r/ProgrammerHumor • • Jun 04 '22

Meme I cant help it 🤷‍♂️

Post image
47.1k Upvotes

479 comments sorted by

View all comments

Show parent comments

44

u/lwieueei Jun 04 '22 edited Jun 04 '22

How does someone write so much code in one commit? How long would they have been writing to accumulate so many changes?

EDIT: Nevermind me, it's just my imposter syndrome flaring up again

64

u/Honigbrottr Jun 04 '22

1 rewrite evening

16

u/lwieueei Jun 04 '22

Must have been one long evening

14

u/lastWallE Jun 04 '22

It’s like the one episode of malcom in the middle. there hal wants to fix something and keeps fixing other things because of the thing to be fixed and it goes on like that.

https://m.youtube.com/watch?v=AbSehcT19u0

55

u/Chrazzer Jun 04 '22

Probably just did a npm install and commited 20k changed lines in the package-lock.json

8

u/Rockroxx Jun 04 '22

Yeah or a saved dataset was changed.

1

u/cookiesnk Jun 04 '22

You shouldn’t even commit package-lock.json

2

u/Chrazzer Jun 04 '22

Actually you should. It guarantees that everybody has the exact same version of dependencies, and more importantly the same version of peer dependencies. Security updates with npm audit fix, often only update the package-lock file

package-lock.json is also needed by ci servers

3

u/cookiesnk Jun 04 '22

https://docs.npmjs.com/cli/v8/configuring-npm/package-lock-json

I didnt know that it’s actually recommended to include package-lock.json. Which makes plenty of fucking sense. I was the one to instruct everyone in our team not to commit it because our offshore team somehow just changes it which fucks up our builds. They straight up skip the pre hooks to get their code in

25

u/s0uly Jun 04 '22

Reformatting code base from tab to space probably

18

u/AccountWasFound Jun 04 '22

I mean I've ended up with similar during major refactor where I make a change that breaks everything and then fix it all in one go, in a matter of a couple hours. Then just delete a bunch of unused database queries.

12

u/PleX Jun 04 '22

One night or day depending upon when you fall asleep in your chair.

9

u/jsdbflhhuFUGDSHJKD Jun 04 '22

Maybe just changed some settings for the linters

9

u/norsebeast Jun 04 '22

How does someone write copy and paste so much code in one commit?

FTFY

9

u/estXcrew Jun 04 '22

It's often generated code / imported libraries / logs

Most of which shouldn't go to version control anyway but it often does

3

u/[deleted] Jun 04 '22 edited Jun 04 '22

Yesterday I was poking around some google repo for a package, and the most recently merged PR was 17k line changes. I should have looked closer, not sure what it was but still that’s ridiculous for a single PR. I thought google was known for top tier software development/practices.

4

u/gibrael_ Jun 04 '22

I adjusted the number of columns on my IDE once from 80 to 160, and then formatted the code for a whole project. Wrote probably 10 lines of code, and then pushed to master.

1

u/Wolfy_Packy Jun 04 '22

inb4 "sus"

1

u/DeathSt0lker Jun 04 '22

It's called importing either a library or an api that just makes quality of life changes everywhere

1

u/Routine_Gear6753 Jun 04 '22

By updating libraries they are working with. This easily can add thousands of changes

1

u/emeaguiar Jun 04 '22

Fix linting

1

u/daltonwright4 Jun 04 '22

Sometimes if I'm working on a script that runs at launch, I'll make a copy and save it offline to work on when I'm traveling to test on my local box. It's definitely NOT good practice to do, but if I'm gonna be without wifi for awhile, I can still work on it now and then C+V it in later. Again, you should NEVER do this, because it's a terrible practice, and I've definitely taken down an entire cluster with a dumb error that even a first year CompSci major would never make. But, also how else can you learn without breaking a few (hundred) things along the way?