News for hackers. Stuff that matters.
Re:One hiring filter that works by pilom on Friday April 06, 2012 @11:10AM (#3807397)
Your first comment should say "until its equal to h" not z
Re:One hiring filter that works by Tyrannosaurs on Friday April 06, 2012 @11:19AM (#3807446)
Shouldn't it say until it ceases to be less than h?

Your comment supposes that the loop will increment without interference. While you'd hope that was the case, it's not necessarily true.

Obviously with the loop as coded your comment is correct (that'll be the first condition that terminates the loop) but it could raise a question about whether comments should reflect the routine as written or just the section they're immediately referring to.

Or indeed whether comments for something so self evident are even useful or necessary... Something I'd definitely ask in an interview if I was presented with this code, not looking for a specific answer, just looking for some indication that the candidate had (or could come up with) some vaguely informed thoughts on the subject.