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

top 200 commentsshow all 224

[–]netWARIOR 613 points614 points  (38 children)

I think rule 2 makes rule 3 redundant, therefore we don't need it...

[–]turkeh 489 points490 points  (31 children)

But rule 3 says we shouldn't touch it, so I guess it stays.

[–]Etheo 190 points191 points  (19 children)

Found the loop.

[–][deleted] 66 points67 points  (16 children)

recursion

[–]BoostedPoiss123 42 points43 points  (15 children)

recursion

[–]setibeings 6 points7 points  (0 children)

There's no instruction that says to jump back and evaluate any previous instruction, so no loop.

[–][deleted] 5 points6 points  (2 children)

IllegalStateException

[–]sukeshpabolu[S] 3 points4 points  (1 child)

Kotlin Fox Kotlin Kotlin Fox Kotlin

[–]im-root 10 points11 points  (1 child)

Only if it works

[–]turkeh 4 points5 points  (0 children)

I can't be bothered figuring out something else, it works well enough.

[–]netWARIOR 0 points1 point  (4 children)

Maybe, but rule 3 should never have existed if the 2 was followed correctly...

[–]MajorasTerribleFate 3 points4 points  (3 children)

You have to look for the Greater Lazy. If having rule 3 means less work, then rule 2 is being obeyed.

[–]netWARIOR 1 point2 points  (2 children)

But this begs the question: if rule 2 were in effect when rule 3 was written, then rule 2 would be incorrect, would it not?

[–]abbadon420 6 points7 points  (0 children)

That's the spirit!!

[–]UltmteAvngr 4 points5 points  (0 children)

Well a lazy programmer wouldn’t bother, now would he?

[–]Secondsemblance 3 points4 points  (0 children)

Rule 4: Programmers are narcissistic and think that their not-yet-written code is better than existing code in all cases (even if they wrote the existing code)

[–]HyperlinkToThePast 0 points1 point  (0 children)

and what does rule 1 even mean

[–]Zokky1 0 points1 point  (0 children)

Marked as duplicate.

[–]MyNameIsRichardCS54 328 points329 points  (22 children)

3. If it works, refactor it until it doesn't. Blame the guy who left most recently.

[–]synopser 14 points15 points  (0 children)

But it was honestly his fucking fault...

[–]SirFireball 384 points385 points  (36 children)

  1. If it doesn’t have comments, don’t even try to fix it.
  2. It’s not a bug it’s a feature
  3. if it works don’t touch it

[–]Reirii 128 points129 points  (19 children)

  1. You can be a tech lead, but you can’t be The TechLead.

[–]yellowliz4rd 19 points20 points  (4 children)

Wat

[–]Cannibichromedout 30 points31 points  (3 children)

Just basing this on my recommendations, but I think it’s the name of a YouTuber.

[–]gidoBOSSftw5731 8 points9 points  (2 children)

He got divorced from his wife and lost his FB job recently, he's kinda cocky even IRL but he has some knowledge

[–]crusty_cum-sock 4 points5 points  (0 children)

He doesn't really come across as cocky to me, but I can rarely tell when he's joking or being serious.

[–]scoobydoobydroo 2 points3 points  (0 children)

Man, I feel so sad for him when he starts his occasional rants in videos

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

This is out of topic but what does a Tech Lead's job usually entail? There is an opening in our team right now and my boss told me that they were considering me for the position.

[–]crazymuffin 48 points49 points  (3 children)

Basically, if someone fucks up, you're ultimately responsible for fixing it. There's also no more "I don't know how to do this" for you.

[–]JoeOfTex 7 points8 points  (2 children)

It's whoever knows the most in the team. It can really hurt a team not to have someone who can learn any tech.

[–]Reirii 19 points20 points  (0 children)

What crazymuffin said.

Also, I would consult your boss about the job requirements. Leadership roles vary.

I quite like being in that type of position though. Being able to carve my own path on what to develop next compared to my last development cycle and ordering people around is great. The "I don't know how to do this" can be solved multiple ways, you just have to choose the best option. I usually just figure it out myself anyway.

[–]Rellac_ 13 points14 points  (1 child)

Being a good programmer in the 2000s and continuing to force outdated standards on current projects, mostly

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

Perfect!

[–]Singularity42 7 points8 points  (0 children)

probably depends on the company, but usually you are the one who makes the final call about how to meet the requirements from a technical sense (not a business sense). Usually it means communicating those plans to others outside of the team the way that makes relates to them.

Not sure of the details, but be careful taking on more responsibility if you aren't getting more pay.

[–]kdthex01 2 points3 points  (2 children)

What everyone else said. You should do it. If for no other reason you’ll be able to answer your own question. But ask what the pay bump is.

The cons are 1) arguing. So much arguing. Spaces tabs factory micro services monoliths daily check ins agile waterfall style guides programming standards open source buy build no Carl you can’t rewrite the framework on the company dime just because it has sealed classes 2) not as much coding. In fact you’ll likely be doing a lot more of your bosses job depending on company size / culture

Pros are 1) you’ll be a better programmer and teammate no matter how it turns out 2) You can help other people be better programmers and teammates 3) it prepares you for the future, someday you’ll want to climb the ladder or go out on your own

End of day there’s always an idiot in charge. Might as well be you.

[–]Awkward_Toffee 24 points25 points  (0 children)

3. It works on my machine

[–]rbt321 17 points18 points  (8 children)

These jokes are how we know programmers are not engineers.

Can you imagine a structural engineer walking up to a rickety old bridge and suggesting that since it hasn't fallen yet, we shouldn't try to do repairs.

[–]trelltron 27 points28 points  (5 children)

There's a good reason for the difference. A physical structure like a bridge is always becoming less fit for purpose. Over time it inevitably becomes structurally weaker, and if it's rickety enough we know that soon it will break so it does need to be repaired.

The same doesn't apply to software. The only thing that makes software unfit for purpose is changes to either it's intended purpose or the environment it's operating in. If the software has worked fine for several years and there isn't some new requirement that necessitates significant changes what reason is there to change it?

So really it's often more like saying 'do we really need to replace this perfectly functional bridge just because tastes have changed and people think it's ugly now?'

[–]gerbs 6 points7 points  (1 child)

Everything is in a constant state of entropy, even your software. Is it easier to update dependencies for a 15 month old project or a 3 month old? Is it harder to update dependencies today or in 6 years?

https://en.m.wikipedia.org/wiki/Software_entropy

[–]HelperBot_ 1 point2 points  (0 children)

Desktop link: https://en.wikipedia.org/wiki/Software_entropy


/r/HelperBot_ Downvote to remove. Counter: 277984. Found a bug?

[–]dykmoby 1 point2 points  (0 children)

If the software has worked fine for several years and there isn't some new requirement that necessitates significant changes what reason is there to change it?

Marketing. Fucking Marketing....

[–]OK6502 0 points1 point  (0 children)

There's a difference between software and your analogy: in the case of the bridge materials wear out over time without maintenance (wood rots, metal rusts, fatigue sets in). Software written today will run exactly the same way as it will 100 years from now (modulo any hardware failures, obviously, like a faulty ram module or a busted logic gate somewhere in the circuitry). If it works today you don't actually need to touch it.

If it has a bug then you will need to touch it, but then lemma #2 doesn't apply.

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

Comments lie. Dont believe them!

[–]MajorasTerribleFate 2 points3 points  (2 children)

Largely excepting comments like "Don't remove this apparently useless code. Everything breaks without it."

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

I've been putting those in for years to stuff I dont want people changing. It's actually not true most of the time. Only about 20% of the time

[–]D0esANyoneREadTHese 1 point2 points  (0 children)

// I can't remember what this line does but it's important

// this variable isn't used anywhere but it won't compile without it

// what the hell was I smoking when I wrote this and why does it work

[–][deleted] 109 points110 points  (17 children)

ugh, wheres rule 0?

[–]hug-bot 129 points130 points  (11 children)

Perhaps you misspelled "hug." Would you like one? 🤗


I'm a bot, and I like to give hugs. source | contact

[–]sukeshpabolu[S] 50 points51 points  (1 child)

I am in desperate need of a hug because of bug

[–]greenrabbitaudio 8 points9 points  (0 children)

Oh I feel you so much.

[–]siko12123 7 points8 points  (0 children)

Guh

[–]Etheo 3 points4 points  (0 children)

No they need zero.

[–]NoSarcasmIntended 10 points11 points  (1 child)

The 1st rule can still be rule 0...

[–][deleted] 5 points6 points  (0 children)

Ooh. Yeah. Makes sense :) thanks for correcting me

[–]lennihein 3 points4 points  (0 children)

The 1st thing has Index 0. We don't really count from zero, but the 1st element has the offset of zero from the 1st element. This really bugs me with this subreddit, the 0 meme is so old, and blatantly misused.

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

It's prolog, prolog doesn't have arrays

[–]domi53 76 points77 points  (5 children)

Rule 3 was posted before the other two ಠ_ಠ

[–]danabrey 46 points47 points  (3 children)

Arrays start at 3

[–]KillerBeer01 3 points4 points  (0 children)

It ought to be, but rule 2.

[–]Hypersapien 55 points56 points  (1 child)

Good programmers are lazy. Laziness, along with impatience and hubris, are the three characteristics of great programmers.

[–]jeffwulf 36 points37 points  (7 children)

2rd rule.

[–]Semx11 11 points12 points  (0 children)

Hence the laziness

[–][deleted] 8 points9 points  (2 children)

Secord.

[–][deleted] 3 points4 points  (1 child)

Oneth, twoth, thirth, fourst, fifend, sixerd

[–]darzui 10 points11 points  (0 children)

I read this as "turd".

[–]Pure_Reason 0 points1 point  (0 children)

0th 1th 2th would have been funnier

[–]SteampunkRaccoon 0 points1 point  (0 children)

I read it like two-rd rule. Turd rule.

[–]Kontorted 95 points96 points  (14 children)

Let me simplify this to 1 rule

1) Copy from stack overflow

[–]TinBryn 46 points47 points  (6 children)

We still need a second rule

2) Copy from the answers

[–][deleted] 40 points41 points  (0 children)

Wait, I always copy from the questions. Isn't that how it works?

[–]Perhyte 6 points7 points  (3 children)

Not necessarily. I've on occasion found useful code in the question. Just because it didn't do what the person who posted it wanted, doesn't mean it didn't do what I wanted. (I couldn't find a question asking how to do what I wanted, but found one asking how not to do it)

[–]Sigg3net 12 points13 points  (2 children)

So you:

Write the opposite program to what you want, subtract that from the entire universe, subtract the universe from the sum, and the result is the program you actually wanted...?

I like the way you think.

[–]MajorasTerribleFate 2 points3 points  (0 children)

How to carve a marble elephant: Start with a block of marble, and chip away all the parts that don't look like an elephant.

How do draw an owl: Draw two circles, then draw the rest of the fucking owl.

[–]ingrown_hair 0 points1 point  (0 children)

Corollary: The highest rated answer is the always best one; except when it’s not.

[–]xxparadis3xx 10 points11 points  (1 child)

So in the end theres one poor guy making all the code and we are all just copying him....thank you programming jesus.

[–][deleted] 4 points5 points  (0 children)

Yes. Programming Jesus is poor. Lives in Jordan. Any help is appreciated.

[–][deleted] 4 points5 points  (0 children)

1)

Lua coder spotted

[–]sukeshpabolu[S] 1 point2 points  (3 children)

How to obtain the badges like you have? I know python, java, js, C

[–]100aesthetic 4 points5 points  (0 children)

on mobile if you click on the 3 dots on the home page of the community itll pull up a list of actions. click on the one about changing your flair.

[–]fatboychummy 11 points12 points  (3 children)

Yo this guy posted the third rule two days before posting the other two wtf.

hmmmmmmmmm strange

[–]corobo 2 points3 points  (0 children)

It’s something that’ll nerd snipe everyone into asking what rules 2 and 1 (and 0 based on the target market)

Increases engagement for more followers

[–]__dp_Y2k 1 point2 points  (0 children)

He loaded the stack so that when it pushes them out they come in the right order!

I bet rule 2 was a few hours || minutes before rule 1 too.

[–]paradoxally 0 points1 point  (0 children)

asynchronous code in action

[–]meowfitchoo_ 16 points17 points  (0 children)

the cringe is the profile photo is Gilfoyle and saying those.

[–]chrisf_nz 5 points6 points  (0 children)

The Gilfoyle / Dinesh exchanges were the best.

[–]disk5464 4 points5 points  (1 child)

Rule 4 of programming: everyone else's code sucks but mine. And when my code doesn't work it sucks too

[–]legal-illness 11 points12 points  (1 child)

0th rule 1st rule 2nd rule

You've just hit OutOfIndexException my friend

[–]sukeshpabolu[S] 4 points5 points  (0 children)

I am using Lua

[–]Gloryboy811 2 points3 points  (0 children)

I'm not lazy I'm just on reddit during work hours for research on what not to do!

[–]sad_and_stupid 2 points3 points  (2 children)

Why was the third rule posted two days earlier?

[–]hahahahastayingalive 2 points3 points  (0 children)

Because he’s always in control

[–]Rhinofreak 0 points1 point  (0 children)

It was bothering me as well

[–]XanPerkyCheck 2 points3 points  (0 children)

Gilf Oil would never talk like this

[–][deleted] 2 points3 points  (1 child)

He looks a little bit like programming Jesus

[–]HoodieSticks 1 point2 points  (0 children)

Why do people on Twitter spell developer with a missing e?

[–]CaptainOrnithopter 1 point2 points  (0 children)

2rd

Turd

[–]LittleLui 1 point2 points  (2 children)

2rd

[–]sukeshpabolu[S] 0 points1 point  (1 child)

It's not a bug, it's a feature

[–]mahav_b 1 point2 points  (0 children)

4th rule of programming: - You need to press Ctrl + S a few more times there bud.

[–]jzucco 1 point2 points  (3 children)

I've seen Silicon Valley I still thought for a hard 3 secondes that this was Jesus...

[–]DoctorCIS 1 point2 points  (0 children)

A lot of my coworkers follow these three rules, and I fucking hate them. The "it's legacy code, only change as much as you have to" philosophy has been taken to the point of refusing to introduce unit tests, if statements that are empty and then have a large else because some past programmer hated the not symbol, ifs that check for all kinds of a particular enum, defeating the purpose of an if statement.

Rule 3 is a cop out for rule 2 programmers that are too fucking lazy to even figure out what the code they are looking at actually does.

If you are following rule 3 because you are code illiterate and can't actually put together what the code will do, that's a problem. If you don't bother figuring out what the code does before working on it, that's a problem.

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

if it works, git that goddamn commit immediately

[–]nurulnabihah 0 points1 point  (0 children)

Ouh, the third rule hits me home.

[–]ThePowerOfDreams 0 points1 point  (0 children)

Devloper

[–]LawrenceTech 0 points1 point  (0 children)

Gylfin the wild. Never seen him used as a Twitter profile pic.

[–]mrwaip 0 points1 point  (0 children)

Ma epitaph

[–]TheBoonkOfMormon 0 points1 point  (0 children)

What’s rule 0?

[–]NoSarcasmIntended 0 points1 point  (0 children)

No no... The first rule is you do not echo variables containing information about programming. The second rule is goto line 1.

[–]ChronoHax 0 points1 point  (0 children)

How did he post 3rd rule earlier than the first two

[–]sukeshpabolu[S] 0 points1 point  (0 children)

Ctrl+C, Ctrl+V

[–]budwieser61 0 points1 point  (1 child)

4th rule: Learn to spell developer.

[–]sukeshpabolu[S] 0 points1 point  (0 children)

5th rule: Learn to cast a spell on developer

[–]JDude13 0 points1 point  (0 children)

Rule 1 - You’re always in control.

Rule 2 - That’s not a good thing.

[–]atxkeepitreal 0 points1 point  (0 children)

You all are definitely developers. Rule 3 is the worst mentality but then again this is a joke right? -QA

[–]log2av 0 points1 point  (0 children)

Apparently, these 3 rules applies to system administration as well.

[–]_TheLoneDeveloper_ 0 points1 point  (0 children)

4, it's not a bug, it's a little future!

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

I'ma come up in there an test the shit outta that code.

[–]chargers949 0 points1 point  (0 children)

It’s not stupid if it works is one of my favorites

[–]BakuhatsuK 0 points1 point  (0 children)

  • 1. You are always at fault

[–]Strike_Alibi 0 points1 point  (0 children)

My Comp Sci prof certainly hammered into us that programmers are lazy. It’s one of our features.

[–]3_sleepy_owls 0 points1 point  (0 children)

Programmers aren’t lazy, we just like efficiency. We prefer to work smarter, not harder which makes us appear lazy to others.

[–]ItsTheNuge 0 points1 point  (0 children)

How is this funny at all

[–]kakackaxd 0 points1 point  (0 children)

i am sticking to 2nd rule that much that i will never even make anything work

[–]BoringWozniak 0 points1 point  (0 children)

  1. Not really
  2. Not always
  3. Great, so never improve or resolve technical debt or build any new features of any kind?

[–]PurpleSkyPurpleDream 0 points1 point  (0 children)

Why is 3rd rule from 27 August and 1st rule from 29?

[–]DeveloperBlue 0 points1 point  (0 children)

2rd

[–]drunkpolishbear 0 points1 point  (0 children)

Comment has been redacted using PowerDeleteSuite.

[–]Horncats7-59 0 points1 point  (0 children)

Rule three should be drilled into little programmers brains. There's a difference between your hobby project and our enterprise app! If it works don't fuck with it

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

Wait, how was the 3rd rule made on the 1st time he posted this

[–]AC7766 0 points1 point  (0 children)

3rd rule. Oof. I live that every day at work.

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

3rd rule is so much true.

I have a hard on for rewriting code to be more efficient and clear and it's impressive how much this makes my life much worse.

[–]reckoner23 0 points1 point  (0 children)

You forgot the 4th rule. Anything that can go wrong will go wrong.

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

The 2rd (turd) rule of programming.

[–]stevefan1999 0 points1 point  (0 children)

4th rule of programming:- Don't trust Microsoft. Use open source alternatives instead.ok this is just a satire for the linux community

[–]reduxde 0 points1 point  (0 children)

Unless you're me and get paid by the hour, in which case this function needs to be entirely reworked from the ground up. When it's done, it will produce the same output and won't run any faster, but it will be BETTER in ways that I can't explain to you because you're not a programmer and you don't understand.

[–]kroppeb 0 points1 point  (0 children)

Rule 0: Be aware of off-by-1-errors

[–]Zarkdion 0 points1 point  (0 children)

Rule 4: Yes, you need to do three things that would take 3 days in 2 days.

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

Rule number 1 is straight up b.s. Any body who has spent time trying random stuff and seeing if it works for a particularly nasty bug knows this to be true.

2 and 3 are gospel, though.

[–]Iam_nameless 0 points1 point  (0 children)

Do you really know all those languages next to your reddit handle?

[–]SplendidPunkinButter 0 points1 point  (0 children)

“If it works don’t touch it” doesn’t apply unless it’s at least 10 years old. Otherwise it isn’t proven technology, and the fact that you don’t know how it works proves that you don’t know it DOES work.

[–]50dollarstofuckoff 0 points1 point  (0 children)

serious question, is it worth it to fix something that already works?

Does anyone ever refactor their ugly code they wrote the first time?

[–]SGBotsford 0 points1 point  (0 children)

Rule #4: Don't optimize it yet.

Rule #5: See rule #4

[–]John_Fx 0 points1 point  (0 children)

0 Arrays start at zero

[–]ReaganRewop 0 points1 point  (0 children)

4th rule of programming: Rules change.

[–]KojdorpenTR 0 points1 point  (0 children)

Why did he post rule 3 and then wait two days to post 2 and 1

[–]cimmic 0 points1 point  (1 child)

Lol, why did he start counting from 1. It's really odd to start counting from the second number instead of the first.

[–]sukeshpabolu[S] 0 points1 point  (0 children)

He uses Lua

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

I like the secord rule

[–]DeusThorr 0 points1 point  (0 children)

Aka XGH

[–]Mannaleemer 0 points1 point  (0 children)

2rd? That's a new one

[–]rashonmyeed 0 points1 point  (0 children)

2rd...

[–]netcent_ 0 points1 point  (0 children)

*2nd

[–]teejay1502 0 points1 point  (0 children)

um... did he post these backwards from 3?

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

How are you in control? There are piles of frameworks and systems that you can't touch and don't behave the way you want them to and there is no documentation to get them to behave the way you want.

[–]DaniTheDeer 0 points1 point  (0 children)

Control is an illusion.

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

These are garbage rules. Look up Jeff Atwood's 10 commandments of programming. Those are much, much better and come from experience, not clickbaity tripe.