This week's book giveaway is in the Agile and other Processes forum.
We're giving away four copies of The Mikado Method and have Ola Ellnestam and Daniel Brolund on-line!
See this thread for details.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Is this excessive commenting? Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


Win a copy of The Mikado Method this week in the Agile and other Processes forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Reply Bookmark "Is this excessive commenting?" Watch "Is this excessive commenting?" New topic
Author

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
http://www.youtube.com/user/thejartender?feature=mhee
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: http://ej-technologies/jprofiler - if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
 
subject: Is this excessive commenting?
 
Similar Threads
Reading Record by Rec Number
lock & read or just read?
recNo in Bodgitt and Scarper
Interface question B&S
[B&S]: Using a Singleton class to represent the file resource