News for hackers. Stuff that matters.
Re:How to read code by eru on Sunday July 04, 2010 @03:54PM (#1486250)
> Loops are the source of all evil[.]

That's why I prefer languages without loops.

Re:How to read code by tkahn6 on Sunday July 04, 2010 @10:43PM (#1487025)
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 :)?

Re:How to read code by SkyMarshal on Monday July 05, 2010 @02:10AM (#1487446)
That's what I assumed when I upvoted him. Recursion & lambda ftw.
Re:How to read code by eru on Tuesday July 06, 2010 @05:49PM (#1492514)
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.

Re:How to read code by telemachos on Sunday July 04, 2010 @11:03AM (#1485776)
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

Re:How to read code by mifrai on Sunday July 04, 2010 @01:07PM (#1485954)
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.

Re:How to read code by omergertel on Sunday July 04, 2010 @11:21AM (#1485793)
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.
Re:How to read code by kenjackson on Sunday July 04, 2010 @01:27PM (#1485982)
As well as the bug in the loop... there also appears to be a bug in the printf statement.
Re:How to read code by CountHackulus on Sunday July 04, 2010 @11:38PM (#1487146)
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.

Re:How to read code by kqueue on Sunday July 04, 2010 @12:04PM (#1485854)
lost interest reading it when I saw void main(void).

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