I’m a Unix guy, but the participants in my Python classes overwhelmingly use Windows. Inevitably, when we get to talking about working with files in Python, someone will want to open a file using the complete path to the file. And they’ll end up writing something like this: filename = ‘c:\abc\def\ghi.txt’ But when my students…
If you have children, then you probably remember them learning to walk, and then to read. If you’re like me, you were probably amazed by how long it took to do things that we don’t even think about. Things that we take for granted in our day-to-day lives, and which seem so obvious to us,…
Hi! I’m in Cleveland, Ohio, for PyCon 2018. I’ve already heard back from others who are here for the conference, and will be coordinating with all of you privately to meet up in person. I’m excited to meet (and learn from) lots of other Python developers from around the world! To celebrate the conference, I’m…
I’ll be attending PyCon 2018 in Cleveland, Ohio later this week — from Friday morning through the first day of sprints on Monday. I’m hoping to meet lots of people from the worldwide Python community — as well as readers of Linux Journal, listeners to the “Freelancers Show” podcast, people who have attended my training…
I’ve been teaching Python for many years now, and it never ceases to amaze me to discover just how many people are able to use Python without ever having really learned it. In particular, there are lots of people writing and using Python objects who assume that classes and instances in Python work just like…
As you may know, I’ve been a panelist on the Freelancers Show podcast for a few years. It’s one of the high points of my week to chat with my co-panelists, discuss various aspects of freelancing/consulting, and to interview interesting people who can help us improve our freelancing careers. I’ve been consulting since 1995, but…
What’s the hardest part of Python to understand? For nearly 20 years, I’ve been teaching Python to engineers at companies around the world. And if I had to say what most confuses my students, it’s list comprehensions. And yes, if you’re wondering, set and dict comprehensions are equally confusing. Comprehensions are both powerful and compact.…
Ah, Git. It’s one of the best and most important tools I use as a software developer. Git is everything I want in a version-control system: It’s fast. It lets me collaborate. I can work without an Internet connection. I can branch and merge easily, using a variety of techniques. I can take a personal…
Within minutes of starting to learn Python, everyone learns how to define a variable. You can say: x = 100 and voila! Your You have created a variable “x”, and assigned the integer value 100 to it. It couldn’t be simpler than that. But guess what? This isn’t the only way to define variables, let…
I recently asked subscribers to my free, weekly “better developers” newsletter to send me their Python programming questions, promising that (a) I’d try to solve them, and publish the result to YouTube, and (b) anyone who submitted a problem that I selected would then get a coupon for 30% off of any of my books…