Bill Shirley - bshirley - frazerbilt.com
if (Posts < 30) you.read( JavaRanchFAQ);
There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Originally posted by Roshni Singhania:
...in SCJD part of the 1.5 certification book, it says that it should be on the same line or the marks could be reduced if we put it on the next line...
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
Originally posted by fred rosenberger:
indeed, anywhere you work will have a style guide. contrary to what some folks will tell you, no style is better or worse. you should follow whatever guide is appropriate for the project. If you are doing a SCJD project, use their style guide. if you are doing the JavaRanch cattle drive, use theirs.
The soul is dyed the color of its thoughts. Think only on those things that are in line with your principles and can bear the light of day. The content of your character is your choice. Day by day, what you do is who you become. Your integrity is your destiny - it is the light that guides your way. - Heraclitus
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Originally posted by Ilja Preuss:
... I totally agree - except for the fact that *my* coding style is the only true one...![]()
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
Originally posted by Shashi Kala:
And I don't think that marks get reduced for this reason.
We�ve seen people fail the exam because they put the curly braces on the line below the method declaration rather than immediately following the declaration (on the same line), violating the official Java Coding Conventions. While this infraction alone probably might not cause you to fail, the points deducted for code convention violations might be the ones that sink you where you otherwise might have squeaked by.
The Assignment is graded by giving your application a starting number of points and then deducting points for violations including minor things (curly braces in the wrong place) and major things (locking doesn�t work in every situation).
Marc and I are tending this part of the bar, so Marc's right. What he says goes.Originally posted by marc weber:
That's only correct if your coding style happens to match my coding style.
SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6 - OCEJPAD 6
How To Ask Questions How To Answer Questions
Originally posted by Ernest Friedman-Hill:
The "brace-on-the-same-line" style originated with Kernighan and Ritchie's "The C Programming Language". They have gone on record saying that this was only done to save vertical space in the book, enabling them to keep listings together on a single page.
Rob
SCJP 1.4
Originally posted by Rob Ross:
Just thought you'd want to know.
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |