this post was submitted on 21 Jun 2023
549 points (99.1% liked)

Programmer Humor

32571 readers
317 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 5 years ago
MODERATORS
 
all 34 comments
sorted by: hot top controversial new old
[–] T156 31 points 1 year ago* (last edited 1 year ago) (4 children)

That's why you get the best of both worlds, and combine them to use tabspaces. Everyone will hate you equally, achieving true equality in the process.

[–] mundane_party 25 points 1 year ago (3 children)

Tab characters are space efficient and configurable for each person in their editor. Space characters are consistent between developers.

Solution: each tabspace indent is a random width, making it both inconsistent and non-configurable. Also, each character is the size of at least four regular characters, so it’s not even space efficient

[–] PrometheusG 6 points 1 year ago

So, we're using Word?

[–] dojan 3 points 1 year ago

This sounds perfect.

[–] rooster_butt 3 points 1 year ago

Honestly the best solution is tabs for indentation and spaces for alignment.

[–] [email protected] 15 points 1 year ago (1 children)

I think you put those images the wrong way around, pal 😠

[–] [email protected] 7 points 1 year ago

I agree, the others are wrong.

[–] Anarch157a 13 points 1 year ago (1 children)

Create a language where tabs are used for indentation while comments are formed by one space character at the beginning of a line, followed by a tab. Exactly eight spaces at the beginning of a line means that line is continuation of the previous one.

Maybe I'll start an Anarchy Programming sublemmy.

[–] ThatSandwichGuy 1 points 1 year ago

Really nice, I like

[–] [email protected] 11 points 1 year ago (1 children)

The only solution is to use a curly brace language and write everything on one line.

[–] [email protected] 5 points 1 year ago (1 children)

The real question is spaces around curly braces or not?

[–] T156 2 points 1 year ago

Have spaces around curly braces modify the behaviour. That way, you can incorporated both.

[–] [email protected] 10 points 1 year ago (1 children)

The only wrong person here is the one with whitespace marked invisible smh

[–] [email protected] 12 points 1 year ago (1 children)

I·don't·know·what·you·mean.

[–] [email protected] 8 points 1 year ago

Just set your tab width to 1. No more argument now.

[–] [email protected] 8 points 1 year ago

Finally someone that speaks the hard truth that we need to hear

[–] [email protected] 7 points 1 year ago

I have no problem with either. But I do have a problem with people who use the space bar instead of the tab key.

[–] [email protected] 6 points 1 year ago (1 children)
[–] zephyr 2 points 1 year ago

More like expand me

[–] [email protected] 6 points 1 year ago (2 children)

I prefer to use three alt+255

[–] IHawkMike 2 points 1 year ago

You just reminded me my brothers and I used to use alt+255 back in the DOS days to rename files that we didn't want our parents opening. 😁

[–] [email protected] 1 points 1 year ago

A bit useless if there's no character in front of the lead

[–] [email protected] 6 points 1 year ago

Hard to imagine how anyone could be so wrong :P

[–] [email protected] 4 points 1 year ago (1 children)

My workplace almost came to blows as every 2nd source file was auto-formatted to varying levels of spaces.
I was told this after I complained to my manager that someone came into my project fresh and started autoformatting our code to 1 space on every file they worked on.

[–] emptyother 1 points 1 year ago

Understandable. When the code is already written, one follow its defaults no matter what ones own preferences are. Thats just common courtesy.

[–] [email protected] 3 points 1 year ago (1 children)

I've always found it weird people call it white spacing when most coders use night mode on their ide, shouldn't it be black space?

[–] [email protected] 1 points 1 year ago

😂😂😂

[–] [email protected] 2 points 1 year ago

As a JS developer, I prefer to use semicolons for indentation.

[–] Lachy 2 points 1 year ago

My indentation is secretly the actual program written in the whitespace programming language.