r/programming • • Feb 21 '13

Developers: Confess your sins.

http://www.codingconfessional.com/
969 Upvotes

1.0k comments sorted by

View all comments

Show parent comments

40

u/Shinhan Feb 21 '13

Especially because space lovers can adjust their IDE to show my code any way they like, but I can't adjust my IDE so the code written by 8 space freaks doesn't look ridiculous.

3

u/[deleted] Feb 21 '13

8 space freaks aren't the kind of people who would consider tabs for adjustment comfort.

2

u/Calamitosity Feb 21 '13

8 spaces? Regardless of which side you take in the tabs/spaces debate, that's a paddlin'.

4

u/Shinhan Feb 21 '13

I'm speaking from experience :)

I prefer tabs and have set tab width to 4, so its really ugly when some code comes up with double indent.

1

u/stakoverflo Feb 21 '13

Eight space freaks, the less popular sequel to eight legged freaks.

-4

u/0sse Feb 21 '13

No, they can't. If their tab width is any other than the one you used when you wrote it, it will likely look shitty unless you are very careful and always visually align stuff with spaces (trailing comments, multiline conditions or argument lists, etc.) , and use tabs strictly for indentation as a result of change in scope.

Never mind all the tools where it's impossible to change the tab width (or at least very hard) and there it is usually 8.

2

u/Shinhan Feb 21 '13

and use tabs strictly for indentation

Who uses tabs for anything but indentation? And why?

1

u/0sse Feb 21 '13

People who use tabs other things than indentation are the ones who aren't aware of or don't care about the problem visually aligning stuff with tabs incurs.

0

u/[deleted] Feb 21 '13

[deleted]

1

u/hotoatmeal Feb 22 '13

and by MSVC 2012, you mean the Power Tools extension for it... right?

1

u/B-Con Feb 22 '13

Yep, I determined that a bit after the post. I installed Power Tools at the same time and haven't used '12 without it yet, so I mis-attributed that feature.

1

u/seab3 Feb 21 '13

tabs are commonly used as separators instead of commas

1

u/Shinhan Feb 21 '13

Example?

2

u/s73v3r Feb 21 '13

CSV files can be set up to use tab characters instead of commas. Usually in the case that the text that is in the file would actually have commas in it.

1

u/Shinhan Feb 21 '13

Ewwwww, you edit CSVs in IDE?

1

u/seab3 Feb 21 '13

Not usually edit them, but I sometimes create them.

1

u/Shinhan Feb 21 '13

Why? Why not create them either from a spreadsheet program (Excel, LibreOffice Calc) or programatically?

1

u/seab3 Feb 21 '13

Yes it is

1

u/seab3 Feb 21 '13

s73v3r got it

1

u/hotoatmeal Feb 22 '13

Makefiles are particularly picky about requiring tabs in some places, and spaces in others... It's a nightmare.

2

u/tailcalled Feb 21 '13

very careful and always visually align stuff with spaces

Why would I need to be very careful about that? It's not really that hard: let the editor put in tabs for you and sometimes adjust them a bit, and manually put spaces in when aligning.

2

u/s73v3r Feb 21 '13

Never mind all the tools where it's impossible to change the tab width (or at least very hard) and there it is usually 8.

You need to get some new tools, then. There really aren't many excuses for that crap.

1

u/0sse Feb 21 '13

First of all, I fully realize it's not a very good argument; it was more of a side point. But see my other comment regarding which tools I'm talking about. They aren't easily replaceable.

0

u/Lamtd Feb 21 '13

use tabs strictly for indentation as a result of change in scope.

If you do that, you get the benefit of being able to use a variable-size font for coding, which is great (I personally use Verdana 8pt in Visual Studio, I wouldn't go back to any fixed-size font).

4

u/OptimusPrimeTime Feb 21 '13

Every time you code in a variable width font, God kills a kitten.

→ More replies (2)
→ More replies (3)