Do I know you?

Dear Mike,

I suppose you have read my blog post about cold-calls I regularly receive from recruiters. Or perhaps you haven’t, as you’ve only seen my CV few minutes before sending your e-mail, as you admitted. Anyway, even if you did, I’ll try to help you understand what I meant.

To tell you the truth, I found the job posting utterly and completely boring. Why don’t you give some material to your client on how to write attractive job descriptions? There are plenty of close-to-identical offers. Why would I care about that one?

For example, have them look at my public repositories and ask them to tell me what they like and don’t like about it. Get me involved. Show me some code that you think is freaking awesome. Let me know what companies inspire you. Tell me about your culture. Tell me about you.

In the meantime, I’m going to work on these little personal projects that help me stay up-to-date in the software industry and at the same time shows people like your client how I code. Remember: you are actively searching – I’m not.

Cheers,

Nicolas


Do you know me?

Dear Ben,

I’m flattered that you wanted to talk to me about a job offer, and I’m sorry I wasn’t able to talk longer. Here’s a written response that I hope you will appreciate.

Five years ago, I applied for a Java offer by writing to Miss J. from your recruiting firm. The process was not successful, and I accepted an other offer.

Few months later, Miss J. asked if I can refer someone for an Asp.net developer.

Two years later, Miss J. talks with me on the phone. I explain that I am interested in Java development, not .NET. I am not open to new job opportunities at the time.

Nearly a year later, I got a generic job offer from Mr. M. My response asked to be removed from your firm’s mailiing-list.

Last year, I got an invite to join Miss. D. on LinkedIn with a generic message, which I ignored.

Today, a person named Ben calls me during the day, as if I didn’t have a full-time job.

Who are you? Who’s my contact at your firm? Who was Mr. M? Why did Miss. D.? Where’s Miss J.? Why would I want to talk to you now?

Do you know me at all? Did I pop in your search results because I had "Java" in my file? Has someone referred you to me? Have you researched me on the internet, before telling me about that great offer I should not ignore? I have a blog, a Google+ profile, a Facebook profile, Twitter & Diaspora accounts, a LinkedIn profile, a Stack Overflow profile with questions I asked and answered, a GitHub profile with public contributions on stuff that I find exciting, and even Meetup.com account and you can also learn about me by browsing my photos on my Flickr account. There are 38,300 results if you Google me, and there are very few people with the same name. You already know all this, right?
By now, you know what you should do. Master your craft. Once you have enough reasons to believe I may want to talk to you, go ahead introduce yourself, and tell me something exciting. Until then, I’m having a good time with my life, and I hope you do as well.
Regards,
Nicolas (it spells with no "h")

Ubuntu Network Installation with dnsmaq and DD-WRT

The path to get somewhere depends on where you come from, and I often find myself in the situation of having to install Ubuntu without a CD-ROM, on a computer that has buggy or non-supported USB boot. From there, the easy way – I think – is booting from the network, since motherboard usually support PXE.

Booting from the network needs three things:

  • A DHCP server for sending the address of the TFTP server and the pxelinux.cfg file to the DHCP client on the motherboard;
  • A TFTP server setup to serve pxelinux.cfg and the operating system image;
  • The operating system image.

I already have a DHCP server on my home router, and it runs DD-WRT. I had already enabled DNSmasq for DHCP, but I was missing the magic line in Services->Additional DNSMasq Options that tells the motherboard the address of the TFTP server:

dhcp-boot=pxelinux.0,strangebob,192.168.1.123

DD-WRT can run a TFTP server, but that’s a bit complicated. I decided to install dnsmasq on my Ubuntu desktop, because dnsmasq provides, well, DNS, but also a TFTP server.

sudo apt-get install dnsmasq

It also provides a DHCP server, which will be a problem if connected to my home network because it will fight will my DD-WRT DHCP. So I need to disable that and only enable the TFTP server. I modified /etc/dnsmasq.conf to end up with everything commented-out except:

enable-tftp
interface=eth0
tftp-root=/var/ftpd

If fact, it already comes with the DHCP server disabled, because the ‘dhcp-range’ configuration is commented-out by default. I’m specifying the interface because I have more than one network card, and one of them was already busy (used by VirtualBox) and dnsmasq failed to start. Once you’re done with the changes, restart the daemon:

sudo /etc/init.d/dnsmasq restart

You could now try to boot, but the PXE client will complain that it either cannot find a file to boot from, or the mysterious "no boot filename received" message, depending on your firmware. The computer I’m installing has two network cards, and this added a variable to the debugging process, so I plugged both cards in my home switch.

Now this will never work without an operating system to boot. Ubuntu network boot images are available at:

http://cdimage.ubuntu.com/netboot/

Get the right netboot.tar.gz for your target machine, and decompress it in the TFTP server root (defined above in dnsmasq.conf):

sudo tar -xvzf netboot.tar.gz -C /var/ftpd

You should now be able to boot Ubuntu and proceed with the installation.

It didn’t work very well for me. The TFTP client reported it got a response, but then the computer froze. I checked the logs of the TFTP server for clues, and found that the client requested many files, and among them a vesamenu.c32. Knowing that VESA means graphical, my hypothesis was that the crappy video card isn’t supported, so I commented-out the corresponding line from pxelinux.cfg/default and fixed my problem!

As they say, your mileage may vary.


Evaluating Structure101 with Storm

I won a licence for Structure101 at the last Code Retreat, watched introduction videos, and decided to give it a try. I looked for a decent Java project to run it on, and I picked one of the most starred projects on GitHub: storm.

First, Structure101 wants to know where the bytecode is, so I need to compile storm. I look for compile instructions and I find it contains Clojure sources. Since that should compile to bytecode, I take a chance and keep going.

Compiling Storm

I see storm has a project.clj in the top-level directory mentioning lein, so I install leiningen. The latest is version 2, but I need to use version 1, as per the project.clj and the error I get otherwise:

~/storm (master)? $ lein help
ERROR: requires Leiningen 1.x but you are using 2.0.0-preview10

So I type lein compile, but it ends with a failure:

Compiling backtype.storm.messaging.zmq
1 [main] ERROR org.apache.zookeeper.server.NIOServerCnxn - Thread Thread[main,5,main] died
java.lang.UnsatisfiedLinkError: no jzmq in java.library.path, compiling:(zmq.clj:1)

I find bin/install_zmq.sh and execute it, and get:

checking for ZeroMQ… no
checking zmq.h usability… no
checking zmq.h presence… no
checking for zmq.h… no
configure: error: cannot find zmq.h

It turns out the script does not check if commands failed and goes on with the rest. Before that error, zeromq complained about missing uuid-dev, and I `sudo apt-get install uuid-dev`.

This helps, but then jzmq wants to make org/zeromq/ZMQ.class but can’t find the classdist_noinst.stamp "target". It turns out this is a known issue with a simple fix to do in src/Makefile.am. Finally `lein compile` completes.

Creating Structure101 project

I go back to Structure101 and create a new local project, picking Static classpath because I’ll point it to the generated `classes` directory. I choose the Logical breakout because I don’t really care how storm organizes its classes for the moment.

I choose the detailed granularity because the code base is not very big, and I guess I can reduce the amount of detail later if the view looks too cluttered.

For now I’ll hide external dependencies to concentrate on the storm codebase.

No excludes, no additional source files, no transformations.

Project Summary

It takes only few seconds to generate the summary.

Storm Project Size

Storm Project Flat Tangles

It also says "The architecture for this project is not defined". From the text following that note, I understand this is me that needs to define the desired architecture rules that must be obeyed, and which will be used to generate a violations report, possibly viewable in an IDE such as Eclipse or IntelliJ.

Full summary here.

Structure: Exploring Tangles

In the summary, one big tangle that adds Excessive Structural Complexity (XS) is the `backtype.storm` package. Navigating to that package under the Structure tab, from the Package Explorer, I get this:

Dependency graph: backtype.storm

This is the Composition view. The dependency graph shows, at the top, that command, planner, and drpc packages depend on the tangle. At the bottom, the tangle depends on cluster, event, messaging, stats, nimbus, util, and ui. The `generated` package is even lower because it depends on nothing else.

Within the tangle, the first observation I make is that we see both the `backtype.storm` package as well as its subpackages. We can see that classes in `backtype.storm` refer to classes within sub-packages, and vice-versa. This discourages letting a package depend on its parent, where each level in the package hierarchy builts on its leafs.

The reverse of that – leafs depending on its parent – would mean that leafs couldn’t be refered to, other than by a package in a different root package. I see this can lead to interesting discussions, and how enforcing rules can help large teams build maintainable systems.

Back to the diagram, the `tuple` package is clearly a dependency of all other packages. The `utils` package could almost be a leaf, but it has a single reference to the `task` package (going up), although there are 13 references going the other way. This clearly is a smell, and I want to know what is that reference. Highlighting the arrow going up from utils to task, the Dependency breakout pane shows the culprit:

Dependency breakout

It shows that utils.ShellProcess takes a TopologyContext as a parameter. Navigating (with the context menu) to consumers of TopologyContext, I find that it is referenced 160 times from all over the place. This is often what happens with "context" classes: they tend to become a very important holder of state, and it is eventually passed to whoever needs access to any state. As a first step to untangle this, I could move ShellProcess out of utils into its own package, but I can’t find a way to do this in Structure101. This is most likely only possible in Restructure101.

Structure101 also has a standard Class Hierarchy viewer, to which I can navigate from the context menu of any class or interface represented in the dependency graph. For example, here’s `backtype.storm.spout.ISpout`:

Class hierarchy graph: backtype.storm.spout.ISpout

The Good

I feel like I’m navigating classes in Eclipse, but with a bird’s-eye-view. I can see what call what, but instead of jumping from one method to the other, I get lists that interact with my selection in the graph. It feels natural, and lets me explore the code base.

I have been looking at a fairly big project, after all. It is all foreign code to me, so that does affect how fast I can learn to use Structure101 effectively. I’d be interested to use the tool for a new project, seeing the dependencies evolve and provide architectural feedback during development. This introspection would certainly help me understand how to write without tangles from the start.

I have not tried to define an architecture diagram, but I can see how defining a target architecture can be useful in identifying tiny steps to get toward the goal. Moving classes around is relatively easy with a good IDE, but if I was to reduce the dependencies on the TopologyContext class, for example, I would need to keep track of that over a long period.

The Bad

Clojure generates many classes. This makes the experience of looking at class dependencies a bit difficult for that part of the code. However, the navigation and display shows packages first, hiding them unless they are part of a tangle.

Getting the most of the tool requires a bit of reading and trial and error. With experience, key observations would be faster to extract.

The Walkthrough guide refers to an older version of Structure101, and is difficult to follow. The user interface has changed, and there are dead links.

The right-click menu is broken, at least on the latest Ubuntu 12.10. The menu pops, but the mouse does not hightlight the items. Using the keyboard to navigate the contextual menu works, though.

I wish there were more keyboard bindings. Using arrows, enter, space, and context menu would help.

Verdict

I won’t stop here. I’ll try Restructure101 to resolve problem I see in dependencies, in a "what if" mode of exploration. And the next step would be to use it on code I own and know well.

This is not something I would tell everybody to install, as the US$600 price tag is prohibitive for individuals – Restructure101 is even more expensive. The 30-day trial version can be useful for spot architectural work, but I’m glad I won a licence, as this will give me the opportunity to try it with various projects over a longer period of time.


Télécharger Le Devoir sur une liseuse numérique

Possédant maintenant une liseuse de livres numériques (un Sony e-reader, pas un Kindle!), j’ai cherché comment ajouter le journal Le Devoir à ma liseuse. J’ai cherché un logiciel de gestion de livres électroniques pour Ubuntu Linux, et je suis tombé sur l’excellent logiciel Calibre.

Une fois Calibre lancé, allez ajouter une source de nouvelles:

Dans la liste, vous trouverez Le Devoir dans la rubrique Français:

Vous pouvez alors demander à Calibre de télécharger automatiquement votre journal tous les matins. Comme ça prend plusieurs minutes, c’est pratique que ça soit déjà fait quand on branche la liseuse numérique, car il ne reste qu’à transférer le journal vers votre liseuse. Et si vous laissez la liseuse branchée pendant la nuit, alors le journal est automatiquement ajouté à celle-ci.

Le matin, vous pouvez alors vous lever, débrancher la liseuse, et boire votre café.

Si, comme moi, vous êtes abonnés à la version payante du journal, cette recette ne vous donnera pas accès à tout le contenu. Pour ce faire, il vous faut faire une petite pirouette que je vous décris ci-bas.

Pour les abonnés à la version payante

Comme Calibre ne vient pas avec la "recette" pour récupérer le journal payant, il vous faut la récupérer. Copiez la recette que vous trouverez à ce lien dans votre presse-papier (CTRL-C), en cliquant préalablement sur "raw":

https://gist.github.com/766816

Revenez à Calibre, et ajoutez une source personnalisée de News:

Collez la recette en basculant dans le mode avancé:

Enfin, planifiez le téléchargement de votre recette personnalisée:

Dans la rubrique "Personnalisé", vous retrouverez votre recette "Le Devoir (abonnement)", où vous devez entrer votre courriel et mot de passe pour le site ledevoir.com:

Bonne lecture!


Hoé! Hoé! Cyclistes de Montréal!

À chacun son vélo, par Clara (sur Flickr)
Photo: Clairette Paquette

Bonjour à tous!

Au retour de mes vacances, j’ai été frappé alors que je circulais en voiture. Je circulais sur l’autoroute 40, direction est, à la hauteur du parc industriel, et je suis tombé dans la lune en regardant défiler le paysage. Ma blonde étant au volant, il n’y avait rien de dangereux. Après avoir traversé des régions entières rasées pour faire pousser du maïs, j’ai été ensuite frappé par l’absence de végétation, la grandeur des stationnements, le smog et la déchéance de l’espèce humaine.

Si je suis tombé en amour avec la ville, c’est assurément à cause du vélo, qui m’a fait visiter les plus jolis coins de la ville, là où on se sent en sécurité, et là où la bonne humeur s’entend. Dix ans plus tard, je veux me bâtir une remorque pour aller à l’épicerie, située à quelques coins de rue de chez moi, pour éviter d’ajouter une voiture à la circulation, et m’imprégner de l’atmosphère du quartier. Car de l’espoir, j’en ai à revendre!

Depuis que j’ai découvert Masse Critique, j’ai une raison de plus d’aimer la ville: je visite Montréal à vélo, en sécurité parce qu’il n’y a pratiquement pas de voitures, et je peux même faire connaissance avec toute sortes de personnes! Le succès de cette sortie est proportionnel au nombre de participants, alors j’envoie ce rappel:

Masse Critique aura lieu ce vendredi 28 août. Le rendez-vous est à 17h30 au Square Phillips, et le départ a lieu à 18h00, à vélo, planche à roulette, patins, échasses, ou ce que vous voulez. C’est comme ça tous les derniers vendredi du mois. Il n’y a pas d’organisateurs, et je ne fais que passer le mot.

Les habitués devraient se faire un devoir d’inviter tous leurs amis, et tous les Facebookiens savent comment écrire "Je VAIS à Masse Critique ce vendredi! Viens-tu avec moi?" Faites passer l’invitation!

http://massecritiquemtl.org/


Quel parti pour les citoyens de Montréal?

En novembre prochain, des élections auront lieu à Montréal, et les accomplissements de Gérald Tremblay et son équipe seront comparés aux promesses de Louise Harel et de Projet Montréal. Je vais donc faire ici ma petite analyse à moi.

Comparons premièrement les chefs.

Gérald Tremblay a étudié en droit, est titulaire d’une maîtrise en administration des affaires (MBA), et fut élu député au provincial avant de se faire élire à la mairie Montréal.

Louise Harel a étudié en droit et est élue députée puis devient ministre, pilote notamment le dossier visant à réduire le nombre de municipalités au Québec, après quoi elle se lance au municipal.

Richard Bergeron est urbaniste, a travaillé à l’Agence métropolitaine des transports (AMT) de Montréal, après quoi il fonde le parti Projet Montréal et se fait élire comme conseiller dans l’arrondissement du Plateau Mont-Royal l’année suivante.

Vous en conviendrez, ce résumé est plutôt objectif. Maintenant, laissez-moi vous dire ce que j’en pense. Comme citoyen de Montréal, et pour améliorer ma qualité de vie, je fais plus confiance à un urbaniste pour qu’à des gens qui ont étudié en droit.

Parlons maintenant de démocratie.

Gérald Tremblay, chef du parti "Union des citoyens et citoyennes de l’île de Montréal" a changé le nom de son parti pour quelque chose de plus simple, et qui réflète bien sa conception de la démocratie: il a rayé les "citoyens et citoyennes" pour l’appeler plus justement "Union Montréal".

Louise Harel, depuis qu’elle a forcé des villes à fusionner sans consulter les citoyens, ne représente pas très bien ce qu’est la démocratie. De plus, on apprend avec la démission de la vice-présidente de Vision Montréal que Benoit Labonté, sans aucune consultation de son exécutif, cède sa place à Louise Harel. Si le parti n’est pas capable de démocratie à l’intérieur de lui-même, consulterait-il vraiment la population?

Le parti politique fondé par Richard Bergeron est basé sur les principes de démocratie. Le programme électoral a été bâti démocratiquement par des centaines de citoyens. Dans Plateau Mont-Royal, le conseiller a travaillé pour mettre en place un budget participatif permettant aux citoyens du plateau de disposer de millions de dollars pour des projets de leur choix, chose que la mairesse tente depuis d’arrêter en réduisant le montant affecté.

À Vision Montréal, un budget participatif c’est bien, mais "ça coûte trop cher", selon Anie Samson, mairesse de Villeray-Saint-Michel-Parc Extension. Pourtant, la démocratie ne devrait pas s’appliquer seulement quand c’est rentable.

On voit bien ici que c’est Projet Montréal qui fait avancer la démocratie, et les deux autres partis qui suivent péniblement, en réalisant qu’ils perdent la face devant leur électeurs. On pourra compter sur eux pour reprendre les idées de Projet Montréal en les dénudant de tout leur sens, comme de réduire le budget participatif…

J’ai grand espoir que Projet Montréal emporte les élections en novembre 2009, mais avec un taux de participation de 30%, c’est impossible. Si les citoyens ordinaires connaissaient Projet Montréal, ils iraient voter, car c’est la solution au cynisme et l’antidote du désintéressement.

Tremblay et Harel, c’est du pareil au même: décisions faites en secret, consultations et analyses éternelles, corruption, favoritisme, magouilles, et conception arriérée de l’urbanité.


Suivre

Recevez les nouvelles publications par mail.