The End of Tutorials: Learning Any Programming Language with ChatGPT

Sandro Correa
5 min readJun 8, 2023

--

There’s a lot of discussion these days about the types of jobs that tools like ChatGPT will replace. However, predicting how users will apply this technology in its myriad possibilities is a challenging task. A simpler exercise is to apply ChatGPT to existing behaviors or problem-solving methods and observe the results.

In this article, we’ll explore how to learn a new programming language using ChatGPT as your primary instructor. I’ll demonstrate how this can significantly enhance your learning experience.

Why is it Normally Difficult to Learn a New Language?

To explain this, let’s use a real-world example from a different field. Consider an Olympic gymnast. In the early stages of training, the athlete undergoes rigorous physical preparation involving repetitive workouts. The gymnast needs a strong, flexible body and a vast collection of muscle memories before they can start executing gymnastic jumps and landings.

This is precisely how developers often feel when starting a new tutorial to learn a new programming language, especially if it’s their first language.

This is how a normal learning curve looks like.

Why is ChatGPT a Game Changer?

With an AI like ChatGPT acting as your primary instructor, your learning curve tends to be exponential, without any bumps along the way. This is because you can start learning key concepts while simultaneously applying them to a project that you (not the instructor) decide to build.

The best approach is to associate the language you want to learn with a project you’re genuinely interested in building. You will guide the process of mastering that language by building features YOU envision and observing the results.

This is how a learning curve assisted by ChatGPT can be.

Practical Example:

From this point, we’ll do a practical example using my ChatGPT 4. The images you see here are exactly as they were provided.

Think of this exercise as a five-step framework to learn any programming language.

Let’s assume I want to learn Rust, and I already have experience with other languages. So, I built my prompt like this:

Stage One — Broad Concept

Hi ChatGPT, I want to learn Rust, the programming language, and I want you to build an initial guide about how to start. It’s important for you to know, I’m a Software Engineer with more than 10 years in the field working with programming languages like: Java, Javascript, Python, Kotlin, and Scala.

ChatGPT response

Take note of the response. It effectively highlights the main features to consider when starting. The best part is, ChatGPT tailors its response based on my previous experience. This personalized approach saves me from spending hours on tutorials that rehash the basics of programming — such as variable declaration, loops, or function structuring — that I’m already familiar with.

Stage Two — Understanding Key Concepts

After reading the first response and exploring some suggested links, you’ll be ready to understand some key concepts, like this prompt:

Can you elaborate more about how Concurrency works in Rust and add some of the advantages of using Rust for concurrency systems rather than another language like Java?

ChatGPT response

Again, the response is impressive. It not only introduces important concepts that I need to know but also draws parallels with my existing knowledge, thereby enhancing my understanding.

Stage Three — Getting Ready to Get Your Hands Dirty

Whenever you decide, usually after a few initial prompts, you can start thinking about what to build. If you already have an idea, you can validate it and receive feedback about the concept. In this case, I’m asking for ChatGPT’s help on ideas, highlighting the aspect I want to learn in this project, which is concurrency.

“I’m thinking about creating a proof of concept program to learn Rust and I want some suggestions from you about what type of program I can create. It’s important to stick to ideas where concurrency will be applied.”

ChatGPT response

Thanks to ChatGPT, even if my mind was devoid of ideas, it provided a comprehensive list to kickstart my thought process. Notably, ChatGPT even highlighted some applicable libraries, going above and beyond my initial request.

Stage Four — Validate Your Idea

Validating your idea is a unique aspect of AI. You can prompt your intention, and the AI will provide additional perspectives and feedback, adding great value to your project.

ChatGPT response

“Here we have an excellent response outlining key points.”

Stage Five — Sweet Coding, Babe…

We know what to build, and we have some basic understanding, let’s create this repository!!!

Can you build for me a skeleton of this project as a starting point?

ChatGPT response
ChatGPT response

Conclusion:

By now, I hope you’re convinced that working with an AI tool can be a game-changer in your journey to learn new programming languages. While I’ve consumed dozens of tutorials over the past few years and recognize their value, I’m also open to embracing new ways to improve myself.

Please feel free to reach out if you have any additional thoughts. ;)

--

--

Sandro Correa

With 20 years in Software Engineering, I'm passionate about AI, Programming & Entrepreneurship. Here, I'll share insights and income tech tips.