• Gary Varga (11/16/2015)


    call.copse (11/16/2015)


    I seem to spend half my life trying to drill this into various devs from multiple angles. It's often hard to maintain my equitable visage but of course always strive for such. When you have finished writing this procedure have a cup of tea, come back and write a comment explaining the various clauses - please, I say. Explain what your intent was in case the code does something a little different. Occasionally this works.

    I ask (read demand) that the comments are written BEFORE any code. Capture ones intent then execute it.

    Comments added afterwards tend to capture what the code says not what the coder was attempting. This makes it more likely that the comments are superfluous duplication of the code adding little to the understanding.

    Either ways is polite. Neither way is just rude.

    Good thinking Batman - like writing tests before code I guess. I'll give it a try!