dev-resources.site
for different kinds of informations.
How to learn to code with AI in 2024
This blog was originally published on Substack. Subscribe to āLetters to New Codersā to receive free weekly posts.
My daughter just turned 12 and will learn to drive in a few years.
When I picture her getting behind the wheel, I canāt help but think about how different her experience will be from mine. When I got my US driverās license in 2006, I didnāt even have a back-up camera, let alone automatic parking. I certainly never imagined that semi-autonomous cars would be widely available in the next decade.
Given the rapid advancements in self-driving technology, Iām curious how driver education might evolve. Will my daughter use AI features while learning how to drive? Will she be able to invoke AI features during the driving test?
I donāt have answers to all these questions. However, Iām confident that driving tests will disallow AI features for the foreseeable future. If Tesla has taught us anything, itās that even the most advanced driving technology needs supervision from well-trained drivers.
Learning to code in this new era bears a lot of similarities. AI tools can enhance a programmerās work, but they canāt solve most complex problems unassisted. Without strong programmers at the wheel, AI can easily drive us off-course.
There simply is no substitute for internalizing the basics.
Now more than ever, you need strong programming fundamentals to make the most of AI. But will your coding journey look the same today as it would have a few years ago?
Today, weāll explore learning to code with AI in two different ways:
How to equip yourself to be a successful coder in the AI era.
How to leverage AI to learn to code more efficiently.
Letās get started!
How to be a successful coder in the AI era
Imagine a world where AI provides many snippets of code as you build software. You review each line to ensure correctness and alignment with your coding style and guidelines. Through a combination of AI-generated and original code, youāre able to build great programs efficiently.
This is the near-future of software development.
Notice that AI isnāt replacing your role as a programmer; itās reducing grunt work. Without a deep understanding of what AI is doing, you run the risk of introducing errors and vulnerabilities into your code.
Itās like when I discovered that you could build IKEA furniture with a drill instead of an Allen key. This innovation has saved me tons of elbow grease, but I still need a deft hand to ensure my KALLAX shelving unit doesnāt collapse from improper assembly. At the end of the day, I control the machine.
So, does AI change what you need in order to become a professional developer?
Yes, somewhat! Youāll need to learn how to incorporate AI into your workflow to be more productive. (As a developer, Iām thankful for this because it means less time completing small, tedious tasks, and more time solving interesting problems.)
However, AI shouldnāt change how you learn to code, at least at the beginning. Just as you learn math fundamentals before using calculators, your first few months learning how to code will focus on learning coding fundamentals, including how to think like a programmer.
Many months down the road, you can think about incorporating Machine Learning and AI topics into your curriculum ā but donāt get ahead of yourself! Youāll never reach that point if you skip the fundamentals.
How to leverage AI in the learning process
Many professional developers use AI assistants like ChatGPT and GitHub Copilot to write code more efficiently. Naturally, you may be wondering if AI tools can accelerate your learning process.
Well, yes and no.
AI assistants have some amazing capabilities. However, I donāt recommend using them heavily in your first few months of learning to code. Letās discuss why ā and explore some new AI tools specifically designed for learning.
Learning with ChatGPT and GitHub Copilot
As you learn to code, itās easy to become overwhelmed by all the new terms and concepts youāre encountering. Having an AI assistant for quick, direct answers to questions like āWhat is a data structure?ā can save you time scouring forums for relevant information.
AI assistants can also help unblock you and debug your code. Letās say you canāt remember how to nest an object. With the right prompting, ChatGPT or Copilot can spit out code that meets your requirements. You can then analyze the output to learn how objects are nested in that particular context. Or, if you write code independently, you can have your AI assistant check for errors, then use that feedback to refine your skills.
This all sounds pretty great. So why not use AI assistants as a new coder?
To unlock the full benefits of ChatGPT, Copilot, or similar tools, you need the programming skills to do the following:
Write effective prompts.
Fact-check outputs.
Beyond asking simple questions like, āWhat is a data structure?ā, new coders donāt have the experience to provide guidance that generates useful AI outputs. There are entire courses dedicated to this topic (called āprompt engineeringā), which I only recommend once youāve mastered programming basics.
No matter what you ask AI assistants, itās crucial to receive their answers with healthy skepticism. Thatās because Generative AI can āhallucinate,ā or generate inaccurate responses with a tone of authority. The technology doesnāt truly understand the content it generates; itās simply creating responses based on patterns perceived in its training data, which is often outdated.
AI is improving all the time. However, even a small chance of hallucination is risky. I doubt youād feel comfortable dumping all your symptoms into ChatGPT and accepting an AI prescription. Personally, Iād want a human with medical training to sign off on it.
The problem is, new coders donāt yet have the knowledge to validate AI responses. This makes you highly susceptible to false information. AI assistants are more useful once you have strong programming foundations ā and you canāt rely on untrustworthy information to get there.
AI-powered tools for learners
AI assistants like ChatGPT and GitHub Copilot arenāt ideal for learning to code. So whatās the alternative?
For years, self-taught coders relied on books and videos to learn programming fundamentals. These can still be good options, as many of them contain high-quality content. However, traditional learning resources canāt provide you with a personalized learning experience.
Thankfully, AI-powered learning tools are providing new coders with a better option.
For example, platforms like Educative take the university-quality content of traditional learning resources and enhance it with AI. Hereās how it works.
As you progress through an online course, AI periodically assesses your knowledge and learning goals. From there, it adapts the curriculum to meet your needs in real time. This is highly valuable for self-taught coders, who often lose steam without a structured plan to guide their learning. Instead of researching what lesson to try next, all you have to do is focus on learning and stick to the path laid out for you.
AI also creates a more personalized, engaging experience within each lesson. When you start programming, you can write and run all your code in-browser. AI provides tailored feedback on your code, so you can make improvements and continue practicing within the course environment.
Need clarification on a concept? Instead of opening a new tab to ask Google or ChatGPT, you can highlight text within the course and receive an instant explanation.
Between adaptive learning, personalized code feedback, and instant explainers, AI-powered learning provides many benefits of an AI assistant ā with the crucial addition of quality control. You can benefit from a personalized experience without worrying that false information will lead you astray.
Get started today
Overall, learning to code with AI looks a lot like learning to code without AI.
As a new coder, the best thing you can do for your future career is commit to learning the basics. With all the buzz around AI, it can be tempting to jump to AI skills ā but this will hurt your progress if you havenāt mastered programming fundamentals.
Think of it this way: you canāt properly advise an AI tool on how to solve problems if you donāt have relevant experience yourself. Plus, these tools are far from perfect, so youāll need the right expertise to edit AI-generated code.
By the time youāre ready to interview, youāll want to show employers that youāre AI-ready. This doesnāt mean that youāre prepared to work on AI models right away. Rather, youāre a strong coder and problem-solver with a demonstrated willingness to learn how to leverage AI.
So if youāre ready to learn how to code in 2024, donāt let the AI hype derail your journey. Choose a guided learning plan like Educativeās Learn to Code: Become a Software Engineer ā and start building your coding foundation.
While you canāt skip the hard work of learning the basics, you can choose AI-powered courses that help you learn the basics faster. Unlike AI assistants like ChatGPT and Copilot, AI-powered learning is designed to support new coders. Youāll get a highly personalized experience that accelerates learning, with the quality content of a university course.
As long as you stick to the learning plan and remain curious about AI, youāll be right on track to become āAI readyā in 2024.
Featured ones: