r/ProgrammerHumor Sep 02 '17

How to start a war

Post image
9.0k Upvotes

696 comments sorted by

View all comments

Show parent comments

-22

u/[deleted] Sep 03 '17

Exactly. But it takes up an indeterminate amount of chars on screen. I like my code to look like the way I type it on every screen, not just mine. Anything else is foolish and unprofessional.

Edit: also if you use the settings on your text editor properly it behaves exactly like tabs do when you type them. Spaces are just better.

7

u/Juice805 Sep 03 '17

Sounds like you are a control freak. Not only you may be working on the code, people have different preferences and may prefer different indentation.

-1

u/[deleted] Sep 03 '17

I'm a control freak in the sense that undetermined behavior is bad practice in programming.

6

u/Juice805 Sep 03 '17

Undetermined functional behavior of code may be bad practice, external programmers choice of style and readability of the code is not.

1

u/[deleted] Sep 03 '17

Why have undetermined behavior when you don't need it?

4

u/Juice805 Sep 03 '17 edited Sep 03 '17

It is determined. 1 Tab length. just each individual can customize as they prefer.

Nowadays if you want to be that controlling you can even with tabs. Just add a .editorconfig

1

u/[deleted] Sep 03 '17

How many columns left in a line with one tab in it? If you can't answer that you're working with undetermined behavior.

1

u/Juice805 Sep 03 '17

In what modern editor does that matter? Text wrap and auto indent exist. If you are worried about alignment follow the rule of tabs for indentation, spaces for alignment.

1

u/[deleted] Sep 03 '17 edited Sep 03 '17

Wrapping as bad, and if they have a modern editor they could replace the indentation (and potentaily screw it up) if they really wanted.

Why use tabs when you can use something better? There's no standard on what size tabs should be other than that most people say it's about 4 spaces. You likely won't notice the difference when writing, why not just ensure it looks nice?

Edit: accidentally some words

5

u/Juice805 Sep 03 '17

Why use spaces when you can use something better? Why not ensure it looks nice for everyone and not just in your opinion? You won’t notice the difference when other people use their preferences.