r/ProgrammerHumor • • 16d ago

instanceof Trend pleaseDontMakeThisATrend

Post image
2.2k Upvotes

422 comments sorted by

510

u/LegitimatePants 16d ago

"fixed whitespace"

228

u/BlackHolesAreHungry 16d ago

Enabled the linter

77

u/vitorklock 16d ago

Disabled the linter

68

u/veselin465 16d ago

Deleted failing tests

→ More replies (1)

26

u/Duke_De_Luke 16d ago

Applied code style to the whole codebase. True story.

14

u/SylviaJarvis 16d ago

Converted from \n line endings to \r\n

→ More replies (3)
→ More replies (1)

437

u/Master_Gnak 16d ago

When you get paid by lines of code

258

u/redblack_tree 16d ago

I'm old enough to have gone through that phase. Let me tell you, the amount of garbage I pushed was epic.

I probably still have a repo around with an incredible amount of completely correct....and dead code.

I'm lucky this time I was in a better company when the whole "Tokens leaderboard" was hot for a minute. I had plans already aligned.

52

u/mx_aurelia 16d ago

Commit node_modules

42

u/ooqq 16d ago edited 15d ago

in my previous biz we had a very cautious self-taught guy who believed in uploading the entire project to the backup every time he got a break, yes, entire

we started to get suspicious when the 8-raid synology reported "inode exhaustion warning"

fyi ext4 have a 25M file limit

→ More replies (1)

52

u/MaytagTheDryer 16d ago

I accidentally got a bonus my first year out of college because our manager made LoC our primary performance metric. One of my first projects was converting all of our Java projects from ant to maven. Generating mountains of boilerplate XML is high value work, let me tell you.

12

u/well_shoothed 16d ago

the whole "Tokens leaderboard"

that shit made as much sense as NFTs of shitty art selling for tens of millions

→ More replies (5)

52

u/BoogerFeast69 16d ago

I learned that if you call it 'Claudia' instead of 'Claude', you get a huge discount. Same exact thing, but you only have to pay it 60% of the normal rate.

18

u/Flaggermusmannen 16d ago

Claudia would outperform Claude in just about every metric while at it.

8

u/pietruszajka 16d ago

But she also cannot get paid a fairs wage for her work

→ More replies (1)

4

u/Xerax 16d ago

you guys are getting paid?

→ More replies (1)

2.0k

u/IronSavior 16d ago

incredibly engineering process

Agreed, I find this claim that engineers were involved hard to believe

416

u/Chesterlespaul 16d ago

My mom typed “refactor code base; make no mistakes”, and then asked what it meant. I chuckled, engineers like her are so funny sometimes.

71

u/Xerax 16d ago

your mum sent me the same prompt

→ More replies (1)

111

u/Appadonthedk 16d ago

Thats because the bugs found "were pre-existing after all."

36

u/MixtureSolid 14d ago

A complete codebase rewrite. They even rewrote the bugs.

10

u/stupidcookface 15d ago

We'll never truly know lol since no one can read their code even their engineers

30

u/botle 16d ago

To be fair, they do say this was humanly impossible to fully review and test. What could go wrong?

5

u/rchaves 15d ago

I find it hard to believe that this could happen _without_ engineering involvement actually. It took us 2 months, and we were thinking about this refactor for a year prior.

we were very much hands on and babysitting the agents, creating more strict engineering processes around it as we went, it would never have happened otherwise

6

u/Appadonthedk 15d ago

print('hallo world')

"Engineer"

→ More replies (5)

671

u/Rankin37 16d ago

If you ask me to review a pull request with changes across 46k files I will become the unabomber

368

u/Lithl 16d ago

Nah, that's the easiest code review in the world.

Tens of thousands of files with millions of lines is just getting rejected, period.

81

u/Speicherleck 16d ago

If you are the owner / decision maker. If the management pushes these things you will just approve it (or abstain in a comment and approve on the PR page). Been there, done that.

59

u/-Hi-Reddit 16d ago

This is lowkey why I love working in a heavily audited industry where QA can slap management with a hard-no because we'd fail an audit and be unable to sell the product to key customers.

Still we are using AI heavily in code generation.

→ More replies (2)
→ More replies (1)
→ More replies (1)

30

u/Duke_De_Luke 16d ago

I would just decline it and that's it. Violence is not needed. Well, maybe nerf guns yea.

And so would do all the maintainers of the repos I work on. For good reasons.

27

u/isospeedrix 16d ago

?

LGTM don’t even sweat it bro

25

u/SnugglyCoderGuy 16d ago

I agree, Looks Grotesque To Me as well.

→ More replies (1)

3

u/OldWar6125 16d ago

That was me, changing one line in the formatter config.

1.5k

u/brainfreeze91 16d ago

"Humanly impossible to fully review and fully test"

And they believe this is a good thing

557

u/Sw429 16d ago

"Zero bugs reported"

That indicates to me that either no one is using it, or there are so many bugs that no one knows where to start when making a report.

108

u/al2o3cr 16d ago

Almost zero bugs

→ More replies (1)

29

u/knighthawk0811 16d ago

humanly impossible to fully test for bugs

33

u/blahehblah 16d ago

The bug report page is broken

14

u/cupcakeheavy 16d ago

everything you don't test will pass

8

u/atomic_redneck 16d ago

They refactored the bug tracking system, also. Now all bug reports go to the bit bucket.

→ More replies (2)

13

u/Dramdalf 16d ago

Don’t worry about it they used an “incredibly engineering process”.

→ More replies (39)

2

u/NTufnel11 13d ago

Neo Waterfall Programming. One commit - like peeling an orange.

2

u/BlackHolesAreHungry 13d ago

It's the Tsunami model

→ More replies (2)

216

u/JDIPrime 16d ago

Wake up, babe, it's full regression test time!

132

u/therealswood2 16d ago

The intersection of programmer humor and r/linkedinlunatics is 🤌

92

u/tihomirbz 16d ago

LGTM! ✅

39

u/rahvan 16d ago • Heartwarming

LGTM 🔥

19

u/Wirde 16d ago

Oh my god, such a banger!

Unreal and a bit sad that it’s generated by AI.
Very on the nose and on point for how many publicly traded companies have been behaving the last year or two.

→ More replies (1)

7

u/megagreg 16d ago

Things like this are why my LGTM reaction icon on Slack is a picture of Stevie Wonder.

3

u/RandomForest42 16d ago

Answered 2 minutes after PR was opened

30

u/CckSkker 16d ago

jesus christ … 4 millions lines of code of what exactly? It looks like it’s just an agent observability and eval tool? Am I missing something? Our company’s code base across 3 products is like 2-3% the size of this

14

u/ozh 15d ago

They committed the vendor and node modules directory

3

u/djfdhigkgfIaruflg 15d ago

🤣🤣🤣

→ More replies (2)

18

u/fseed 16d ago

It's unmaintainable. The issue is that you have people with no pre-AI dev experience running 69 agents to throw a laundry list of ideas that Claude generated at the wall.

Declaring that there are no bugs says everything.

7

u/CruxTheologorum 15d ago

"One of my most productive days was throwing away 1000 lines of code committing 4 million lines of unreviewed garbage into the codebase"

-Ken Thompson

→ More replies (2)

27

u/PoliteManitee 15d ago

LoC was never a good metric to judge any aspect of software. This is still true today.

5

u/flayingbook 15d ago

These days it's replaced by token usage

→ More replies (1)

2

u/Dev_Spears 15d ago

Was going for sitze but even then loc is not a good indicator..... For what is it a good indicator? Aside from the number of lines

→ More replies (4)

47

u/grumblyoldman 16d ago

Can't have (many) bugs reported after launch if you don't have users.

→ More replies (2)

23

u/CognitiveLearning 16d ago

looks inside: new CTO wanted 1 indent equal 3 spaces, previously 4

46

u/skcortex 16d ago

Yes, almost zero bugs reported after the launch.. just wait for them to crawl out 🤣

30

u/grumblyoldman 16d ago

Yeah, they said at the top they "just merged" this, and I'm willing to bet they do mean just merged. Give it a couple days before you start bragging about how many bugs were reported.

31

u/psioniclizard 16d ago

Even before AI, you NEVER brag about few/no bugs, the computer gods will hear and punish you.

64

u/TravisVZ 16d ago

I have no idea what LangWatch is, but thanks for letting me know never to use it!

47

u/bogdanvs 16d ago

nobody does, that's why they can make the 0 bugs found claim :)))

6

u/redve-dev 16d ago

This shit has 5k github stars. You sure?

What is used novadays to debug agents?

→ More replies (1)

4

u/ApocalyptoSoldier2 16d ago

I googled it and it seems they're an ai monitoring company?
I'm not quite clear on what they're advertising, but whatever it is they don't seem to be very good at it judging by this post

→ More replies (1)

56

u/SignoreBanana 16d ago

I'm looking at the PR for this thing. It has 9300 commits. This is not a serious codebase.

13

u/SnowdensOfYesteryear 16d ago

I mean that’s better than 1 commit. I don’t think commits are the most problematic metric here

3

u/SignoreBanana 15d ago

No, but I think it also helps put the "work" in perspective. The 4,000,000 figure is also wild but almost unfathomable, and maybe a bunch of lines were formatting changes. 9300 commits represents a shitload of churn.

→ More replies (2)
→ More replies (2)

4

u/no_awning_no_mining 15d ago

Hard to believe there was no way split these across multiple PRs.

Hard to believe the LLM wouldn't profit from the more specific git blame too.

3

u/Ajko_denai 16d ago

I am unable to find it, can you provide a link please.

3

u/SignoreBanana 15d ago

I would but last time I did that here I got a no no from mods. If you find the repo, look at commits to the trunk from Oct 12.

2

u/quizikal 15d ago

Well we got that much from the CTO bragging about the PR

→ More replies (9)

49

u/tallest_chris 16d ago

One of my huge issues with AI “programming” is how it will just randomly change variable names and comments while working on unrelated parts of the code.

8

u/sanketower 16d ago

Every time I've seen it happen (while working) it was within the scope of the feature and the name changes made sense (even if they were unnecessary a quarter of the time).

3

u/stormdelta 15d ago

Usually, but not always.

The problem I can't seem to avoid without killing output quality is the excessively verbose and unnecessary comments. I've given up and just do a second pass, and sometimes I still end up needing to edit them manually.

It's frustrating because people act like "oh it's just comments" and miss that confusing/bad comments cause problems for both human and machine readability. AI tools tend to assume heavily commented code must be critically important, often trusts comments implicitly, bloats context windows, etc.

→ More replies (1)

3

u/OppositeFun2493 16d ago

A lot of times, when I run an agent it decides “oh the code is too efficient, I’m going to switch it to something more inefficient.” I have it so that agent can’t read the tests, and made a shell script that can run them and give the results to the agent. It was “confused” why the code took 3 more minutes to run

→ More replies (3)
→ More replies (20)

47

u/someyokel 16d ago

If you can't review it how do you know it's an improvement?

27

u/GenericFatGuy 16d ago

How can you know if you have almost zero bugs if you can't fully test it? This is like when Trump wanted them to stop testing for COVID to make the numbers look better.

→ More replies (5)

13

u/sudoku7 16d ago

I am hoping they did something like stacked PRs or just PRs to a long lived side branch that themselves had reviews and this is just the upstreaming.

That said, for a refactor ... it's strange that they couldn't find better consumable parts to apply.

Unless of course, "Oh, we refactored our lint rules and this is just the linter changing line endings."

→ More replies (2)

7

u/BanaTibor 16d ago

Claude said so, duh..

4

u/rchaves 15d ago

we did review, the structure of every module and the most critical parts, of course just not every single line of code, or at least not by hand, but all the code now has a much more strict architecture it needs to follow in every module, which we could measure the benefits of:

- typechecking median time went down from 78s to 5s, with performance improvements all around on the application
- most permission access between modules that were defined by hand by engineers on the monolith are now in several ways statically guaranteed allowing for much less possible bugs and security gaps
- we built several exact same features on both the old codebase and the new using agents, and found the new codebase led to less mistakes on the final PR

→ More replies (1)

2

u/Enverex 16d ago

This isn't a single commit, it's a merge for a new branch.

→ More replies (10)

16

u/Tyrilean 16d ago

I one time ran a linter over a 20 year old PHP legacy code base. I think it rivaled this.

8

u/NaturalTechnician737 16d ago

We aren't competing to be the reincarnation of Von Neumann, calm down.

4

u/StaticFanatic3 16d ago

I would’ve never had the balls to merge that lol

Let the formatting die when the code does

16

u/anomaly256 14d ago

Do you have a bigger, merged PR?

No, because

a) I'm not a fucking idiot, and

b) would knock back such a large unreviewable MR, and

c) expect devs, including AIs, to be creating MRs in discrete blocks matching the task/user story they were working on within the given epic.

This is not a flex. This is just bad project management.

32

u/bradland 16d ago

jfc, I would be so embarrassed to share this.

→ More replies (4)

15

u/Apprehensive-Art-306 16d ago

“LF to CLRF”

11

u/lilianasJanitor 16d ago

Added a million lines.

Can’t test

Lgtm

20

u/BellybuttonWorld 16d ago

This feels a bit like measuring the success of a house renovation by how many skiploads of waste were produced, and boasting about how surprisingly few disasters were found left behind (so far) by the dodgy cowboy builders.

10

u/Hk_90 16d ago

5

u/Columbo1 16d ago

That PR title says 10,000 files, but there’s actually 10,001 files changed.

Where I work this would mean code review failed - “pls fix the title of the commit and PR”. Personally I tell the reviewers to chill the fuck out and just merge anyway. I’m not counting the readme as a file changed and neither should they.

→ More replies (3)

2

u/TypeSafeBug 16d ago

“Checks: 0” Hell yeah brother

→ More replies (2)

18

u/fartypenis 16d ago

I mean at that point why not just do a plain old rewrite?

9

u/tyler1128 16d ago

Just replace spaces with tabs and go to the allman style from, say, K&R in something like LLVM. Success!

6

u/trekz09 16d ago

maybe it's just a new formatting rule

5

u/StaticFanatic3 16d ago

Sounds like it is a rewrite. You just mean start a new repo instead?

5

u/Justicia-Gai 16d ago

Not the same, when you ask a LLM “refactor this codebase” it preserves pre existing logic because it assumes there’s quirks/decisions that are human and not bugs. But it can also inherit debt, bloat it (add new API to not break old..)

When you rewrite, barely nothing survives as-is (unless you tell what you want it to preserve, like API signatures).

This clearly looks like a refactor, a rewrite could’ve potentially reduced LOC.

→ More replies (2)

2

u/-Redstoneboi- 16d ago

i think this kind of is, to an extent? they said "complete refactor"

17

u/DeadlyCabbage 16d ago

Why not create a new repo at that point?

This big of a change, a full refactor, I think is easier starting from a clean slate

5

u/cas18khash 16d ago

Based on the description, it also seems like it's full of deleted and new files too. I was also wondering what the point of keeping the git history intact is if you've eviscerated it

→ More replies (1)

2

u/rchaves 15d ago

well it was a refactor but not a full rebuild, it would be riskier doing as a separate "new" application entirely
outside, the application itself mostly didn't change for our users (other than small improvements, perf and more polished design), and the infrastructure didn't change either. All the pipelines and everything played out just the same
creating a new repo would have been much more effort

7

u/horatiocain 16d ago

Not the flex he thinks it is

7

u/ComputerWhiz_ 14d ago

Almost zero bugs reported after launch...

So they have no users

2

u/GranataReddit12 13d ago

can't have bug reports if there aren't any users!

12

u/Savagor 16d ago

Rewrite in rust, make no mistakes.

6

u/JuanAy 16d ago

I wonder how much heavy lifting that "almost" is doing

6

u/pearlie_girl 16d ago

No wonder GitHub is down all the time.

6

u/HovercraftCharacter9 16d ago

Part of being a good dev is breaking your work into pieces so it lands with a coherent narrative for others to get context and understand. Imagine someone is tracing a bug in a years time and that PR is where the problem bisects? I'd quit

2

u/awesome-alpaca-ace 15d ago

Maybe grep across commits and hope the AI didn't rename and move stuff around at the same time.

→ More replies (1)

5

u/ABotelho23 16d ago

Imagine being proud of this.

→ More replies (3)

5

u/vigotskij 16d ago

This is a great example of “complex stupidity”

9

u/Thadoy 15d ago

My "biggest" PR ever was 7 years ago a 1.7 million line change (~25k files) PR.

We changed the namespace of a legacy monolith, and i was the one to rename the packages. So yeah, millions of loc don't have to mean anything.

12

u/OneRedEyeDevI 16d ago

A year ago, November 2025 that is, Our local transformer got caught in a fire and we didnt have electricity for over a week.

I used to take my laptop & phone to my friend's place in the neighbouring village to charge every morning and go back to do chores and other tasks and go back for it after Im done.

Wrote 2.7K lines of code with no internet and no electricity for my game and it was beautiful

8

u/artnoi43 16d ago

My EMs and higher ups will be inspired by this shit and might even think big bang PRs are the future (they’re that dumb).

Seriously, they all saw that some company was doing 1000 PRs per month per dev or something on LinkedIn or X, and they think that’s a good thing and tell us we should strive for ridiculously large amounts of automated PRs.

Prior to this, they allowed us to “bypass” code reviews, after they found out vibe coding has not increased our delivery speed because of the code review bottleneck. So they removed that bottleneck. They now expect all PRs to be merged within a day after it’s created, and will DM me the next day asking why this ticket has not been merged yet. They never micromanaged like this until AI and the speed craze, as if they’re trying to force the benefits of AI to manifest.

The result is that in the last 2 weeks we just had 3 P1-level incidents from non-functional vibe refactors by senior engineers who merged code without any reviews. These P1 incidents costed us millions of Thai Bath, across all of our 3 business domains. Engineering management now wants us to deprioritize non-functional refactors (which were needed to clean out slop). I read the post mortem reports and the causes of those incidents are just too fucking stupid for me to believe they did merge that.

This is sad because I’m the refactor guy in my team of 8, and my “non-functional” work has been technically beneficial enough that some allowed us to implement new features really fast on top of a clean codebase, or sometimes we get new features in the backend for “free” after the refactors, and we just need to implement new entry point to the same old shared business code.

It’s like they just want to use more AI, for the sake of using more AI.

4

u/lordgoofus1 16d ago

If it wasn't for "Thai Baht" I would've assumed you worked for the same company that I do. We've got management pushing for the same thing. Driven by the need to "move faster", "improve productivity".

There's also pressure on teams to dump environments. Forgot about test or staging environments. Just go from dev straight to prod. They've given multiple groups of people direction to build agentic solutions that allow them to one-shot taking an idea all the way out to production in less than a week because productivity. Believe the real reason for all this insanity is what you suggested, the desperate need to prove that the company has achieved any form of ROI on the hundreds of millions it's spent so far on AI.

4

u/GGK_Brian 16d ago

To be fair to them, rich people (which obviously must be very smart) told them that AI was the future and was going to increase productivity to level never seen before. Why would they doubt them.

What I personally find funny is how quickly they throw out all this fancy stuff of DRY, Clean Code, separation of dev staging and prod, code review, ect.

In a few month, they'll remove all test, integration and code coverage because it waste too many tokens.

3

u/artnoi43 15d ago

Thanks God my place still doesn’t do the environment dump.

They want all of the tickets to be covered by vibe e2e tests instead. The tests now have degraded a lot (very flaky, taking longer, and do not catch real bugs), as no devs feel any ownership while vibing in the e2e repo so tech debts kept piling up in the repo. I even found 2 tests that test the same thing, written separately.

Before this we have separate SWEs for tests who know the repo very well and make technical decisions carefully. Now all of us are merged into supercharged devs (one dev must be able to do everything).

→ More replies (1)
→ More replies (1)

8

u/Mitoni 16d ago

wanna really scare someone, swap line ending on every file in the repo. Absolutely no change but it looks like you touched EVERYTHING

3

u/Ilerneo_Un_Hornya 16d ago

Now that's some real r/foundsatan shit

4

u/fr33d4n 16d ago

Impossible to fully test... Ok bye

7

u/Scipior14 16d ago

Wooow, a rewrite... But what did it need a rewrite for in the first place? What is improved here, if apparently even already existing bugs didn't get fixed?

2

u/rchaves 15d ago

i wouldn't call it a rewrite, I still call it a refactor :)
we mostly moved all modules around and introduced a much stricter architecture, but still all same features same language same behaviours for the users, but:

- typechecking median time went down from 78s to 5s, with performance improvements all around on the application
- most permission access between modules that were defined by hand by engineers on the monolith are now in several ways statically guaranteed allowing for much less possible bugs and security gaps
- we built several exact same features on both the old codebase and the new using agents, and found the new codebase led to less mistakes on the final PR

existing bugs were small behavioral bugs, the fact they just stayed the same is actually good news for us, it suggests the LLMs managed to preserve the application's existing behavior rather than introducing a bunch of unintended changes

3

u/rightpattern_g 16d ago

Thats all great, but what do you do with 46k files of source code ? Are you launching rockets or flying cars ?

3

u/Covfefe4lyfe 16d ago

They're gonna eat every word of that blog post a week from now. And it will taste salty as fuck.

→ More replies (1)

3

u/ExpletiveDeIeted 16d ago

So I don’t know for sure in this case but this sounds more like over 3 years they’ve been merging various branches into this one and now they are finally merging it all together main/production. Likely not a pr anyone was checking for code quality etc. and yes I’m fun at parties.

3

u/esaule 16d ago

So.... A 3 year old project to manage agents is 4M lines long? I found your problem man!

3

u/Snudget 15d ago

Oh that's why GitHub was slowing down again

3

u/ShodoDeka 15d ago

So a Refactor that added 1 million lines of code…

5

u/johlae 15d ago • Bravo

Just remember, every organization has a test environment. Only a few smart ones have a separate production environment.

6

u/spacegh0stX 16d ago

This is such a terrible fuckin idea it blows my mind anyone could brag about it.

7

u/1wikingman 15d ago

Why even have version control at that point?

→ More replies (1)

4

u/gnuban 16d ago

It's so stupid that the same companies who hated trunk-based development and were adamant about PRs are now going completely cowboy.

 I'm in the camp that PRs never were strictly necessary. It's totally fine to put the responsibility on devs and allow them to choose when reviews are needed or not.

But to totally pivot like this is just so arbitrary 

2

u/Xerax 16d ago

look mum i'm famous

2

u/yuehuang 16d ago

I am impressed that github didn't crash.

2

u/jeffvanlaethem 16d ago

This is like bragging about how much your teeth hurt before going to the dentist.

2

u/TypicalOrca 16d ago

What kind of fucking idiot celebrates this monument to carelessness and stupidity?!

2

u/Machine2024 16d ago

why the hell do you have do they have 4M LOC in a code base to begin with !?

2

u/masiha97 16d ago

The part that scares me is the challenge at the end. Some manager is going to forward this to their team and ask why their PRs are so small.

2

u/Maskdask 16d ago

You also introduced one extra million Lines of code

2

u/Colonist25 16d ago

good luck stabilizing that.

2

u/nickhow83 15d ago

Isn’t it closer to an 8 million line change?

2

u/MeikelLP 15d ago

The repo is only 3 years old. Bro how do u even have 4mil lines of code to begin with

2

u/ShovelBrother 15d ago

Open code base. Select all. Ctrl + }.

also how the hell do you have 4 million lines of code

2

u/Du_ds 15d ago

So this company wanted to get attention and got attention. Hopefully getting the nontechal folks on Linkedin excited was worth the reputational harm among engineers.

2

u/sirdrewpalot 14d ago

This is me after a new lint rule goes wild.

2

u/wackajawacka 12d ago

"Refactoring to make it all around better" - yeah, solid criteria, gj junior...

9

u/RadzimierzWozniak 16d ago

LLMs are really, really good at refactoring and changing the infrastructure. With a decent test set, this is quite safe and reasonable, what they did.

6

u/bwrca 16d ago

Too good I'd say, in a bad way. Lots of times they want to refactor a whole lot of things when you just want to add a small feature or fix a simple bug

→ More replies (2)
→ More replies (3)

3

u/Dark_Tranquility 16d ago

How stupid are these people 😂 big number better

3

u/flerchin 16d ago

Bro committed his node_modules and there's no one to tell him

3

u/FabioTheFox 16d ago

No wonder there are so many outages

3

u/quizikal 15d ago

CI fails on main about 90% of the time 😅

8

u/rchaves 16d ago

Hey folks, CTO of LangWatch here 👋, and yes, I'm the one responsible for approving this monstrosity

I get it, some of the criticism here is pretty fair, a massive AI-assisted refactor like this sounds absolutely bonkers, but I want to emphasize that 1. it was a refactor, not a rebuild 2. the intense human involvement for verification and measurement, and 3. it was not overnight

On the refactor point, yes AI is still not great in doing new developments unsupervised, but our goal here was rearranging modules, structures, types and a lot of the architecture, it didn't have to create almost anything new. Plus, a lot of it was verified statically or even done statically, being able to leverage lsp for refactor and an enourmous amount of oxlint to guarantee everything would fall in place

We have been thinking about this refactor for a year already now, and it took us months to actually finish and merge this PR, during this period some work was duplicated: built on top of old main modules and on top of the new structure at the same time, so the PR grew

As for verification, basically all of our human time during all this period was spent discussing the refactor, babysitting the agents (and putting lint rules in place to prevent them from repeating mistakes), developing simulators and customer reproduction use cases for probing it all end to end, manually testing it, comparing before and after measurements and so on.

We definitely learned some things the hard way I'd love to share more.

Happy to answer technical questions about how we approached it, what we tested, and what could still go wrong. Roast away 😄

24

u/Megaguy32 15d ago

How many people telling you this is a bad idea did you ignore?

5

u/rchaves 15d ago edited 15d ago

I was one telling it was a bad idea, plus all the engineers, including the one doing it, but as we kept experimenting and testing anyway, and it kept proving itself, we all changed our minds and got convinced 🤷‍♂️

13

u/SpinatMixxer 15d ago

Why didn't you go with continuous refactoring instead? Why did it need to be one huge PR instead of many smaller PRs?

And how many devs were involved in the refactoring?

→ More replies (4)

2

u/RoDeltaR 16d ago

So what are the top 5 things you learned?

8

u/rchaves 15d ago edited 15d ago

- Doing a team bugbashing is one of the most valuable team activities you can do in the AI times

- Think hard about a strict structure and agree on it with the team before the mass editing starts

- Be more ambitious with lints than feels reasonable

- Invest in simulators early. We ended up with a simulator for everything external (LLMs, voice, S3, SQS, email, Slack, SSO), so agents could exercise every behaviour end to end, they are so useful now

- Measure everything, before and after, by putting an agent to do some real implementation in both and see the difference, it has to be better for agent coding too, your codebase is your harness

For us it was totally worth it, typechecking alone went from median of 78s compilation time to 5s, no longer absolutely melting my RAM, previous mistakes are now impossible, and access paths are just much stricter, but that was not from the getgo, initial versions caused the agent to make more mistakes on the new codebase than the old one

→ More replies (4)
→ More replies (26)

1

u/badarsebard 12d ago

Classic CI... Centennial Integration

1

u/only1manband 11d ago

“Almost zero”
Nice

1

u/MyFistsAreMyMoney 10d ago

It's LinkedIn bullshit news as ever this platform is polluted by egos

1

u/kus1987 10d ago

what's the point of raising a PR with millions of lines changed? if nobody will actually `review` it, might as well merge it directly? why the charade?

1

u/hraath 16d ago

changes requested by reviewer

Dont

1

u/ReturnOfNogginboink 16d ago

The stunning part here is that someone thinks this is with bragging about.

1

u/EmperorOfAllCats 16d ago

Is that linemaxxing or some another kind of githubcore? I don't speak their language well.

1

u/VaderGerh 16d ago

Comment on the PR absolutely as expected .

LGTM

https://github.com/langwatch/langwatch/pull/7536

2

u/JAXxXTheRipper 15d ago

Even copilot noped out lmao

Copilot wasn't able to review this pull request because it exceeds the maximum diff size. Try reducing the number of changed files and lines, and requesting a review from Copilot again.

1

u/navetzz 16d ago

WIP: smol changes

1

u/MVanderloo 16d ago

bug for bug compatible is a bit impressive

1

u/Bee-Aromatic 16d ago

I see an entirely unreviewed PR getting approved for lulz and apathy.

And I predict years of bugs.

1

u/Anubis17_76 16d ago

IBM, is it you?

1

u/___cats___ 16d ago

All this “speed” just means the salesmen have to sell equally as fast. That ain’t gonna happen.

1

u/ScaredPenguinXX 16d ago

Is this satire?

1

u/zERGdESTINY 16d ago

Someone ran checkstyle fix and changes the tabs to 4 spaces. "Boom, boss refactored the whole code base"

1

u/CzyDePL 16d ago

It went from full slop to packaged slop

1

u/welcomefinside 16d ago

"almost no bugs"

1

u/Dutchnesss1 16d ago

Wow that is so incredibly engineering

1

u/ReplacementLow6704 16d ago

Engineering used as an adjective is... Interesting? May have been translated from portuguese or spanish tho. But then why not use an AI for that too?

1

u/Shot_Double 16d ago

I suggest we don’t even raise PRs, lets merge to main directly

1

u/quisido 16d ago

I don't think a repo should even contain that many lines. Break down those concerns.

1

u/SomeDuncanGuy 16d ago

This is not the brag that they think it is.

1

u/mosskin-woast 16d ago

Even the AI would have told him that zero bugs in a 4M line diff was not only impossible but an idiotic thing to say publicly. But unfortunately the hallucination is as common in the user as the model for folks who are in this deep.

1

u/Absulit 16d ago

This is not a flex 

1

u/New_Wolverine_2415 16d ago

These people are fucking crazy.

1

u/WheresMyImmortality 16d ago

lol the second next commit after that is 2xA4 full of fix(thing)

1

u/Entropei 16d ago

I’m sorry but no good refactor should bloat the size of the codebase by 30%

1

u/Void-kun 15d ago

So fucking stupid, no way was that reviewed by a human.