|
a big Bronx Cheer if you are using Doxygen, just saying.
~d~
|
|
|
|
|
I do not believe that function needs any documentation as the function name and argument names are self explanatory as they should be. In my own work I rarely document for that reason. Also I am lazy
|
|
|
|
|
I've been called out in meetings and *thanked* for writing comments. We have a fairly high turnover rate where I work, and knowing that, I comment pretty much everything I do, not so much as the "what", but more the "why" of code. I also comment as if the person coming in behind me is fairly new at being a programmer.
I've actually gotten letters of commendation for my "drive towards more maintainable code".
Good comments are worth the effort and the clutter that necessarily comes with them.
We don't use Doxygen,
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
Perhaps, now you have some influence, you can convince your employer and team to use Doxygen -- take your code to the next level.
~d~
|
|
|
|
|
I'm a contractor. I have no influence.
".45 ACP - because shooting twice is just silly" - JSOP, 2010 ----- You can never have too much ammo - unless you're swimming, or on fire. - JSOP, 2010 ----- When you pry the gun from my cold dead hands, be careful - the barrel will be very hot. - JSOP, 2013
|
|
|
|
|
|
Amen. I nix'd using Doxygen for that very reason -- a screenful of tags for a 5 line function. It makes visually scanning the codebase a nightmare. Better to just document stuff in a separate file -- wiki, markdown, HTML, Word doc, whatever.
|
|
|
|
|
Doxygen is fine - its actually a great way of automatically annotating code to make a hyperlinked bundle that you can explore in a web browser. However, insisting on commenting every single class, method and parameter is certainly a waste of time IMHO when self-documenting code is in play (as it should be).
|
|
|
|
|
YES TO THIS. All of my this.
Real programmers use butterflies
|
|
|
|
|
Agreed. I have an intense dislike for over-commenting. I'll quote something Dan Saks, one-time Secretary of the ANSI/ISO C++ Standard Committee, said in a C++ class he taught at my employer:
"If at all possible, say it in code. Otherwise, say it in a comment."
I've followed this advice ever since. Careful naming eliminates most of the "what is this?" sort of comments that a lot of people write. If I'm implementing a specific algorithm or to a particular specification, I'll include that information in a comment. I despise text-mode graphic comments with cutesy graphics or anything of that crap. The only exceptions are I do occasionally use 'dividers' like this:
to partition logical sections of the code or declarations. We also have a change list tool as part of our automatic build process that constructs a change history correlated by version based upon comments in the source code.
Software Zen: delete this;
|
|
|
|
|
|
I know it's not ideal, but I enjoy technical writing, and I prefer to give my code the full treatment by way of articles. It is better than not doing, and it's more likely that I skip it if I hate doing it.
Real programmers use butterflies
|
|
|
|
|
I, too, like technical writing! It is like having a code review and training others. If you try to think like the reader and ask the questions that he/she/it would ask, it often highlights ambiguities and holes and missing features and redundancies.
|
|
|
|
|
It's much better to write the documentation with the aim of saying why you are doing something rather than just what. How many times have you seen something like the ultimate useless comment, "// Loop through the list"?
Doxygen is very clever in it's way but still basically useless.
- I would love to change the world, but they won’t give me the source code.
|
|
|
|
|
Same thing with a tool one of my colleagues was trying to push on us to "document" our SQL Server databases a few years back. Whatever it can create automatically, is not documentation. And what could it possibly do which we can't do better ourselves?
|
|
|
|
|
The main thing I use doxygen style stuff with doc comments for is in C# I can force my compiler to error out if I haven't commented a public method. I don't care about the XML doc file it generates.
Real programmers use butterflies
|
|
|
|
|
Sometimes management forces you to write documentation - documentation that nobody ever will read - so you use a tool to pump out a steaming mound of pulp, show it to management, and move on.
The point is: Know your audience.
|
|
|
|
|
Doxygen was documentation in the 1990s, before your IDE could show you all the classes in your project, and you had to have paper documentation. Not so much today.
Doxygen is not documentation if you don't use Doxygen comments to at least say what function args mean, but rely exclusively upon what Doxygen finds by itself, again because your IDE already does that.
|
|
|
|
|
The problem isn't doxygen, the problem is people thinking that using such a tool creates useful documentation all by itself.
If you can't come up with sensible comments at the right places, sensible function and variable names, and clean code, then no tool in the world will magically turn that code into well documented code!
GOTOs are a bit like wire coat hangers: they tend to breed in the darkness, such that where there once were few, eventually there are many, and the program's architecture collapses beneath them. (Fran Poretto)
|
|
|
|
|
Stefan_Lang wrote: The problem isn't doxygen, the problem is people
I never blame the tool, only the people using it (except if the tool doesn't work properly, but Doxygen does).
GCS d--(d-) s-/++ a C++++ U+++ P- L+@ E-- W++ N+ o+ K- w+++ O? M-- V? PS+ PE- Y+ PGP t+ 5? X R+++ tv-- b+(+++) DI+++ D++ G e++ h--- r+++ y+++* Weapons extension: ma- k++ F+2 X
|
|
|
|
|
star couple discard constellation (8)
|
|
|
|
|
Is is asterisk ?
"I didn't mention the bats - he'd see them soon enough" - Hunter S Thompson - RIP
|
|
|
|
|
|
Perhaps Obelix? Getafix?
Nah ... it's Dogmatix!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!
|
|
|
|
|
I think you know the answer is no.
|
|
|
|