Live data from Hacker News

We rewrote JSONata with AI in a day, saved $500k/year

reco.ai

181–190 of 278 posts

Re: We rewrote JSONata with AI in a day, saved $500k/year

#181

The key point for me was not the rewrite in Go or even the use of AI, it was that they started with this architecture: > The reference implementation is JavaScript, whereas our pipeline is in Go. So for years we’ve been running a fleet of jsonata-js pods on Kubernetes - Node.js processes that our Go services call over RPC. That meant that for every event (and expression) we had to serialize, send over the network, ev…

Most of the other replies to this hit the nail on the head. A human writing some poor, but working code that is supposed to be a demo, goes to production 9 times out of 10. Then it becomes critical infrastructure. Then management cannot understand why something working needs a rewrite because there's no tangible numbers attached to it. The timeless classic developer problem. We were here ^^^^ up to 2024-2025. Now, wi…

> that management won't moan at you about.

That seems unlikely.

Re: We rewrote JSONata with AI in a day, saved $500k/year

#182

The key point for me was not the rewrite in Go or even the use of AI, it was that they started with this architecture: > The reference implementation is JavaScript, whereas our pipeline is in Go. So for years we’ve been running a fleet of jsonata-js pods on Kubernetes - Node.js processes that our Go services call over RPC. That meant that for every event (and expression) we had to serialize, send over the network, ev…

Yeah that's the skeptical key point.

The practical key point is: if you want to do a large migration is to have a very good & extensive test suite that Claude is not allowed to change during the migration. Then Claude is extremely impressive and accurate migrating your codebase and needs minimal handholding. If you don't have a test suite, claude will be freewheeling all the way. Just did an extensive migration project, and should have focused on the test suite much more.

Re: We rewrote JSONata with AI in a day, saved $500k/year

#183
I’ve predicted the future and I’ve figured out where vibe coding is going to go based on this article.

1. People are going to come in and vibe code a replacement for some shitty component in a morning. They aren’t going to take time to verify and understand the code.

2. The new code will fix most of the problems with the original component, but it will have a whole new set of issues.

3. People will use AI to fix the bugs, but they won’t take the time to understand the fixes or the regression tests that they tell AI to add.

4. The new system will get so complicated that it’s hard for even AI to work on it. The “test suite” will be so full of tests that are redundant, and nonsensical that the run time will be too high to meaningfully guide AI. And even in the cases where AI does use it, many of the tests are just reimplementing the code under test in the test (Claude does this about 25% of the time based on what I’ve seen if you don’t catch it).

5. Goto 1

This is the same cycle I’ve seen in 90% of companies I’ve worked at, it will just be on a faster cadence.

And that is how we’ll get to a place where we output 100x lines of code, and spend 2x developers salaries on tokens, with little meaningful impact on the outside world.

Re: We rewrote JSONata with AI in a day, saved $500k/year

#184

I’ve predicted the future and I’ve figured out where vibe coding is going to go based on this article. 1. People are going to come in and vibe code a replacement for some shitty component in a morning. They aren’t going to take time to verify and understand the code. 2. The new code will fix most of the problems with the original component, but it will have a whole new set of issues. 3. People will use AI to fix the…

> The new system will get so complicated that it’s hard for even AI to work on it.

I used AI to refactor several of my own "move fast and break things" projects and it worked absolutely GREAT. So if that's what you're concerned about, you're not seeing where the puck is going.

Re: We rewrote JSONata with AI in a day, saved $500k/year

#185

I’ve predicted the future and I’ve figured out where vibe coding is going to go based on this article. 1. People are going to come in and vibe code a replacement for some shitty component in a morning. They aren’t going to take time to verify and understand the code. 2. The new code will fix most of the problems with the original component, but it will have a whole new set of issues. 3. People will use AI to fix the…

> The new system will get so complicated that it’s hard for even AI to work on it. I used AI to refactor several of my own "move fast and break things" projects and it worked absolutely GREAT. So if that's what you're concerned about, you're not seeing where the puck is going.

Did you take the time to review the code?

Re: We rewrote JSONata with AI in a day, saved $500k/year

#186

Earlier quoted context omitted.

Completely agree. We have > $50m from our most recent funding round, and even a cloud expense of $50k/year (in our case for storage) is considered a high priority to address. If it was $300k, our CTO would be running around with a butane torch setting everyone’s hair on fire until the problem was resolved. But, venture funding does create a lot of weird inefficiencies which vary from company to company.

But what is your income? How important it is to address should be compared to that and current profits too if any, and whether you have to be profitable right now.

First, I have to make a major correction: the cost I was thinking of is over $50k/month, not year, so over $600k/year. But it was still considered a big issue when it was at $300k, which wasn’t that long ago.

The reason it matters is (1) because it’s directly relevant to profitability projections, i.e. cost per customer, and (2) because management looks at those numbers and sees potential headcount.

Re: We rewrote JSONata with AI in a day, saved $500k/year

#187
post #77

Some background on one of the other two golang implementations mentioned in the comments. Years ago I hired an Upwork contractor to port v1.5.3 to golang as best he could. He did a great job and it served us well, however it was far, far from perfect and it couldn't pass most of the JS test suite. The worst was that it had several recursion bugs that could segfault with bad expressions. That was the now-deprecated im…

I was also involved in writing a clean-slate port of JSONata after finding issues in the jsonata-go repo and not wanting to run the javascript version in a sandbox. It was relatively easy until we stressed it with 20 layers of nested context and 5000 line expressions and suddenly we had memory explosions not present in the JS version.

JSONata is too tied to the language. Looking back, we should have slightly altered the spec and written some code mods. we didn't have customers bringing their existing JSONata over so they wouldn't notice the differences.

Re: We rewrote JSONata with AI in a day, saved $500k/year

#188

Earlier quoted context omitted.

> The new system will get so complicated that it’s hard for even AI to work on it. I used AI to refactor several of my own "move fast and break things" projects and it worked absolutely GREAT. So if that's what you're concerned about, you're not seeing where the puck is going.

Did you take the time to review the code?

Yes, it's for a Laravel project and Laravel Boost + Pint makes both Claude and Codex write great code.

The trick is to make a good plan first. And to not rewrite your entire codebase all at once. But that advice is older than my all of my kids combined.

Re: We rewrote JSONata with AI in a day, saved $500k/year

#190

Earlier quoted context omitted.

Did you take the time to review the code?

Yes, it's for a Laravel project and Laravel Boost + Pint makes both Claude and Codex write great code. The trick is to make a good plan first. And to not rewrite your entire codebase all at once. But that advice is older than my all of my kids combined.

If you’re taking the time to review the code, none of the the above applies to you.
Post reply on HN