Top
Best
New

Posted by taubek 20 hours ago

Cisco gives engineer unlimited AI tokens to rewrite legacy code(fortune.com)
190 points | 221 commentspage 2
Aperocky 19 hours ago|
Unless they also have 750K tests like sqlite do, I can't imagine this will go well, even if/especially if the legacy code warrants a refactor.
bombcar 8 hours ago||
Better than 750k tests is millions of customers! They’ll test it for you!
RachelF 4 hours ago||
Microsoft has patented that approach!
wiseowise 2 hours ago||
With how shit their software is, it would be better if even if monkey pooped and smudged it on a screen.
Taikonerd 19 hours ago||
Does this one engineer have the domain knowledge to know WHY the old code was written the way it was, and what the graybeards would have done differently if they could start again now?

Otherwise he's just going to replicate all the legacy bugs and questionable design decisions.

greggh 10 hours ago||
He doesnt need that when he has Ponytail https://github.com/DietrichGebert/ponytail

Right? ...

arcxi 9 hours ago|||
I've never heard of Ponytail before, I've read the entire README and glanced through this repo and I'm left so confused. From what I can gather this project is essentially a single markdown file with a prompt that verbosely says "write the simplest code". Yet the repo itself looks so bloated and complex and has so much activity. This feels like satire similar to fizzbuzz enterprise edition[1] but apparently this is the actual state of our industry?

[1] https://github.com/enterprisequalitycoding/fizzbuzzenterpris...

bombcar 8 hours ago||
The date picker example is perhaps the best worst they could have picked.

Anyone who has used the built in date picker knows why everyone rolls their own.

grey-area 3 hours ago||||
Is this entire repo satire?

It's a bunch of text files in a repo with massive churn (all new version 5!), but somehow even the technical debt 'skill' (i.e. text file) has technical debt itself:

https://github.com/DietrichGebert/ponytail/blob/main/skills/...

> ...every ponytail shortcut is marked with a shortcut: comment ... (older code may say ponytail:).

frevib 3 hours ago||
That’s what I thought. Then a colleague introduced it for real in a code review.

It doesn’t matter if it’s satire. Developers seem to be so vulnerable to all these AI promises of ‘automating’ everything.

BTW it’s terrible. It gave two very hollow suggestions that did not solve the real problem. Hour wasted, angry colleagues, no code change.

grey-area 2 hours ago||
The AI craze very much reminds me of the crypto craze a few years ago - lots of people new to the industry jumping on the latest trend and building tooling for something that doesn't need tooling, trying to sell shovels in a gold rush, but just spending years creating a gold-plated shovel which nobody needs instead.
frevib 2 hours ago||
And Web 3, Metaverse, Blockchain, NFT… Only this time it’s kind of useful.
grey-area 2 hours ago||
Yes that's true it is more like the dot.com bubble in that regard - a useful technology which will clearly grow over time, but overhyped in the initial phases as everyone tries to be 'AI' in 2026, in 1999 it was online, whether it fits with their business or not.
dboreham 7 hours ago||||
See also: https://en.wikipedia.org/wiki/Purple_hat_therapy
classified 19 hours ago|||
I have no doubts that there will also be new bugs.
koskokos 19 hours ago||
the premise does sound a lot like written by someone who is looking for hype and not sounding credible
sleepyguy 19 hours ago||
Looks like his startup was some kind of translation service. So yeah he is totally qualified. It's a miracle how Jeetu Patel was able to find Padmanabhan Krishnamurthy or even know that he was under employed languishing somewhere in the bowels of CISCO. I wonder if they know each other from India?
forgotpwd16 11 hours ago|||
His startup was acquired by Cisco so not weird for Cisco's CPO to know the startup's founder/CEO. That said, not sure how knowledge on speech translation means he's totally qualified on rewriting infra/networking/cybersecurity (Cisco's primary fields of operation) code. Unless the legacy code expected to be rewritten is constrained on related services/solutions, e.g. CVP or/and WebEx.
bombcar 8 hours ago||
His job isn’t to rewrite all the code. His job is to make the market satisfied that Cisco is “more AI” than competitors.
idiotsecant 7 minutes ago||
I sincerely hope this is what is actually happening behind the scenes
oblio 19 hours ago||||
The entire story sounds very weird.
greenavocado 11 hours ago|||
They met each other by chance and began work rewriting the entire company's codebase over a firm handshake
sleepyguy 10 hours ago||
You forgot to mention the translation company he helped found was also acquired by this same CEO. :))
alwa 19 hours ago||
Rewrite it in service of… what exactly?
rustyhancock 19 hours ago|
It says "legacy" code.

Legacy code is typically a euphemism for old unmaintained code, no one knows how it works so it can be edited, and it probably doesn't align with current work practices.

Not to say a rewrite is necessary right, but avoiding rewrites of working code is how we ended up with more COBOL code than COBOL programmers in 2026.

rafram 19 hours ago|||
If nobody knows how the old code works, how will anyone know how the new code (written by an autonomous agent) works?
rustyhancock 19 hours ago|||
Regression tests?

I think people are assuming the worst but AIs most helpful contribution beyond churning out code is explaining the code base.

Who knows if they will do a good or bad job that's down to the engineers and not the tools imo.

mlmonkey 13 hours ago|||
At my previous place, we had to write unit tests to cover each and every line of code. So if you add 10 lines of code, you ended up writing 100 lines of unit tests, mocking this service and that service, etc.

Once AI came along, I became like Captain Picard (RIP) and would just sit back and let the AI write all unit tests. "Try harder, make sure coverage is 100%". It was very exhilarating to sit back and watch the models churn away, creating 100s of lines of unit tests. Of course, I checked them all manually before submission ;-)

paimapi 17 hours ago||||
I think this is actually the opposite in practice. LLMs generate better tests than they are at assessing which tests are effective (and, inferentially, how a system should behave). See: https://arxiv.org/abs/2410.21136

That said, there's also research pointing to LLMs encoding existing bugs as test requirements: https://arxiv.org/abs/2607.05139

That CS PHD researcher, Konstantinou, in particular, has written a lot on this: https://arxiv.org/search/cs?searchtype=author&query=Konstant...

rafram 19 hours ago|||
Why is that better than having the agent(s) write regression tests or explanations of the old codebase?
jiggawatts 9 hours ago|||
Documentation in "plain english", architecture diagrams, comments, and documentation are notorious for being unreliable, out-of-sync, and not as precise a specification as the code itself.

The issue with using "the code as the spec" is that humans can't read 100K lines of code in a day, can't hold the entire ball of unstructured mud in their brains all at once, and generally require hierarchical "structure".

Modern AIs just don't have these issues! Their context windows are big enough to encompass an entire codebase, so they can "see everything", all at once.

Each line of new code they write is compared against every relevant line of code in the original, which they treat as a spec.

My main issue in my experience is that that AIs tended to reproduce the legacy behaviour "bug for bug", which was not my intention.

Similarly, the AIs were hamstrung by external constraints: I typically prefer to leave the DB schema unchanged, which meant the torturous workarounds were needed for design errors in some stored procedures, etc.

The older the code, the bigger the issues with baked-in assumptions about transactions, stateful sessions, data types, string formats, etc.

This trips up AIs just as much as humans. You can't trivially maintain backwards compatibility and modernise the codebase! Those are conflicting goals, no matter what.

thaumasiotes 47 minutes ago||||
> Not to say a rewrite is necessary right, but avoiding rewrites of working code is how we ended up with more COBOL code than COBOL programmers in 2026.

Surely we have more code than programmers for every language in existence?

Except for the part where the concept isn't even well-defined, this sounds like a complaint that the world contains more bricks than bricklayers. Of course it does.

LoganDark 19 hours ago|||
I don't think no one knows how it works. I just think the people using the word "legacy" for it are boneheaded.
petra 19 hours ago||
I think Cisco is an interesting use case for AI, because it's code, probably:

-Works according to a defined specification

-Within the bounds of that specification, has a lot of code written to optimize speed, cost, latency, etc - all measureable goals

-Written in c, with all it's weakness

-Given limitless engineering work, some could be ported to better hardware

-the new system could be automatically compared to the old system for functional correctness

All those factors fit well with agent based development.

Btw, many of them are true in general to embedded systems.

mkjs 19 hours ago||
It's way more complicated than that. Bear in mind many of the network protocols in use today are decades old and have been constantly evolving, but there has generally been a consideration to maintain interoperability.

Then consider that not all vendors implement the standards identically, because the standards can be a bit woolly and in some cases followed rather than lead live implementations.

There will be a bunch of code that looks useless, but is actually there because of specific interoperability scenarios.

petra 18 hours ago|||
That's a good point.

I wonder whether AI is any good at looking at that code,running the system, and documenting those edge cases?

mkjs 18 hours ago|||
I'm probably not describing the scale of the issue adequately. Lots of these bugs only show up when you have a specific bit of hardware on a specific version of code, and it's connected to another specific bit of hardware running another specific version of code.

Lots of this stuff should work in theory, you only find out that it doesn't in practice when you try it on real hardware. And there are thousands of bits of hardware.

dboreham 7 hours ago|||
It's good, but it can't create information that is undiscoverable.
dboreham 7 hours ago|||
Indeed. Making a perfect clone of such software is I suspect provably impossible because you have no way to assemble all the test cases. There might be some peer box out in the wild somewhere that is the only thing that will exercise some code path. You have no idea what that box is or what it does.
Cyph0n 18 hours ago|||
I worked at Cisco on one of the IOS-XR teams. It’s way more complex than you think it is.

This whole thing sounds like a deluded vanity project birthed in an ivory tower.

eudamoniac 10 hours ago||
That describes everything Jeetu is involved in. I'm very glad to have recently left Cisco.
InsidiousWombat 8 hours ago|||
you assume their code is well written, while in reality the history of weird quirks and thousands upon thousands of CVE doesn't make the code underneath look well designed and written.

But yes, fact it uses a bunch of very well documented standards with multiple implementations gonna help massively

wil421 19 hours ago|||
Manufacturers can’t even maintain OIDs between releases. I hope the AI will help. Ciena isn’t any better than Cisco, they broke their OIDS for the switches we use and we have to wait until mid 2027.
InsidiousWombat 8 hours ago||
to be fair SNMP is just bad. Only redeeming feature of it is "takes little RAM to run it" (which was important when average networking device might've had only 2MB of RAM, not so in last 30 years).

The whole design where you need to get a magical list of IDs to decode the metrics and the list is not even shipped with device is entirely asinine

pphysch 19 hours ago||
The first and last bullets are extremely optimistic. How do you possibly simulate all the weird interdependent behavior in real world networks?
petra 19 hours ago|||
Given that a Cisco switch can be replaced with some other company's switch(at least in theory, idk), without weird unknown cases interfering, why would this be a problem ?
Cyph0n 18 hours ago||
Not that straightforward. Similar to CPUs and other HW, there are errata and interop quirks between devices.

There are also tight time budgets (basically SLAs) that must be met along with memory considerations (both in SW and on the NPU/HBM), not to mention how the device needs to respond to load and various failure scenarios.

bijowo1676 11 hours ago|||
there is software to simulate any arbitrarily complex network: GNS3, eve-ng, Cisco Modeling labs, etc
pphysch 9 hours ago||
I'm talking about heterogenous legacy hardware that isn't owned by Cisco, not complex topologies.
bijowo1676 7 hours ago||
Cisco doesn't talk to devices, Cisco talks protocols, most of them are documented in specs and they are often vendor neutral.

if any hardware does not confirm to specs, thats on them and its actually a reason to pull out and replace legacy hw

williadc 19 hours ago||
There's no goal mentioned in this article as why 98% of the code needs rewriting.
HarHarVeryFunny 19 hours ago||
Yeah - code rewrites are generally a thing to be avoided since the requirements of older production code is typically not fully documented, even if it originally had been. Production code accumulates bug fixes, performance tweaks, special cases, additional requirements, etc, with documentation and test suites not always being updated in sync.

Your rewritten codebase will presumably look much cleaner and more maintainable that what it's aiming to replace, but it's easy to miss the purpose/necessity of all of the old "cruft" which need not be just poor coding but rather later enhancements not anticipated by the original design whose implementation was therefore crufty.

Does anyone here work at Cisco, and have any insight as to why a rewrite is considered necessary and might be expected to succeed?

jimmaswell 9 hours ago|||
A rewrite is a slam dunk for any decent frontier AI. It has a penchant for maintaining API/etc contracts to a fault in the absence of instructions to the contrary. It can easily validate its work and loves building exhaustive test cases. You can tell it to get 100% code coverage if you want. It will laborously accurate document every accumulated edge case and help you find a better overall cohesive structure.

A rewrite has historically been a huge mistake in many situations, some of which I've personally had the agony of witnessing firsthand, powerless to stop it. But AI completely changes the calculus because it doesn't waste significant developer time or energy crawling back to the previous working state, it just does it while you go get coffee. And this I've found to be a huge benefit, that I can continue making my codebases nicer to work with and better documented/integrated with bugs stamped out for free. There are upsides to a rewrite, and they're now much more likely to be worth it as the downsides are automated away.

amluto 6 hours ago|||
> It has a penchant for maintaining API/etc contracts to a fault in the absence of instructions to the contrary.

AI has no magic powers to figure out what the “API/etc contracts” are in a nasty old codebase. This problem is fundamentally hard and not always well defined.

AI is also (at least for now) not consistently good at writing tests that test the behavior that matters. Recent models seem to be getting slightly less bad, but again, this is a hard problem.

I’ve personally used AI to rewrite gnarly code where the goal is to have exactly identical results to the old code. GPT-5.6 Sol could do this correctly with some extra help guiding it to rest the right things, and I haven’t tried this particular task on a newer model.

But ancient code like in the article is probably an enormous buggy mess full of accidental behaviors and implementing protocols in ways that do not fully match the spec. Some, but not all, of the mismatches will be cases where the spec is wrong. Sure, an AI can probably generate a new implementation with a similar set of bugs, but is this what is actually wanted? Also, depending on the gnarly set of bugs, a clean implementation may be unable to reproduce the bugs, leading to a messy implementation instead.

amelius 9 hours ago||||
If this was true then Python would already have been rewritten to be GIL-free, and the entire ecosystem of Python packages would have been rewritten to respect its API.
solyin 8 hours ago|||
Absence of evidence is not evidence of absence! We're on this thread because Cisco is sponsoring piles of tokens at the problem. No such megacorp sponsor exists for this problem for Python. The megacorps have decided not to sponsor that specific problem.
cwillu 6 hours ago|||
Absence of evidence is evidence, it's just not very strong evidence.
Bayart 7 hours ago|||
What would be the Python megacorps of choice ? Trading firms ? Not a regular pythoner (pythonist ? pythonian ?) myself.
solyin 5 hours ago|||
Google has their own dialect of Python that they use internally that could stand to be faster. Microsoft also uses Python all over the place. (GvR has worked at both of them.) Both of them have, at one time or another, sponsored teams to make Python faster, along with Meta. Just not for the above specific cause.
samudrijan 6 hours ago|||
Pythonista
noosphr 4 hours ago||||
I imagine it has been, but they didn't release it because the diff is too big to be accepted into regular Python and it would cost more to fix it than use it as is.

With the current sota models code is free.

80fj0348i 8 hours ago||||
In my experience it's been much simpler to rewrite programs from Python to <insert lower level language of choice here>
heylook 7 hours ago|||
I hope everyone that reads this can understand why it's a ridiculous argument.
exe34 2 hours ago||
Could you explain for those of us who are a bit slower? Why would the absence of a rich sugar daddy for python be evidence that it can't be done?
InsidiousWombat 8 hours ago||||
I'd even argue AI is better for maintaining/moderninzing existing code than writing it, just because there is so much less input from developer about architecture it requires, as it has it in the code itself.

But there is pretty big risk of false positives and negatives; some "bugs" are design decisions that were not documented well/at all, and inevitably some new ones will appear when it reasoned something wrong.

stavros 9 hours ago|||
The entire point of a rewrite is to get rid of the behaviour you don't want, while you keep the behaviour you do want. Consider the pathological case: Rewriting your FORTRAN codebase in Rust would obviously be useless if you had to reimplement every bug in the rewrite.

An LLM doesn't have enough context to know what you so and don't want. If you give it call logs for every function that was called and how, maybe, but a seasoned engineer will have more context around what the company needs.

habitue 9 hours ago|||
Not necessarily, a rewrite can just move to a language that's easier to maintain (off C / cobol).

Honestly though, it's pretty clear the AI rewrites work, we have a ton of high profile examples. It's just a holdover attitude about rewrites from before AI. In reality, AI is going to make the code better when it rewrites

what 7 hours ago||
> we have a ton of high profile examples

Such as?

literalAardvark 8 hours ago||||
Defining the legacy bugs and porting them as features during the rewrite is actually one of the most difficult parts of enterprise rewrites.

You don't get to pick what parts of the API you're porting during something like that, it has to work the same or some of the ecosystem around it will break.

beardbandit 7 hours ago||
Usually you’d choose to port features in slices end to end so that you don’t have to pull in bugs as side effects. Strangler fig.

Obviously this fails if this is a large org with many teams and microservices, but for a leaner org this isn’t really a problem.

I realize this thread is about Cisco so my comment doesn’t apply here haha.

ravishi 8 hours ago|||
The thing is, to get rid of unwanted behavior the first step is to document all the behavior and be able to reimplements it. Then you can pick and choose what to keep vs what to dump.

And AI is really good at all the stages here.

phil21 9 hours ago||||
While I certainly don't work at Cisco, I've come to the conclusion that I need to re-examine my priors when it comes to code rewrites and general maintainability.

AI makes these projects significantly more feasible, at least in my domain. We have some critical-path software I wouldn't touch with such an approach, but the vast majority of our code is internal and/or supporting tooling.

For those cases, burning it down and rewriting via AI tooling has proven far more productive than anything we have attempted in the past. This is for old technical debt laden stuff everyone has been afraid to touch for well over a decade.

It's not perfect, but it moves the needle where before a lot of such projects were stuck on the backburner for years.

It certainly introduces new bugs and such, but at least this way forward momentum is happening vs. just being stuck in decision/analysis paralysis forever.

This also assumes some very senior SME folks are driving the process. I would not expect similar results with junior or even mid-level folks in these specific domains.

anyonecancode 9 hours ago|||
> While I certainly don't work at Cisco, I've come to the conclusion that I need to re-examine my priors when it comes to code rewrites and general maintainability.

One of the reasons to avoid rewriting has long been that the time spent rewriting code that works is time not spent writing code to meet new business needs. In other words, it's usually a huge opportunity cost, rarely balanced out by sufficient gains to be net positive.

I do think AI does challenge this prior, as the time needed to do a rewrite shrinks dramatically. It's not zero, of course, but it now becomes worth asking if it's worth doing, rather than defaulting to avoiding rewrites in nearly all cases.

curt15 9 hours ago|||
Does the coding assistant demonstrate any tricks to improve the likelihood of success for such rewrites?
quantbuilder 5 hours ago||
What works for me is that I do have a different model (if possible) to review and check against the diff vs the original ask/requirement. Because a rewrite will just cleanup the code even if something look 'not right' but it is actually on purpose due to the requirement, so the second model is the one that can check and catch.
jbjbjbjb 5 hours ago|||
> Your rewritten codebase will presumably look much cleaner and more maintainable that what it's aiming to replace

Until one day you leave and the next guy comes and says “what is all this shit”

InsideOutSanta 10 hours ago|||
It's because the old bits are starting to stink a bit from age. Get those stinky bits out of here, I say! Let the AI make some new bits!
schainks 7 hours ago|||
It’s been a while, but configuring their hardware manually in 2016 was bug ridden ridiculousness. Awful UI/UX. Their own techs had specific field notebooks for our make and firmware version that we couldn’t access unless persuaded, detailing various land mines to avoid while working. Literal “don’t click these things in this order” kinds of notes.

A critical security firmware update once brought down redundant pair of firewalls we used because the bug didn’t manifest until a counter buffer overflowed months after application. Three hours into the outage the tech power cycles the thing and our services came back to life.

Cisco is only doing this because some other alternative is more expensive. They had more than a decade to get started.

jmspring 7 hours ago||
Cisco iOS even on terminal servers in the early 2000s was...special.
entrope 11 hours ago|||
Because it's Cisco?

We had to turn off a bunch of on-by-default features in the system I'm deploying now because IOS matches too aggressively and decides that arbitrary UDP datagrams are DHCP requests or PTP packets that need rewriting (and then dropping when they turn out to not be DHCP/PTP). I have to think that an AI rewrite with a today-good model would recognize the lax checks and do them better.

nitwit005 10 hours ago|||
No goal, and no results, but a younger guy was enthused about AI!
dboreham 7 hours ago||
Plus: publicity!
oceansky 10 hours ago|||
It is not in Rust.
taneq 3 hours ago|||
All of the known bugs will be gone.
add-sub-mul-div 19 hours ago|||
AI has electrolytes!
analognoise 19 hours ago|||
It’s what the shareholders crave!
yako21000 19 hours ago||
They also seem to crave everything that has the word AI in it.
daveguy 10 hours ago||
These are references to an excellent, hilarious, and sadly more relevant than ever, movie:

Idiocracy (2006): https://en.wikipedia.org/wiki/Idiocracy

sourweasel 8 hours ago||
Movie? I prefer to think of it as a documentary made in advance.
classified 19 hours ago|||
The hardware it runs on has capacitors as its components and some of them do in fact contain electrolytes.
Hikikomori 10 hours ago|||
It's what Cisco does, as they've done several times before.
DonHopkins 11 hours ago|||
It's got tabs instead of spaces. Yuck!
vonneumannstan 19 hours ago|||
Somebody needs a promo packet. Duh
aaron695 10 hours ago||
[dead]
cheevly 17 hours ago||
Shocking to realize how many on HN do not realize that this is NOT a tall order, and has not been a feat for at least six months.
g-b-r 13 hours ago|
Shocking how many on HN do not realize how devastating this can be
perching_aix 6 hours ago||
i.e. they burn a fraction of the cost it would otherwise take and it may end up as a discarded dud?

yeah, i think they'll survive whatever the outcome

mr_roboto 19 hours ago||
He'll pull it off, get feature complete, and spend a year or two with better models as they are released ironing it out. We just did an experiment, in four weeks generated 3500 commits, 200k sloc with a 1:1.15 ratio of production to test code and it all works very well. We are well on our way from 10x to 100x.
Ancalagon 17 hours ago||
Did you check with the end user as to how well its actually working? My prior company is doing this and their platform has gone to latency/bug hell.
mr_roboto 17 hours ago||
It is for internal use and so far so good. We are finding bugs and we just point the models at it with a strict red-first TDD approach and they've done very well fixing them. It certainly isn't perfect but the issues are very similar to what you get with a team of humans doing the same thing.

The main takeaway though is we had one person, in a single month, do the equivalent of at least a couple years of work for a small team. We view bugs and performance issues as a currently inevitable part of the process and we are dealing with them with models just like we do with humans on every other project already. Overall though it is representing an absolutely massive speedup. If you work in an environment where the models make egregiously more mistakes than your human counterparts then I am quite jealous.

greenchair 11 hours ago||
and if you enable dangerously_skip_permissions you can probably even get to 1000x
samiv 3 hours ago||
If it isn't broken then break it!
emoII 19 hours ago||
Well they say the last 20% of the work takes 80% of the time so if he gets the prototype in 4 weeks, which I have no doubt he will be able to do, and assuming that prototype is the first 80% of work, then he should be able to do this in 20 weeks. He even has some margin! Looking forward to seeing the results
gonight 8 hours ago|
Never thought I'd say this, but, "thank god I use unifi".
More comments...