Learn to Code by Solving Problems: A Python Programming Primer Homepage for the book Learn to Code by Solving Problems: A Python Programming Primer

Learn to Code Book Q&A

Want to know whether Learn to Code by Solving Problems is the right book to help you start coding? When I mention the book below, I’ll use the shorthand LTC (for Learn to Code).

Q: I don’t know any programming at all! Can I start here?

A: yes! We start at the beginning of your Python programming journey. In addition, the book contains checkpoint questions, line by line code explanations, common traps and pitfalls to be aware of, and additional practice exercises to make sure you’ve got the material down pat.

Q: I’ve heard that it’s hard to write code that works. Is that true?

A: that can be true, especially when you write code but don’t have anyone to give you feedback on it. Is your code right? Almost right?

Feedback is crucial in the early stages of learning to program. You have to know whether your code is doing the right thing. When you learn with LTC, you’ll be learning using online programming judge websites that tell you whether your code is correct or you have bugs/mistakes to fix.

Tired of working through exercises and getting stuck? Or getting somewhere but not knowing whether your code is correct in all cases? Not here! I’ve written sample code for all of the exercises in the book, so that you can check it against your own work or use it to help get you unstuck.

Q: I’ve tried to learn programming before but didn’t get anywhere. Am I too stupid to learn programming?

A: no. You can do this. I hope that I get the opportunity through my book to be the one to prove this to you. You might get stuck, and the road won’t always be easy. (Anyone who tells you that you can become a master programmer in a month is lying.) Slow, steady progress is key. Don’t give up! And if something in the book isn’t working for you, please don’t hesitate to email me or seek additional explanations online. There are many ways to explain programming concepts, and you may just need to find an alternate one that unlocks you to go further.

Some people will tell you that there’s a geek gene, and that if you weren’t born with that gene then you’re screwed. I have never believed this, and nothing in the programming education research has convinced me otherwise.

Stay positive. Associate with people who want you to succeed.

Q: who are you, anyway? Why can you teach me programming?

A:

Q: will your book teach me how to make video games?

A: no. (There are other great Python books for that.) My approach is to start small and really dig into the core concepts that you need to know. To do this, it’s my belief that we need to focus on small programs and understand every single line of code that we write. Don’t worry: I plan to keep you engaged even without games and graphics. But by all means, you can take the background that LTC gives you and apply it to video games or whatever area of programming you’re interested in pursuing next.

Q: there are hundreds of Python books out there and I found one that I like better than LTC. Do you want to convince me to use LTC instead?

A: not really :D I want you to use the book that works best for you. Maybe that’s some other book, maybe that’s LTC, maybe that’s LTC first and other books later or in concert. (In particular, I encourage you to check out the other high-quality Python books published by my publisher No Starch Press.)

But I will say that LTC is not an ordinary Python book. And that’s because: I don’t consider it just a “learn how to use Python” book. I mean, yes, you’ll become proficient in the latest version of Python 3 by working through LTC. But my goal is to turn you into a programmer, period, not just a Python programmer. That’s why – in addition to all the Python stuff – we have discussion of good program design. That’s why we have discussion of program efficiency and big O. That’s why we learn about the value of sorting, binary search, data structures, and making your programs faster. My job is to equip you with the skills to become a programmer and tackle any programming language that you want to learn after Python.

Q: I see that you use programming competition problems in the book. I don’t care about programming competitions. Should I use LTC?

A: yes. Here’s why:

Q: Is LTC up to date with the latest version of Python?

A: yes. I’ve tested everything with the latest version of Python, currently Python 3.11. (Oh – and if you’re stuck with an older version of Python, you’ll be fine as long as it’s at least Python 3.6.)

Q: In the section of the book where you talk about email addresses and why two different email addresses might actually be the same, you ask readers to email you to say hi. Do you really want us to? Aren’t you busy with your work?

A: I do! (This is my work.) As a teacher, it may be the greatest compliment when someone (who could be doing a thousand other things) takes some of their valuable time to reach out, whether it’s to say hi or to make a suggestion or to ask a question. This book is written for you. Of course I want to hear from you.

Readers are getting very, mmmm, “creative” with what they send me based on the email addresses stuff :) I happily read it all. I may not be able to respond individually, but I will absolutely do my best, and I will make ongoing updates to this FAQ as well.