It’s a relationship
I’ve been working on increasing and polishing my relationship with AI when coding. Although I made a career out of adapting and hacking new technologies, and I’ve been working on AI related products for a bunch of years, I am an old-school software engineer (AKA. control freak) and have learned the hard way that leaning on shortcuts does not result in a good medium/long term productivity boost although it is often tempting and very productive on a short term. I want the advantages of AI without getting stuck to what is commonly done or without hitting a wall in the middle of a project and being forced to start over before achieving the current goal.
This inspired me to start writing down all the things I find about my working relationship with AI. Especially because a lot of these things are very intuition-related. Rules and heuristics are fuzzy and they don’t really work all the time because of the non-deterministic, fast-paced, multi-model world AI is right now.
The Misleading Promise
We often hear the seductive pitch: “8-year-old with zero coding experience built [insert software product] in two hours with AI!” It sounds magical, and technically, it’s true. Give a very smart 8-year-old a good AI tool, and they’ll have something working in no time — assuming an adult sets up everything for them. But here’s the catch: It works especially well for an 8-year-old because they aren’t likely to hit the shallow limits of a fully AI-built app. Their expectations are flexible, and their requirements are low.
On the other hand, I find that an LLM-powered agent is as competent as a slightly above-average professional coder. Which is amazing but very far from optimal…
The Fiverr Metaphor: Working with AI
Here’s a metaphor that explains how I’ve come to see coding with new AI agents (such as Cursor or Void):
Imagine you’re hiring developers on Fiverr. Each time you send a request, a different developer takes the task. You can’t control who it goes to, and each response comes from a new person with limited understanding of the project’s larger context (it won’t warn you when truncated). They are all disturbingly overconfident, and there’s no liability or consequence when things go wrong.
Now, imagine every prompt to an AI is like this. It’s dirt cheap and still incredibly powerful. But would you trust this random stream of developers with your entire project? Probably not. Like any good project manager, you need to break tasks down, manage context for each request, and know when to step in to avoid being derailed by misleading results. Trusting an AI to build something big, reliable, or safe? That’s a risk not worth taking unless you’re in full control. At least for now…
Learning vs. building
In my opinion and experience, it doesn’t work to ask an AI agent to build a project on a technology or language that you don’t know. You will hit a wall very early on. But you don’t need to know all the details of the syntax or all the obscure setup things… If you’re experienced, just glossing over intermediate to advanced tutorials will make you good enough to effectively control an agent through a median project. So indeed, you can learn a new language on the go while coding a real project fast.
Automation Magic: Where AI Really Shines
One of the most exciting uses of AI in my workflow is automating tedious tasks. We’ve all been there — you hit a problem and think, “I could write a script to automate this.” But then, you realize it’s going to turn into a three-hour distraction, so you find a manual workaround or avoid that path of development all-together and move on.
With AI, I can now spin up those scripts in seconds. Suddenly, the balance between effort and productivity shifts in my favor. The risk of AI screwing up is minimal because automation tends to be linear — input comes in, output goes out, and you can verify it quickly and acurately by just looking at the output. This has been a game-changer for things like:
Data transformations/migration/translation Bash/Python scripts for boilerplate setups File system batch operations
These quick wins add up and keep my focus where it matters most.
Syntax and Troubleshooting: The New Workflow
I’ve learned that it’s often faster to ask an AI for something and then quickly verify it using documentation, rather than slog through docs trying to figure out how something works from scratch. Also, whenever there is an error, it’s quicker to pipe it to the agent first, to see what it says before going into debugging or research.
Treat your AI like a secret agent - picking context
Give it a good high-level background on your project (when needed, specifically on architecture) and then very “need-to-know basis” code access. This makes it focus on what is important, reduces hallucinations (in my experience), and avoids it from getting too cocky and secretly adding “extra features” that you didn’t ask for.
I would like a second opinion
Options are great, Keep in mind that each prompt to an LLM is a new world (Remember the Fiverr metaphor above). LLMs are statistical models, if you ask for something, it will give you what it thinks is the most likely response, but doesn’t mean it’s the only response it would give you nor is it the best. So if you are not sure that the answer is good enough for you, ask again.
You are absolutely right
One interesting quirk of LLMs is their tendency to always affirm your critique or question with “You’re absolutely right.” – goes on to “fix” or “rewrite” whatever you asked about… – even if you are wrong and it was fine to begin with. A useful trick to counter this is to include the possibility that you might be wrong in your prompt. For example, instead of saying, “the function call X seems to be missing Y” try framing it as, “I am not sure, the function call X seems to be missing Y. Could I be wrong?” This approach encourages the LLM to consider the fact that there is a possibility that you are “full of it” ;) (with all due respect). Note: don’t worry, it won’t break your heart, it will still tell you that it’s brilliant to ask that, but you’re missing the point.
Want better? Just ask!
Here’s an awsome trick that I heard from Simon Wilson in a great podcast about these issues: If you don’t like the output on a hunch but can’t bother to figure out what the problem is or even just verbalize it to the LLM, just tell it something like: “Do better”, “Do it again but cleaner”, “My supervisor wouldn’t approve that code”, “Make it more elegant”. It’s surprising how many times it actually works!
It’s not only the coding
Another valuable way I use AI is to explore new libraries or languages, compare options or build discardable prototypes as research. Rather than spending hours reading through the “Getting Started” sections of documentation, I’ll ask the AI to write out some sample code for different libraries. Even if it’s wrong, it gives me enough insight to make a quicker decision about which direction to go.
It’s also great for tasks like writing documentation. In these areas, it’s less about perfection and more about creating a solid foundation I can refine later.
Conclusion
Working with AI as a coder is a wild ride. It’s like having a brilliant but quirky slave who can supercharge your work. The key is balance. Use AI to boost your productivity, but don’t let it take the wheel. Keep a firm grip on your project’s direction and quality.
Here’s the kicker: as AI gets better at coding, the key skills of software developers shift in value. If you’ve been avoiding project management skills, now’s the time to level up. They’ll be just as crucial as coding chops in the AI-augmented (very near) future.
Remember, AI is a tool, not a replacement. By mastering this dance between human insight and AI power, we can push our craft further than ever before. It’s an exciting time to be a coder - let’s make the most of it.
Key takeaways
- AI as a Competent Assistant: Treat AI tools like slightly above-average professional coders. They are powerful but not infallible.
- Context Management: Break tasks down and manage context carefully to avoid misleading results.
- Learning vs. Building: Use AI to assist in learning new technologies, but ensure you have a foundational understanding to guide the process.
- Automation: Leverage AI for automating tedious tasks to save time and increase productivity.
- Syntax and Troubleshooting: Use AI for quick syntax checks and initial troubleshooting, but always verify with documentation.
- Prompt Framing: Include the possibility of being wrong in your prompts to get more balanced and accurate responses.
- Iterative Improvement: If you’re not satisfied with an AI output, ask for improvements with prompts like “Do better” or “Make it more elegant.”
- Exploration and Prototyping: Use AI to explore new libraries, languages, and create prototypes to make informed decisions quickly.
- Documentation: AI can be a valuable tool for drafting documentation, providing a solid foundation for further refinement.