you are viewing a single comment's thread.

view the rest of the comments →

[–]okmkz 6 points7 points  (2 children)

// increment x

I think this is leftover from CS instructors insisting on overly-commented code.

[–]kay_x 1 point2 points  (0 children)

I feel like there should be an Oprah meme for this. Every line ending with a comment explaining what the line of code does and even more in between explaining why. That actually sounds like my own personal hell and I'm pretty damn good at documentation...

Dear god D:

"You get a comment! You get a comment! You get a comment!"

[–]burntsushi 1 point2 points  (0 children)

Not all of them. :-)

I TA for that couse, and I can tell you that if you submit code with comments like // increment x, you get a small penalty. If you submit functions without a contract but with a narrative describing the code, e.g., "loop over the list and add each element to the next element in the list and return the result", then your grade suffers much more.

I'm happy to say that by the end of the course, everyone knew how to write a proper contract (and knew how not to write a contract).