upvote
AI makes it possible to fix bugs and solves issue one wouldn't do before. But just because it's easier now doesn't mean it's automatically worth it. There are tradeoffs (like code complexity or breaking stuff), or it really just wasn't that important to fix if it was in the backlog forever. I've seen devs go down this rabbit hole, and perhaps overdo it. It feels productive, but at some point it might stop to provide value, and other things should've been prioritized.
reply
Avoiding 3rd party libraries seems like a false sense of security. You’ll stop seeing CVEs on the scanner reports, but the bugs are still there, just in your own code that is less well audited than public libraries.
reply
I understand, but I would argue its better to have an in-house 1K lines of code that only does what we need and nothing else, it well tested and under our control, than to depend on some 50K lines of code (of which we might only use 10% of functionality and the others just getting in the way) that random's on the internet can modify, sometimes pulling in transient dependencies that we would really not have in a server environment, telemetry and other gremlins. It goes without saying that opensource packages will become even more juicy targets for malware/hackers to get into your systems like we've seen in the past month (and it will only become worse - you will be forced to pay technical debt or die).

The only "third-party" packages that we want to ideally allow/support would be provided from LTS versions of our runtime (in this case, packages provided by the dotnet team and audited by microsoft). So we will always try to build around what the framework provides. Second choice is our own code, third choice is open-source packages, fouth choice is a separate application/appliance (lets say ZenDesk for ticketing). Over time, we will reduce this footprint to only have dotnet team code and our own.

Remember most CVE's can be hidden on servers that are not publicly routable and don't have a real exploitation paths. The bits that are public (lets say a linux edge server with a web server on it, some firewalls, a couple of open ports) - these should be hardened to the max and not allow full access to all the services running behind it. We don't even give our internal services public IP addresses to make near impossible to route traffic to them.

Our git repo's are also not on public infrastructure (serious, think carefully about hosting on public services and if you really need it), never mind making the repo public.

We also have a dedicated secrets/certs manager, so no credentials are in codebases or pipelines. Very strict in this regard.

reply
> on some 50K lines of code

also some 3rd party libraries are overdesigned/overcomplicated because everybody wants the library to do everything for everybody.

This overcomplication can easily introduce security problems that is not present in the 1K solution.

reply
> overdesigned/overcomplicated because everybody wants the library to do everything for everybody.

Also a source of significant dependency churn even excluding security bugs.

Whereas with my own code I don't have to worry about scheduling work that's only arisen because somebody outside my organisation has decided to make a breaking change in a dependency. Paying that tax got old over a decade ago, and my patience with it now is close to zero.

reply
100% our thinking too.
reply
cough OpenSSL cough
reply
Similar to distroless containers & statically linking all dependencies
reply
It has been proofed again and again that you cannot trust npm/cargo not even AUR, implement you own minimalist functionality without dependencies and just for you own needs seems to be a much better solution.
reply
I feel like security by obfuscation might actually be valuable in the age of llm attacks
reply
on the other hand you are not exposed to supply chain attacks
reply
One problem I’ve seen with third-party libraries, especially in the JS ecosystem, is that to fix a CVE, you often need to jump a major version or three, and that entails quite a bit of work to adapt to breaking changes. Porting a fix back on your own and keeping your own fork is the same as supporting a first-party library, except it’s not really first party, and you’re not familiar with its innards.
reply
>Avoiding 3rd party libraries seems like a false sense of security.

What a bullshit.

It's different scenario, different trade offs.

You mitigate risk of library being sold to malicious 3rd party, you avoid risk of your supply chain being hacked, you avoid API/behaviour breaks, etc.

The trade off is that you have to maintain it.

That's why dotnet's ecosystem is so loved due to MS providing 90% of needed libraries, so you avoid some 3rd parties maintained by single person.

reply
This is the way! What also affects the decision is what the code will be doing, and how much extra functionality that you will never use (extra attack surface) you will get by importing external library after library.

Often it can be a very good choice to write the functionality yourself and not rely on external libraries.

reply
Same approach here.

And since we now have coding assistants, maintaining in-house costs near nothing now. Nobody else can break us, only ourselves.

reply
Now this is how companies should be using AI. Not as an excuse to fire half the devs. Less bugs, less failures, better experience for everyone.
reply
We haven't fired a single person yet due to AI. We just save everyone time, make input more accurate, make our accountants better, manage our technicians and jobcards better and so on. We also made our system bullet proof to the point that we only had one weekend failure in the last 24 months, and it wasn't our fault (a third party dependency did a large deployment on a friday night). Our system is now deeply "boring" and its awesome.
reply
Congrats, that's awesome.
reply
Perhaps the ultimate use case would be to use AI to scan, debug and find issues etc, but never to generate new code. Still have humans writing and understanding everything, keeping things as clean and concise as possible.
reply
It would be great net result for our brains, however too much money has been poured into this business to give up on that. My belief they will push for SWE layoffs trying to position LLM-based agents as a cost efficient alternative to human programmers. Which is extremely stupid and short-sighted but that's the strategy.
reply
They will learn certain lessons the hard way for sure. As much as I want to spin up 100 agents in a loop on our codebase and let them loose, I also know its not feasible as they can easily go down the wrong rabbit holes or over-engineer the wrong solution. They are amazing but cannot be left 100% autonomous just yet.
reply
Literally half of the work we did the last 12 months was this. Refactor and fix, performance improvements, security hole fillings etc. We have one or two devs doing visible feature work, the rest of us is making the system rock solid.
reply
>fixed thousands of bugs

>set our compiler to treat warnings as errors, and to be as strict as possible

>ironed out all the bugs and failure modes in our infrastructure automation / monitoring.

>eliminate all 3rd party dependencies

>rebuild our frontends completely using zero frameworks

Oh yeah, that's what i call "software engineering" and excellent use of LLM's! Great to see Company's with a Mindset like that.

reply
> rebuild our frontends completely using zero frameworks, not touching npm ever again after that

Genuine question, because I don’t know: Wouldn’t it suffice to vendor your current packages and “only” stick to maintenance from there on out, instead of rewriting it all?

This should still achieve the goal of not needing to touch npm, but presumably with less effort/tokens, right? Or is it just that you would expect the result of that process to be less clear and maintainable than a full rewrite?

reply
Actually, I have started with it already but is paused, but the approach is to rebuild it from scratch in parallel to our current legacy system and move our staff over to the new completed screens in batches (we have close to 1000 views in our system, 150 background jobs, with about 15 main categories (think organisational sub-divisions)). So as long as we go slow and steady (even with AI) it will work out fine, I expect it will be done in less than 6 months. One month if we rush but we don't want to rush it, as we are moving some things over from MSSQL to Postgres, so slow and steady is the way.
reply
> from MSSQL to Postgres

How's that going? Any lessons learnt you'd be willing to share?

reply
Differences: Money/decimals, rounding, case-sensitivity, equality comparisons differences, db/table locks mechanisms, memory/worker management, table/column naming conventions, null fields/columns effects on queries.

Mmm what else. I prefer postgres so I'm very excited about this. So many foot-guns will no longer haunt us like on MSSQL and less db/table locks to try solve (pessimistic vs optimistic locks). Oh and we are going to save a gross amount of money per year, as we will also be able to switch off a couple of Windows Server VM's in the process. These puppies are costing us a ton (I think about half of our infra bill are licenses...).

Just create a branch, spin up a test db and try to port a small feature. Its very easy in most cases. Debian + dotnet + postgres = dream team.

reply
Because they are large codebases with their own technical debt. You're not doing a full rewrite, but just make what you need for you own codebase.
reply
If the parts you need from a larger third party library are small and simple, that makes sense. But I don't think the general idea of reusing battle tested code across many projects is obsolete because of AI.
reply
Ah, I think I see now. Essentially the dependency module is unnecessarily large and (for your own use case) ships with extraneous features/“bloat”.
reply
Exactly. And over time a project can drift from its original purpose, so you end up building around a bunch of stuff you aren't using anyway, but you pay cost/risk for having it present.
reply
Good thing if you can afford the vulnerability detection run.

I could imagine scenarios where only well off developers and companies could afford that.

Then if you don't have the money, you are out of luck and risk having vulnerabilities in your code.

And it takes just one adversary to pay the bot & the bot will happily find an exploit for them in your code.

This worry this could lead to a serious power imbalance & furthe damage the free software community...

reply
Short term there will be pain (hacks/malware) but at the same time, it will force the survivors to build bullet proof systems.

Worse case, we enter the Dark Forest era for technology. Read up on this concept and apply it to the tech industry. I suspect open-source might die and everything becomes private, no more public networks, no more open access, as to assure survival. In a sense we are halfway there already as it seems the internet is starting to close down, people not posting their art and music as much anymore, not posting their knowledge for free anymore, as it might be used against them by AI (the other party in the dark forest..). Thus private authentic experiences will become more valuable.

reply
I don't think it'll be that bad:

1. The cost of running AI is dropping down to "free" - there's open weight models, open source tools, and guides on running your own if the long list of suppliers isn't good enough for your use cases.

2. Vulnerabilities have always been a risk; AI is not a panacea. The pre-AI best practices still apply. Furthermore, a huge percentage of vulnerabilities are in 3rd party tools and systems, which are systematically being scanned and fixed and/or exploited, then fixed.

You mention "the free software community" in your last sentence though - this implies the code in question is open source, so it's able to receive plenty of improvements from anyone with access to these tools.

reply
> Our next project is to eliminate all 3rd party dependencies, and after that to rebuild our frontends completely using zero frameworks, not touching npm ever again after that.

What's the proportion of bugs you've encountered that was due to a library versus due to your own code? I suspect it's probably more than 1:1000.

This is a stupid decision.

reply
Didn’t you guys have to ship new products? How a business can afford so many backlog tickets being implemented? I understand fixing bugs can also mean improving the product but still - (almost) the whole world has this balance between new features and acceptable-ish number of bugs
reply
We are multiple developers, each having 10+ main claude agents running different sessions/terminal tabs. I have 10 copies of our codebase on my laptop, each with their own purpose and claude session and history. The other devs have different approaches but we all get similar output. And then we also built an agent framework that runs within our system that has access to our code (at most 60min behind master branch), our infra and our databases, so it can diagnose issues with excellent precision and prove it to us where to find code/data issues.
reply
What are your token budgets like?
reply
Are you able to share which domain your company works in?
reply
Utilities - Electricity/Water/Gas. 98% of our systems are internal facing or third party integrations. Our surface for end-consumers is tiny.
reply
Can you tell us how did you achieve that kind of work, briefly? I struggle to figure out how such massive bug fixing campaigns or even large scale software engineering are done with ai not taking weird decisions...
reply
I personally started using AI with a very rudimentary "memory" system, and for first weeks corrected it ad nauseam, until, in the small domain I was responsible for, it started doing work end to end fully autonomously. Takes a lot of time and effort to bootstrap, but once steered well enough, it just clicks and less and less is needed to check manually
reply
Yeah a memory system per domain, or per module or even per file works amazing, we have it too. Took a ton of time to improve the code and list down all the tribal knowledge, but now that it's done, it works super well.
reply
Myself specifically, I have a /code folder without about 10 copies of our codebase, each running their own claude sessions & git branch. Then, I have 10 terminal branches. I spend a ton of time planning out & specing the problem with claude, to be as specific as possible and be as constrained as possible so it cannot go on side-quests. I use Opus 5.5 on High effort. That's just on my laptop with what I can mentally cope with day to day. Then we have some other automatic ai goodies running within our custom agent framework that runs within our platform that also helps. Then for apps, I basically plug in multiple phones into my laptop with usb (and emulators if I really need to), and claude can fully drive the ui and testing on the phones via adb as an example. Even on linux/fedora/kde it can drive UI apps a and take screenshots and fix things properly etc. It can ingest all logs & debug chains, so it absolutely flies through its task.

Before we started this journey (about a year ago), we spent a ton of time cleaning up our codebase, splitting large files (10K+ lines) into files that are no more than 2K lines, things like that. Then we let claude scan our important files and summarize them, add comments for future claude sessions. So we've let it built up tribal knowledge per file and the reasons for things to exist. We tell it all about our operating environment, the country and legal framework etc, so every little piece helps it stay honest and on track.

So to start, do something simple like: Scan the files in this folder for database code and check for queries that loads the entire result set into memory and/or queries that loads all columns. Suggest which queries we can filter better or reduce columns being transferred. Once done, also check real db row counts, compare them with the queries in these files and check if they might benefit from an index or partitioning/sharding. Also check for queries that loads data but their results are not used. Don't make changes yet, just do a deep investigation and report back. Feel free to spin up muliple agents to batch the scans.

edit: it goes without saying you need a language with strict typing and a good compiler (we use dotnet). Doing this on python/javascript would be a nightmare.

reply
> IDE's would've made it very uncomfortable

Would you mind elaborating?

reply
When you change a single setting in the IDE to make something more strict and you have 1M+ lines of code, you will get 30K items to fix, via red/yellow/blue squiggles in the IDE. Most of those can be simple refactorings, but the performance & UI of the IDE makes it incredibly unwieldy and it will sometimes fight you back, sometime crash internal processes which leave refactorings half baked and so. Now imagine you change 50 such settings, to make the compiler force you to write better code. Changing 200K+ lines of code yourself is a nightmare (and to prove it still does the same thing afterwards). Instead, claude systematically approaches whole classes of errors and convert them to cleaner variants (either using our custom skills or it writing new scripts to do it). I consider myself an advanced user of IDE's, know how to do bulk refactoring and renames and so on (esp with JetBrains tools), and I would say it would be a near impossible task to do as a human. Then there are other developers - so you flip a setting and now 5 other people's IDE's are forcing them to work a specific way which will make you unpopular very quickly and revert the changes. So, since most of us no longer use IDE's as our main tool to build/diagnose, we can more easily flip compiler settings without destroying someone else's week. Hope that makes sense.

Oh it also helps to split refactoring work into three buckets: business logic changes, performance changes (same output as before but faster) and cosmetic changes (rename files/folders/classes, breaking large files up, add logging/comments, domain layering etc). We tend to focus on performance and cosmetic changes for bulk refactors and leave logic changes to more dedicated sessions as to avoid changing what the system do (our domain is fairly complex and we cannot afford breakages). We also managed to port ALL of our code to dotnet 10 lts and have clean boundaries between projects (we have a mono-repo with about 50 projects in it), so we can wholesale upgrade dependencies without a sweat.

reply
IIUC, your point is that changing IDE settings will affect other developers. But can't you enable an inspection locally, apply all or some of the quickfixes and revert the setting before committing? In the longterm, you want to enable the inspection anyway because the point is to prevent developers or agents from comitting new code that violates it (agents can access JetBrains IDEs' MCP Server to get inspection results).

Of course, crashes and bugs can happen when applying quickfixes, which isn't nice. Ideally, they should be reported and fixed. You can also ask an agent to fix the occurences instead of using the IDE quickfixes if that's blocking you.

I guess what I'm trying to say is that IDEs shouldn't make that process harder, they can actually improve agents' results. For example, you don't need to write custom skills to prevent agents from writing some class of bugs if the IDE can detect it and agents have access to the results.

> Changing 200K+ lines of code yourself is a nightmare (and to prove it still does the same thing afterwards).

If an agent does it, you still have no proof, but okay.

Full disclosure, I work at JetBrains, but not in the IDE department.

reply
The problem is, even if I only enforce some rules locally, another developer has a different set of rules. So when we git commit, we ping-pong changes and fix each others stuff over and over again, bloating commits. We used editor config files + analyzer configs in the past (that gets checked into version control too), but there were still too much friction.

Where now, the compiler flags & strict analyzer settings forces claude to do the right things (we explicitly tell claude not try and bypass or lower the barrier). I think it only works because we don't spend 95% of our time in the IDE anymore like a couple of years back, so we as developers no longer feel that friction, as claude tries to satisfy the compiler instead. Its a massive mental load that is just gone, we haven't had any conversations in meeting about this kinda stuff anymore (remember in the past we would have flameouts in meetings or code reviews about linter settings...).

reply
If you're going to roll your libs, be sure to set up agents to scan for CVE analogues of equivalent known vulnerabilities in your own code. It takes quite a bit of work to set this pipeline up, as well as manually selecting high-impact CVEs (relying on the public scores is worthless, because there are some vulns that are catastrophic with a score of 6 vs something meaningless thats a 10).

It's also crucial to scan for "analogues" because otherwise many LLMs autoreport as "not vulnerable" since "this applies to Postgres/whatever and this repo isn't using it"

If you get hit by cyber guardrails you should use a local model to prune any CVE specific language from the reports.

To give examples, every single LLM (and people too tbh) will write netcode that's vulnerable to these CVEs: CVE-2026-27135, CVE-2024-45311, CVE-2021-32567, CVE-2019-9511; without explicitly mentioning the CVE text no LLM finds these either.

reply
The JS frameworks exist for a reason, recreating them seems a little excessive. Why not skip JS and go to a Rust wasm framework or Phoenix LiveView if the goal is to get away from JS/node/npm?
reply
Our legacy system runs mvc view with bootstrap 3 and some jquery. It's not a SPA, so no framework to replace. But we still have to mess around with npm sometimes.
reply
Depending on the framework you are in, there might be the equivalent of LiveView/Hotwire that works with MVC.
reply