4 ms·
>since if it all worked like its commented then there'd be no bugs. Unless it is no longer supposed to work how it was originally written and commented. Softwa
by nickolai 15y ago
>since if it all worked like its commented then there'd be no bugs.
Unless it is no longer supposed to work how it was originally written and commented. Software lives and evolves over time. All too often comments go stale. When the Big Bug Day comes, many hours will be wasted on such legacy comments.
- jacques_chester 15y agoAs I understand it, the difference here is that the documentation is actually tested automatically. I believe Python has a tool like this too. Edit: or maybe not, I can't see mention of it on tomdoc.org. However the format lends itself to that. For contrast, the D language allows inline tests.
- GFischer 15y agoAt some of the more orderly places I've worked, we put dates on comments. Also, whenever we made a change, we put a comment (at the top of the class, function, method or whatever is changed), also timestamped, with a reference to the change request ticket (or equivalent), and a summary of the change. Old comments were deleted if necessary (you could always look them up with a diff on the source control) Said ticket also had a reference to the code file :) so you had 100% traceability. The downside being of course it was all very bureaucratic, but there were legal requirements to fill and it was a sensitive, finance sector company. That setup probably wouldn't work for a fast-paced startup :)