Skip to content
Back to Writing
AI

Using AI as a Coder, Not a Software Engineer

How I Use AI

As I mentioned in my previous blogs, domain knowledge is essential if we want to improve our efficiency with AI. Since LLMs are probabilistic generative models, they can make unpredictable mistakes. We need to give them clear and specific instructions, and we also need to review the code they generate. In this post, I will summarize how I use AI to improve my productivity and reduce token usage while coding.

Harrison Wang5 min read

As I mentioned in my previous blogs, domain knowledge is essential if we want to improve our efficiency with AI. Since LLMs are probabilistic generative models, they can make unpredictable mistakes. We need to give them clear and specific instructions, and we also need to review the code they generate. In this post, I will summarize how I use AI to improve my productivity and reduce token usage while coding.

I do not want to explain how to use Harness or what should be included in the AGENT.md file. You can find plenty of articles covering these topics. Instead, I’d like to share what I do and what I think about when coding to help AI generate high-quality code while using tokens efficiently.

Think Clearly Before Doing

Well, I don't use the word “design” here because, in the Agile world, design often refers to a long and complex design document. However, avoiding this word does not mean that clear thinking is unimportant. Thinking clearly is itself a form of design, and many Scrum teams have realized that some form of design is still necessary before implementing a feature.

Let me share a short story.

I have worked for several large companies, and every team I worked with tried to improve productivity. We used Scrum to manage our development process, and nobody liked writing design documents. Before each sprint, every team member was expected to think carefully about the feature they were going to develop. For some critical features, the proposed implementation plan would also be reviewed.

But the reality was that everyone was busy. Some people began skipping the step of thinking through the feature carefully because they believed they could complete it in a few minutes. During short review meetings, it was also difficult for people to identify all the important issues. As a result, the number of bugs increased.

After analysing the root causes, we found that many bugs were caused by not thinking clearly. So we began encouraging our team members to think more carefully before coding. But how could we verify that they had actually considered the important aspects of the implementation? We prepared a template listing the key factors that needed to be considered, such as failover, concurrency, consistency, the impact on related modules, idempotency, transactions, and so on.

Team members gradually got used to writing down their implementation approach before coding. It didn't need to be complicated or beautiful, and nobody cared about the format. The template simply helped us think clearly before we started coding.

As I mentioned in my previous blogs, AI is currently a good coder rather than a good software engineer. It cannot hold the entire context of a complex system, nor can it fully understand and design one. Developers need to provide clear and specific prompts if they want AI to generate correct, high-quality results. Therefore, we need to think through the details and review the code generated by AI in order to maintain the quality of the project as we contribute to a project.

Split Features into Manageable Tasks

I’ve found that splitting a feature into manageable tasks is a good way to control quality. As I said earlier, I use AI as a coder, not as a developer. Just as I would implement a feature step by step, I instruct AI to implement each step for me. I also provide details about how I want to implement each step—for example, which design pattern to use or how many times an operation should be retried after a failure. Additionally, smaller tasks are also easier to review.

Sometimes, however, a task is too cohesive to split further. In that case, it may be more difficult to explain how to combine the results of several small steps than to describe how to implement the entire module as a whole. When this happens, I think through the module in greater detail, prompt AI to generate it, and then ask AI to adjust specific parts of the module that don't match what I had in mind. Using precise domain language helps me instruct AI effectively.

LLMs are probabilistic generative models. If we give them more freedom, they will have more room to be creative. Sometimes we need that kind of creativity and innovation; sometimes we don't. Imagine that you are the boss of an AI coder. First, figure out what you really want, then tell AI exactly what you need. I believe we can work with AI much more effectively this way.

The Revolution in Software Engineering

AI is bringing a new revolution to many industries. It will become as common in our lives as cars, computers, the internet, and smartphones. Many routine and easily automated jobs will be replaced, and some junior roles may disappear. At the same time, many new positions will be created, and the path from junior to senior will change.

Since 2024, I have been discussing with my colleagues how young people can progress from junior to senior software engineers. As software engineers who have spent more than ten years writing code by hand, we understand that this is a long journey requiring time and dedication. In the future, programming languages may become less important, but system design and the ability to translate real-world logic into software will remain essential. Fortunately, AI may give young engineers more time to focus on these areas. Of course, this depends on AI becoming better at understanding complex systems and reducing bugs at the code level.

AI technology is developing every day. It may not replace us anytime soon, but someone who uses AI better than us might.

End of article 5 min read

More posts