When you program, how wide is your editing window ?

Status
Not open for further replies.
May 11, 2008
19,561
1,195
126
I get the impression with a lot of examples that the code is written in a window of about 30 characters wide.

I like wide editing windows when i type code, usually around 200 characters wide.

What is your editing window wide ?
 

Gryz

Golden Member
Aug 28, 2010
1,551
203
106
80 Characters wide used to be the standard. In my company it seems to be 100 characters now. I'm fine with a 100. As long as there is a standard.

Of course, some &%*(#(%s don't care. And they type 120, 160 or even 200 characters wide. I am sure that God is reserving a special place in hell for them now.

It seems these people who put 600 characters on one line still live in the 1980s. They alway use just one window. And they just switch between multiple sessions inside that one window constantly. But at any time they will have just one window on their screen. And as they have 16:9 screen, that one window they use can be 120 lines high, and 400 chars wide. And you know dumb people: if they can do stupid things, they will do stupid things.

I myself have evolved a little beyond the 1980s. I like to use multiple windows simultaneously on my screen. If you have multiple windows, you can't make them 300 characters wide. But what do the others care ? It's not their problem.


Similar topic: why write comments in your code ? You've written it yourself, you have a good chance remembering what you did. Others ? F them. It took you a lot of effort to write that code, it should take others a lot of effort to read that code ....
 
Last edited:
May 11, 2008
19,561
1,195
126
Why would you in heavens name limit yourself to a small line space. That would mean lots of scrolling or writing hard to read code. But at least 80 is something.

I have seen c source examples that look like they were typed on a 25 character screen.
Horrible.
 

Schmide

Diamond Member
Mar 7, 2002
5,587
719
126
I've never understood this. They invented word wrap so people wouldn't be so peevey. My current setup is 261. My longest line in my current project seems to be 139. Every once and a while i drop my res from 4k to 1k to do other stuff and I have no problems reading it. It just wraps.

As for writing comments. I have conversations with my self in my code. I often have to delete many comments before I show it.
 

Chaotic42

Lifer
Jun 15, 2001
33,929
1,097
126
100 characters with a marker line enabled. I usually max out the height of the window.
 

Red Squirrel

No Lifer
May 24, 2003
67,395
12,141
126
www.anyf.ca
I tend to maximize my text editor to the full monitor, and do other tasks like compiling, debugging, running the app etc in the other monitors. So however many characters fit in a HD screen is what I use.

That said any sane editor should have a line wrap function anyway. I try to minimize how long a line of code is though as too long simply means it's harder to read. Ex: multiple nested functions might be better off being written in several lines with variables being inputted to the next one. You probably want to do error handling on the first functions anyway.
 

slashbinslashbash

Golden Member
Feb 29, 2004
1,945
8
81
Usually maximized on one monitor (so about 200) or sometimes split (as when I need to have two files open at once, to refer to say the functions in a library file while I'm programming in another file) so about 100 each. I do try to keep my lines fairly short. I use vim in a Terminal window.
 

Broheim

Diamond Member
Feb 17, 2011
4,592
2
81
being part of the ultrawide masterrace (34" 21:9), pretty wide...

I'm a C# developer though, so by convention, my lines don't get very long.
 

Broheim

Diamond Member
Feb 17, 2011
4,592
2
81
21:9 is great for multiple 100 column windows. :p

for some reason, I only really use multiple editing windows in VS Code, I'm more of a Tab'er, which is why I opted for a single large monitor rather than several small ones, I'd only use 1 monitor 90% of the time.
 
May 11, 2008
19,561
1,195
126
I have a multiple windows setup as well. When i use visual studio or programmers notepad , or Mplabx or any other IDE, i have always the same setup. A project window with all files on the left, the main editing window from the top of the toolbar all the way to the right of the screen about 200 characters horizontal and 40 lines vertical and below the output window of about 12 lines vertical. All the other windows i only need during debugging so i hide them during programming until needed.

I do note, i never make my code wider than about 200 characters, too much scrolling is a difficulty in reading. I always try to type in such a way that i need to scroll horizontally or vertically as less as possible when reading code.
Human view is very horizontal.

Comments are always handy. Either when you plan to share the code or just for yourself. In the personal use case, why spend time figuring out how you made your own code twice...
That is less time spend for creating new code in the same time frame.
 
May 11, 2008
19,561
1,195
126
What is your tab and indentation size guys and gals ?
I have both set to 2 because i do not like code spaced far apart.
 

Gryz

Golden Member
Aug 28, 2010
1,551
203
106
When programming in C, you set your tab-width (your indent) to 4 spaces.
If you use another value, you will burn in hell forever.

Can't say anything about other languages.
 

Ken g6

Programming Moderator, Elite Member
Moderator
Dec 11, 1999
16,250
3,845
75
This thread has wandered way off topic. I think I'd better close it before someone starts a holy war about VI vs. Emacs. -- Programming Moderator Ken g6.
 
Status
Not open for further replies.