Standards For Java Coding

338 views

Published on

Standards For Java Coding

Published in: Education, Technology
0 Comments
1 Like
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total views
338
On SlideShare
0
From Embeds
0
Number of Embeds
1
Actions
Shares
0
Downloads
10
Comments
0
Likes
1
Embeds 0
No embeds

No notes for slide

Standards For Java Coding

  1. 1. * * splash@dei.uc.pt 26  February  2011  
  2. 2. bonus tips
  3. 3. “ ”
  4. 4. 1 1.1 1.2 1.3 2 2.1 2.2 2.3 3 4 4.1 5 6 6.1 7 Indentation Line length Wrapping lines Alignment White space Blank lines Blank spaces Trailing white space Naming conventions Declarations Placement Dead Code Comments Special comments Parenthesis
  5. 5. 1 - Indentation
  6. 6. 1 - Indentation Because it is a Java language coding standard presented in the Java Language Specification, from Sun Microsystems
  7. 7. 1 - Indentation Because of line wrapping, which will be explained later on
  8. 8. 1 - Indentation Because it is the Ruby convention
  9. 9. 1 - Indentation Just because it makes your life easier
  10. 10. 1 - Indentation
  11. 11. 1.1 – Indentation – Line length How it looks like using 90 cols per line
  12. 12. 1.2 – Indentation – Wrapping lines
  13. 13. 1.3 – Indentation – Alignment
  14. 14. 1.3 – Indentation – Alignment
  15. 15. 2.1 – White space - Blank lines
  16. 16. 2.2 – White space - Blank spaces
  17. 17. 2.2 – White space - Blank spaces
  18. 18. 2.3 – White space – Trailing white space http://andrei.gmxhome.de/anyedit/
  19. 19. 3 – Naming conventions
  20. 20. 3 – Naming conventions
  21. 21. 4.1 – Declarations – Placement
  22. 22. 5 – Dead Code
  23. 23. 6.1 – Comments – Special comments
  24. 24. 7 – Parenthesis By Noel Rappin, from http://www.pathf.com/blogs/2008/10/elements-of-ruby-style/.
  25. 25. 7 – Parenthesis By Noel Rappin, from http://www.pathf.com/blogs/2008/10/elements-of-ruby-style/.
  26. 26. 7 – Parenthesis By Noel Rappin, from http://www.pathf.com/blogs/2008/10/elements-of-ruby-style/.
  27. 27. 1 – Commit messages
  28. 28. 1 2 Reverting Messages
  29. 29. 1 – Reverting DEV 1 By Taryn, from http://rubyglasses.blogspot.com/2007/08/actsasgoodstyle.html. DEV 2
  30. 30. 2 – Messages By Taryn, from http://rubyglasses.blogspot.com/2007/08/actsasgoodstyle.html.
  31. 31. 1 2 3 Models Views Controllers
  32. 32. 1 – Models By Taryn, from http://rubyglasses.blogspot.com/2007/08/actsasgoodstyle.html.
  33. 33. 1 – Models By Taryn, from http://rubyglasses.blogspot.com/2007/08/actsasgoodstyle.html.
  34. 34. 1 – Models By Taryn, from http://rubyglasses.blogspot.com/2007/08/actsasgoodstyle.html.
  35. 35. 2 – Views By Neeraj Choudhary, from http://scribd.com/doc/2889649/Rails-coding-standards-defined.
  36. 36. 3 – Controllers By Taryn, from http://rubyglasses.blogspot.com/2007/08/actsasgoodstyle.html.
  37. 37. * * splash@dei.uc.pt 26  February  2011  

×