A AI-generated image of a human and an AI working together on a piece of code

Should you still learn to code in the “age of AI”?

I’ve been helping my niece with some of her computer science homework recently and talking to her about whether learning to code is something she’s going to continue or even make a career out of. One of the questions that’s come up is with all of this development around AI, is learning to code even worth it anymore?

From code generation, to code optimization to code review, every piece of a developer’s workflow gets more AI-infused everyday. All of this is a pretty clear indicator that we don’t know what the role of “programmer” will look like in 5 years or even less.

In the past 10 years, learning to code has been a pretty good general path to success, as technology gets more and more important in all our lives. But given the massive shifts in the market with AI and the uncertainty about the future, if you’re just starting your career or your higher education today, is this still good advice?

Short answer: yes. The longer answer is below, so let’s dive in.

The case against learning to code

Imagine a world where you can sit down at your computer, open up your IDE and start a new project. But instead of spending hours or days architecting the application, designing the database schema and writing all the code yourself, you simply describe to an AI system what you want the application to do.

“Create a full-stack web app for managing customer orders,” you say. “It should have a responsive front-end that displays available products, allows customers to add items to a shopping cart, and has a checkout flow that captures shipping and payment details. On the back-end, there should be a REST API that reads and writes data to a relational database. Handle all the error cases and implement logging for key events.”

You sip your coffee while the AI goes to work, analyzing your description, asking clarifying questions as needed, and then generating all the required code – HTML, CSS, JavaScript, SQL, API endpoints, data models, configuration files and more. But the AI doesn’t stop there. It runs a suite of automated tests to validate all the functionality works as intended. It scans the code for potential security vulnerabilities and optimizes the database queries and application performance. It even writes user documentation explaining how the app works.

And just like that, you’ve gone from concept to finished product before lunch, while barely touching the keyboard. As AI systems continue to evolve, the role of the programmer may become less about knowing all the syntax and architecting every detail, and more about providing clear specifications, reviewing AI-generated code for quality and monitoring the automated pipeline.

In a world like this, one could argue, what’s the point of spending years honing your coding skills if an AI can do it faster and more reliably than any human? If you can build complex applications by just talking to a computer, why bother learning the intricacies of Python or mastering the latest JavaScript framework? The time investment of learning to code, in this light, might seem inefficient, even wasteful, when AI can shoulder more and more of the coding burden over time.

Of course, this is an extrapolation and the future likely won’t play out quite so simply. But the trendline is clear – AI is getting better at coding, fast. And it’s worth seriously considering what that means for the value proposition of learning software development skills. Will businesses still want to hire entry-level developers if an AI can generate the code they need on demand, without a salary or benefits? It’s a challenging question that aspiring coders will increasingly need to grapple with.

Why coding skills are more important than ever

However, as the skills of an “entry level developer” become available to the next billion people, having specific and hands-on programming knowledge is only going to become more valuable.

Some tasks are still easier when you can write code by hand

LLMs are trained (mostly) on data they can access on the public web. This means that they’ll be more able to perform coding tasks in languages they have the most exposure to and that they’ll do better at the types of coding tasks people frequently ask questions about or write tutorials on.

For the most part, this is ok, because those types of problems are the problems that most people have. However, when you run across a specific performance optimization that you have to make or if you need to write code in a language that is not as popular online, you might see an LLM start to struggle.

I was recently working on a project where I discovered the JSON Patch format, which is very useful but doesn’t have a ton of documentation online. My project involved making changes to a large JSON file and, while the LLM was happy to make the required changes, these changes were costing a lot because I was providing an entire JSON template to the LLM and it was returning an entire template to me. When I discovered I could receive the changes back in JSON Patch format and save a lot of LLM time and token cost, I was very excited. However, I realized that I couldn’t get the LLM to consistently return the correct JSON Patch format and I had to take another approach.

If I was building an application by hand, I could have instead read about the JSON Patch format, used my knowledge about JSON and other coding paradigms to understand it and applied it in my project.

If you’re finding an LLM struggling to write code for you, you might want to consider taking a look at the documentation and seeing if you can write the code you need yourself. And to be able to do this, you need to know how to code.

LLMs still generate code a lot of the time

Large language models are just that – language models. They struggle to do calculations, work with data and many other things that traditional programming languages are great at. The creators of many of these models have realized this and, since LLMs can write code, often use this as a go-between to actually accomplish the task they were asked to do. You can see this in ChatGPT for example, if you ask it to choose a random number, analyze some data or create a visualization.

A screenshot of ChatGPT generating a random number by writing Python code to actually perform the number generation

Even in cases where LLMs don’t generate the code for you, because of the fact that LLM output isn’t always consistent and sometimes contains incorrect statements, oftentimes asking an LLM to generate code that accomplishes your task is a more reliable method than relying on an LLMs generated answer directly.

No matter how your particular query results in an LLM using code, being able to understand the code that the LLM is writing, spot inconsistencies or potential errors and prompt it to modify the code instead of relying solely on verifying the output is hugely beneficial and a big time saver. If the code that the LLM is generating is referencing the incorrect column of data in a CSV, for example, a scan of the code should help you find this relatively quickly.

For example, if you have ChatGPT generate a CSV file with thousands of lines of data, going through all of that output manually and verifying the data is correct could take a very long time. However, because this is the kind of task ChatGPT will write code to do, being able to review, understand and verify the code would give you the same confidence in the output in much less time.

LLMs are a tool to enhance programmer efficiency

At the end of the day, LLMs are an amazing tool that can generate pretty good, usually-working code most of the time. However, an area where LLMs still struggle sometimes is defining the approach to the problem, especially if it contains multiple steps. Knowing how to code and knowing programming concepts is a great way to make LLM outputs better by guiding the AI with specific terms.

For example, instead of asking ChatGPT to write an algorithm that searches through a phonebook for a person’s name and taking whatever output it gives you, you can suggest a “binary search” and potentially get a much more efficient algorithm. Being familiar with writing code and how codebases come together can help you give an LLM “shortcuts” like the binary search suggestion when generating the output you’re asking it for and will give you output much closer to what you’re seeking if you can add this specificity. If you’re asking an LLM to generate code in a language you’re already familiar with, you could even guide its output with specific functions and techniques that you already know.

One of the first things you learn when you start learning how to code is all of the “unknown unknowns” that exist in programming. If you can make these known to you, you can use this knowledge to prompt AI more specifically and get better output in fewer iterations rather than asking for something general and having to spend a lot of time guiding the AI towards a better result.

Where’s the balance?

In the end, the decision on whether to learn to code is (ironically) not a binary one. You can learn a lot of the concepts from Computer Science 101 and use the AI tools available to start applying that knowledge to real-world projects much more quickly. Not only can LLMs help you write code, they can actually teach you in a much more personalized way and focus specifically where you’re stuck.

The most productive and successful programmers of the next generation will rely on their learning and their own mind for architecture concepts, high-level decisions and knowledge of “real world considerations” that lead to edge cases and other complications. They will pair that with LLMs who can generate code way faster than a human, are familiar with all the correct syntax and can debug and correct their output in real time.

Together, this will allow developers who are already proficient to get even faster and more productive, while also lowering the bar for others to learn to code and start to create useful code right away. As the tools get better and more accurate, those programmers who have already incorporated them into their workflow will only continue to get more efficient and more accurate.

Just like we really don’t use reference books for C++ anymore, the future for developers will look very different than relying on Stack Overflow answers and forum posts for code suggestions. But if you think this eliminates the need to learn to code entirely, think again.

What does the future look like for developers?

The rise of AI coding tools might seem like it would reduce the need for human programmers. After all, if an AI can write the code, won’t that put developers out of a job? While it’s true that AI will likely automate away some coding tasks, especially at the entry level, there are several reasons why coding skills will remain highly valuable in the job market.

There will always be a need for humans to guide the high-level software design and implementation process. AI can generate code based on specifications, but it takes a skilled programmer to define the right specifications in the first place. What features should the application have? How should the system architecture be designed for scalability and maintainability? What are the key performance metrics and user experience considerations? These are the kinds of strategic questions that require deep technical understanding, business acumen and creative problem solving – skills that AI alone cannot replicate.

Developers who can think strategically, understand complex systems and translate business needs into technical requirements will be in high demand. They’ll need to know how to break down large problems and create the right abstractions and APIs.

In many ways, the coding skills involved in architecting software systems will become more important than ever.

Aspiring programmers should view AI as a tool to augment and enhance their skills, not a threat to their job prospects. By learning to code, you’re not just acquiring a narrow vocational skill, but rather a powerful way of thinking and problem solving that will serve you well in a variety of roles.

If you’re considering learning to code, don’t let the rise of AI scare you – embrace it as an opportunity to focus your skills on the most impactful and rewarding aspects of the job. In a world of AI-augmented coding, deep technical expertise will be a key differentiator, and those who have it will be in high demand.