Hacker News new | past | comments | ask | show | jobs | submit login
How to read code (omergertel.com)
52 points by omergertel on July 4, 2010 | hide | past | favorite | 11 comments



> Loops are the source of all evil[.]

That's why I prefer languages without loops.


That's interesting. I can't tell if you're joking or not (I'm pretty sure the ability to loop is a requirement for Turing-completeness).

Do you mean like Lisp which favors recursive function (or lambda calculus which uses the Y-combinator :)?


That's what I assumed when I upvoted him. Recursion & lambda ftw.


Indeed, I was aiming at recursion. (Though I mostly use combinators like foldr instead of naked recursion.)

On the other hand: You can see loops as a special case of recursion. Though I like languages that don't treat this special case as a special case.


He mentions the small sample size (5 people) as a negative, but I wonder if this situation fits Jakob Nielsen's arguments about testing smaller groups.

http://www.useit.com/alertbox/20000319.html


Jakob Nielson argues that, specifically in usability testing, 5 people gives you a majority of your flaws but not the entire picture - where ~15 people would give you that. That is to say, more is better but there is diminishing returns. Given this, he argues that rather then expending resources to gather the entire picture for a single iteration, it's even better to test 3 sets of 5 people with design improvements between each set.

I think this argument is slightly different than just saying 5 people is enough for any sort of study. I still would have liked to seen more people. Or at least additional studies with modifications to inspect or confirm specific aspects of their findings.


I actually approve this argument. My personal experience also shows that usability testing can be done with very few people at a time, over many iterations. Obviously, this is not a universal rule. It's useful for practical usability testing, but not for testing all cognitive processes. Perhaps, if the variations are small enough, it may be sufficient.



As well as the bug in the loop... there also appears to be a bug in the printf statement.


Can't believe I missed that, but you're entirely correct, that second %d doesn't map to anything.

Guess loops aren't the source of ALL evil.


lost interest reading it when I saw void main(void).

Reading code needs patience and getting used to the coder's style.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: