afuna: Cat under a blanket. Text: "Cats are just little people with Fur and Fangs" (Default)
afuna ([personal profile] afuna) wrote2009-05-11 12:19 pm

Whooo, Javadoc

The one thing I love about JavaDoc is that it starts with two stars. Makes it look special (and, in Eclipse, blue).

The things I don't like about JavaDoc are too many to count! But the list includes annotations! Why are you letting comments define behavior? That's just freaky.

On the flip side, documentation is a good warm up to the day, so!
allen: extras (extras)

Annotations

[personal profile] allen 2009-05-11 09:09 pm (UTC)(link)
Annotations aren't really part of JavaDoc. They just look like it.

I really disliked annotations until I started using them with the new Java Persistence API (and Stripes). Now I love them. It's really nice to write

@Entity
@Table(name="organization")
public class Organization extends NamedBean  {

  @Id
  @GeneratedValue
  @Column(name="organization_id")
  private long organizationId;
  ...

and have all of the DB mapping code just handled there, rather than having to write separate Hibernate XML files.

Now if only there were a standard way to autogenerate accessor methods...
owl: The Articles of War are not "More actual guidelines than rules." - Captain Sir Edward Pellew, RN (articlesofwar)

[personal profile] owl 2009-05-11 11:18 pm (UTC)(link)
Hmm, I've just realised that I think of JavaDoc comments in a slightly different way than I do about normal comments, that they're more codey or something. I'm sure our tech lead would be glad to hear that, as he tears into JavaDoc with the same persistence as he does into code, but a block comment will only get an eyeroll unless it's on a [livejournal.com profile] whitaker's-mom level.
owl: Motherboard and CD (computer)

[personal profile] owl 2009-05-14 08:26 am (UTC)(link)
Yes, that is his point. However, in the middle of the code review he said thoughtfully, "You know, we really should generate this JavaDoc one of these days..." :D