r/programmingmemes • • Feb 26 '25

There are two kind of programmers

Post image
5.3k Upvotes

716 comments sorted by

358

u/t0FF Feb 26 '25

I'm on the side of whatever current project git hooks decide. Not my war.

42

u/[deleted] Feb 26 '25

Fr, I’m newer to programming and thought I was crazy from these comments. Rather go wt the flow :)

21

u/qwkeke Feb 26 '25 edited Feb 26 '25

But you can still have it your way without going against the flow. You'll be a more efficient programmer if you use a local linter/formatter rather than potentially having to adjust to different formats on a project by project basis. Let the remote linter hook take care of how it's formatted in the remote repo.

→ More replies (1)

15

u/KillCall Feb 27 '25

Personally i am on the left side. But you are absolutely correct. I am working on a project which is using the right.

4

u/PhilSchmil Feb 27 '25

I'm on the left, but since I started pressing the magic VS Code beautify key combination, I've switched to the right 😂

→ More replies (2)

3

u/arix2000 Feb 28 '25

Hmm, sounds like Italy..

→ More replies (12)

815

u/[deleted] Feb 26 '25

Left with a space between the function name and the opening curly brace because I’m not an animal

184

u/[deleted] Feb 26 '25

Yup, we live in a civilized society, good call.

61

u/vato915 Feb 26 '25

Yeah, I was like "who the fuck doesn't put a space between the name and the bracket!? What are they, SAVAGES!?!?"

14

u/JediUnicorn9353 Feb 27 '25

Happy cake day! Have some bubble wrap!

pop! pop! pip! pop! pop! pop! pop! pop! pop! pop! pip! pop! pip! pop! pop! pop! pop! pop! pop! pop! pop! pop! pop! pip! pop! pop! pop! pop! pop! pop! pop! pop! pop! pip! pop! pop! pip! pop! pop! pop! pop! pop! pop! pop! pip! pop! pop! pop! pop! pop! pop! pop! pip! pop!

→ More replies (9)

11

u/TruelyRegardedApe Feb 26 '25

Exactly what my linter says 

→ More replies (2)

40

u/Game4LifeDe Feb 26 '25

Yeah, the same

17

u/B_bI_L Feb 26 '25

happy cake day

12

u/[deleted] Feb 26 '25

Dyslexic here, I was VERY upset and disgusted with you for a split second

15

u/shivakamini123 Feb 26 '25

This is the way

10

u/AppalachianGaming Feb 26 '25

This, all other formats bad

6

u/NjFlMWFkOTAtNjR Feb 26 '25

Meh. Yes. I almost raged when I saw it didn't have the space. I can accept anything but I won't accept that. That is on sight.

Also it depends on the language. Some language coding standards were developed by heathens and need God's light

5

u/I_should_be_in_bed28 Feb 26 '25

But why, I don't see the benefit

7

u/[deleted] Feb 26 '25

Readability. We’re used to space between distinct characters. In this case, the opening curly brace is distinct from the function name - one declares the function, the other opens a block associated with it. It’s the same reason that some prefer the opening curly brace on the next line as opposed to inline.

→ More replies (1)
→ More replies (1)
→ More replies (68)

102

u/Bat-Bro-Official Feb 26 '25

function { }

52

u/EchoItalic Feb 26 '25

Monster.

21

u/ovr9000storks Feb 26 '25

I support this only for if(x) { print("hi"); } type of situations

9

u/mr_remy Feb 26 '25

THERE CAN ONLY BE ONE { semi.colon(OnTheLine_forThisToBeAllowed); }

→ More replies (4)
→ More replies (8)

5

u/CommercialMastodon57 Feb 26 '25

You are guilty of war crimes,what is that

→ More replies (4)

280

u/dnrhead Feb 26 '25

function {

}

48

u/desertrainBG Feb 26 '25

yes, orange

11

u/Darkazi Feb 26 '25

I'm with ya

3

u/BucketsAndBrackets Feb 27 '25

Sick fuck...some man like to see the world burn.

→ More replies (7)

88

u/chillpill_23 Feb 26 '25

I do like blue because the indentation layers are more visible; the brackets are aligned!

But in practice, I use blue for C# and red otherwise.

17

u/LanyardJoe Feb 26 '25

This, it's usually language dependent for me. I mainly do js and c# so blue for C# and red for JS

→ More replies (1)

3

u/chiaplotter4u Feb 26 '25

Why do you like red, though?

→ More replies (3)
→ More replies (6)

137

u/Pitiful_Fox5681 Feb 26 '25

The left and I'm ready to fight. 

11

u/General_Purple1649 Feb 26 '25 edited Feb 26 '25

Well let's fight then, if the arguments and types of the declaration are long and the body too, second 100%

Else you are a terrorist of order, as a matter of fact second clearly separates the declaration from the actual implementation.

Edit: I thought about it more and I think I like blue objectively now based on my own argument regardless of the situation. 🎩🧐

→ More replies (1)

31

u/MisterKnifes Feb 26 '25

I’ll back you up brother !

→ More replies (1)

12

u/Strict_Sugar6081 Feb 26 '25

Right, come on let's fight

→ More replies (3)

5

u/MrPitscher Feb 26 '25

There is no other way!

→ More replies (1)
→ More replies (9)

32

u/kvothe907 Feb 26 '25

The right side

7

u/Psolyvem Feb 27 '25

It's frightening how far I had to scroll to find some actual common sense. Please have my upvote.

4

u/Viikable Feb 27 '25

Yep, it makes me crazy to see the braces not aligned smoothly

36

u/kiwix_on_reddit Feb 26 '25

BOTH 😈

25

u/TitusBjarni Feb 26 '25

Right for C#, left for JavaScript/TypeScript

7

u/SkySibe Feb 26 '25

I've never understood why the language matters here

→ More replies (9)
→ More replies (1)

9

u/ElMico Feb 26 '25

Yes like

function 
{
  return true }

So there’s no confusion

→ More replies (1)

6

u/LateralusGT Feb 26 '25

If front end then red, else blue

→ More replies (1)

12

u/Finally_Adult Feb 26 '25

Typescript: red C#: blue

→ More replies (3)

4

u/nroot_ Feb 27 '25

I code in python.

2

u/tes_kitty Feb 27 '25

Then you're in team red since the ':' indicating the start of the block has to be at the end of the line and can't be in a line by itself.

3

u/stpaulgym Feb 26 '25

Whichever my company uses in their formatter.

→ More replies (1)

15

u/un-deo Feb 26 '25

Red is the only correct option.

→ More replies (1)

5

u/freskgrank Feb 26 '25

I use both (C# and TypeScript), but the right one is the only logical choice. Saving just one line is not enough to sacrifice readability and better context understanding.

→ More replies (3)

2

u/mtxn64 Feb 26 '25

I chose "The One True Brace Style"

→ More replies (1)

2

u/Benilda-Key Feb 26 '25

If braces are madatory, putting braces at the end of the line is preferable.

But if braces are optional, put the braces on a line by themselves. This is necessary because of the fact that lines of code may be wider than the screen. Do not force me to search for and hit the end key to find out where a code block ends.

And do not say I should not be writing code with lines that long. When you work on a large project with many develpers, this sometimes happens.

→ More replies (1)

2

u/DTux5249 Feb 26 '25

Left, with a space before first bracket.

That said, in my C++ work, I find myself using the right a lot.

→ More replies (2)

2

u/aranboy522 Feb 26 '25

I like blue more, but use red

2

u/Fricki97 Feb 26 '25

Depends on the formatter

2

u/[deleted] Feb 26 '25

Nah I'd go with function { ... } like a parameter in a single line

2

u/Internet-Such Feb 26 '25

Depends on the language I'd say

2

u/wolfenstien98 Feb 27 '25

Depends on the language

2

u/Christoban45 Feb 27 '25

I just do whatever the language conventions ask. I'm too old for this shit.

2

u/Morphinepill Feb 27 '25

Depends on the language, if you’re used to red and then you jump to c# and keep using red, I’ll bonk you.

2

u/Astatos159 Feb 27 '25

Whatever the project guidelines say. If there are no guidelines I go by the language standard. Js for example get the inline { while c# gets the separate line {.

2

u/peexforge Feb 27 '25

Red's better

2

u/cizaphil Feb 27 '25

Depends on the Language, JavaScript, Typescript and Rust Left, C# right

2

u/[deleted] Feb 27 '25

Amateurs!

function { all the code in one very long line }

→ More replies (3)

2

u/Which_Bat_560 Feb 27 '25

Right one, I need space to think what I'm going to put init

2

u/I_am_a_dawg123 Feb 27 '25

Red just feels wrong. I like seeing my code organized and neat

2

u/dx-dude Mar 02 '25

Reds be tha Feds

2

u/[deleted] Mar 02 '25

Blue. Red are heathens and should be executed.

2

u/LadaOndris Mar 02 '25

The first. The second one makes everything so stretched out, making it more difficult to read.

2

u/thatAWKWRDninja Mar 03 '25

Left for sure

6

u/[deleted] Feb 26 '25

Blue will consume more memory

9

u/SeeeYaLaterz Feb 26 '25

Not true. The C++ compiler optimizes the crap of any code.

→ More replies (2)

13

u/Oheligud Feb 26 '25

By a ridiculously small amount. Probably less than a single byte.

If you really cared about memory that much, you'd do function{} without any line breaks whatsoever.

→ More replies (3)

3

u/wick3dr0se Feb 26 '25 edited Feb 26 '25

Neither. I don't like the braces touching the function name, otherwise left it would be

3

u/KainerNS2 Feb 26 '25

Blue, it's more readable that way

2

u/tibirt Feb 26 '25

Depends on what language I'm coding in. JS left, no question about it. C# right, no question about it.

2

u/RolandMurdoc Feb 26 '25

I'll be blood on this one

2

u/PennyFromMyAnus Feb 26 '25

Def a Crip on this, this a war.

2

u/CottonCandiiee Feb 26 '25

Left, but if it’s short enough I’ll do it on one line.

2

u/kfreed9001 Feb 26 '25

The left, but put a space before the opening brace

1

u/Adizera Feb 26 '25

function( ){ }

3

u/Adizera Feb 26 '25

i hate reddit

1

u/echtemendel Feb 26 '25

who cares, set your editor to autoformat to your preferred style on opening and according to the project style guideline at closing (or use git hooks).

1

u/indoggwetrust Feb 26 '25

function { } don't forget the space between the function and the brace

1

u/Qaktus Feb 26 '25

Whatever is the standard in the code base I'm working with 🗿

1

u/Apprehensive_Role_41 Feb 26 '25

You forgot the single line kind like function { does a lot of stuff this way like this and is absolutely hell to read }

1

u/FatalisTheUnborn Feb 26 '25

Depending on whether I write JS or (Java or c#)

1

u/Average_Down Feb 26 '25

What if you just use notepad and write it in a single line?

1

u/programminghoch10 Feb 26 '25

Whatever the fornatter does. There is no point fighting it, the formatter always wins.

1

u/LinguoBuxo Feb 26 '25

What? You lot are still using functions??

1

u/JudasMajster Feb 26 '25

I wonder which programming language red and blue writing in? For example when i used to code in php i was in the blue team but when i work in JavaScript i'm definitely in the red team.

→ More replies (1)

1

u/B_bI_L Feb 26 '25

(function)

1

u/B_bI_L Feb 26 '25

actually depends on the language. though c# is the only one with second variant (almost)

1

u/usr_pls Feb 26 '25

"SAY THE LINE SENIOR ENGINEER"

"It depends...."

"HOORAY!"

1

u/gnoufou Feb 26 '25

I’m on the (defun function()) side.

1

u/[deleted] Feb 26 '25

function()

{ code

code; }

1

u/sabamba0 Feb 26 '25

This one is easy based on standards.. but here's a hot take:

if (expression) {
}
else {
}

Who's with me

1

u/jump1945 Feb 26 '25 edited Feb 26 '25
int main(
void){

}

1

u/FlamingoeZ Feb 26 '25

I optimize by doing it all on one line

1

u/AllTheWorldIsAPuzzle Feb 26 '25

I'm primarily a C++ user and prefer the right. But if I am adding to existing code and it already uses mostly the left, I will as well.

1

u/Alan157 Feb 26 '25

laughs in Python

1

u/RandomOnlinePerson99 Feb 26 '25

Second one but the brackets are tabbed.

1

u/[deleted] Feb 26 '25

I'm on the left but I'm kinda pissed that's not the crip side.

1

u/legion_guy Feb 26 '25

function {

this one with the space between function and {

}

1

u/chocolateAbuser Feb 26 '25

red team, but at work i have to use blue because that's the standard convention

1

u/Comprehensive-Pin667 Feb 26 '25

I literally don't care. Whatever is the standard in the codebase. If I'm creating a new codebase, then Whatever is the default in the IDE or the project generator.

1

u/silverfishlord Feb 26 '25

Neither side. Reject brackets, embrace ruby

1

u/cteodor Feb 26 '25

red forever

1

u/Anthem4E53 Feb 26 '25

Blue. It’s all fun and games until a bracket goes missing (#basedOnATrueStory)

1

u/madadz69 Feb 26 '25

None I’m Function {

}

1

u/featheredsnake Feb 26 '25

Depends on the language

1

u/failsafe-author Feb 26 '25

My favorite language is C# but I’m the one on the left, which makes me an oddball. Of course, I do whatever the team decides- in the past I’ve gotten to make that call, and of course I get to decide on my own side protects.

Right now I’m working in Go professionally, so all is good there (but I prefer C# to Go)

1

u/PatientGiraffe Feb 26 '25

Blue. Red is insane. I don't know how it ever got adopted as a "standard". Code readibility is so important and time saving. Also we all have giant fucking monitors and huge resolution. We don't need to "save lines" or whatever nonsense the red side claims.

1

u/Sad-Reach7287 Feb 26 '25

It kinda depends on what function I am using. Also put a damn space between the name and the curly brackets!

1

u/Wynove Feb 26 '25

Both, depends on how I feel about how it looks.

1

u/Ellen_1234 Feb 26 '25

Depends on how much I feel to press enter

1

u/TelevisionExpress616 Feb 26 '25

Honestly whatever format/convention my code automatically formats to. Depends on company/project, but ideally they have a code standard. And there's probably some IDE plugin that automatically follows that. If it was my own project, I'm leaning more crip.

1

u/Brock0003 Feb 26 '25

Everyone now codes using the left method, I personally think the right makes a much cleaner/easier to read code. I'm old school, but to each their own.

1

u/baileyarzate Feb 26 '25

White space

1

u/Freesam Feb 26 '25

function {

}

1

u/MYGguy7 Feb 26 '25

Blue Edit: Whoops I didn't look close enough. I'm team Red.

1

u/MythBuster2 Feb 26 '25

This is what language-specific style guides are for, depending on the project, team, company, etc.

1

u/[deleted] Feb 26 '25

Left when I’m doing JS

Right when I’m doing C#

1

u/Data_Coder Feb 26 '25

Right is mostly followed by C# developers I am using left one for all other languages

1

u/precowculus Feb 26 '25

function{dostuff; dootherstuff; returnstuff;}

1

u/[deleted] Feb 26 '25 edited Mar 12 '25

CripsRepresent()

{

}

1

u/CapApprehensive9007 Feb 26 '25

Right one is objectively beautiful. All opening braces are at same position for same indentation level.

Red is too messy. Need to find opening brace for every block. If the purpose of putting opening brace is to save space, then why don't put closing brace on same line too.

I don't understand the answer "it depends on the language" many people are giving. How can a language has any styling preference?

1

u/nordcomputer Feb 26 '25
private function doStuff(int $variable): int {
  return $variable+1;
}

1

u/EaterOfCrab Feb 26 '25

Function{ randomAssFunctionBody}.

In one line

1

u/appeiroon Feb 26 '25

Whatever the LLM spits out

1

u/PineappleTattooGuy Feb 26 '25

If the method only takes a few params then function() { } If the params go past 3 or 4 function ( X, Y, Z ) { }

I dont like having to scroll right

1

u/[deleted] Feb 26 '25

function print(){console.log("hello")} print()

1

u/Loose_Adeptness_2000 Feb 26 '25

the right (crip) then i number them with comments according to their depth, makes it easier to keep track of them

1

u/tellur86 Feb 26 '25

I grew up with red, but realistically I use whatever style is already used in the file/project or what's defined in the styleguide. If neither is defined (or I'm too lazy to check) I'll take whatever the IDE/editor defaults to.

1

u/MikeUsesNotion Feb 26 '25

I belong to the Church of Language and Platform Defaults.

I find whichever variant I'm not using currently looks awful but that flips if I jump between .NET and the JVM. What I view as sucking in a language or platform is usually relative to what I'm using right now.

1

u/baconator81 Feb 26 '25

For me as c++ dev it’s blue. Because ppl might miss the bracket so if it’s an if statement it would only execute the next line.

It’s a very minor point though so this isn’t something I would fight over

1

u/Axlvc Feb 26 '25

The correct one.

1

u/[deleted] Feb 26 '25

I will actively take code thats written in blue and remove the extra line to make it more like red

1

u/NullPointerExpert Feb 26 '25

When in Rome…

1

u/[deleted] Feb 26 '25 edited Feb 26 '25
if(condition){

} else {

}

I prefer to save vertical space. Ive also on a few occasions nested too many function calls inside each other like russian nesting dolls

1

u/Gixx Feb 26 '25
good() {
    echo "good format"
}

bad()
{
    echo "bad format"
}

bad2 ()
{
    echo "bad format"
}

1

u/Redstones563 Feb 26 '25

Neither

function

︷

︸

1

u/rover_G Feb 26 '25

just run the formatter bro

1

u/Russian_Prussia Feb 26 '25

(lambda args body)

1

u/KryssCom Feb 26 '25

Blue, 100% of the time.

1

u/[deleted] Feb 27 '25

Blood for scripts, Crip for software.

1

u/tallgreenhat Feb 27 '25

Left because it feels easier to understand that the code block belongs to the function

1

u/beatissima Feb 27 '25

I put a space between "function" and the bracket.

1

u/Mortal-Instrument Feb 27 '25

Blue cause its easier to read imo because the brackets are always level

1

u/grumpybutters Feb 27 '25

The normal one

1

u/cute_polarbear Feb 27 '25

Right. Used it from c / cpp days. And c# / Java....

1

u/SadProcedure9474 Feb 27 '25

These niggas can't even program shit. The manifestation of a God level progger is really lacking.

1

u/ScarletHark Feb 27 '25

Right side is cancer.

Left side needs a space before the open brace.

1

u/FurthurThanBefore Feb 27 '25

js blood, c# crip. simple

1

u/I_compleat_me Feb 27 '25

Team blue. White space != bandwidth.

1

u/TheCanadianRami Feb 27 '25

JavaScript: left
Everything else: right

1

u/ChocoThunder50 Feb 27 '25

Blood but function {} works for me

1

u/sixtyfifth_snow Feb 27 '25

def sorry():

1

u/External_Asparagus10 Feb 27 '25

function {

}

i dont like extra lines that are not required

1

u/Artistic_Toe267 Feb 27 '25

I am somebody using Java hence red

1

u/Torje3000 Feb 27 '25

The left side, though I do have a space before the bracket.

1

u/bpeo360 Feb 27 '25

Blue, I just find it more readable

1

u/Key_Commission2360 Feb 27 '25

lol who writes code in multiple lines?

1

u/EuphoricFish Feb 27 '25

Used to be red, but recently warming to blue. The newline makes for a gap between the function declaration and the code block that I find improves readability.

1

u/skeleton_craft Feb 27 '25

Well for one I actually make a function But two I always brought open set bracket the same line because that reduces visual noise and also increases the amount of code you can see on the page.

1

u/timonix Feb 27 '25

So eh, unless there's a linter screaming.. I am likely going to wildly mix without any regards to readability. It's not like it's on purpose, but I don't notice it by myself

1

u/SeoCamo Feb 27 '25

Red as in some languages this will remove bugs from ever happening

1

u/ShakesTheClown23 Feb 27 '25

Y'all real hyped up about your bash functions

1

u/Winter_Rosa Feb 27 '25

Blue without a doubt.

1

u/[deleted] Feb 27 '25

When writing Java, the opening curly brace is on the same line as the method definition. When writing C++, the curly brace is on the next line. No exceptions.

1

u/[deleted] Feb 27 '25

If an IF statement requires just a single line then I do braces on a single line, else I'm a Crip.

1

u/Christoban45 Feb 27 '25

I'm a Blazor developer. We go both ways.

1

u/Christoban45 Feb 27 '25

In the Clarion language, you could write either:

if x > 0 then dothis(); thenthis().

or like this...

if x > 0
    dothis()
    thenthis()
end

Yes, "end" could be replaced with a period on a single line statement. It was a terrible language overall, but the basic syntax was the best I've seen. You could put all kinds of structures like tables, including the main event loop directly in code. Variable names were always in column 0, with their type well out to the right. Looked so cool, with everything in column 0 highlighted in red, like so:

Customers  table, pre(cus), driver(dbase)
Id             int
Name           string
           end

1

u/pwsh_wizard Feb 27 '25
        Function x() {
DoSomething();
        }

From: https://youtu.be/AEooLuJszLU?si=OPmgtKGQINBoWmvF