Canadian author and pythonista.

Dusty Phillips Codes

last update:

Parts in this series An Order to Learn to Program, Part 1 An Order to Learn to Program, Part 2 An Order to Learn to Program, Part 3 An Order to Learn to Program, Part 4 An Order to Learn to Program, Part 5 Part 5: Beginner programming, dynamically typed This is part 5 in my series on the order to study topics related to programming. This series aims to provide a gentle path to follow as they explore this fascinating field.

The venerable RSA public key encryption algorithm is very elegant. It requires a basic understanding of modular arithmetic, which may sound scary if you haven’t studied it. It reduces to taking the remainder after integer long division. The RSA Wikipedia article describes five simple steps to generate the keys. Encryption and decryption are a matter of basic exponentiation. There’s no advanced math, and it’s easy to understand their example of working with small numbers.

Parts in this series An Order to Learn to Program, Part 1 An Order to Learn to Program, Part 2 An Order to Learn to Program, Part 3 An Order to Learn to Program, Part 4 Part 4: Binary, bits, and bytes This is part 4 of my series on the order to study topics related to programming. This series aims to give people a gentle path to follow in order to be able to dabble in this field.

Whenever I start a new hobby web project, I just want to jump in and start coding. Instead, I spend many many hours trying to get authentication to work. I’ve got half a dozen half-finished “boilerplate” projects lying around that were supposed to satisfy the desire of, “next time, I can use this boilerplate and authentication will just work.” It never does. One thing I know I don’t want to do is manage my own auth database anymore.

Parts in this series An Order to Learn to Program, Part 1 An Order to Learn to Program, Part 2 An Order to Learn to Program, Part 3 An Order to Learn to Program, Part 4 Part 3: SQL Basics It’s not common to see SQL as the next language taught after HTML. Most authors would jump to a full-fledged structured programming language like Python or Javascript instead.

My wife and I both have a tendency to leave the garage door open. You’re in and out, grabbing garden tools or supplies, and at the end of the day you enter the house through the back door and forget to check the garage. Luckily, we live in rural Canada, surrounded by wonderful people, where the door could sit open for days without anything “disappearing”. But it still makes me feel nervous to discover it’s been forgotten, if only because it is a waste of heat in the winter (not to mention the chance of blowing full of snow!

I really appreciate Python’s pathlib module for managing filesystem stuff. While I don’t love the argparse module for command line parsing, I don’t think it’s worse than other available options. I usually choose it for my CLI scripts, since nothing else is good enough to overcome the inertia of using a third party library. Not many people seem to be aware that the two can very easily be combined such that argparse will return Path objects instead of strings that need to be adapted after you query them:

Parts in this series An Order to Learn to Program, Part 1 An Order to Learn to Program, Part 2 An Order to Learn to Program, Part 3 An Order to Learn to Program, Part 4 Part 2: HTML This is the second in a series on the order to study topics related to programming. There are countless resources out there for learning to code, so many that it becomes overwhelming to decide where to start.

I accidentally started working on a new personal project for budgeting that I think others might be interested in. I haven’t open sourced any projects in quite a few years now, but if I actually finish an iteration of this project, I think I’ll probably share it under an open licence. While I’ll be running the service locally, it is implemented entirely in Javascript React, and could easily be deployed as a SAAS.

Parts in this series An Order to Learn to Program, Part 1 An Order to Learn to Program, Part 2 An Order to Learn to Program, Part 3 An Order to Learn to Program, Part 4 Part 1 Learning to program is hard. There are a few reasons this is the case: Programming itself is hard. However, this is less true than most people believe. Programming professionally is pretty difficult.