My Programming Projects and Progress in 2020
Back in 2019, when I did my programming retrospective I made a few predictions. How did those go?
- Work on my Extra Life Donation Tracker? Yup! See below!
- Write more C++ thanks to Arduino? Not so much.
- C# thanks to Unity? Yes, but not in the way I thought. I only did minor work on my game, but I did start a new GameDev.tv class.
- Learning Ruby? Well, I wouldn’t necessarily say I learned Ruby. I did finish the book Ruby Wizardry and I took copious notes. But until I do some practice - maybe via some code katas, I don’t think I’ll have solidified it in my mind.
- 3D Game Dev? Nope, not really.
- Rust and Go? Not even close. Although I did make sure to get some books on the languages.
So, what happened? On the programming front, I wanted to continue my journey to truly master Python after having used it at a surface level for the past 15ish years. I dedicated myself to doing the Python Morsels challenges (more on that below) and working through various Python development exercises. Outside of programming, the time I had off from COVID was used to play with my kids and they wanted to play lots of video games. So we took advantage of having way more time than usual to do that. So a lot of my goals slipped. We’ll get to 2021 predictions at the end, so let’s take a look at 2020!
PyGame 2.0 is out!
I just found out today that PyGame 2.0 was released yesterday, on the 20th anniversary of the software. One of the first steps I took with Python was a series of games I made from tutorials in Linux Format Magazine. On Github I’ve got my shifter game and my Space Invaders clone. The shifter game is a little wonky since I haven’t touched the code in over a decade. But I was able to make the one shift needed to make the Space Invaders clone work on Python 3. So you can enjoy those and celebrate that PyGame development has picked up steam again.
Last few weeks in Programming: Python, Ruby
You may notice it’s been a while since I last wrote about programming. Well, a lot of the programming I was doing with the kids was due to having more time on my hands thanks to COVID. With Scarlett back in school full-time, there’s a lot less time for that as we focus on making sure she gets the most out of her education as well as teaching the twins to make up for not being in preschool this year. This has left me with reduced time for all my projects and entertainment (games, TV, and reading). Up until now that has meant the programming was put off to the side - kind of. Because I’ve been loving my exercises from the Python Morsels website and I’ll be talking about that when I get to the Python section. But first up, Ruby!
Last Few Days in Programming: Python and Arduino
Python
Spent the last few days finalizing the 5.0 release of my Extra Life Donation Tracker and then pushed ahead to get version 5.1 out. Here’s the PyPi page if you want to use it for your Extra Life live streams.
Arduino
I got back to my BBQ Themostat project and did some minor programming while trying to figure out how to run a computer case fan. So far I’m still working on the wiring aspect of this part of the project, but some folks on reddit did point out that part of my problem was getting a pair of my BJT connections mixed up.
Last Three Days of Programming: Python
I’ve mostly been working on version 5.0 of my Extra Life Donation Tracker. Since I adopted the Semantic Versioning principle for the project, an API change means a major version change. I’ve been taking everything I’ve learned about Python programming from 2019 and 2020 and tried to make my code both more Pythonic and more sophisticated. I’m also trying to move towards 100% code coverage. That is to say, I’m looking to try and make sure every line of code is covered by a test. While 100% test coverage doesn’t guarantee perfect code (after all, the test itself could be flawed or I might not be considering corner cases), striving for it usually has a few benefits:
Coming Full Circle: Contributing to the Python Project Matrix-Nio
Somewhere around 15 years ago, I started learning Python because I’d gotten deep into genealogy and started using the free and open source project Gramps. As I was also pretty deep into free software (somewhere around that time I became a supporting member of the FSF for a few years - and I think my smile.amazon.com still donates to them) I got interested in the idea of helping projects by contributing code. Python seemed like it wasn’t too hard to learn (compared to C++), so I started learning. I never did end up contributing to Gramps as I found GUI programming incredibly hard. In fact, it was something like 6 years ago before I created some useful GUIs (that weren’t copied out of tutorials) and only last year that I started making good, competent GUIs using the QT toolkit.
Milestones reached in two of my Python Projects
For my btrfs snapshot program, snapintime, I have reached version 1.1.1. About six years after starting this project, it now covers all the cases I wanted to back when I started. I’m very happy with where it’s now at.
For my Extra Life Donation Tracker ( PyPi page here), I’ve reached my v4.2.0 release. This release fixes some of my oldest issues (#s 13 and 14 - while the current highest issue is #95), and allows users maximum flexibility in the way they want to set up their tracker window. They can change the font face and color of the text that displays the latest donation and they can change the background color if chromakey green doesn’t work for their use case.
My Photostats Python Program
11 years ago (HOLY MOLEY WHERE DOES THE TIME GO?!?) I wrote about Jeffrey Friedl’s LR Stats plugin. As you know if you’ve been around my blog for a while, I love stats! It’s the biggest reason I do my end of year posts with my music, reading, and video game stats. Well, I haven’t used Lightroom for a few years now, and for some reason I was inspired this past weekend to recreate this ability. So I started on photostats, which will present a lot of the same stats that his Lightroom plugin does. On the plus side, my Python program is app-agnostic!
Hey, Pycharm, hey.
Back in September I wrote about moving to KDevelop for my larger Python projects and also staying with Kate for my smaller projects. I’ve REALLY been enjoying all the features as I work on more and more complex packages involving lots of files. But for a few episodes of Python Bytes now (and/or maybe Talk Python to Me - they share a host) they’ve been talking about how awesome it is to use an IDE that has a Python debugger built in. It may be that KDevelop has that ability (I’m pretty sure it does for C++), but I’m not sure. I am nearly certain that Pycharm does have a debugger built-in. A while ago I’d set up the Pycharm COPR repo on my laptop. I tried playing with it a little at the time, but I was coding on a very small project without a venv, so things didn’t work out well. (Pycharm is pretty opinionated about the way a Python project should work)
My first PyPi Package!
I was reading Serious Python by Julien Danjou as well as looking through other Python repos when I realized that my Extra Life Donation Tracker repo was a mess. (It’ll be different by the time you read this, but here’s how it looked at the time) After learning about how things should be structured and reading Mr. Danjou’s book about how I could use Sphinx to auto-document my code, I decided to undertake the challenge. However, there was a lot to learn and this code is used by many others for their Extra Life campaigns. I wanted to start off with much simpler code, so I started off by packetizing my lastfm-twitter code. It was a fun journey over the last week or so as I learned how to restructure my code and auto-document. (I also learned a lot about how to use Drone CI, which I’m using for my home projects that aren’t on GitHub) As the final lesson, I taught myself how to create a package for PyPi via Drone CI and so, I now have a PyPi package that anyone can import with pip!