in reply to Re^2: An Introduction to Literate Programming with perlWEB
in thread An Introduction to Literate Programming with perlWEB

If you go so far as to say that you don't want to work with programmers who can talk about self-documenting code with a straight face, then you are going to pass up working with a lot of good people. Like me.

On the subject of documentation and code, I am a big believer in limiting what you document about your code. That does not mean eliminating documentation! But my attitude is that documentation exists for people who do not need to read my code, which in practice means that the public API and important data structures (particularly database tables) need to be documented, and sometimes you need an introductory document or three. What documentation does not exist for is helping people to understand my code. If I need that then I have at least one problem, and if I use documentation to solve it then I have just added another.

By reducing the amount I document, I avoid a lot of potential mistakes. Furthermore things that I think should be documented, like APIs, are things that you shouldn't be changing in your code without thinking through potential impacts anyways. So asking a person to go and document those changes makes perfect sense. If you stay consistent about what gets documented, when, then in my experience maintaining that documentation isn't too big a deal no matter where it is. And I personally find that documentation to be more readable and consistent when it is kept in one place.

Even so, documentation will be less reliable than code. But by limiting where I make my mistakes, I know to focus on those potential problem areas. This compensates reasonably well. Since I only need to maintain that vigilance some of the time, it is easier than if I had to think about it more often.

  • Comment on Re^3: An Introduction to Literate Programming with perlWEB