a thoughtful web.
Good ideas and conversation. No ads, no tracking.   Login or Take a Tour!
comment by thundara
thundara  ·  4279 days ago  ·  link  ·    ·  parent  ·  post: Yes, your code does need comments.

Personally, at the very least, I think programmers should document their code in some way. This can be anything from a write-up of its overall design if it's going to be left to another programmer, or python / Java docstrings so you can take advantage of the many IDEs/IDLEs that can show you that information on the fly. Comments, at the bare minimum in this case might mean noting places where you are doing something out of the ordinary (Portability provisions, dealing with library quirks, etc)

More than that? You'll probably benefit in the long run, but many projects are under time constraints or aren't meant to last.





user-inactivated  ·  4278 days ago  ·  link  ·  

    many projects are under time constraints or aren't meant to last.

Any yet they do. There is an awk abomination I wrote for converting IRIS GL programs to OpenGL 1.mumble in the mid-2000s to aid friend in the chemistry department in migrating some software off of Irix on EOL'd SGI boxen. It was supposed to be a one-off. It is still in use, because they didn't want to bother learning a new API. They just added make targets to run the conversion. I don't know, but strongly suspect, that there are poor abused graduate students who would have appreciated a few comments in there.