I've stopped looking at the code

Alex Styl
Alex Styl @alexstyl

As engineers, we take pride in the code we write. It is a big part of our identities. So this year was hard: I decided to embrace AI completely, and I've stopped looking at the code.

Ask it to build a screen creating specific code abstractions, like "create a SettingsViewModel with a StateFlow that holds whether notifications are on", and you will be disappointed. You will find yourself waiting forever for the AI to finish its work, and then have to babysit it to write the code how you would expect it to be written. That's where I was at the start of the year.

In other words, you are micromanaging the AI. You are still coding (deciding on the code, abstractions and wiring), but instead of using actual code, you type it all out in English.

The way to do it is by telling the AI what you want the end result to be: "a settings screen where people can turn off notifications". Ignore your technical abilities for a second and think about the end goal. You might have no idea how something can be built, but try it anyway and you will be surprised.

Engineering best practices are more important than ever. Code architecture, for example, can make specific types of bugs impossible. This effect is amplified using AI, as you produce more work faster. I'd rather have to do less QA on my products than to try to figure out where some specific bugs come from.

You don't need to read the code. You can have the AI write tests based on the best coding practices: test a single thing only, and decouple unit tests from integration tests. However, the final product must always be tested manually.

You got this,

Alex

You're subscribed

The next lesson lands in on Wednesday.