News for hackers. Stuff that matters.

contiver

Re:The bunny theory of code on Monday May 18, 2015 @10:30AM (#9564629)
Sounds a lot like the broken windows metaphor from "The pragmatic programmer". Still, it's nice to have another one.
Re:Seven Ineffective Coding Habits of Many Programmers on Friday April 10, 2015 @08:31PM (#9357868)
I think he is right on most stuff. I don't really like curly braces on their own line though, kinda separates the code too much unnecessarily.

But it's also harder to stay below the 80 cols on such a verbose language as java, I sometimes feel it's better to just ignore it and place everything in a single line (if it's greater than around 110 charecters then you really need to split it or refactor something).

In C at least it's idiomatic to place qualifiers and return types in their own line, leaving more space for the rest of the function signature, or you could code in a less noisy language like Haskell too.

Re:Ask HN: Should I use K&R to learn C? on Tuesday April 07, 2015 @02:00PM (#9335834)
I feel K&R is an important classic from which one can still take a lot of valuable jewels in a pretty concise way. If possible, complement it with other books like Peter van der Linden's Expert C programming (although I don't like his opposition to static linking).

If possible, check the suckless.org projects, they tend to have pretty idiomatic and clean source codes.