I'm from Android background - but that doesn't really matter anymore since the "invention" of Vibe Coding.
So, In my previous post, I have briefly touch based about AI Assisted Development - Vibe Coding, if you missed it do checkout at : AI Assisted Development - Vibe coding is good, when done right
Now why I choose this title, Vibe coding is good when done right, because, when you are vibe coding with the Agentic IDEs, it generates more code in a spawn of minutes then a human can process. We are already seeing these Agentic IDEs, develop an operating system from scratch over night. In reality it would take about more than month, so the amount of code that is being written is larger than the amount code we can safely accept and understand.
This is one of the concerns of Vibe coding, some talk about all the time and some doesn't care at all, and shows their app running localhost. But as a sensible developer like some, I'm also going to take advantage of these AI assisted development tools, and address the review bottle neck, that is what we will be seeing in the next couple of posts.
The review bottleneck
At some point, most of us have tried out the infamous learning application stack, like a todo app, an expense tracker app or even more sophisticated calories tracker app with rich UI. We do this in the inception of software development journey. If you are someone who haven't tried out, that's fine, I'm sure there is also one or two unreleased project in your GitHub or on an old laptop that is been long forgotten.
Now remember the learning we gained over the development of those home cooked applications? Well, those gave us the building blocks that you have to put together to make a successful product.
When developing those learning projects, you used to write every line of code by hand, even when you are stuck on a complex problem and comes across the solution mostly on StackOverflow, you are always advised to get an understanding of the code and implement it by yourself instead of just copy pasting, that way you not only understand the code but gains the confidence, this will not break and if does, this could be the reason.
Time travel to present day!
The same todo app that you spent hours on perfecting, will only take about an hour at most!
You run the app and you test the positive flows, voila, everything works without a sweat, But, here comes the real bottleneck, If we can somehow measure the vibe coding in metrics, say something like number of lines written per hour.
Then the same todo app you have perfected over hours vs vibe coded one, it would be something like, the AI assisted development will always win by a large margin.
Now how can we address this?
Formatting And Linting:
Formatting and linting are two different things, to simply put, formatting is just making sure that the length of a line is only 120 char max, whereas linting helps us in finding code smells, like a functions name is too complex.
If you don't already know this: LLMs - AI models are perfectly capable of generating a well formatted code and reduced to none code smells.
Yet here we are to talk about that, because if there is one thing I learned about LLMs is that they are nothing but giant token prediction black box, and there is this famous saying, Garbage in, Garbage out. So if the code it predicts next in the sequence somehow "triggers" a weight that has a garbage in, then your output will be garbage.
Luckily now a days they are perfecting with lots of regression and improved dataset practice, still the real problem hasn't been addressed.
Now the actual solve... How to?
Well, like the rule we have with stack overflow answers - don't copy paste, the general rule of thumb for AI assisted development is don't accept the code blindly, but-I know we are being recursive here- since the amount of code it generates are vast, it is hard to review every single line of code.
Setup the formatting and linting tool along side your codebase.
Because a static code analysis is much more efficient than a predictive analysis (see what I did here).
And for Android I would suggest to setup detekt, which helps you detect code smells, you can customize the rules also. Suggest me some of them you use, for JavaScript and python
And the good thing here is we can run this from terminal itself, and if one thing these AI assisted development loves is nothing more than a plugin or tools that can be accessed via CLI.
Once you happily accepted a huge diff, ask your agent to run the static code analysis on the diff and fix the high priority ones. <- this is all you need to do!
Check out the next article in this series - Scripting - an underrated tool that can improve vibe coded project standards
Comments
Post a Comment
Don't be a stranger! Speak your mind.