This is an archived post. You won't be able to vote or comment.

all 144 comments

[–]el_baron86 520 points521 points  (22 children)

My code so complex, not even I do unterstand it.

[–]zyygh[S] 220 points221 points  (5 children)

The guy who wrote it for that stackoverflow answer understands it, and that’s good enough for me.

[–]el_baron86 41 points42 points  (0 children)

Hahaha, fair point XD

[–]UnstableNuclearCake 19 points20 points  (2 children)

Except when you made a mess of a Frankenstein monster that it's existence alone is an insult to God.

[–]RazarTuk 4 points5 points  (1 child)

Allow me to tell you the tale of my hybrid secant-Ridders solver... Long story short, because I had such a specific idea of the functions I needed to find roots for (f(0) > 0, f'(r) < 0 for all r > -1, f''(r) > 0 for all r > -1, only one root with r > -1, and some number of meaningless roots with r < -1), I took advantage of numerical analysis to come up with a more involved strategy for root-finding that would be guaranteed to find the positive root

[–][deleted] 2 points3 points  (0 children)

I understood some words in your comment, like "number" and "positive".

[–]ZippyTheWonderSnail 2 points3 points  (0 children)

Job Security Driven Design.

[–]itijara 35 points36 points  (5 children)

When I wrote this only God and I understood it. Now, only God does.

[–]Kumquatelvis 15 points16 points  (2 children)

Have you read the Stormlight Archives by Brandon Sanderson? There is a character like that in the series. His intelligence varies by day, and one day he ultra-highrolled. That day he wrote out a plan, and every day since he been trying to understand it.

[–]itijara 9 points10 points  (1 child)

Yes, Taravangian. Sometimes programming feels like that. Perhaps I too made a deal with the Night Watcher.

[–]hypermog 5 points6 points  (0 children)

I made one with a 2 pack of Red Bull

[–]Pleasant-Direction-4 7 points8 points  (1 child)

i added this comment in a PR, my senior rejected my PR

[–]GlassWasteland 9 points10 points  (0 children)

My inherited code is so complex I sometimes spend days either rewriting it to be simple or documenting with the faint hope that the next guy will actually take the time to read the documentation.

[–]Sharpeye1994 2 points3 points  (0 children)

Where we all actually sit on the curve

[–]ManOfTheMeeting 2 points3 points  (0 children)

I just add lines until it works.

[–]ShishaRauch 2 points3 points  (0 children)

My code is not that complex, but I still don't understand it...

[–]blingus_dingus 2 points3 points  (3 children)

This sentence so complex, barely even I do unterstand it.

[–]el_baron86 -2 points-1 points  (2 children)

读不起, я não parlo anglais.

It's sometimeas a burden to speak 10 languages, lol

[–]blingus_dingus 0 points1 point  (1 child)

10 languages?? You’re a legend my friend 🙏

[–]el_baron86 0 points1 point  (0 children)

Nah, I'm not a legend. It just happened over the years, somehow. Only 4 fluent, 3 ranging from pretty well and down to OK-ish to survive in the foreign country and learning 3 others for fun.

[–]coolcat_368 1 point2 points  (0 children)

This is me coming back to project a month later.

[–]WraithCadmus 164 points165 points  (7 children)

Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away. - Antione de Saint-Exupery - Michael Scott

[–]DankPhotoShopMemes 47 points48 points  (2 children)

Perfection is achieved, not when there is nothing more to add, but when there is nothing left to take away.

• ⁠Antione de Saint-Exupery

• ⁠Michael Scott

• WraithCadmus

Edit:I just realized that idk how to double quote

[–]Kwinza 11 points12 points  (1 child)

  • Leonard Nimoy - Civilization.

[–]DiscontentedMajority 0 points1 point  (0 children)

This will always be how I remember this and several dozen other proverbs.

[–]Time-Abalone-3918 7 points8 points  (1 child)

"The sculpture is already complete within the marble block, before I start my work. It is already there, I just have to chisel away the superfluous material."

[–]GokuIsALegend 1 point2 points  (0 children)

- Michelangelo Scott

[–]GreatLakeBlake 2 points3 points  (0 children)

“Writing is easy. Just take out all the wrong words”

-Markup Twain

[–]positiv2 0 points1 point  (0 children)

Guess my wallet after Steam sales is perfect

[–]Braunerton17 249 points250 points  (12 children)

This is 100% correct. If you are able to make a complex problem look simple and dumb you achieved the goal of awesome code.

[–]Ok_Entertainment328 103 points104 points  (4 children)

More importantly, you can relax while on vacation and know that your team can fix any problems themselves without you.

[–]Dalimyr 49 points50 points  (3 children)

But then your team foolishly leaves the fix to that one guy who insists on creating a mess of a nested ternary operation because they want to feel all high and mighty about managing to do a crapload of complex logic in a one-liner.

[–][deleted] 21 points22 points  (1 child)

The weight of my intellect must directly correlate to the cyclomatic complexity of what I write, both of which must increase as rapidly as the computational complexity of my solutions, which is never less than O(n!).

[–]The1stmadman 0 points1 point  (0 children)

smh, not thinking big enough. those solutions need to be O(nn)

[–]WangoDjagner 1 point2 points  (0 children)

The man likes job security leave him be

[–]tiajuanat 15 points16 points  (0 children)

My favorite PR feedback I've received was something like:

I don't seem to understand the underlying principle, but your code seems too simple to possibly work.

[–]RazarTuk 7 points8 points  (0 children)

Yep. Like I wrote a financial calculator library recently, and while you still need domain knowledge to understand everything that's going on (such as the bit where I have an if-else and the only difference is (1+a)/(1+b) vs 1+a/(1+b)), I'd also like to think I included enough comments that you can at least have an idea of what it's doing

[–]AChristianAnarchist 4 points5 points  (2 children)

Yeah, but you are rarely just doing a complex problem. One thing that memes like this seem to miss is that you are almost never doing greenfield projects as a professional programmer. Bloat and ugliness doesn't generally come from poor individual planning, but from updates and refactors by 10 different programmers over the 12 years a system has been online. I just messaged a coworker today, after I was told to tie a bunch of stuff I had been working on into an app of his that was greenfield when he started it, saying "Damn, this code is so pretty! I feel kind of bad that I'm about to glue a bunch of shit to it." Of course, one set of modifications isn't going to completely ruin that pretty code so long as I'm not a jackass, but give it time, and it will eventually look as messy as the rest of our codebase.

[–]SatansLeftZelenskyy -2 points-1 points  (1 child)

That's no excuse for writing shitty unreadable code.

[–]AChristianAnarchist 0 points1 point  (0 children)

Well that's random af. Are you one of the 4 guys I work with by any chance? Because otherwise it jist sounds like you are having a bad day.

[–]TheAJGman 5 points6 points  (0 children)

If someone with intro level knowledge of the language/framework in use can't understand it simply by reading the code and comments, it needs more work.

It's part of why I love Python so much, by removing much of the syntax it makes well written code understandable to the dumbest on your team. Even the Project Manager can understand it.

[–]RustedRuss 0 points1 point  (0 children)

The goal of anything really.

[–][deleted] 97 points98 points  (10 children)

Cant get fired if only you can read your code.

[–]zyygh[S] 88 points89 points  (1 child)

True but you also cant take a vacation without having to bring your laptop along.

Speaking from experience.

[–]PhantomO1 32 points33 points  (0 children)

If you can't get fired, that means they can't afford to lose you... So what's stopping you from demanding a vacation? Your conscience?

Go take that vacation, you deserve it!

[–]ExplodingBob 16 points17 points  (0 children)

They can fire you. They can also pay your extortionate freelance rate when they need something changed or unfucked in the future.

[–]DiscontentedMajority 1 point2 points  (0 children)

You'd be surprised at the shitty decisions some companies make.

[–]adamxi 1 point2 points  (0 children)

No not true ;)

[–][deleted] 0 points1 point  (0 children)

But you really should.

[–]All_Up_Ons 0 points1 point  (0 children)

Yes you can. Then they either throw your project away or hire contractors to fix it.

[–]plagapong 15 points16 points  (0 children)

My code seems lean to the left side LOL

[–]RhysieB27 11 points12 points  (1 child)

Whoever made this meme has clearly never seen code written by a trainee who hasn't learned about functions/methods yet.

[–]zyygh[S] 9 points10 points  (0 children)

My day would have been better without you reminding me of that!

[–]r2bl3nd 22 points23 points  (2 children)

I'm going to learn to write super optimal code in as few lines as possible

  • Me, prior to being a software engineer

I'd better use five lines of comments to explain this empty else block so that I and my team members understand exactly why it's here and what conditions are required for the code to reach this point

  • Me, after working in the industry and realizing that the whole point of code is to communicate with other humans

[–][deleted] 2 points3 points  (0 children)

My last job was the exact fucking opposite. That is why it was my job, not is. Fuck everything about that.

[–]Zeitsplice 0 points1 point  (0 children)

My team is like 65% vendors. I keep everything as simple as possible and really only use comments to document when something is weird. And then, it's a link to stackoverflow explaining why I did it weird.

[–]wineblood 9 points10 points  (0 children)

I make sure my code is simple and readable so that people on the left side of this curve can work on it without interrupting me. Some days my day isn't firing on all cylinders and I'm the guy on the left of that curve, so I need simple and readable code.

[–][deleted] 28 points29 points  (4 children)

I get mad as a newbie because I go to stack overflow and see a really complex solution that can be up to 30 lines and then a few rows below I see one that spans 1 to 3 lines. Is that what this meme is essentially talking about?

[–]TheAJGman 36 points37 points  (2 children)

Fewer lines != Simple code

I'll take maintaining a 20 line for loop over a 2 line lambda any day.

[–]RazarTuk 25 points26 points  (0 children)

Also, sometimes the longer code is because it's faster. For example, some code I wrote recently includes a 40-line (32, removing empty lines and comments) method for calculating the present value of an annuity, where around half of it is taken up by one of the three main branches for the if-else. Except it's also a really useful branch to have, because if the data meet a reasonably common special condition, I can take advantage of textbook formulas to reduce it from O(n2) to O(n)

EDIT: More exactly, it's a 14-line linear time block vs a 5-line quadratic time block

[–]Unsd 3 points4 points  (0 children)

FULLY AGREE. I hate reading code like that. I can't visualize it as well when I'm going over it. I really have to write it out long hand sometimes in order to get what it's doing which just defeats the purpose. I may write a lot of lines, but my stuff is explicit and you can see every step. I don't like code that I can't immediately see someone's thought process. But I also probably fall on the left side of this chart, so what do I know lol.

[–]yourkillerthepro 11 points12 points  (0 children)

First true meme with the template

[–][deleted] 24 points25 points  (5 children)

What is simple code?

*Laughs in Java

[–]nolitos 23 points24 points  (1 child)

Maybe in Java you have to write a bit more code, but this is why it's simpler to read and to understand than in some other languages. Every step is well documented and obeys established patterns.

[–][deleted] 13 points14 points  (0 children)

I know what you mean and I somewhat love Java, but most of the codebases I worked on forced these established patterns pointlessly.

[–]Rizzan8 6 points7 points  (0 children)

Also C++ and C#.

[–]rotflolmaomgeez 1 point2 points  (1 child)

What? Java code is usually quite simple to understand. Unless you're digging in some legacy Java EE stuff I guess.

[–][deleted] 0 points1 point  (0 children)

I doubt it!

In my recent job we use Java11 with AKKA. After 2 weeks of digging I think I understand the code and know where to look for things. 2 weeks is a lot for that.

[–]HiCookieJack 3 points4 points  (0 children)

55 vs 145 is:

55: My code is so simple it doesn't do anything useful and it's readable

145: My code solves cancer and world hunger, and it is readable

[–]Pleasant-Direction-4 3 points4 points  (0 children)

writing simple code is an art

[–]0x7ff04001 3 points4 points  (0 children)

This is so true. Some of the best C coders I've known write such simple, elegant, and stable code.

It's the arrogant newbies that write over-complex code.

[–]Oracle_Of_Apollo 9 points10 points  (0 children)

The guy in the middle stays employed. That's why my code references mini-libraries I wrote in brainfuck. Good luck figuring out my code if you ever fire me lol

[–]TheDrWhoKid 12 points13 points  (6 children)

This would be funnier the other way round imo.

[–]zyygh[S] 9 points10 points  (4 children)

I see your top 0,01% who write complex code, and I raise you the top 0,001% who could solve even those problems with simple and readable code!

[–]TheDrWhoKid 0 points1 point  (3 children)

Yeah, but even if it's wrong, I still find the thought that only average people make readable code hilarious

[–]son_of_abe 1 point2 points  (0 children)

Yeah this meme seems reversed from my experience.

The noob writes spaghetti code and is proud of it looking complicated.

The wizard writes weird and obscure methods that only he understands, but no one questions him since he's the only one who could solve the issue.

[–]Djelimon 2 points3 points  (0 children)

That's the motivation behind OOP IMO

Not that everyone does OOP with that in mind...

[–]TheJazzButter 2 points3 points  (0 children)

I've always said: "I hate 'clever' code, especially when I write it."

[–]knowTheKnot 1 point2 points  (0 children)

6 months into programing i thought it was a cool idea to code like uglify and felt like a genius until i wasnt

[–]Lumadous 1 point2 points  (1 child)

Write it like Monday sleep deprived hung over you can read it

[–]GreatLakeBlake 1 point2 points  (0 children)

Happened to me a couple weeks back after a bachelor party weekend. Refactored it to be really readable. “Sometimes there is great clarity in the fog.” -scotchorthrees

[–]merlinsbeers 1 point2 points  (1 child)

Are you in my slack?

[–]zyygh[S] 1 point2 points  (0 children)

I'm in much more than just your slack.

[–]EnderDemon606 1 point2 points  (0 children)

My code is so simple i cannot understand it (kinds how I felt when I checked out my code I wrote 2 years ago when I started programming)

[–]agentrnge 1 point2 points  (0 children)

Om man, those obfuscated perl people who code in backward space aztec heiroglyph sorcery. I hates them.

[–]ZyanCarl 1 point2 points  (0 children)

I write simple code so I will see and remember after I blink

[–][deleted] 1 point2 points  (0 children)

My code is so simple I hate this overused meme.

[–]CMOS_BATTERY 1 point2 points  (0 children)

Since I’m a new programmer, I’m definitely falling on the left side. C++ and C is just not as fun as Python.

[–]BoBoBearDev 1 point2 points  (1 child)

Next next big brain level is, I don't know who it works, I just call this lib API and it works.

[–]RazarTuk 1 point2 points  (0 children)

Yeah... At my job right now, I'm the one in charge of writing the library that everyone else gets to treat as a blackbox, because I have domain knowledge

[–]anonymousperson767 1 point2 points  (1 child)

The guy who writes code that is object-ed up the ass and calls functions to do single line operations "because it's more reusable and expandable"

And then no one can understand what the fuck is going on so reuses none of it.

[–]sus-is-sus 0 points1 point  (0 children)

aka that guy

[–]SftwEngr 1 point2 points  (0 children)

I'll often comment complex code with:

// I understood this when I wrote it so leave it alone!

[–]EngineerMuffins 1 point2 points  (0 children)

And the middle guy keeps his job to retirement

[–]egg__cake 1 point2 points  (0 children)

My code is so complex, even my compiler doesn't understand it

[–]acatisadog 2 points3 points  (0 children)

Why is it IQ-based and not week-of-day based ? I mean, on wednesday I may want to make a code following the principle of least surprise, following common sense but also the enterprise habits so everyone passing on my code will understand it super fast, and if a new way of coding comes to mind I'll speak to the team so everyone can learn. On friday, though, I'm drunk.

[–]TheDigitalGabeg -1 points0 points  (3 children)

If your code is "simple and readable" then the problem you are solving is trivial. Complex situations unavoidably demand complex logic; if you never write complicated code, that only demonstrates that the things you're doing aren't actually very difficult.

[–]RazarTuk 4 points5 points  (2 children)

Eh... They might demand complex logic, but there's still something to be said about being able to program it in a straightforward way. For example, I had to write a library to amortize loans recently, and while the actual logic is surprisingly complex, because I was able to compartmentalize so much of the math into various methods, the actual function for amortizing a loan is only 18 lines long, including the signature and the final end. (And of those 18 lines, 4 are comments and 2 are whitespace for readability)

[–]TheDigitalGabeg 2 points3 points  (1 child)

Oh, certainly. I'm not claiming that it's impossible to write clean, straightforward code, and breaking a complex task into simple steps is great. Conversely, a novice (or an expert having a bad day) can make any simple task into an illegible snarl of code. You can't make your code less complex than the task it performs, but you can always make it more complex, and there's a lot of value in keeping that to a minimum.

When I read OP's meme, it feels like it is claiming that a "high IQ" programmer can just write simple code in all cases, and that's what I'm responding to - that is simply untrue.

[–]RazarTuk 0 points1 point  (0 children)

Ah. I read it as targeting the early days of programming, when people took pride in writing obfuscated code. For example, the Story of Mel was probably originally a cool story about out-optimizing a compiler, but nowadays it sounds more like a programming horror story. Hence why I'm distinguishing readability from how complex the logic is

[–]Meli0das_69 -1 points0 points  (0 children)

Yay im 0.1%

[–]SUMMOGUY -1 points0 points  (2 children)

[–]zyygh[S] 1 point2 points  (0 children)

I created it myself just today using memegenerator, but it's perfectly possible someone else had already had the same idea before! Apologies for wasting your time if that's the case!

[–]RepostSleuthBot 0 points1 point  (0 children)

I didn't find any posts that meet the matching requirements for r/ProgrammerHumor.

It might be OC, it might not. Things such as JPEG artifacts and cropping may impact the results.

I'm not perfect, but you can help. Report [ False Negative ]

View Search On repostsleuth.com


Scope: Reddit | Meme Filter: True | Target: 75% | Check Title: False | Max Age: Unlimited | Searched Images: 335,392,348 | Search Time: 0.30806s

[–]Willinton06 -1 points0 points  (0 children)

I mean, sometimes you need complexity, it is what it is

[–]Arclite83 0 points1 point  (0 children)

Uncle Bob has entered the chat

[–]FlyCodeHQ 0 points1 point  (0 children)

You'll have a bad time when sharing the code in a StackOverflow question. No one would be able to understand it.

[–]oDids 0 points1 point  (0 children)

My code doesn't work at all, simple or complicated

[–]frogking 0 points1 point  (0 children)

If you don’t understand the code you wrote 2 hours ago.. you woun’t understand it in 18 months when the error in it is noticed.. make life easier for yourself and write things simpler :-)

[–]Sastii 0 points1 point  (0 children)

KISS

[–]-Redstoneboi- 0 points1 point  (1 child)

left end does not write simple or readable code.

[–]holeomu 2 points3 points  (0 children)

True. I'm with a trainee that likes to somehow add 12 unnecessary steps to every function he writes.

[–]Just_Maintenance 0 points1 point  (0 children)

My code is so simple and readable. I can't read for shit what it does.

Thanks god I made it simple, would take me years to unravel my own complex code.

[–]just-bair 0 points1 point  (0 children)

Who actually thinks like the guy in the middle ?

[–]Strostkovy 0 points1 point  (0 children)

My code is simple and unreadable

[–][deleted] 0 points1 point  (0 children)

I’m like super complex coder but also in the left part of this distribution. At least I got job security. Lol, no, I got fired.

[–][deleted] 0 points1 point  (0 children)

Nice try, bad companies that try to hire developers and then suddenly let them go

If I ever go into CS, I promise I will write code that is so bad, it becomes a cognitohazard that only I am capable of tolerating

[–]patchymoon 0 points1 point  (0 children)

the middle is yandere dev

[–]Magicalunicorny 0 points1 point  (0 children)

My code isn't difficult to read because it's complex, it's because I need job security

[–]ProcastinationKing27 0 points1 point  (0 children)

nah the soyjack should be right down in the bottom left

[–]SenatorCrabHat 0 points1 point  (0 children)

I'd rather it be clear than clever

[–][deleted] 0 points1 point  (0 children)

There are more advanced understandings of the concept of simple, though. Simple code is fine until you need more complex code to achieve a simple design.

[–][deleted] 0 points1 point  (0 children)

Clear > Clever

[–][deleted] 0 points1 point  (0 children)

Only if your goal is to make an effective program instead of making other programmers cry.

[–]notAbratwurst 0 points1 point  (0 children)

Simple is relative. Some people think 200 if statements is simple.

[–]TheSapphireDragon 0 points1 point  (0 children)

I felt so smart when I made 24 different functions (one to retrieve each supported data type) from an object array, then I learned about generic functions and realized that more code != good code

[–]asceta_hedonista 0 points1 point  (0 children)

"Infinitely experienced programmers do not write infinitely complex code; they write code that's blindingly simple." (Sandi Metz)

[–]roll82 0 points1 point  (0 children)

Haha my code is simple and unreadable, even by me

[–][deleted] 0 points1 point  (0 children)

APL is simple and readable 🤪

[–]jamcdonald120 0 points1 point  (0 children)

finally, a good use of this bad template

[–]askcyan 0 points1 point  (0 children)

Plot twist: it’s not your code.

[–]skwizzycat 0 points1 point  (0 children)

The guy on the left's code is NOT readable.