Source code with character
Par Emmanuel Deloget, mercredi 28 février 2007 à 12:00 :: Expériences :: permalien #57
Tags: fun
La version Française de ce billet est ici.
While waiting tomorrow's ticket about the Liskov Substitution Principle, I make this wonderfull piece of code I recently found on the system I work on available to you. And I'm pretty sure that, like me, you'll have hard time to find any kind of justification for this.
if (i == 0) element->address[0] = '1'; else if (i == 1) element->address[0] = '2'; else if (i == 2) element->address[0] = '3'; else if (i == 3) element->address[0] = '4'; else if (i == 4) element->address[0] = '5'; else if (i == 5) element->address[0] = '6'; else if (i == 6) element->address[0] = '7'; else if (i == 7) element->address[0] = '8'; else if (i == 8) element->address[0] = '9'; else if (i == 9) element->address[0] = '10';
I suppose we can agree that the author was a bit tired...[1].
Notes
[1] no, it's NOT me.
Commentaires
Aucun commentaire pour le moment.
:: Fil rss des commentaires de ce billet ::
Ajouter un commentaire