When "Vibe Coding" Goes Too Far
When we first launched Carolina Cloud we had a pretty simple console frontend. We started with just VMs and containers so all we needed was four plain html files. Doing two of everything; creation modal, instance list etc was not too much hassle to understand or maintain. And besides, Cursor whipped it up for us and it worked first time!
But as the company, software and hardware was progressing so had to the frontend. We began doing what many early-stage teams are doing right now — we ‘vibe coded’ and to quote myself ‘I don’t care how the frontend is coded. If it looks good, it is good’.
Over time these four html files grew to six then eight, then a subfolder was made with four more html files and soon we had created such a monster that fixing bugs or adding new features was, while not impossible, such hard work that we continued to default to the AI, which further exacerbated the problem. Digging the proverbial (code) hole!
And then the cracks started to show with buttons flickering for no reason, pages refreshed when they shouldn’t, or needed to be refreshed and strange bugs began to appear. For example, if one made a marimo notebook instance and then tried to make a Rstudio server instance, the button to deploy that Rstudio server instance would not work. You had to go to a new tab, not even a hard page refresh would fix it. When trying to add new features, hundreds of new lines of code were added and a quick, scary scan through revealed nested if statements and other nasty things.
Something had to change. We made the call to convert to React as so much of our UI was reusable. In fact our UI was a classic React use case. But to not fall into the same trap as we did before we could not simply prompt Cursor — “Please convert our frontend to React”. We made a brand new frontend folder and rebuilt the interface piece by piece.
I can’t say we didn’t use AI at all. That box on the right is hard to put away. But switching from ‘Agent’ to ‘Ask’ was like switching from heroin to methadone. It helped us get off the Prompt-Apply cycle and start to actually audit code before dropping it in and testing.
Now our frontend is fully React and the difference is clear. The new UI is smooth and stable and everything works as expected. Things make sense instead of thousands of lines of repeated code and we have a new found respect for the DOM. Extending our software stack is now easy with reusable components and configurable props. The number of bugs has reduced dramatically and the frontend codebase is about one third the number of lines.
But most importantly, we understand our frontend again and can work on it without summoning the AI oracle.
BTW this was not written with AI.