• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Ron McLeod
  • Paul Clapham
  • Bear Bibeault
  • Junilu Lacar
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Henry Wong
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • salvin francis
  • Frits Walraven
Bartenders:
  • Scott Selikoff
  • Piet Souris
  • Carey Brown

Strict Adherence to Coding Conventions?

 
Ranch Hand
Posts: 318
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I just took peek at Java's Coding Conventions based on someone's post recently. One thing that struck me: they should you should do your braces as such
int myMethod () {
//code
}
That just drives me crazy! I prefer the good old:
int myMethod ()
{
//code
}
The rest of the rules I use or can live with changing them. How strictly do you think you have to adhere to that standard? I mean, I don't want to loose points, but it's also almost impossible for me to make myself write code the other way. It is much harder for me to read. What are your thoughts? I know it seems pretty trivial, but I'm going to download the assignment in 2 weeks and I'm getting nervous and wanting to get all my ducks in a row.
With Respect,
Matt DeLacey
 
Greenhorn
Posts: 18
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
The sun code conventions clearly mentions it should be
int myMethod () {
//code
}
So I wouldn't take any risks of losing some marks for a silly
thing. Even I had the same thing in mind when I started
my assingment and got used to it.

Originally posted by Matt DeLacey:
I just took peek at Java's Coding Conventions based on someone's post recently. One thing that struck me: they should you should do your braces as such
int myMethod () {
//code
}
That just drives me crazy! I prefer the good old:
int myMethod ()
{
//code
}
The rest of the rules I use or can live with changing them. How strictly do you think you have to adhere to that standard? I mean, I don't want to loose points, but it's also almost impossible for me to make myself write code the other way. It is much harder for me to read. What are your thoughts? I know it seems pretty trivial, but I'm going to download the assignment in 2 weeks and I'm getting nervous and wanting to get all my ducks in a row.
With Respect,
Matt DeLacey


 
High Plains Drifter
Posts: 7289
Netbeans IDE VI Editor
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I don't give a rat's about achieving the highest possible score, personally. The exam is pass-fail, and while making 155 points the goal is a nice motivation, the bragging rights for perfection are suspect.
It's going to depend on the grader. I've seen both kinds: graders who deem themselves incontrovertibly bound by the rules, and graders who are far more concerned with *consistent* style.
You should be able to judge by your own feelings on "proper bracing" that someone else might feel as strongly about doing it the other way, right? That being said, how many points can you realistically attribute to that?
Do what you feel comfortable doing, I say. Just be consistent. If it's a couple points off because you did, I'm sure you'll be just as employable as anyone else who passed.
------------------
Michael Ernest, co-author of: The Complete Java 2 Certification Study Guide
[This message has been edited by Michael Ernest (edited January 11, 2001).]
 
Matt DeLacey
Ranch Hand
Posts: 318
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Sound advice. Wow! I'm honored. I used your book almost exclusively to get me through the Programmer's Certification. Certainly, I owe you a measure of thanks. Now, it looks like you'll be assisting me in my quest to obtain the Developer's Certification as well!

With Respect,
Matt DeLacey
 
Ranch Hand
Posts: 75
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
hi
can anyone tell me where can i look for coding conventions...
Thanks in advance....
------------------
Sachin,
****************************************************
Learn from others mistakes. Life is too short to make all yourself.
****************************************************
 
Ranch Hand
Posts: 133
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi Sachin,
The coding standard for Java can be found here
Sam
 
passwords must contain 14 characters, a number, punctuation, a small bird, a bit of cheese and a tiny ad.
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
    Bookmark Topic Watch Topic
  • New Topic