from Hacker News

Vibe Coding Is Fun–But Vibe Refactoring Pays the Bills

by makowskid on 5/6/25, 1:08 PM with 56 comments

  • by lolinder on 5/6/25, 1:46 PM

    The author's description of vibe coding seems to have confused it with getting into a flow state in a vaguely AI-adjacent way. Vibe coding as originally coined by Karpathy [0] can't pay the bills because it would be wildly irresponsible for a professional to do—it's the kind of no-checks minimal-validation AI usage that gets lawyers into trouble for submitting legal documents with hallucinated court cases, just translated to coding instead of law.

    What the author is proposing isn't really "vibe" anything, it's just dedicating a small amount of time to fixing tech debt in a way that happens to involve an LLM as an assistant. The LLM in this model is honestly mostly superfluous.

    Don't get me wrong, this absolutely is how LLMs should be used in a professional setting, but I just question why we needed a name and a blog post for it. This is just responsible code maintenance as it's always been.

    [0] https://x.com/karpathy/status/1886192184808149383?lang=en

  • by laborcontract on 5/6/25, 1:55 PM

    Disagree gently here. Vibe refactoring is so much harder than vibe coding. I understand the temptation of having LLMs refactor code because that's ostensibly what they're great at – "transforming" the code. But LLM's are opinionated enough where they love to arbitrarily drop features or constraints for no particular reason, and they won’t tell you what they dropped along the way.

    Proper refactoring with an llm requires full testing coverage and, by the time you do all that, is the refactoring really necessary? I prefer 100% stability. If you're refactoring the because it's poorly structured and unreadable, that’s okay.. LLMs can help understand it.

    In my use of llms, i find it’s actually much easier to rebuild something from scratch rather than refactoring flawed code. It’s much less likely to inherit strange assumptions and code smells that way.

    With all that said, the one prompt I do use when refactoring is to tell the llm to do a lossless refactor and then follow up with a "was this really lossless"? It's not foolproof. LLM's love to lie.

  • by mg on 5/6/25, 1:52 PM

    Refactoring is indeed one of the areas where LLMs already shine bright. And I love it.

    I have been coding since I am 12 years old. I always loved writing code. But I also always loved reading code. I don't know, for me code is a kind of art. Never met anyone else who sees it like this. When a friend was hiring for his startup a while ago, I was happy to sit down for multiple hours and read all the code the applicants wrote and gave him advice on whom to hire.

    So for me, the new times are paradise. I try to not touch code directly anymore. I write prompts that would enable a really good developer to implement features and then let various LLMs work on it. Afterward, I rate the results so I have an overall score for each LLM. I pick the best solution for my codebase and manually finetune it to perfection.

    After each commit, I also ask the LLMs if they can find anything in the files that can be refactored to make the code shorter or more logical. The result is that the codebase becomes better and better. Because the LLMs often find stuff to improve. They usually come up with 10 ideas I dislike, but also one idea that I like. And so the codebase becomes better and better over time. Instead of worse and worse like in the past when you had to keep a balance of refactoring for the sake of beautiful code and building new features. Nowadays, refactoring becomes more and more free.

  • by lukev on 5/6/25, 1:42 PM

    So, I know the battle has been lost for the definition of vibe coding (https://simonwillison.net/2025/Mar/19/vibe-coding/).

    But we definitely need a word that makes a distinction between a LLM autonomously generating software, and having a human ultimately curating all the code (even if they're using a LLM to generate it.)

    If not vibe coding, what should we call that?

  • by empath75 on 5/6/25, 1:46 PM

    Be _very_ careful about refactoring with Cursor -- it has a tendency to randomly delete important blocks of code and comments and re-order things in a way that make for difficult diffs to read. Make sure you do it in relatively small chunks and do PRs and have others review. The larger a refactor you do, the more difficult/impossible it becomes to actually review the code usefully.
  • by skybrian on 5/6/25, 2:00 PM

    I don’t really get what they’re doing. This would be a better article if they actually explained how they use repomix.
  • by mbeavitt on 5/6/25, 1:53 PM

    Did you use AI to write this blog post? Be honest.
  • by lylejantzi3rd on 5/6/25, 3:36 PM

    Are we at the point yet where companies are looking for programmers specifically to fix their vibe coded codebases? A codebase restoration expert?

    Or will they do what most companies do when they sink millions of dollars into a codebase that doesn't work: dump the codebase, dump the team, hire a new one, and build from scratch?

    What does everybody think?

    edit: oxford comma is life.

  • by ChrisMarshallNY on 5/6/25, 2:06 PM

    I tend to use tools like ChatGPT to refine my code.

    i.e. "I have this function. Can you suggest ways to make it more efficient?" etc.

    Sometimes, it gives good feedback, sometimes, not. I almost always need to modify whatever it gives me.

  • by mentos on 5/6/25, 1:53 PM

    Are any of the freelance software dev marketplaces seeing an uptick in opportunity to refactor vibe code?

    Probably an opportunity to category kill that niche.

    "Got a vibe coded prototype you want to make more robust?"

  • by llm_nerd on 5/6/25, 1:45 PM

    We've reached the stage where the word vibe in a coding submission is a really good indicator that you should just flag it and move on. It is a meaningless, incendiary, click-bait term that is meant to trigger people and induce engagement.

    "There’s a lot of hype about vibe coding"

    There is incredibly little hype around vibe coding. 99% of the comments about vibe coding are people propping it up as a strawman to knock down. Otherwise it's like it fills the void left by web 3.0's decline to irrelevance where a bunch of useless masturbatory noise is had by people trying to get in front of something that they think will be a thing. Maybe they can put it on the blockchain.

    All of us normal people incorporate LLMs into our work process. No vibes at all. Just another tool in our belt.

    EDIT: Just discovered that my comment is apparently dead by default, which is...interesting.

  • by panny on 5/6/25, 1:35 PM

    So this is a plug for repomix?

    Some questions,

    Does repomix do anything Github copilot should be doing? It seems like this should be something copilot does automagically.

    Does it work on any language? I notice the repomix github suggests a different tool if you're using python.

    It seems straightforward to create an output.xml on the repomix site, but is there an opinionated try-it-free AI to use that output with?

    I'm tired of trying things only to get ai slop. If this cures the slop, I would be interested.

    edit: it seems the HN discussion is dominated by the definition of "vibe coding" and not at all interested in what the article presented as a solution... nice.

  • by evertedsphere on 5/6/25, 1:40 PM

    can we just ban llm-generated blogspam submissions already
  • by numbsafari on 5/6/25, 1:58 PM

    Hiring a bunch of recent college grads to build your startup is fun. They're great drinking buddies and they make you feel young again. They'll inefficiently work around the clock, sleep at the office, and treat it like their mom's house, and make you think you're a big, important boss.

    Coming in as a gray hair to fix their disaster definitely pays the bills.

  • by zwnow on 5/6/25, 1:49 PM

    I wont feed my production code to a LLM thanks for trying though. There is not a single trustworthy "AI" company out there. My companys codebase is a complete dumpsterfire and I will extinguish with a complete rewrite later this year. There is nothing, absolutely nothing worth paying for when it gets to LLMs.