in reply to Commenting One's Code In A GNU/GPL/OpenSource World

As I read it, your argument is based on two premises which don't necessarily (or even usually) hold:

  1. Open-source code's primary purpose is to help programmers learn.
  2. Comments hinder the learning process, because they give away information that would be better learned the hard way.

To the first premise: IMHO, open-source code is made open-source mostly to give people good tools that they otherwise wouldn't have access to, and if the code does mostly what they want it to, to give them the chance to modify it to do exactly what they want it to. If they learn something in the process, that's great, but the point is accessibility. So if you make open-source code harder to modify (by taking out the comments, for instance), you're defeating part of its purpose (the easy-to-modify bit).

To the second premise: depends what you want to teach. I'm going to learn more, and faster, about the language, or other back-end libraries, if I have to dig through the documentation to figure out how stuff works. On the other hand, if I'm trying to learn an algorithm, I don't want to get tied down to the details of just how each step works, because I'll lose the forest for the trees.

I don't think your argument's necessarily wrong, just a bit broad in scope. And thanks for bringing it up; I've enjoyed reading this thread.

--
:wq

  • Comment on Re: Commenting One's Code In A GNU/GPL/OpenSource World