• 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

Question on handling of braces

 
Ranch Hand
Posts: 3141
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Marilyn, Paul ...
The Cattle Drive style guide states that braces should appear on seperate lines

But the style guide on Sun's site uses the following style:

My question is, eventually I want to write the SCJD exam. If I've trained myself to follow the Cattle Drive styles; will I be penalized if I use them on the Developer's exam?
Either of you know?
Thanks


------------------

Jane Griscti
Sun Certified Java 2 Programmer
"When ideas fail, words come in very handy" -- Goethe
 
Bartender
Posts: 783
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Jane,
Great question. My answer would be "When in Rome..."
Seriously, if Cattle Drive prefers the braces to line up then critique the code using that convention. For the SCJD, I would go with what SUN's coding convention. They can't penalize you for using their coding convention, but they can if you use anything else. Why give them a reason to mark you off?
I have an editor (Visual Slickedit) with a code beautifier that will allow me to convert between the two styles.
-Peter
 
Trailboss
Posts: 23778
IntelliJ IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
What Peter said.
I also use Visual SlickEdit. It does a nice job on those sorts of changes, but there will probably be more changes than that.
I've also heard that there are two style guide's at Sun, although I have not searched for the second.
As a professional, you need to be prepared for any style guide you are presented with.
Both my style guide and the Sun style guide will prep you for the most important stuff.

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
with visual slick edit can you cut and paste keeping the same spacing that is wanted for submitting assignments.
 
Jane Griscti
Ranch Hand
Posts: 3141
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Thanks guys ... I tend to be habit prone; obviously that's a habit I'll have to break

------------------

Jane Griscti
Sun Certified Java 2 Programmer
"When ideas fail, words come in very handy" -- Goethe
 
paul wheaton
Trailboss
Posts: 23778
IntelliJ IDE Firefox Browser Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Mike,
yes.

That's how I sent the solutions.
 
With a little knowledge, a cast iron skillet is non-stick and lasts a lifetime.
reply
    Bookmark Topic Watch Topic
  • New Topic