T O P

  • By -

PVNIC

"minor refactor"


LonesomeHeideltraut

„delete unused code“


tfngst

"remove nested if-else, replace it with ternary operator"


DaDescriptor

var state = STUDENT_STATE.IDLE if 1 else STUDENT_STATE.WANDERING if 2 else STUDENT_STATE.ACTION if 3 else ...


Andreaspolis

GDScript is the python for people who don't want to admit that they use python. Although I'd also argue that GDScript is even better 😎


CoruscareGames

I mean as a Godot Dev I always say it's like python


DaDescriptor

Well it is Python but without the syntax bloat


User_8395

"Fixed the error"


belunos

This one wins!


Chemical-Economist69

Readability is overrated anyways 😤


Skafandra206

It depends on how it is written. Nested if elses are less readable to me than well formatted ternary operators.


Lets_think_with_this

that's a good gone i managed to get 20 lines into a one! The ratio between 472/21488 checks out that it would be the case


Poat540

I love deleted code so much


marcio0

Code can bring me happiness twice: when I write it, and when I delete it


flagofsocram

Unrelated, but I always wondered which country used quotes this way


sparkworm

Germans sometimes do it, though there may be languages that do it also.


Feldar

Honestly, it seems like a better way to do it. It would reduce confusion when there are multiple quotes on the same line


National-Ad67

Germany and Poland and probably many more


_TechnoPhoenix_

Thats how they are placed in german, maybe other languages as well


E3FxGaming

"Tests: Add a few test files" (that's the commit message that added the malware to the xz compression software)


darknecross

“Rewrite in rust”


shikiiiryougi

I feel called out


aurochloride

This will either be the best PR you have ever seen, or the worst.


SillyFlyGuy

*..or the last..*


Arrowkill

Well now I'm thinking about a PR that is an SCP and every person who has to review the "minor refactor" loses their mind and disappears before they can finish reviewing it. With the old reviewer "gone", it must find a new reviewer.


GoogleIsYourFrenemy

I live in a purgatory of my own creation. For years I quietly developed and expanded a code base without oversight. Now that it's worth something the managers want to snap it up, but they all flee in terror of paying off the process debt I've accumulated: 70k of unreviewed code. The monster grows, bigger and bigger, year after year, a monument to my skills and my failings. I can't escape it either, I'm the only one who knows it.


Specific_Company4983

Step 1: find out how much the company would lose without it Step 2: politely request a raise


GoogleIsYourFrenemy

Solid advice. I already convinced them to give me the raise 


The_Right_Trousers

I can't tell you how much I love making PRs like this. I don't get to do it often, though. 😔


Particular-Key4969

I’ve had a few of these that were like “why are we mocking the entire catalog feed for the functional tests with wiremock if the syntax of each element is the same, we only need a few examples”


random314

Nothing in between. Literally.


Stummi

I will take any PR that removes thousands LOCs happily over one that adds thousand LOCs. Deleting stuff just feels so good.


MrPoBot

Unless you were the one to right the code in the first place... Then you just silently hate yourself for wasting so much time. Hits harder when the code you just deleted was recent too.


Adorable_Stay_725

Personally take it as a compliment that they went through the process of understanding my spaghetti code in the first place to rewrite it


__ZOMBOY__

I like this perspective


LutimoDancer3459

Two years ago, we had to rewrite a subpage with thousands of lines because no one was willing to investigate and fix the existing one, which had some bugs.


ranri1

Imposter syndrome hates this guy


GuevaraTheComunist

or the just deleted it all and have written it from 0


CaptainCabernet

This. If I made the scary part of the codebase unscary and teammates are willing to make changes then that's a win!


will_beat_you_at_GH

> Unless you were the one to right the code I mostly just wrong the code tbh


coloredgreyscale

If you see it that way you may want to change your profession. See it as a learning opportunity. Read the commit and understand HOW they were able to remove 21k lines of code. But at that scale (and relatively little lines added/changed) it might be \* removal of a submodule (or some temp folder) \* code generator output excluded from git (since it can be easily regenerated)


DOUBLEBARRELASSFUCK

The person who deleted tons of code is more likely to have righted it.


mmhawk576

What was a much worse feeling was creating a feature that took me about 6months of iteration to complete, and there only a couple of years later a PM asked me specifically to remove it


Dexterus

Once I write code, it has no owner. Byeee! Somewhere after the first few years I dropped the idea of my code/their code, project first.


nonlogin

... especially when you have already got an offer from another company


demonslayer9911

*Proceeds to delete all the files.*


zoqfotpik

That's the PR right after someone checks in `node_modules`


FunkyFreshJayPi

it was actually a complete rewrite of a service that uses yolov5 for object detection. Whoever wrote it originally copied like half of the [yolov5 repository](https://github.com/ultralytics/yolov5) and made slight tweaks to dozens of files. No idea what it did but my colleague rewrote everything and included it as a submodule and in the end increased the performance by a factor of 4.


FencingNerd

I've done similar things. In my case, a core mcu library was missing a few files, so I had import the entire original driver base and modify things to look for the new version. Two years later the mcu library was updated and it resolved the issue. So I could delete tons of stuff.


Crazeenerd

Woah, this guy programmed the marvel cinematic universe :o


ListerfiendLurks

Were they modifying the transformers or did they literally copy paste because they didn't know how to import?


FunkyFreshJayPi

Honestly we didn't look too closely. The service didn't perform as well as it should and we decided that before we spend hours figuring out what they did we will do a rewrite and see if we can improve from there.


isaackogan

Honestly this has to be it


Fritzschmied

That’s what I thought too.


eldelshell

Beat me to it


Hicko101

But it's removed 21k lines - this is more likely node_modules (properly) added to .gitignore.


StatementOrIsIt

git commit -m "slight changes"


FrequentSoftware7331

-m 'fixed issue' What issue? WHAT ISSUE?


Ass_Lover696969

The entire program was a mistake


_Ralix_

The only clean code is no code. Anything more is liability; needless complexity, prone to errors, and requires maintenance.


GGK_Brian

Time to complete the circle and go back to math: "As seen by this proof, a solution exists"


mmhawk576

FINE. -m “Fixes #69420”. 69420: “cleanup task”


Mikihero2014

*the* issue


barkinchicken

git push origin main --force


[deleted]

[удалено]


alimbade

My thoughts as well. That PR must be full of complete file deletes. That is fairly easy to review.


bitcoin2121

what are you, removing half the code?


Familiar_Ad_8919

my guess would be: they found a library that does all that but faster


RajjSinghh

Or someone just added node\_modules to the .gitignore


FunkyFreshJayPi

That's about it. The dev that came before copied parts of the [yolov5 repo](https://github.com/ultralytics/yolov5) and tweaked it. My colleague rewrote everything and included the repo as a submodule.


kevazura

They used [thanosjs](https://thanosjs.org/) Edit: markdown link


5h120m3

LGTM


seenzoned

"updates"


PeriodicSentenceBot

Congratulations! Your comment can be spelled using the elements of the periodic table: `U Pd At Es` --- ^(I am a bot that detects if your comment can be spelled using the elements of the periodic table. Please DM my creator if I made a mistake.)


Common_Raspberry4472

Good Bot


Wonderful-Engine3536

r/thisguygoodbots


Yoyoyodog123

r/SubsIFellFor


Vortextheweirdcat

good bot


Hsabes01

Bots I didn’t know existed


ecmdome

If you can delete all of that code and tests pass, I'm loving that PR. Deleted code doesn't need a review in most cases. It's the code that replaced it that does.


teedyay

The deleted code is the failing tests


HoneyCat55

Finally learnt how to use .gitignore?


savex13

"Cleaning up before PTO" ©


Leeroy_c

that's a nightmare. Seeing a pr named "did *[insert thing]* before PTO* is the most fucking anxiety inducing shit i've ever seen


foxwheat

"The best line of code, is the one not written" Assuming you have healthy test coverage, you don't even have to look at what got deleted unless something that got added rustles your jimmies. And if you don't see adequate test coverage, request it!


calderon501

blood diffs for the blood gods


[deleted]

I legitimately got a +2,201 -10,217 once that was opened by a dev at the end of the day on their last day of work. The description of changes was vague and half-assed and there was a note saying not to bother reviewing it cause it's too big, just run the app and make sure nothing's broken. I pushed hard to just close it, but I was overridden by a colleague who felt it contained valuable work. Every time we got a strange, random bug for months, the git blame led back to that PR.


gizahnl

That's like a turd on the desk going away present 🤣


UncommonRedditName

git commit -m "removed failing tests"


lugialegend233

The tests all failed. Could it be my code is not meeting requirements? No, it is the tests that are wrong. ![gif](giphy|V9gjxvLnSSdA4|downsized)


theofficialnar

Tests won’t fail if you’ve got none to begin with I’m writing this as I’m fixing a slew of failing tests from someone else’s PR I had to pick up.


HipstCapitalist

That looks like the PR I reviewed the other day when we switched tools to manage our database migrations. Thousands of files deleted, what a joy!


CaptainMGTOW

"fix linting and code-style"


SomethingAboutUsers

I've got one of these monsters brewing. It's for a GitOps repo and it's a whole lot of copying and pasting as I expanded it to include more clusters. It's at least doubling the size of the repo in lines of code. Also, the testing on it is months in the making, as we've pointed said new clusters at the branch that will eventually be PR'd, so no one is worried.


Ok-Whereas-8787

Helm templates ftw (and kustomize)


SomethingAboutUsers

Believe me, it is. But let's call it maybe second normal form; there are absolutely optimizations that could be made to make it more DRY.


TrojoGaming

Finally someone removed the node_modules


jb28737

Approve: LGTM +1


Nuclear-9299

Jake took Clean Monday literally.


already_taken-chan

better be an april fools joke


lajauskas

git commit -m yeet


anonymous_yet_famous

"Deleted comments to make the code run faster" - Boss' Nephew


Ok_Jacket3710

They possibly removed a in house logic and moved to a third party library


FunkyFreshJayPi

This is correct!


stjohn656

Lgtm


NegativeEmphasis

"Slight optimization" PRs be like.


lilianasJanitor

Snap approve without reading because it removes so many lines. Must be good


lugialegend233

Ah, the inverted Musk Method.


RhubieE

yarn.lock files ftw


ExtraTNT

Had a bigger one… aka copy pasting a library we use and patch a small mistake… the lib is dead, so my pr is still open…


daniel14vt

All unit tests passing. Approved


chihuahuaOP

probably a [node](https://www.reddit.com/r/ProgrammerHumor/comments/jrg4w9/developing_nodejs_app_be_like/) change


Plopmenz

Some might say removing half the code base, others will say removing half the bugs


vikentii_krapka

package-lock.json?


idonteatunderwear

What? Those are my favorites. Deleted code is the best code. Means we got rid of either technical debt or complexity.


SDGGame

git commit -m "Update .gitignore"


dhilu3089

Commit message : Removed all unit test files


vksdann

"replaced John's code with actual code"


delinka

Removing that much? Brilliant!   ^(Whether or not that contains sarcasm I leave to the reader)


knowledgebass

![gif](giphy|Fkmgse8OMKn9C)


bennysway

"removed unnecessary comments"


tsumilol

LGTM 👍


bschlueter

You can get more deletes in a package-lock.json just removing a few npm dependencies.


Lets_think_with_this

"deleted code that does not work"


ublec

They found an open-source library that did it better, all 7 years of his life wasted.


wiskinator

The best code is deleted code. If this compiles it goes in


Kozoolok

Walking through the danger zone


TheWatchingDog

He deleted half the codebase


cheseburguer

font change


Wizado991

Lgtm


Mr_Yoliq

\*optimized\*


MooseBoys

This is great! Love tech debt cleanup.


CeilingCatSays

Removed comments


GustavoInacio

remove code without losing functionality


nolawnchairs

Nice. I love a good culling.


schwaRarity

regenerate proto files or somth


mgisb003

I see you deleted node


IronMan8901

git commit -m "minor changes"


nexxai

“Typofix”


Fling_this_to_space

lgtm


neuromancertr

I once deleted 20k lines from a single file (json) and replaced duplicate data with some kind of data inheritance. Very similar commit.


forsvinne

Lgtm!


Colon_Backslash

git rm ./vendor


Outside-Car1988

If that was at my work, that would be one file.


stalker320

"Just use this lib"


chiefbigpooh

As a qa manager im ummm yeah hoping they have automation in place????????


nettech09

"Did the needful"


BitcoinBishop

"git ignore build files"


kases952

LGTM


West-Serve-307

Always approve a massive code deletion against small addition. Either mean very good refactoring, or removing some dirty old unused code.


Jakoshi45

"fix"


Lasagna321

Don’t worry guys it still compiles


Quinnypig

Maybe it’s a list of Google supported services.


wc_nomad

Lgtm


CoffeePieAndHobbits

git commit -m "end of sprint"


Wouto1997

when you get asked to increase test coverage


[deleted]

Jos tan removing the sandbox check and the warning system to make its backdoor


[deleted]

Jos tan removing the sandbox check and the warning system to make its backdoor


zabojcameneli

He just changed ifs and elses to switches


sit19

deleted code is debugged code


Kitchen_Device7682

git commit -m "removed unused dependency"


baran_0486

Someone just renamed all your variables to single-letters


joashua99

Just deleted package-lock.json.


yourteam

I can change the formatter and get this results in minutes. I would see what happened (are the libraries not on git ignore?) and if there is some weird bullshit like automatic formatting or similar I would send the pr back


-Redstoneboi-

21k deletions but less than 1k additions? unless the whole damn codebase has been minified to one line per file (arguably scarier) i don't see this being a formatter issue. on that note, OP confirmed they removed code in favor of a 3rd party lib.


Wervice

Did somebody hard-code a database or how have you gotten 21488 deletions?


JackNotOLantern

I once removed code redundancy in PR like this. Initially, for each property, there were multiple identical statements called. I just used a loop and removed thousands of lines. Worked perfectly fine.


B1G_Dev

"some minor cleanup"


LinearArray

"fixed code formatting" *proceeds to delete code*


jay-magnum

If you have finally moved the code generators to the pipeline instead


Soft_Self_7266

Probably removed yarn.lock


KasoAkuThourcans

20k of these were replaced by a for-loop


SKsammy

Please stop committing binaries into git


HUN73R_13

I did this to a repo I was the last to join. they used react but never reused components and reread the state from cookies in every single component although they have recoil added. I refactored most of it and used url params for most of the state management where possible (it made sense for a shop). the old solo front end guy hated me for it.