|Perl Monk, Perl Meditation|
What is your practice for code documentation?by ady (Deacon)
|on Jun 25, 2008 at 16:56 UTC||Need Help??|
Reading the thoughts by on Arnon Rotem-Gal-Oz on Code Readability: Documentation vs. Refactoring , I think he hits the argument on the head and drives it right home.
Currently I do most of my code development in .NET C#, using an autmated build cycle I've set up including unit-tests and coverage (which is an enormous benefit) and automatic generation of code documentation (HTML, extracted as ///code comments by Sandcastle), -- but I must admit that though our project is now 6 months down the road, I don't think that any of the developers in the project have looked at the extracted documentation more than once.
I thus agree with Arnon (on autogenerated UML and code-doc), that:
What I think is that while both of these efforts can help satisfy a customer-specific requirement for "comprehansive documentation" they have very little value in making anyone understand anything about your code. UML diagrams can only help if they are created at a higher level of abstraction than the code (which means they'd be hand-crafted) and if GhostDoc can understand your code enough to create anything useful, it means that your method and parameter names are self-descriptive anyway.
Now, I don't have extensive experience with autogenerated code documentation in Perl, apart from 'high level' POD-pages for reusable modules as exemplified by the docs on CPAN). But the discussion of putting your code documentation effort into comments (for extraction) vs. refactoring still seems relevant. I would be interested in your experiences and thoughts on this.
Update: Ouch, I should probably have posted this to the Meditations section, -- feel free to move it!