Programmer pay and indent-style: tab-using coders earn less than space-using coders

nedit will select rectangular blocks. I find it handy for messing around with columns of data, usually if I am turning it into code.

Vertical select is oddly missing (or the arcane incantations to enable it are top secret) in a lot of editors, if not most of them. Even though I largely use other editors and IDEs, I keep Sublime Text around on each machine because of that and some other nice features like sort, permute, and join lines. Still, because the key+mouse combination to vertical select is different on different platforms, it usually takes a few tries to figure out how to enable it.

1 Like

when working with other people’s code, i’ve found that people that choose tabs are typically more meticulous with the rest of their formatting and people who choose spaces are typically a little looser. that isn’t always the case, but it seem to be a general rule of thumb. the people that mix, don’t give a fuck what their code looks like.

tabs and spaces, how you place your curly braces, if you add leading or trailing spaces in your method and function call parenthesis, variable naming, whether your arrays all line up across multiple lines or are condensed… whatever you choose to do for the love of code be consistent. i’d rather work on consistent clean well organized code from someone or some team who makes different choices then me on all the above then deal with hodge podge messy code.

many editors are moving to multiple cursor support, which allows for vertical select along with a host of even more powerful editing options.

5 Likes

You say that like it is a bad thing.

2 Likes

I’m not quite as old as dirt, but I’ve been there too! Many years ago I worked on a MIPS-based supercomputer that ran some ancient System III UNIX, and it didn’t include vi. I got so tired of using the line-based editor ‘ed’ that I eventually ported vim over, but as I recall it was not easy.

3 Likes

I once worked on a 20 year old code base which had been worked on by a mix of students, military conscripts, part timers and customer trainees. All up hundreds of people. It was, to say the least, as mess. But it worked somehow. Its really bad when people who can’t work out how to do a remote method call just paste the 1500 lines of code they wanted to use into the middle of an if statement without adjusting the indent.

4 Likes

I had completely forgotten about using edlin, debug, and copy con > filename.txt on an old DOS 3.3 machine - or blocked it from my memory. That may be why one of the first open source contributions I made was a few features for an editor.

1 Like

One of my favorite things about modern editors is the ability to have some auto-enforcement of code policy. I do a lot of professional coding in C# and being able to use something like ReSharper to fix extremely messy and inconsistent code by converting it into something well formatted and adhering to various coding standards in one keystroke is revelatory.

3 Likes

I’m in my early 40s. When I was in university, my school had all the students on a terrible mini-computer we all shared. Our editor choices were pico and ed. Pico was only there because it was required by pine. So I don’t know where 40 is on the dirt scale, but I’d suggest those days aren’t as far away as you’d think. Or hope.

My experience in tabs versus spaces: folks who bounce between terminal and IDE are strongly disposed toward spaces. Most other folks don’t care.

Yay for http://editorconfig.org BTW. Makes it easier to maintain consistency on a team.

7 Likes

You know, I think I remember trying to compile PINE on that one, but it had some impossible build system.

Ha - here it is! The Ardent Titan.

It belonged to the Chemistry department of my local University when I was in high school. They had put it in a room with a huge superconducting magnet :facepalm: and messed up the hard drive! We found the tapes and eventually figured out how to get it up and running again. (There were extra tapes with BSD 4.3 stuff on them, so with that I eventually got most of the GNU system running on it. It was a cool machine to have root on!)

3 Likes

Doesn’t work, in my experience. Too many programs (including terminal windows, and code listings on github.com) hardwire tabs as 8 spaces wide, which results in horrible overindenting. Also, variable width tabs screw up all sorts of other indenting in files, like aligning comments at the ends of lines, or secondary lines of multi-line expressions. If you set those up to look nice at, say, 4-char tabs, then they’re going to be completely messed up with 2-char or 8-char or whatever.

6 Likes

Now I feel old because I still read one of my accounts (the one that gets reports for Boing Boing, in fact) in pine (well, alpine). :smiley:

5 Likes

Which editors are those? I’ve been using Xcode for 17 years (OK, it used to be called Project Builder) and TextMate for at least 12. Lots of people swear by BBEdit which has been around since the early '90s.

If coding is your profession, it makes sense to spend a bit of time setting up tools that will make you more productive, even if they’re not around by default. I doubt many expert guitarists just show up at a venue expecting to use whatever axe happens to be lying around backstage.

I’m just going to bring up syntactic vs non-syntactic whitespace here so we can really get the flamewar going.

2 Likes

Okay I’m up for it. K&R braces are basically a way of saying that indentation is more important than braces. Python’s approach says okay lets just have the indentation then.

(former C coder and current python coder here)

2 Likes

Personally I prefer spaces, but it’s not the hill I’d choose to die on.

Now people who write lines longer than 80 characters … *shakes fist*

4 Likes

This discussion is way too civil. It’s boring.

Let’s talk about indent styles, instead. I’m a loose user of Allman style, myself. How about you?

I don’t agree. Even in languages where tabs are syntactically equivalent to spaces tabs mean something else to the programmers.

In my shop we use tabs only for indenting. Which means I can set it to a comfortable 2 spaces when working on my laptop (small screen) and 8 spaces when working on my desktop (humongous screen) because it makes seeing the indentation easier.

I never understood the advantage of using spaces for indenting. Except maybe that lots of text editors are retarded and insist on inserting spaces all the time.

My guess is that it’s age related. Older coders learned the trade using plain old text editors (where using tabs is a bigger advantage), the younger generation probably always used IDEs where using TABS still is an advantage (IMHO) but less so.

2 Likes

But that’s the point of using tabs. If you do indenting using tabs (and only tabs) the amount of indentation becomes a preference. To me if a coder uses spaces for indentation it feels like he is pushing is preference. Like if he forces me to use a certain font size in the editor.

4 Likes

In my experience it works wonderfully, as long as you can bash all the new snotty coders over the head with coding guidelines which demand tab indentation.

If that’s the case you’re doing it wrong.
You use tabs for the indenting level only any whitespace beyond that should be spaces.

I really like it that way. I set my editor to use visible tabs and I can see the indenting level at a glance.

3 Likes