• 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

Code Style

 
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello everybody

I like it better to write code in that fashion:
--------------------------------------------------------------


----------------------------------------------------------
Will I be penalized for doing this the non java way? The code
guidelines from java ranch also see things as I do. Thanks for
the reply

[ November 04, 2007: Message edited by: Alain Huber ]

[ November 04, 2007: Message edited by: Alain Huber ]
[ November 04, 2007: Message edited by: Alain Huber ]
 
Ranch Hand
Posts: 184
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
as far as i have seen the sun standards, your code should look as


and i am not sure if you will be penalized for that but its always good to follow the coding standards specialy if they are laid down by SUN

[ November 05, 2007: Message edited by: abhishek pendkay ]

[ November 05, 2007: Message edited by: abhishek pendkay ]
[ November 05, 2007: Message edited by: abhishek pendkay ]
 
Ranch Hand
Posts: 40
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Try to use SUN formatting standard. You may loose some points if you don't follow sun style.

Some IDEs like eclipse provide a very useful automatic formatter, that you can set to follow SUN standard.
Another useful utility is checkstyle, can be downloaded as an pluggin for eclipse.
 
Ranch Hand
Posts: 231
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Do you know any other tools like checkstyle that can be used for netBeans even better independent of any IDE ?

thanks
 
Rancher
Posts: 43081
77
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Originally posted by Musab Al-Rawi:
Do you know any other tools like checkstyle that can be used for netBeans even better independent of any IDE ?



There are plenty: jlint, jcsc, lint4j, pmd and findbugs. All these can be run from within Ant or as standalone applications.

I particularly like FindBugs for its relevant and actionable warnings, and PMD for its extensibility.
 
Alain Huber
Greenhorn
Posts: 5
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Many thanks for the reply's.
 
reply
    Bookmark Topic Watch Topic
  • New Topic