• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Is it a great technique to reduce the documentation?

 
Maurizio Nagni
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • 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?
 
Mark Smyth
Ranch Hand
Posts: 288
  • Mark post as helpful
  • send pies
  • 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
  • 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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic