File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Is this excessive commenting? Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Is this excessive commenting?" Watch "Is this excessive commenting?" New topic

Is this excessive commenting?

Yucca Nel
Ranch Hand

Joined: Nov 20, 2008
Posts: 147

Dilema is as follows... a choice needed to be made. I was either to provide a class that had no use other then to extract the magic cookie and the num of fields and record size. But opted to not include it in my code as it does not give an function or benefits to the program.
The end result is this...

Where i leave a huge comment that I hope the assesor and future programmers will find usefull in knowing how and where I get these values.

Should I rather opt for the class to show how I got this value(even going as far as just creating a static class to open the database and make these available as constants)?

SCJP 6.0, SCJD (400/400), SCBCD for JEE 5, SCWCD 1.4 I do videos for development at
I am probably the only developer ever to have had an orange sized brain tumor in my brain while learning development!!
Yucca Nel
Ranch Hand

Joined: Nov 20, 2008
Posts: 147

I forgot to mention that my previous choices was to hardcode the values at the start of the database into my Value object by opening them in a static class and making them static.

something like this

And I would have done an assertion test to test my assumption but am under the impression that all Data value objects should have no coupling.
I agree. Here's the link:
subject: Is this excessive commenting?
It's not a secret anymore!