Win a copy of Clojure in Action this week in the Clojure forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Question on handling of braces

 
Jane Griscti
Ranch Hand
Posts: 3141
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
Peter Tran
Bartender
Posts: 783
  • 0
  • Mark post as helpful
  • send pies
  • 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
 
paul wheaton
Trailboss
Pie
Posts: 21185
Firefox Browser IntelliJ IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • 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.

 
mike fleischer
Greenhorn
Posts: 1
  • 0
  • Mark post as helpful
  • send pies
  • 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
  • 0
  • Mark post as helpful
  • send pies
  • 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
Pie
Posts: 21185
Firefox Browser IntelliJ IDE Java
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Mike,
yes.

That's how I sent the solutions.
 
I agree. Here's the link: http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic