Nov 272024
 

With all the AI hype in terms of software development (you can see the latest update on AI taking over software development here), I’ve found myself revisiting what it is I love about programming in the first place. For me, it’s the satisfaction of having built something (or a piece of something) that didn’t exist before, that (hopefully) solves a problem. I’m not a “code should be beautiful” kind of guy, but there’s a non-trivial amount of pride to sitting down at a text editor, typing out commands, running them, and repeating until they finally do the thing I envisioned, and then getting it out to the world. Because ultimately, it’s something that I worked on, if not did altogether. There’s just no equivalent of that from AI.

People advocating for using AI emphasize increased productivity – it can generate the code for you, so you don’t have to type it all out yourself they say. Maybe, but odds are if you’re programming as a day job, your typing speed isn’t a significant limiting factor. And even assuming that the net time saved by having a script print some random code to the screen for people to copy and paste is actually significant, there’s still time spent understanding the generated code so you can try get it to fit into your project, and trying to catch bugs before they get checked into the codebase (and fixing said bugs after said aforementioned code is merged into version control). For those of you who seem to think copying and pasting code off the Internet is a good idea, I’ve wasted far too many hours cleaning up issues that are a direct result of copying and pasting code from 1 service into another. It’s frustrating, and does not reflect well on the copy-and-paster. And no, saying “But it’s AI-generated!” does not help your case.

That’s another problem I have with using AI to help write code for you. How has copying and pasting whatever ChatGPT, Claude, or whatever AI engine you’re using ever resulted in somebody leveling up their abilities as a developer? Learning happens as a result of taking the time to internalize what you’re doing and why it doesn’t match what you thought it did. Copying and pasting a “fix” you found on a website doesn’t actually teach you anything. In fact, for years we used to warn more junior to not do that when the copy source was StackOverflow, but now that the source for copy/paste answers is an “artificial intelligence,” it’s somehow a benefit? Or do we just no longer care about people actually getting better anymore?

I will admit that there is 1 skill using AI to generate code can help improve – the ability to understand and communicate requirements to something else. While communication skills are useful (and underrated), that still doesn’t make you better at actually building a solution to any problem. You’re just better at telling somebody what that problem is and what you need any potential solution to do in order for it to be acceptable. Congratulations though – you’re becoming a better product manager, and your JIra tickets are surely going to reflect this.

Yes, senior developers can put together and ship a feature faster than juniors. The mistake is assuming that the speed is what makes them senior, instead of merely being a byproduct. More experienced developers tend to move faster because they’re more familiar with the problem domain, the code base they’re working in, and all the various pitfalls and gotchas in both. As a result, they have an easier time thinking through the specific problem, know where to code defensively, know how best to the test the logic, all while best understanding how everything fits together.

Even without problem-specific context, more experienced developers have a more in-depth knowledge of language and framework features. That’s not insurmountable, every developer starts having to look up a bunch of stuff any time they try to do anything. But it’s the developers that look up how to do things, but then actually do those steps themselves that internalize them well enough to not need to Google them in the future. Doing is the process that creates senior developers in any context, and there isn’t a substitute or fast forward for it. That’s because, invariably, at some in the process of doing it’s not going to work exactly the way that it does in the guide. Now you have to debug it, and in the process, learn about the thing you’re working on, and thus, level up as a developer.

In addition to retarding professional development of programmers, just the thought of using AI tools as a code generator just seems fundamentally demoralizing. I may be alone in this (I doubt it, though), but the things that I enjoy about programming are building something that didn’t exist before and solving problems. In other words, it’s not so much that a thing exists, but the fact that I did it. I solved a problem, I put in the time, I debugged, and now this something, even if it’s a small part of a bigger system, exists and makes things better because I built it. I know there’s a lot of jokes out there about software developers bragging about changing the world, and every single 1 of those is well-deserved. But no matter how small the actual impact, the fact that something exists that didn’t before, or that something used to have a problem but no longer, creates a sense of satisfaction, much like making a small repair or improvement to one’s house. There’s an element of craftsmanship to it. It doesn’t matter if people won’t be talking about it the world over the way people talk about things like “German engineering.” It doesn’t even matter if nobody else ever sees it. The longer you see your handiwork…working, the greater the satisfaction from having worked on it.

Asking a fuzzy copy/paste service on the Internet to do a riff on something so it can be copied and pasted from their output window to my input window eliminates every single iota of accomplishment and satisfaction from the software development process. I didn’t write something, run it, tweak my understanding of the problem, eventually get it working, and subject it people who’s job it is to put it into an invalid state with a message of “try to break this,” only to see it eventually succeed. Some application running on a server somewhere else parsed a text block, guessed the context, did some pattern matching based on that context, said “meh, good enough” and sent it back. There’s no actual “craft” from a software engineer anywhere in this process. So why even bother asking them to participate at all?

If we’re so convinced that this is the way to go, the good news in the next few years (maybe 10 tops) is that you go from hiring software engineers (which do not come cheap) to just having product managers type in the feature requests and getting the code back. Then, they can take the feature requests and prompt the AI for tests to ensure generated code satisfies the requirements. Now they can test the AI-generated code using the AI-generated tests, and prompt the AI to fix the problems the AI tests found. You could even probably ask the AI to deploy this for you. Thanks to managed services from a lot of public cloud providers, you don’t even need an operations team to run it in production (just plenty of revenue to cover those cloud bills). While they’re at it they can ask the AI to generate documentation for the code too. Congratulations, we’ve reduced entire cross-functional team (assuming you had 1 to begin with) to down to just 1 person!

Oh wait, that doesn’t actually work, because AI isn’t actually that good, and likely won’t be? You need actual developers because code generation only goes so far, and you can’t actually get over the finish line without people who understand the language, the tools and libraries, and the problem domain? Well, that certainly sounds like a conundrum. By the way, how do you think these engineers and professionals develop these skills? I’ll give you a hint, they quite literally spent a lot of time f***ing around and finding out.

The more I think about using AI to “help write code,” the less I want to do it. Other than generating more lines of code per minute, I don’t see any benefit personally or professionally. Personally, I have no desire or intention to outsource what I like about my job and replace it with blindly copying and pasting an autocorrected copy and paste of other people’s code. Professionally, I don’t actually improve by doing it. I’m not spending time understanding what’s going on, or why I would want to do what this code is doing, which means I’m of rapidly-decreasing value any time there’s a problem, a change needed, or something new comes up. I don’t think AI is all doom and gloom though. There do seem to be a lot of developers looking to get in on the hype and start just having it write at least chunks of their code. I also think AI has a skill ceiling that I can beat, so I intend to encourage other people to let it write their code, while volunteering to help get that code working whenever they get in over their heads (which I’m assuming will start coming earlier and earlier in the process as people start using AI code generation more and more). At that point, I figure I’ll have pick of the litter in what I want to do, be it at work, or as a pretty lucrative consulting career getting AI generated code to actually for 7 to 8 figures a year for other businesses. So keep on ChatGPTing kids!

 Posted by at 11:45 AM