Devibecoding 🔧

In my last post I defined vibecoded code as code nobody on your team has fully understood. But what happens when you take that code and make it yours?

I think we need a term for this: devibecoding.

💻 Devibecoding is the process of taking code you don't fully grasp — whether AI generated or not — and systematically working through it until you truly own it. Understanding it, restructuring it, making it maintainable.

🧠 This is not just code review. It's a mix of reverse engineering, refactoring and deep comprehension — without being able to ask the original author about their intent. Because there was no human author.

💬 Someone in the replies to my last post described exactly this: putting in the effort to understand and reformat AI output until it becomes their code. That's devibecoding in practice.

🚀 And here is my take: this will become its own discipline. With its own tools, its own best practices, maybe its own specialists. Think tools that don't just lint but explain. That visualize where your understanding gaps are. Possibly even AI helping you understand AI code — ironic but inevitable.

⚡ The more vibecode exists in the world, the bigger the need for people who can devibecode it.

What do you think — is this already part of your workflow? And what tooling would help you most? 🔍

#SoftwareDevelopment #AI #Vibecoding #Devibecoding #CodeQuality #DevLife #Refactoring

We organise in the open, and you're very welcome to chat with the organisers to help, ask questions, give feedback, or simply to watch. You can reach us on the #ev_socratesuk slack channel (https://slack.softwarecrafters.org/), or on mastodon, LinkedIn, BlueSky, or by emailing organisers at socratesuk dot org.

#SoftwareCraft
#Unconference
#OpenSpace
#TDD
#Refactoring

Join Software Crafters on Slack!

How do you manage large-scale code migrations across a massive codebase?

At #Spotify, the answer is Honk - an internal AI-powered coding agent - currently merging 1,000 pull requests every 10 days!

Read more on #InfoQhttps://bit.ly/4rZExaF

#SoftwareDevelopment #AIassistedCoding #Refactoring

Welcome to the Leanpub Launch video for Craft Your Code: Mastering the Foundations of Code Quality in the Era of AI Assistants, Second Edition by Srihari Sridharan!

Watch & read on the Leanpub blog here:

https://leanpub.com/blog/leanpub-book-launch-craft-your-code-mastering-the-foundations-of-code-quality-in-the-era-of-ai-assistants-second-edition-by-srihari-sridharan

#books #leanpublishing #selfpublishing #booklaunch #coding #programming #softwareengineering #career #refactoring #nodejs

Leanpub Book LAUNCH 🚀 Craft Your Code: Mastering the Foundations of Code Quality in the Era of AI Assistants, Second Edition by Srihari Sridharan

Unlock the power of code craftsmanship with "Craft Your Code."

The Leanpub Blog

Leanpub Book LAUNCH 🚀 Craft Your Code: Mastering the Foundations of Code Quality in the Era of AI Assistants, Second Edition by Srihari Sridharan

Watch here:

https://youtu.be/WjWRbaaXtF0

#books #leanpublishing #selfpublishing #booklaunch #coding #programming #softwareengineering #career #refactoring #nodejs

Leanpub Book LAUNCH 🚀 Craft Your Code: Second Edition by Srihari Sridharan #books #programming

YouTube

These models are used in literally thousands of places in the project - they're truly the heart of the system. And this weekend I am attempting a major heart surgery to rewire them.

This includes standard migrations, data migrations, and lots and lots of refactoring throughout the project.

Terrifying stuff.

Wish me luck 😬

3/3

#Programming #Refactoring #Decisions #Schema #DataModeling

Refactoring and (A)I

Reading Time: 3 minutes

For two days I have been migrating my blog from Hugo to Eleventy via the markdown pages, and the photos via Ghost Export for WordPress. In the process I achieved a goal, and then AI broke things, so I achieved them again, and then AI broke them again.

The favourite thing for Ai, and Gemini, in particular to break was the logic that took the markdown titles, matched them to a json file, and then helped 11ty marry the photo with the correct post. When it worked it was brilliant, but when it broke I would spend half a day trying to fix it. By the third time this happened I decided to ask Gemini to help me write a script to hard code the image path straight into markdown pages.

That step was a resounding success. The logic is simple. AI is great for a simple question, but as soon as you start a russian doll/inception of steps the context window, or scope window, to use a programming term gets confused.

Scope Windows and AI

I saw the term context window used, but I'd like to experiment with scope and AI. Specifically I'd like to document how it behaved when I saw that the eleventy.js file was getting too long, and I asked Gemini to refactor it. The first mistake was to accept that Gemini could do this in just two steps. Step 1, filters.js, and then step 2 for another set of logic.

Now, in an ideal world, AI would know what it did, see the code, determine what each part does, and tidy everything up into neat refactored niches. It didn't do that. Remember that mention of the image logic being lost three times? The third time was due to refactoring.

To be specific, Gemini took the complex logic for matching thumbnails to posts and replaced it with two lines of irrelevant code, that I noticed eventually, as I tried to debug why the refactoring had failed.

Gemini and Git

When I noticed that Gemini has issues with keeping within the scope of a question I decided to use git. Every time Gemini provided me with a solution that worked I'd commit it. The logic is that if it breaks something I can tell it "This is how things were, and this is how they are now. I'd like to fix things".

Why Entrust Git rather than AI?

In my experience AI is fantastic as spitting out code, and muddling contexts, but very bad at answering "Can you remind me which command we used to do that", whereas git is fantastic at that, if you're efficient about git commit comments that mean something to you.

The AI Negative Feedback Loop

If AI makes a mistake, either because your instructions were not clear or because it got confused, asking another question will muddle it even further. Imagine an AI chat as a sand pit by the sea. The more you chat, the deeper the hole you dig. Eventually you make a mistake, and the tidal waters begin to flow into your sandpit. Within seconds that chat is swamped and unusable. With AI it's good to have a bug out bag ready. "Now that this context is hallucinating let's move to a new one".

Git and a Fresh Chat

If you're working on an eleventy blog and you're adding functionality, one step at a time, it's good to add bookmarks in the form of git commits. You use Gemini, or your favourite LLM to write the function, and once it works you bookmark it. You then write the next, and bookmark that. Eventually, when the LLM, or you, makes a mistake, and the LLM hallucinates or starts muddling scopes, you just start with a clean slate, helped by git, and continue moving forward, with a minimum of hassle.

AI driven Refactoring Lessons Learned

Next time I refactor I won't ask "can you refactor this long eleventy.js file?" I will break into stages. I like that Gemini refactored the functions into two files based on function type. I made the mistake of not checking that it preserves the logic of the function while refactoring. Be explicit.

If Logic Works, Embed It

With the thumbnails and featured images logic I assumed that once the logic worked, it would be permanent. It isn't. It can easily change. When I told Gemini to use the logic, and move the image paths directly into the markdown files I simplified my life. Complex logic could be removed from eleventy, and posts could go with a standardised approach to displaying images. Simplification works.

And Finally

Use git to help you keep track of changes. AI is not a search engine, so don't rely on it to remember a solution it provided for you. It will come up with a new one. Be as concise as possible and keep the context window small. The larger it is, the more room there is for mistakes.

And finally, AI might be logical and rational but it doesn't have an understanding of what it is doing. To use the Short Circuit analogy "A machine doesn't have emotions, or feel, it only runs as programmed". AI is Not Number five. AI is a tool. That's why it's good to practice with using it properly.

#11ty #AI #context #eleventy #javascript #js #refactoring