The New Way Of Coding

...it's actually fun

Remember that time when you are coding a cool project and you are locked in — you just know how everything will come together. But then suddenly, you find yourself stuck on a trivial task which must be done in order to unlock the next exciting part of your cool project.

That task can be anything that comes under the I-just-know-if-I-sit-for-a-couple-of-hours-I-can-figure-it-out category but you find yourself losing the flow of your thought by wasting energy on this trivial but important task. This is exactly where the AI tools excel right now.

The best thing about this is that you get to hand-over the task to the LLM and whilst you hand it over, you also get to explain what exactly you want and understand a lot more about the effects than you can imagine. It’s like goal-oriented journaling. Why I am saying that is because things that seem so clear in your head instantly become a mess when you start engineering a prompt.

As you start sorting out your prompt further, you’ll have a clear idea of the approach and be a lot more confident about what the output will look like and now it doesn’t matter if the LLM generates the code or you write it yourself as long as you can move on to the exciting part again!

There will be bugs, but you will catch it even before you copy the code because you know what’s what. When you do catch a bug, man, trust me, it’s the best of the feelings.

The other best thing about this is that you don’t loose your flow because whatever you just did doesn’t need that much energy, in fact, at this point, you are more of a product manager than a developer. You understand the problem from a different perspective and it lets you think about how you can take it further.

But it’s not always good. There are a few things to keep in mind with this approach. Sometimes, it’s just that the problem is so niche to your requirement that an LLM just can’t find a way and it will start hallucinating. It doesn’t warn you, remember. So, let me help you how to realise:

  1. If you feel like you are just going round and round with the LLM and landing back at the same bug over and over again, it’s a warning.

  2. If you know that the solution is just too much of a reach even to find it on stack-overflow or on a random github repository, it’s a warning.

The better approach here would be to reach out on any kind of a community server that is available for the technology on which you are working. The chances of finding a solution this way is much higher and more rewarding, trust me.

Recently, I ended up implementing a solution which I got from one of the maintainers of the project as a result of me asking for help and turns out, there was a very specific way to get what I wanted. I bet I could have never got there by just searching the internet or even by wasting a bunch of tokens. It was a real catch which even the maintainer agreed on which led me to create an issue for the same which could also become a PR soon(hopefully).

Now this is what I enjoy about being a developer. You try, you fail, you seek help, you figure it out and finally, you give back to the community. The full circle.

With most of the boring tasks out of the way, now it’s just about thinking at the architectural level, orchestrating everything to work the way you want. Have fun.
And to quote from a recent book I read which might go well here:

All Problems Are Soluble
**—
David Deutsch (The Beginning of Infinity)