--
You received this message because you are subscribed to the Google Groups "Java Posse" group.
To view this discussion on the web visit https://groups.google.com/d/msg/javaposse/-/NfzND7O7M4YJ.
To post to this group, send email to java...@googlegroups.com.
To unsubscribe from this group, send email to javaposse+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/javaposse?hl=en.
I had a discussion very recently within my company regarding the source code produced and that it has almost no comments in it. I was told quite confidently by the developer I spoke to that this was a deliberate company decision and that the code should be clear enough that no comments were necessary. Also it was said that the code and methods were changing so often that it would just be painful overhead to keep JavaDoc comments up to date.I understand the principle of trying to make code self documenting and clear enough so that it does not need lots of documentation. I am not sure however how I feel about the idea of using this argument not to add much of any comments at all. Am I just not with the times or Agile enough?What are your thoughts?
--
--
You received this message because you are subscribed to the Google Groups "Java Posse" group.
Interesting... That summary makes me revisit my own opinion :)
I've now court it down to this: Document INTENT, don't document details that can (and should) be intuitive from reading the source code.
I've seen this tactic before, and it *does* work.
If you can't comment trashy code to explain it, then you find yourself refactoring more to make it explain itself. The policy is most effective when used in an environment that practices code reviews and/or pair programming.
--
You received this message because you are subscribed to the Google Groups "Java Posse" group.
To view this discussion on the web visit https://groups.google.com/d/msg/javaposse/-/DBxX-1OArV4J.
--
You received this message because you are subscribed to the Google Groups "Java Posse" group.
To view this discussion on the web visit https://groups.google.com/d/msg/javaposse/-/NfzND7O7M4YJ.
On Sat, 18 Aug 2012 15:28:07 +0200, Graham Allan <grundl...@gmail.com> wrote:Also, there's a thing to clarify. "Unnecessary" means "zero" and I'd give a very different response if we're talking about "zero comments" or "a few comments".
On 18 August 2012 13:47, Cédric Beust ♔ <ced...@beust.com> wrote:
[snip]
Anyone who tells you that comments
are made unnecessary by good code has probably never worked on anything else
than solo or toy projects.
My experience tells me that certain coding practices render comments
unnecessary, under certain circumstances.
Your experience tells you that with other practices comments pull
their weight, under certain, different circumstances.
Please, let's avoid the ad hominem "anyone who disagrees must be doing
something trivially easy" argument.
--
You received this message because you are subscribed to the Google Groups "Java Posse" group.
To view this discussion on the web visit https://groups.google.com/d/msg/javaposse/-/i2z1vWqk8aEJ.
I guess we were talking at cross-purposes. I was thinking more of internal APIs, the kind used by one group of developers possibly in the same source as the application they're working on. There at least, the documentation tends to be worth far less than the code it attempts to document, not least due to braindead IDEs generating crap like the following:
/**
* TODO To change this template go to File | Settings | Templates
*
* @param name
* @param age
* @return
*/
The actual useful gems of documentation get lost in generated or hand-written nonsense.
For better-documented projects such as Spring or Guava, sure, I'm less likely to actually read the source but I am quite fond of opening it and then using IDEA's normal code navigation keys instead of googling for the API, finding the right version and then navigating the poor frameset that javadoc still spits out.
--
You received this message because you are subscribed to the Google Groups "Java Posse" group.
To view this discussion on the web visit https://groups.google.com/d/msg/javaposse/-/16wkU2jpA1QJ.
To post to this group, send email to java...@googlegroups.com.
To unsubscribe from this group, send email to javaposse+...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/javaposse?hl=en.
--
You received this message because you are subscribed to the Google Groups "Java Posse" group.
To view this discussion on the web visit https://groups.google.com/d/msg/javaposse/-/_lv6WT34QoIJ.