Win a copy of Programmer's Guide to Java SE 8 Oracle Certified Associate (OCA) this week in the OCAJP forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Line length coding convention

 
Thomas Fly
Ranch Hand
Posts: 164
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
Mark Spritzler
ranger
Sheriff
Posts: 17278
6
IntelliJ IDE Mac Spring
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
Mark
 
Michael Morris
Ranch Hand
Posts: 3451
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

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
 
Thomas Fly
Ranch Hand
Posts: 164
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 329
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
This may help in places that you are not sure about:
http://www.javaranch.com/style.jsp
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic