Actually Write Code#
The danger with this textbook, and the associated videos, is that you could read and/or watch the material without ever actually typing code yourself. This would be a waste of your time.
The only way to learn to code is to write it. You will not learn coding, or how to actually do data science, if you don’t write code yourself. That’s why this is considered a lab course. It will be frustrating, and you will make mistakes. But that’s how you learn.
As described in the first Python lesson, the chapters in this textbook are intended primarily as a reference. You should read them (or watch the videos, which follow each chapter exactly), but you should also write code as you read or watch. Pause the video as necessary to give yourself time to do the work, and fix any mistakes you make. Coding, like language, is a procedural skill, which means you learn by doing. Passive watching, or cutting and pasting code from the textbook into your Juptyer notebook, will not help you learn.
What about Gen AI?#
Since the original publication of this textbook, generative AI has taken the world by storm. Tools like ChatGPT and GitHub Copilot can be very helpful for writing code. However, they are not a substitute for actually learning to code yourself. You will not learn to code if you simply ask an AI tool to write the code for you.
It’s reasonable to ask whether you even learn to code if you rely on these tools. The answer is that you still need to understand the underlying concepts and logic of programming. Programming is more than just writing code. It’s about understanding the problem you want to solve, what you want as outputs, and how to operationalize your solution. That is, you need to break a problem down into small parts, determine what order to do the various tasks in, and how to implement each part. You also need to be able to test your code to ensure that it’s doing what you want it to do (AI is notorious for hallucinations).
Using AI tools can help you write code more efficiently, but they should be used as a supplement to your own learning, not a replacement for it.