News for hackers. Stuff that matters.
Re:How do we read code? by mattmanser on Wednesday December 19, 2012 @07:32AM (#4942276)
That code is jarring to my eye because of the variable name, my eye tracking would keep going back to 'winners'.

Why winners? What a bizarre variable name, to me anyway. Does anyone else use that? I always go with `matches`, `retVals` or `returnValues` depending on the language/IDE I'm using.

Re:How do we read code? by synesthesiam on Wednesday December 19, 2012 @12:35PM (#4943652)
I went back and forth over what to name this variable. I wanted it to convey some meaning (winners are the items that passed or "won" the test), but not give away too much.

Several people have commented on this, however, so I may just change the name to "matches" or something. Thanks for the suggestion :)

Re:How do we read code? by eholk on Wednesday December 19, 2012 @11:34AM (#4943331)
The experiment has several variants of each program. In some cases the names make sense, and in other cases they are just random words. One of the goals is to measure how much choosing good names matters.