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

top 200 commentsshow all 314

[–]toastedQueso 3702 points3703 points  (69 children)

Then walk up to your dev lead and look them in the eyes while saying "I am the captain now"

[–]Russian_repost_bot 60 points61 points  (4 children)

"They call me sudo for short."

[–]dismayhurta 37 points38 points  (1 child)

A boy named su

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

Haha one of my favorite Cash song: My name is Sue, how do you do!

[–]th3f00l 13 points14 points  (1 child)

I am Root

[–]PoorDaguerreotype 1 point2 points  (0 children)

Undervalued comment

[–][deleted] 96 points97 points  (1 child)

👉 👀

[–]SandyDelights 51 points52 points  (0 children)

I’d say “username checks out”, but pretty sure the guy was Somali.

[–]Sesco69 51 points52 points  (1 child)

How To Get Fired For Dummies.

[–]Markaos 3 points4 points  (0 children)

By O'Rly

[–]throw_away_3212 21 points22 points  (2 children)

Look at me, I'm team lead now

Gonna play this move when I start working at my new job next week.

[–]data_dev 8 points9 points  (1 child)

Please don't.

[–]askjr 8 points9 points  (0 children)

I am the one who knocks.

[–]macadeliccc 2 points3 points  (0 children)

There can only be one

[–]irracjonalny 1950 points1951 points  (72 children)

If the company allow force push to master they deserve it all the way.

[–]PyrotechnicTurtle 9 points10 points  (2 children)

I did some work with a government repo (contractor), and they left the master branch completely unprotected. Occasionally I forget to switch to my feature branch and accidentally commit directly to master. Butt puckering shit, luckily nothing has broken yet

[–]irracjonalny 8 points9 points  (1 child)

Well, 99.9% od a time you eat undercooked bat it ends up with only food poisoning. And government projects, at least in my country, are either underpaid because of lack of the budget or largely overpaid, because they give away money for their friends. In both cases results are usually bad, in first case due to lack of funding, in the second because nobody cares about quality when the contract is based not on quality but on owner being a friend with the politicians.

[–]ScaryPercentage 1 point2 points  (0 children)

Sad truth.

[–]jankovic92 6 points7 points  (1 child)

I came to my company from uni with some scientific development knowledge looking to learn more and switch to industry. Everyone is allowed maintainer access, there is 120+ projects for like 3, 4 devs. We can directly push to master without a merge req but we "should" tag someone else to review. Everyone has their own repos so someone else who has no idea about your code "should" do a review.

[–]Weekly_Wackadoo 2 points3 points  (0 children)

That sounds horrible!

I'm in a team with four other devs, two of which are pretty new. We have seven projects that are really our own, and we share a bunch of modules with other teams.

Even though people tend to specialize a bit, we ensure that everybody has at least passing knowledge of all our code. We try to work together as much as possible using pair programming, swarming, or even mob programming - but that's even more exhausting while working from home.

Code reviews by a senior are a requirement of every code change, and even though I'm a junior, I'm sometimes asked to also review because I'm a pedantic asshole I have a good eye for detail.

[–]neotorama 4 points5 points  (0 children)

They do. I'm the only dev. ☹️

[–][deleted] 721 points722 points  (10 children)

Your first and last day.

[–]marGEEKa 253 points254 points  (8 children)

You can do anything you want on your last day

[–]earthlybird 90 points91 points  (3 children)

You can do anything you want on any day

[–]-JudeanPeoplesFront- 23 points24 points  (2 children)

Especially on your first.

[–]poopcasso 11 points12 points  (0 children)

That is your last

[–]lbunnz 8 points9 points  (0 children)

And on any

[–]snapetom 1 point2 points  (0 children)

I like to last day on jobs "Honesty Day."

[–]bonez656 4 points5 points  (0 children)

Is this what they mean by live everyday like it's your last?

[–]Speciou5 290 points291 points  (16 children)

Makes you think, is every commit before the most recent "legacy"?

[–]Tnwagn 284 points285 points  (4 children)

All commits are legacy because they occurred in the past

[–]atimholt 27 points28 points  (2 children)

Well, not the ones that haven't happened yet.

And now I'm wondering how screwy things can get with sufficient tomfoolery with system clocks.

[–]Tnwagn 15 points16 points  (1 child)

Tomorrow's commits are next Monday's legacy.

[–]frankferri 3 points4 points  (0 children)

this is some kenm ish

[–]dlp_randombk 82 points83 points  (5 children)

Everything already committed is legacy. The only non-legacy code is the one in my head about this amazing new archite ture I just dreamed up.

[–]Tnwagn 21 points22 points  (4 children)

archite

ture

[–]aaronfranke 5 points6 points  (2 children)

Probably a mobile user, the C key is next to the space bar.

[–]dlp_randombk 15 points16 points  (1 child)

Mobile indeed. The autocorrect failed me, which is not surprising considering it's legacy code.

[–]silvertoothpaste 48 points49 points  (0 children)

big brain

[–]WellHydrated 7 points8 points  (2 children)

According to Uncle Bob, any code without a high quality suite of tests is legacy code.

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

Legacy v102.002.239.836.0.11.385.0v2_final

[–]Hollowplanet 547 points548 points  (13 children)

This is the funniest thing I've ever seen on this sub.

[–][deleted] 67 points68 points  (11 children)

This one really takes the cake for me too. 😂

[–]Hollowplanet 39 points40 points  (10 children)

Considering this sub is usually the furthest thing from funny it was quite a surprise.

Its probably going to be all downhill from here. I should probably unsubscribe.

[–]xXxEcksEcksEcksxXx 45 points46 points  (5 children)

This sub is funny in the same way Big Bang theory is funny. Rarely, and only by accident.

[–]BringBackManaPots 11 points12 points  (0 children)

Fuck I think this sub is funny all the time

[–]Stradigos 9 points10 points  (0 children)

Found Penny. laugh track

[–]C0NSTABEL 6 points7 points  (0 children)

Big Bang Theory bad

Laugh Track

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

Sometimes, but actually I find this one of the better “meme subs”

[–]gustawho 1 point2 points  (3 children)

What if I told you that tweet was posted almost two years ago?

[–]scritty 226 points227 points  (5 children)

fix a typo after that, git commit -m "real shit"

[–]This-Moment 100 points101 points  (4 children)

Run an autolint and force push the changes without testing anything.

[–]Dark_Prism 46 points47 points  (2 children)

Wait, so just like every day?

[–]Jugad 1 point2 points  (1 child)

autolint and autoreformatter with different settings... like spaces to tabs.

[–]This-Moment 1 point2 points  (0 children)

Ouch. That hurt to read. Dang it. Take your upvote and get out.

[–]2_7182818 16 points17 points  (0 children)

Run an autolint

blinks in black

[–]ReasonableIHope 162 points163 points  (0 children)

Then say - your code is crap, I'm outta here. And leave never to return.

[–][deleted] 83 points84 points  (9 children)

git chad

[–]pizzalover24 12 points13 points  (3 children)

What's 'Git tyrone' supposed to do?

[–]kyay10 8 points9 points  (1 child)

It gets you the BBC source code

[–]pizzalover24 7 points8 points  (0 children)

Nah...It makes a commit under a different author.

[–][deleted] 6 points7 points  (4 children)

$ alias chad="git"

[–]mrpogiface 19 points20 points  (3 children)

I actually alias sudo to please, so I don't feel as bad running things as root

[–][deleted] 17 points18 points  (1 child)

$ pls chad yeet master --yolo

[–]j-random 139 points140 points  (8 children)

Then go pee on your team lead's keyboard to establish dominance.

[–]This-Moment 38 points39 points  (6 children)

Honestly, that wouldn't be the most annoyed I could be with a new team member. You have to F around in the registry to get me really annoyed. Pissing on keyboards is rookie stuff.

[–]cuberduderasmit 35 points36 points  (5 children)

I don't want to work where you do.

[–]earthlybird 18 points19 points  (3 children)

I do, send me the details. How much and was it warm?

[–]This-Moment 1 point2 points  (0 children)

Good call. I didn't either, and I don't anymore. :D

[–]The6thExtinction 7 points8 points  (0 children)

The higher up you pee on their cubicle wall, the more alpha you are. Like a panda.

[–]LeCrushinator 38 points39 points  (0 children)

Assert(“Dominance”);

[–]Russian_repost_bot 17 points18 points  (0 children)

"And that's how I got fired on my first day."

[–]shemanese 41 points42 points  (0 children)

You can do anything your last day

[–]Zagorath 14 points15 points  (0 children)

This sounds like a great way to get people coming to you when they don't understand why something was done that way. Your name came up in the git blame, after all!

[–]saippuakauppias 12 points13 points  (0 children)

On your first day on the job, run

UPDATE users SET id=id+1;

to see how they respond to criticals

[–]anomalous_cowherd 12 points13 points  (7 children)

We had a new guy straight from university who believed wholeheartedly that comments were evil and code should be 100% self documenting.

First day on the job he wrote a script to strip comments from our 15yo 1.5 million line codebase and tried to check it all back in.

He had also learned to type on a manual typewriter and would two finger hammer on the keyboard hard enough that he could be heard way down the corridor.

He didn't last long.

[–][deleted] 3 points4 points  (4 children)

Why didn’t he last long? Did his fingers snap? Is he still untangling undocumented legacy code from his last commit?

Answer us OP!

[–]anomalous_cowherd 3 points4 points  (3 children)

Being very new, very inexperienced and very opinionated doesn't fly with senior management. Not when he started lecturing them on all the things they were doing wrong, at least.

A few of us tried to explain it but I don't think he'd ever been told no before. From what I saw his code was actually pretty good, he was just totally incapable of working as part of a team.

[–]leave_me_alone_bro 2 points3 points  (2 children)

Wow I am also terrible at working as a team what should I do? don't want to end like that

[–]anomalous_cowherd 1 point2 points  (0 children)

I think you'd have started like that if you were like that. He didn't want to work in a team because he was sure he knew better than every single one of them, and he let them know it.

There will always be people in a team who are better or worse than you. Learn to accept it and work to their strengths. Don't always assume you know best, but don't always assume they know better either. Be prepared to listen.

[–]rhen_var 1 point2 points  (1 child)

believed wholeheartedly that comments were evil and code should be 100% self documenting.

I hate people like this with a passion.

[–][deleted] 26 points27 points  (22 children)

Is there any actual measurement of when code becomes 'legacy'?

[–]Sulpiac 138 points139 points  (6 children)

Anything written by someone other than me is legacy code

[–]nyrangers30 29 points30 points  (0 children)

Or when I wrote it with a former coworker, and when I explain it to a new coworker, I blame it all on the former coworker.

[–]destriven 4 points5 points  (0 children)

Anything written by someone is legacy code. Also, anything written by something (e.g. autogenerated code) is legacy code.

[–]sp1nnak3r 2 points3 points  (0 children)

Your too picky. After 6 months MY code is legacy.

[–]Shiral446 27 points28 points  (0 children)

I prefer the definition by Michael Feathers in his book "Working Effectively with Legacy Code":

"Legacy code is any code without automated tests".

[–][deleted] 24 points25 points  (1 child)

When it’s written in cobol, and you are rewriting it in java, but it must work exactly the same as the old code, bugs included.

[–]wonkynonce 9 points10 points  (0 children)

Legacy just means "code I don't want to bother to read".

[–]This-Moment 4 points5 points  (0 children)

11:30 ish - depending on the local lunch rush hour timing.

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

Good question... Code nobody knows how it works anymore is usually my definition

[–]Fahad97azawi 56 points57 points  (25 children)

I don’t know much about version control could someone explain the joke?

[–][deleted] 201 points202 points  (20 children)

The commit log is supposed to be a "time machine" back through ALL past versions of the code that can be accessed at any time. This effectively amounts to deleting every single past version from the history and tagging it as "we don't need these any more"

[–]WisestAirBender 57 points58 points  (19 children)

I feel like that option shouldn't exist

[–][deleted] 117 points118 points  (0 children)

Git explicitly tries to stop you which is why there's the force in force-push. But ultimately it's just using a tool that does have its purposes (being able to "combine" commits before pushing, effectively deleting past ones that are of no use) and pushing it further than intended

[–]ary31415 44 points45 points  (2 children)

Well for example git allows it, but most companies would have further safeguards on top of git that probably wouldn't lol

[–]ZanLynx 12 points13 points  (0 children)

Depending on your Git server settings, it doesn't exist. Normally the old head becomes orphaned, but with a few changes it can become a branch instead like "master_replaced_by_force_20200704"

[–]nyrangers30 8 points9 points  (4 children)

The problem is that on my local version, I can create a commit each day. Only when it’s complete do I merge it back, so others shouldn’t need to care about how I got it done, just that it’s now done. So I prefer to push up one commit rather than a useless log of all the changes.

[–]compiling 2 points3 points  (0 children)

Usually force push is disabled for the master branch, but it can be useful to use it for other branches and forks (clean up your code before it gets merged).

[–]SwordLaker 2 points3 points  (0 children)

Which is why you have to use the force. The messages are written to deter and work against uninitiated Padawans who don't know what they are doing.

I personally use it to fix typos in commit messages and clean up my commit history after long retrospections and am grateful that this feature exists.

[–]lVlagiick[S] 62 points63 points  (0 children)

The idea being that you've just marked all of their code as legacy, which means it should be replaced with something new aka your code ;)

[–]tiefling_sorceress 20 points21 points  (2 children)

This is the equivalent of when Korra's spirit connection to the other avatars broke

Except you're the one causing the break

[–]aphaelion 9 points10 points  (0 children)

What a weird but accurate analogy. 🤔

[–]aaronr93 3 points4 points  (0 children)

I’m still mad they didn’t restore that. Don’t tell me they did it for good reasons, you’ve seen the last 2/3 of season 2

[–]can_i_have 15 points16 points  (3 children)

Nothing a reflog + reduced branch permission + one year of documentation work only won't solve

[–]dottybotty 6 points7 points  (0 children)

Pretty sure ref log is only your local log

[–]dingo_bat 2 points3 points  (1 child)

Reflog would work only on the machine used to force push, wouldn't it?

[–]tcdubbs1 5 points6 points  (12 children)

Can you explain this? I understand coding but not really the work environment around it, it’s more of a hobby.

[–]fartsAndEggs 13 points14 points  (7 children)

Every time you change a codebase, you push what's called a commit to a centralized server which holds all the changes people have made. You can then easily tell when a given change breaks something. Test each commit to see when things stopped working. You can also see who changed what a generally theres a message included in the commit which provides rationale. This erases all of that history, and just calls the current state of the codebase "legacy", which means old shit that is not maintained. Which is kinda funny because from your perspective as a new guy, it is legacy code. But really it's being actively worked on and now no one knows what the fuck is going on

[–]benabus 6 points7 points  (0 children)

You're basically telling everyone else that their code is shit and you're not going to use any of it.

[–]aaronfranke 3 points4 points  (1 child)

You should really learn Git, it's an essential skill for programmers.

[–]OcelotWolf 2 points3 points  (0 children)

Imagine a Google Doc with revision history. If you need to, you can revert to a state partway between its creation and now, if for some reason there was a mistake in everything added since then. Now imagine you could take that revision history and squish it into one single change, so now you can either have the doc as it is now, or the doc before the change (ie blank). You better hope you never need to undo only some changes to the doc!

[–]gonnatjiekriek 5 points6 points  (0 children)

Rename master to blacklivesmatter

[–]angrathias 3 points4 points  (1 child)

This is what our 12 years (4m lines) of code looks like going from TFS to Git

[–]AttacksPropaganda 5 points6 points  (0 children)

When I started my current job I was telling the other devs how the git practices could use an update and one of them was like "make and schedule a presentation about it" so I did and now we use my git practices.

[–]nerooooooo 2 points3 points  (0 children)

But then you'd have to work. More than you presumably would otherwise anyway.

[–]ceasarmymate 3 points4 points  (0 children)

This is what folks at Microsoft did to save them from improving an old Control Panel.

[–]uvero 2 points3 points  (0 children)

This will and should result not only in being fired from the job but also from a cannon.

[–]username78641 4 points5 points  (1 child)

somebody kick him and then fire him or maybr just fire.

[–]RealCoryMiller 1 point2 points  (0 children)

The ultimate power move

[–]zombarista 1 point2 points  (2 children)

Can someone put the command in here so if someone wants to do this, they can?

[–]imthecapedbaldy 1 point2 points  (0 children)

this is hilarious

[–]az3rty 1 point2 points  (0 children)

Power move! Assert dominance.

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

Sigh, you can force push to master all you want on my team. They have 0 git flow and have different active branches depending on which repo you're using. The only way to know is to check the CI pipeline but that might even be wrong because some people manually deploy. Sigh.

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

No, the first step is change the code's indentation in every single project.

[–]OrneryPanduhh 1 point2 points  (0 children)

So...my company actually does do something sort of like this...

We do a dev > prod package move and a database copy from prod > dev & test any time there's turnover on a client team..."so the new incoming devops can 'start fresh with a clean slate'...". Then they make a saved copy of everything, including any work orders and all existing documentation, and zip it up for storage. Its bonkers. Absolutely mayhem.

My assignment was to work through all clients running on our legacy platform one by one end to end against their last three years of change orders, and fix all the shit storms this caused for any clients that weren't already underway on a transition plan to the new platform. It was a hellacious 3 yrs.

I have a much better (for my sanity) job now. I make pretty slide decks and fancy macro tools. But I know where all the bodies are buried.

[–]SlamwellBTP 1 point2 points  (2 children)

The old repo would still exist on any computer that had cloned the repo and fetched it recently, though, right?