|
|
|
|
|
by commanda
4924 days ago
|
|
I helped the author edit this post for clarity, but it took all I had not to argue with him because I strongly disagree with his thesis. My main language (Objective-C) is relatively less readable (compared to his main language of Python), and I would absolutely not be able to function in a team, or even with code I'd written myself over a week ago, without heavy commenting. I do believe he's right though with respect to test coverage being effectively a runnable comment or explanation of how a particular module works. However, to me at least, tests are no more readable than the source code itself, so I still rely (and implore my teammates to rely) on heavily commenting their code. Especially when dealing with inscrutable things like OpenGL code. |
|
God help the guy who rips out a seemingly innocuous line of code only to subtly break things underneath. Even a simple:
saves hours of lost productivity.We can get rid of comments the moment we invent a perfectly expressive language, where every single line of code in your entire stack is under your control and everything works exactly as advertised out of the box.
Until then, I'll keep commenting where I need to, and never when I don't.