• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

Is it a great technique to reduce the documentation?

 
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
ok...ok... it may seems a stupid note but according to the assignement

javadoc style comments must be used for each element of the public interface of each class


I understood correctly that this mean that doing a better analisys of the code to reduce the visibility of methods and setting them as much as possible to private improve the code but also reduce the documentation to write, right?
 
Ranch Hand
Posts: 288
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Maurizio Nagni:

I understood correctly that this mean that doing a better analisys of the code to reduce the visibility of methods and setting them as much as possible to private improve the code but also reduce the documentation to write, right?



I think that it is a good programming practice (ie good encapsulation)to limit the number of public methods in a class to only those methods that clients will need to use the class effectively. As you point out this also has the benefit of reducing the number of javadoc comments that you would need to write. It would still be a good idea to comment all protected and private methods and variables, but regular coments would do fine for this purpose.
 
Maurizio Nagni
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
yes... i agree that anyway is a good thing to have a proper style to code.... i hate when i do "ctrl-space" in my NetBeans and i discover that the most of the opensource code documentation is empty.... oh well... that's another point. Dot.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic