
Updating Python
MP 147: How do you clean up when you have too many Pythons lying around? About a year and a half ago, I wrote a post about how to update the version of Python you're using locally. I was hoping that would be a guide I could refer
MP 147: How do you clean up when you have too many Pythons lying around? About a year and a half ago, I wrote a post about how to update the version of Python you're using locally. I was hoping that would be a guide I could refer
MP 146: What happens when the bug actually is in one of your project's dependencies? Note: This post is part of an ongoing series about debugging in Python. The posts in this series will only be available to paid subscribers for the first 6 weeks. After that they
MP 145: Why third-party code appears in tracebacks, and what you can learn from it. Note: This post is part of an ongoing series about debugging in Python. The posts in this series will only be available to paid subscribers for the first 6 weeks. After that they will be
MP 144: What happens when you fix a bug, only to find another bug right away? Note: This post is part of an ongoing series about debugging in Python. The posts in this series will only be available to paid subscribers for the first 6 weeks. After that they will
MP 143: How do you find a bug in a larger project? Note: This post is part of an ongoing series about debugging in Python. The posts in this series will only be available to paid subscribers for the first 6 weeks. After that they will be available to everyone.
MP 142: Conference "open spaces" are a great place to get valuable feedback about new projects. Note: The debugging series will continue shortly. I spent a full week at PyCon, and my son graduated from middle school the day after I got back. Life has been busy. :) I
MP 141: Advice from a climbing guide that's quite relevant to programming. Note: The debugging series will continue shortly. I'm busy getting ready for PyCon, and haven't had time to finish the next post in that series yet. Since moving to North Carolina last
MP 140: How can we take a systematic approach to a "simple" bug? Note: This post is part of an ongoing series about debugging in Python. The posts in this series will only be available to paid subscribers for the first 6 weeks. After that they will be
MP 139: A systematic, inquisitive approach makes debugging simple issues easier, and complex bugs possible. Note: This post is part of an ongoing series about debugging in Python. The posts in this series will only be available to paid subscribers for the first 6 weeks. After that they will be
MP 138: Debugging is often learned "on the job", but you can learn a lot with structured practice. Note: This is the first post in a series about debugging. This post is free to everyone, but the remainder of the series will be available to paid subscribers only
MP 137: I just learned about the webbrowser module; maybe it can save you some work as well. Note: I'll start a new series about debugging on Thursday, April 3. The series will cover a variety of debugging tools and techniques, and will also offer a focused way
MP 136: I don't use it often, but I keep coming back to it. The walrus operator was introduced in Python 3.8, back in 2019. I haven't used it often over the last five years, but occasionally I find myself writing some code that looks
MP 135: They're focused on .gov right now, but I'm pretty sure they're coming for all of us. I can't believe I have to use the name DOGE seriously. When I first heard a new government organization would be formed with that
MP 134: Be careful about performance assumptions until you measure them! Note: In the next few weeks, I'm going to slow the pace slightly on Mostly Python. I've been writing at least one post per week for two full years now. I really enjoy writing these
MP 133: Naming things is hard, but renaming things can be even harder. I've been steadily working through the remaining issues that should be closed before the 1.0 release of django-simple-deploy. One of the last things to address involves reconsidering a name that's used throughout
MP 132: It's a simple built-in function, but using it isn't as straightforward as it might seem. A task that's come up repeatedly in my programming work involves looking through a collection of values, and taking an action if a specific item appears anywhere
Git
MP 131: It seems like Git is always more capable than I realized. I've been using Git for almost 20 years now, and I still discover new ways to use it more effectively. I really appreciate a tool that has more to offer every time I use a
real-world projects
MP 130: How do you make a reasonably secure access code for an electronic door lock? We recently moved into a new house, and one of the first tasks after moving in is to change the locks. Rather than just rekey the existing locks, we decided to install electronic locks.
reflections
MP 129: Highlights from 2024, and what's to come in 2025. I've been writing Mostly Python for two full years now. I started it in order to write more regularly about Python, and about a wide range of topics from the perspective of a Python user
real-world projects
MP 128: Sometimes a try-except block isn't the best approach for handling missing attributes. In Python it's often reasonable to try doing something, and then respond appropriately if that action doesn't work. This is the "ask for forgiveness rather than asking for permission&
Git
MP 127: How do you make sure you've cleaned up all your diagnostic code? I've been doing a bunch of refactoring work on a moderately sized project recently. I'm always looking for ways to work more efficiently, and use tools like Git better. It&
GitHub
MP 126: How do you make a GitHub task list for reviewing all functions in a file? I've been steadily working on bringing django-simple-deploy to a 1.0 release, and this has involved a lot of refactoring. At some stages of development, I want to do a quick
reflections
MP 125: I would argue it was discovered, and that's a helpful distinction. There's no doubt that regardless of anyone's opinion about whether AI is useful or not, it's disrupting many industries, and will continue to do so. The distinction between invention
Selenium
MP 124: It should be simple to do, right? We're in the process of buying a house at the moment, and we want to keep a copy of the pictures on Zillow that show how the house is currently set up. Lots of people want to do this,
real-world projects
MP 123: Modeling mortgage loans, to help make clearer financial decisions. We're in the process of buying a house, and whenever we go through this process I spend a lot of time looking at all the different options about taking out such a significant loan. I always do
reflections
MP 122: And why I like them so much. Something people new to Python don't always understand well is the role of "third party" packages in the ecosystem. People learn the basics of Python, and then they want to do something that requires functionality that'
reflections
MP 121: It always has been, and it sure is now. I was going to write about how much I like third-party ecosystems such as PyPI this week, and what you should know about them. But writing generically about software development at this moment feels like burying my head deep
real-world projects
MP 120: I rarely play the lottery, but when I do I like to model it afterwards. I've written recently about surviving a pretty serious medical event and then making it through a hurricane with some life interruptions, but no significant harm. When I was in the hospital,
Django
MP 119: How do you keep learning about Django? Note: This is the 20th (and final) post in a series about building a full Django project, starting with a single file. This series is free to everyone, as soon as each post comes out. This was a much longer series
Django
MP 118: Deploying a simple Django project. Note: This is the 19th post in a series about building a full Django project, starting with a single file. This series is free to everyone, as soon as each post comes out. In the last post, we did some final reorganization of
django-simple-deploy
MP 117: How often do you write a new, moderately complex library from scratch? Note: Our power was just restored yesterday afternoon, so we ended up going 12 days without power or running water. Internet service is still a week or two away. I've been able to get
reflections
MP 116: ...and into the fire, as the saying goes. Note: I think this post was published yesterday, but not sent as an email to anyone. If you received this twice as an email, I apologize. Mostly Python just passed 5,000 subscribers, which required an update to my Ghost