4 ms·
For me, the beauty is when it is apparent on the first sight what the code does. This is just the opposite of beauty (in my eyes :-)).
by greyman 10y ago
For me, the beauty is when it is apparent on the first sight what the code does. This is just the opposite of beauty (in my eyes :-)).
- marcosdumay 10y agoThere is more to code than legibility. In general, the priorities are correctness, legibility, legibility, a few hundred more times legibility, then stuff like performance, memory usage, binary size, predictability, etc. But this is C. C is used on a wide diversity of contexts, and on some of then the order above changes.
- gpderetta 10y ago... except when performance, memory usage, binary size, predictability are part of the correctness requirement (which is most of the time in the areas C is used).
- Sanddancer 10y agoWhen dealing with embedded stuff, you don't always have the luxury of code at first sight. Sometimes you have to write ugly code like this code does, sometimes you have to roll your own print statements because using printf pulls in a few k of code, sometimes you have to use a uart running at 600 baud to get a 60 hz timer. Of course, when you start going down the path of interesting, it's always best to write lots of good documentation to go with the cleverness, so people understand what's going on.