473,322 Members | 1,778 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,322 software developers and data experts.

standard line length in java source

wasn't sure i should put this here or in comp.lang.java.misc (or even
comp.lang.misc) but I was wondering what is the consensus for line
length for java code?

i always thought 80 chars/line was proper, since it handles printing
to a printer so well. however, i find myself having to break up lines
of code a bit too much with that number. and with today's printers,
that's not nearly as true as it was with the dot-matrix.

so, i did some "research" (ie: web searches) for proper or standard
line lengths for source code and found 3 different "standards", 80,
100, and 120.

120 would be great (plenty of room) but then I wonder if that might be
a bit to long (150% longer then what I am used to) and if other
programmers saw it they would freak out.

Yes, not really java-specific (though since that's what I code in now,
it's java specific for myself), but thought I'd try to get some
opinions.
Jul 17 '05 #1
1 3883
Since I use emacs, I try to stay at 80 lines. Emacs properly intents the
next line so it makes thins easy (emacs is life!!!)
Jimbo wrote:
wasn't sure i should put this here or in comp.lang.java.misc (or even
comp.lang.misc) but I was wondering what is the consensus for line
length for java code?

i always thought 80 chars/line was proper, since it handles printing
to a printer so well. however, i find myself having to break up lines
of code a bit too much with that number. and with today's printers,
that's not nearly as true as it was with the dot-matrix.

so, i did some "research" (ie: web searches) for proper or standard
line lengths for source code and found 3 different "standards", 80,
100, and 120.

120 would be great (plenty of room) but then I wonder if that might be
a bit to long (150% longer then what I am used to) and if other
programmers saw it they would freak out.

Yes, not really java-specific (though since that's what I code in now,
it's java specific for myself), but thought I'd try to get some
opinions.


Jul 17 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

9
by: FISH | last post by:
Ever have one of those days when you're not sure if it's you who's gone mad, or the rest of the world? I have an Open Source project on SourceForge for communication with YSMG - Yahoo's IM...
5
by: Ioannis Vranos | last post by:
I have initiated a similar discussion thread in clc++m, however because of the "m" in the name, the discussion is progressing slowly, so I am setting another thread here. Well the story is...
29
by: David Eng | last post by:
In replying to P.J. Plauger (...
43
by: Steven T. Hatton | last post by:
Now that I have a better grasp of the scope and capabilities of the C++ Standard Library, I understand that products such as Qt actually provide much of the same functionality through their own...
132
by: Frederick Gotham | last post by:
If we look at a programming language such as C++: When an updated Standard comes out, everyone adopts it and abandons the previous one. It seems though that things aren't so clear-cut in the C...
7
by: Robert Seacord | last post by:
The CERT/CC has just deployed a new web site dedicated to developing secure coding standards for the C programming language, C++, and eventually other programming language. We have already...
10
blazedaces
by: blazedaces | last post by:
Alright guys, so the title explains exactly my goal. The truth is I'm going to be reading in a lot of data from an xml file. The file is too large and there's too much data to store in arraylists...
270
by: jacob navia | last post by:
In my "Happy Christmas" message, I proposed a function to read a file into a RAM buffer and return that buffer or NULL if the file doesn't exist or some other error is found. It is interesting...
4
by: lilyumestar | last post by:
I have project I have to do for class. We have to write 4 different .java files. Project2.java HouseGUI.java House.java HouseSorting.java I already finish House.java and I need to work on...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.