News for hackers. Stuff that matters.
Re:1-star reviews of 'Extreme Programming' by jheriko on Thursday December 19, 2013 @12:41PM (#6936229)
thanks for the detailed reply, this is an example of an 'okay' comment, but its still not really needed imo. you can fix this with variable and function names:

function disambiguateRecordsByGroupID() {

    recordsSortedByTime = Data.load()

    results = recordsSortedByTime.map(function(record) { return record.timestamp })

    print(results)

}
Re:1-star reviews of 'Extreme Programming' by yongjik on Thursday December 19, 2013 @01:18PM (#6936503)
ExceptThatNobodyWantsToTypeDisambiguateRecordsByGroupID20Times. (No, IDE can only help you so much. You still lose valuable screen estate for browsing source code when we have excessively long names.)

Not to mention you only captured half of the parent's comment (the "why" of the function), so it should really be something like disambiguateRecordsByGroupIDBecauseRecordsAreAlwaysSortedByTime.

Re:1-star reviews of 'Extreme Programming' by jheriko on Friday December 20, 2013 @05:01AM (#6940712)
yeah, i missed a whole line of code as well :)

there should probably be a reasonable limit to the length of a name... the IDEs are great, but even without them copy-paste is pretty universal and safe for identifiers.

Re:1-star reviews of 'Extreme Programming' by pseut on Thursday December 19, 2013 @04:12PM (#6937916)
To get rid of comments, you've now hard-coded the algorithm into every call to `disambiguateRecordsByGroupID`. What happens if something changes and you need to disambiguate records by something other than group ID? It seems like a short comment is a pretty small price to pay for some additional robustness.
Re:1-star reviews of 'Extreme Programming' by ryan-thompson on Thursday December 19, 2013 @05:25PM (#6938376)

  records.SortedBy(:time).DisambiguateBy(:group_id)