23
I personally use tabs (programming.dev)
submitted 1 year ago by [email protected] to c/[email protected]
top 12 comments
sorted by: hot top controversial new old
[-] [email protected] 1 points 1 year ago* (last edited 1 year ago)

3 spaces is best because if the universe is chaos then everything in it should reflect that.

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

I'm more about increasing spaces exponentially to really highlight how important each line is

public boolean function() {
 if (method()) {
   if (otherMethod()) {
       for (Object o : list()) {
               if (o.isAlive()) {
                               return false;
               }
       }
   }
 }
 return true;
}

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

Amateur! I use coments so it looks like this:

function main(){ /tab/if(fish==2){ /tab//tab/console.log("i need help"); /tab/} }

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

This is horrifying, this is straight up blaspheny

[-] [email protected] 0 points 1 year ago

For real. OP needs to give up on this ridiculous notion of tabbed whitespace and learn to use real, monospaced indentation. How wide is a tab? OP couldn't tell you because tabs are inherently dishonest -- a lie concocted by big keyboard to poison the unwashed programmer masses.

[-] [email protected] 0 points 1 year ago

Tabs are one tab character wide, it's perfect

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

You're one character wide

[-] [email protected] 0 points 1 year ago
int mostCursedIndentation (const int someVal) @safe {
{}{}if (someVal < 0) {
{}{}{}{}throw new Exception ("Value cannot be negative!");
{}{}}
{}{}return someVal * 5 - 3;
}

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

Can you start randomly nest them too?

{{}}{}int foo = bar

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

You made it even worse!

[-] [email protected] 0 points 1 year ago

...this...this can't be real...no one is that much of a sadist are they?

This whole thread is what nightmares are made of.

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

So at my work we've implemented a automatic code formatter. Instead of having discussions about the process of changing the configuration file we just put it up on GitHub. I think I might have found a fun April fool's prank.

load more comments
view more: next ›
this post was submitted on 17 Jun 2023
23 points (100.0% liked)

Programmer Humor

19222 readers
97 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 1 year ago
MODERATORS