Il court, il court

Il est passé par ici, il repassera par là

Bad example – part 5 August 12, 2010

Filed under: work — ilcourtilcourt @ 08:09

I for one prefer to use parenthesis for return, I find it easier to read

The argument to the return statement is in parentheses. This seems to be a popular construct, which I simply do not understand. What benefit do the parentheses confer? To those that ask what harm are they doing, then I would suggest that they make the code harder to read.

via Setting a bad example – part 5 « Stack Overflow.

Advertisements – The Use Of Assertions February 11, 2010

Filed under: work — ilcourtilcourt @ 11:40

The Linux kernel sports just one thousand invocations of the macro in three million lines of code, an assertion density of just one per 3KLOC.

Historically, though, there’s been little good evidence they are effective. Till now. In a paper from Microsoft Research the authors compared the relationship between the density of the assertions and code quality.

via – The Use Of Assertions.


Embedded Systems Design –

Filed under: work — ilcourtilcourt @ 11:24

This code stinks!

At a recent Embedded Systems Conference, I gave a popular free talk titled “This Code Stinks! The Worst Embedded Code Ever” in which I used lousy code from real products as a teaching tool. The example code was gathered by a number of engineers from a broad swath of companies over several years.2

via Embedded Systems Design –


Converting from Mercurial to Git February 10, 2010

Filed under: work — ilcourtilcourt @ 11:22


It’s a relatively simple process. First we download fast-export (the best way is via its Git repository, which I’ll clone right to the desktop), then we create a new git repository, perform the migration, and check out the HEAD. On the command line, it goes like this:

cd ~/Desktop

git clone git://

git init git_repo

cd git_repo

~/Desktop/fast-export/ -r /path/to/old/mercurial_repo

git checkout HEAD

via Hivelogic – Converting from Mercurial to Git.