The Steam Engine and AI

In 1765, James Watt produced a new type of condenser that radically improved the efficiency of the steam engine. This innovation, along with a couple of others, radically transformed the economies of Europe and triggered the Industrial Revolution. It’s important to note that this was not a radical invention. It was an improvement on an existing steam engine. But this improvement led to a whole bunch of changes that improved the economies of Europe and beyond. Large Language Model (LLM) AIs will have a similar effect.

Android Studio

The LLM is essentially a word-prediction algorithm that masquerades as a chatbot. We’ve had chatbots of this sort since Eliza was invented in 1966. LLMs merely allow a particular kind of Chatbot to give you more relevant and accurate (for the most part) results. However, based on my latest experience in programming with the assistance of an LLM, it will trigger substantial innovations in the economics of certain jobs going forward, especially in programming.

The Title Is Not a Typo

The title of this post is not a typo. I believe that AI will bring evolutionary change, not revolutionary change. It will allow for greater productivity and output from programmers, but no fundamental shifts in the architecture of building software.

From my experience, there is very little in the current state of AI that will improve the development of software. What it will do is to radically improve programmer productivity. There are times as a programmer when you get stuck, and you don’t know where to turn.  Code-aware AIs are the perfect antidote for that. This is especially germane on Android, which is notorious for being complex.

Coding with AI: An experiment in Android Studio

Everybody has a hobby. Some people like to work with wood, some people like to build things, and some people like to collect things. My hobby is building Android software, and I have written about other programming projects. I have been doing it for almost a decade with varying degrees of success. What I wanted to do was see if I could build a simple application for my Android phone, using AI to guide me along.

Developing for Android has been a bit of a problem because there are times when you can get stuck. After all, you have multiple different kinds of frameworks that you can use, and it’s never quite clear which one you should use.

What I found was that AI is indeed helpful, but you have to double-check everything it tells you. I found that it generates code, but the code is never 100% correct. And you have to know what you’re doing to determine if the code it’s giving you is the right code.

Android Studio: Mirkwood of Dev Environments

Android development reminds me of The Hobbit, when Bilbo and the team have to go into Mirkwood forest. It’s a forest that is dark and overgrown and contains a monster or two. This is exactly what developing for Android feels like. It’s overgrown, and you have a bunch of different intertwined frameworks that you could use, but from a design perspective, it’s not clear which one you should use. It doesn’t help that developing an Android app also makes me feel small, hairy, and barefoot. (But that may be a problem for me and my therapist).

Android Studio has recently added a coding AI as a feature of the development environment. It has totally changed my coding experience. 

Consider the UI frameworks that you use in Android Studio.  You could use the older XML-based one, or you could use the newer one called Jetpack Compose. When you use Google to answer a question, you’ll often get an answer that says that you should use both, when in my experience, you should use one of the other. 

One of the biggest problems with Google is that they often have multiple versions of their documentation available, and they say conflicting things. It’s been a never-ending source of pain. But now that I have an AI to talk to, I can ask a question about what the most recent framework is, and get an answer that can then be checked. This saves days of getting stuck.

Opinion on Coding with AI on Android Studio

I tipped my hand earlier, but my conclusion is that coding with an AI has been an almost unalloyed good. But you need to take the perspective of my favorite saying from Russian, “trust but verify”. (Sorry, Dara). Oftentimes, the answers are an amazing 98% correct, but it will take you a couple of hours to sniff out the bug.

I believe this will fundamentally change how software gets built. Not in that it will change the shape of software, but rather that it will improve the productivity of producing software, and will also allow more people to build software.

I think this will have two major effects. First of all, I think it will improve the productivity of the average programmer. When I started in the business, the metric was that a developer could produce and maintain about 25,000 lines of code a year. I’m not sure where that number is today, but I easily see this multiplying by a factor of two or three.

A Victory for Mediocrity!

Second, it is a victory for mediocrity! It will make it possible for mediocre developers (like me) to develop more on complicated platforms and build more complicated apps. This is a big deal because often platforms like Android have a huge conceptual weight that they bring with them. In other words, you have to learn a lot before you can do anything useful. This has been my main impediment to developing in Android. As I mentioned above, Android has several frameworks, and some of them overlap. For example, Jetpack Compose and the old XML-based format for display are used for the same thing. And there’s no good guidance on what to use when. Now, all you need to do is ask Google’s Gemini, and it’ll make a recommendation to you. And by and large, the recommendations are usually correct. But always verify your answers.

The direct fallout of these two items is economic. What this represents is that the supply of programmers will go up, while demand remains constant. You could argue whether or not we are at full employment capacity for programmers. I believe we are. If this is the case, then the basic laws of supply and demand apply here. If supply increases and demand remains constant, then prices go down. Which means developers will get paid less. I would argue that programming is a unique skill and brings with it a unique set of headaches and problems. When one looks at what programmers get paid relative to other technical jobs, the labor rates for programmers might have been unnecessarily high.

This will not only affect programmers, but also QA engineers. Google Gemini in Android Studio is surprisingly efficient at generating test cases. This should make for better software.

While shrinking wages are always a problem, many people aren’t programmers for the money. We do it because we love it, or we do it because frankly, we were hedgehogs and it’s the only thing we can do. (See the parable about the hedgehog and the fox.)

Everyone Becomes a Product Manager

After spending a lot of time working with code that was generated from Google Gemini, one unexpected observation was that often, the prompts I’ve had to write are in the form of the dreaded Silicon Valley PRDs, or Product Requirement Documents. The advent of AI causes everyone to be a product manager and think like a product manager. That is: What do you want the code to do? How do you want it to behave and how is it structured? How do the modules interact?. In general, I think this is good because it forces you to think of things upfront.

For example, if you forget about authentication and authorization, you may have to go and bolt it on to get it to work. You may also have to go back to your initial prompt and add in those requirements, and start over. This is especially true for Google’s byzantine IAM APIs. However, the cost of deleting your old work and starting over is much less because most of the code has been generated for you. I believe this is a good thing.

Conclusion: We’re all Product Managers Now

Just as James Watt improved on the steam engine, AI in the form of an LLM has improved on already existing “chatbots” like Eliza. Both Watt’s improvement on steam engines and AIs in the form of LLMs are important improvements on existing technology.

Coding with an LLM (Specifically the Gemini AI included in Android Studio) by my side has been an enlightening experience. It has allowed me to get further along in my programming practice than I would have otherwise, and I believe this generalizes to a much wider audience.  Coding with an AI has also changed the nature of what it means to develop software, and will ensure more thoughtfulness in the design stages of any software project.

It will have a definite impact on programmer productivity and perhaps wages. But it will allow more people to build better software faster. This is a good thing.

(You can find my code here)