This week's book giveaway is in the Big Data forum.
We're giving away four copies of Elasticsearch in Action and have Radu Gheorghe & Matthew Lee Hinman on-line!
See this thread for details.
The moose likes Developer Certification (SCJD/OCMJD) and the fly likes Line length coding convention Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Elasticsearch in Action this week in the Big Data forum!
JavaRanch » Java Forums » Certification » Developer Certification (SCJD/OCMJD)
Bookmark "Line length coding convention" Watch "Line length coding convention" New topic

Line length coding convention

Thomas Fly
Ranch Hand

Joined: Sep 09, 2002
Posts: 164
Does anybody have an opinion on the importance of this? I'm using JBuilder, which has a gray line telling you where to break lines... however, I like 1152 screen resolution and that standard seems unnecessarily narrow (only about half a screen). Anybody stuck with coding on a SVGA monitor should look for another employer, in my opinion!
But if it might cost me a point on general considerations, I'll shorten my lines.

Fly by Night Consultants<br /> <blockquote><font size="1" face="Verdana, Arial">quote:</font><hr><i>I climbed on the back of a giant albatross<br />which flew through a crack in the cloud<br />to a place where happiness reigned...<br />all year 'round<br />the music played ever so loudly!</i><p><a href="" target="_blank" rel="nofollow">Hole in My Shoe</a><hr></blockquote>
Mark Spritzler

Joined: Feb 05, 2001
Posts: 17260

I'd just be careful with JBuilder for this assignment. If you are simply using it as a text editor, that might give you some code completion, then you should be fine. If you use it for building your GUI, I'd stop using it. Because JBuilder puts in a lot of propriatary code into your GUI that will not be accepted by the assessor.
I think the standard is 80 columns for a single line.

Perfect World Programming, LLC - Two Laptop Bag - Tube Organizer
How to Ask Questions the Smart Way FAQ
Michael Morris
Ranch Hand

Joined: Jan 30, 2002
Posts: 3451

I think the standard is 80 columns for a single line.

Absolutely. That is a Java coding convention. You may lose a point or two if you don't comply with that.
Michael Morris

Any intelligent fool can make things bigger, more complex, and more violent. It takes a touch of genius - and a lot of courage - to move in the opposite direction. - Ernst F. Schumacher
Thomas Fly
Ranch Hand

Joined: Sep 09, 2002
Posts: 164
JBuilder has an XYLayout (essentially "null") that's useful in the design stage, and which requires a Borland library, but I'm mostly using GridBagLayout.
I've already elimated "any residual dependency upon that" (namely, any borland import) since presumably it would result in automatic flunking.
I guess I'd better make sure my lines are according to spec as well. Thanks.
Ronnie Phelps
Ranch Hand

Joined: Mar 12, 2001
Posts: 329
This may help in places that you are not sure about:
I agree. Here's the link:
subject: Line length coding convention