I love visiting high school and college classes to help students learn what it’s like to do software engineering professionally. 
 Recently I was a guest speaker in a local high school computer science class, and afterward got a great bunch of emails from the students.
I was recently asked: “What if you start a new job and their codebase is a mess?” 
 We’ve all been there. Here are some of the tactics I’ve used.
I love Django management commands . 
 For dpaste.com I’ve written several management commands for things that I don’t need a web UI for, like: 
 
 expire - delete expired pastes (invoked by cron) 
 expunge - manage TOS violations like spam 
 stats - useful metrics on the current corpus of pastes, and on user activity 
 
 In running the site I also use…
Python 3.8 (2019) added “ assignment expressions ”, aka the “walrus operator”. 
 I generally like things that make Python more expression-oriented, like list
comprehensions, but I’m ambivalent about these. It’s pretty easy to impair
readability by using them overzealously. Is saving one line of code worth
making it harder to notice that an…
I’ve replaced my Disqus comment integration with a Mastodon-powered solution. On posts where I’ve enabled comments, you’ll now see a “Load Comments” button and a “Reply” button, both of which talk to the Mastodon API. 
 Adding commenting to a static site is an interesting puzzle.
I enjoy writing tests because I love what they give me. 
 
 I love knowing that I’m adding defense against breakage from future changes. 
 I love thinking through how a feature is really supposed to work , and having the test capture that understanding. 
 I love thinking about edge cases that the code should handle, and writing tests for them — especially if it turns out that…
I can be kind of a stickler about leveraging the ticket/issue tracker in software projects (which always seems to be Jira these days, but nevermind that). I write tickets carefully; I link to related issues; I add comments to note the status of work in progress, or to record info that’s important to the work to be done.
(Note: this post presumes you have, or want, a CDN in front of your site, which not everybody does. If you are satisfied without one, this post may be moot for you.) 
 I recently came across WhiteNoise , “Radically simplified static file serving for Python web apps”.
My recent reinstall of Ubuntu 21.04 (to fix some driver problems) reminded me
there is more to the world than XMonad. I played with Gnome Shell 3 for a
day, and it’s all right. I don’t hate it (and I didn’t hate Unity either).
I’m quite fond of Mercurial, despite (though perhaps partly because of) using Git daily for the last ten years. 
 The first DVCS I used was Darcs , which I liked; then I tried Mercurial and liked it even more. That was 2007; I didn’t get my first job in a “Git shop” until 2010. 
 I’ve always found the Mercurial UX to be more pleasant than Git. Little things…
I came across an interesting CSS library the other day, awsm.css . It’s a CSS library with no classes . Its
focus is providing nice styles for semantic elements (i.e. not for
 <div> or <span> ). 
 It sounds like the motivating use case was wanting to style stuff coming
out of e.g. Markdown. 
 Your HTML source can read like 1995, but look prettier!
I’ve been a full-time remote worker since 2010. 
 The COVID-19 pandemic has brought big changes to things involving face-to-face contact – like going to an office for work. Since this sea change has gotten more engineers (and employers) to think about remote work, I thought I’d share some tips on how to find and keep remote gigs. 
 This was written with junior-level…
I migrated my blog from a Django system I wrote 12 years ago, to a static site generated via Hugo . 
 The move wasn’t just about getting out of an old codebase — it also was the result of seeing how static generation is a very reasonable fit for most blog sites (including mine). Dynamically generating the pages is really just one way to get the raw content rendered into my preferred form…
This past week I started playing with GatsbyJS , a static site
generator and framework centered around React. 
 I successfully used today it to generate a static version of this blog (I’m in the process of selecting the static site tool that will replace my vintage 2008 Django-based engine). 
 The componentization that
React brings isn’t much of a win for me here, i.e.…
I wanted to have a quick way to see what the other team members are doing, and after pillaging a half-dozen SO posts this is what I came up with. 
 git branch -va --sort=-committerdate --format='%(HEAD) %(color:yellow)%(refname:strip=-1)%(color:reset) - %(color:red)%(objectname:short)%(color:reset) - %(contents:subject) - %(authorname) (%(color:green)%(committerdate:relative)%(color:reset))'…
A couple weeks ago I accidentally replaced our live, production database with a 17-hour old snapshot. 
 I had intended to target a test server, not production. I didn’t realize what I had done for an hour or so, and by that time I had already left work. (I was actually out walking my dog. Not a good setting for managing a production crisis.) 
 Here’s how my team and I handled…
After a couple years of mostly using XMonad on my Linux machines instead of a standard Desktop Environmnt, I’m coming around to
using XFCE . I’ve always liked it; it’s been my installed “fallback” DE (for when you
need the damned settings dialog for some thing or other). Now
it’s becoming my primary. 
 I like the low resource use. I don’t…
You could say Z-80 assembly language is what really turned me into a software developer. 
 My first programming language was BASIC, which was built into my first computer (a TRS-80 Model III). I wrote a lot of BASIC code, including arcade-style games (compiled BASIC — you can still play them on this TRS-80 Model III Emulator ). 
 I always wanted to keep learning. There was no World Wide…
One of the hazards of working in the web biz is impulse-buying domain names. 
 Back in the Web 2.0 boom days, there were a lot of “social” web plays with silly names. 
 I thought I’d satirize this by registering numbr.com and making a social site where you could “friend” the number 7 and that sort of thing. 
 I never got around to building that site. However I did get a curious email…
noSQL is a big tent with lots of interesting tech in it. A few years ago at work I got an assignment to evaluate graph databases as a possible datastore for our 40-million-pageviews-a-day CMS. Graph DBs are elegant stuff, though not a particularly special fit for that application. Here’s what I had to say. 
 Graph databases are all about “highly connected” data. But instead…
(I recently posted this on Quora in response to a question along the lines of “Engineers, when did you decide to study Computer Science?”) 
 I have been a full-time software engineer for the last 7 years, and a part-time one for ten years before that. 
 I have never formally studied computer science. 
 It wasn’t an option before college (small high school in rural Vermont).…
(Note: This is a writeup I did a few years ago when evaluating Riak KV as a possible data store for a high-traffic CMS. At the time, the product was called simply “Riak”. Naturally, other details may be out of date as well.) 
 Riak is a distributed, key/value store written in Erlang . It is open source but supported by a commercial company, Basho. 
 Its design is based on an…
I really do like Quora (you may have seen my SadQuora tweets, a side effect of the time I spend there). But when somebody asked, “What are the most annoying types of questions on Quora?” I couldn’t resist. Maybe it’s just my feed, but I see things like these a lot: 
 
 I’m 23 years old, am I too old to learn programming? 
 If a self-driving car had to either hit…
When I first switched from OS X to Ubuntu for my daily development work, one of the things I missed a lot was Divvy . 
 “Window throwing” is the purpose of Divvy (and Spectacle , which I later replaced it with). With a single keyboard shortcut, I can make the foreground window fill the right half of the screen. Or the left half. Or the bottom right quadrant. Or the whole screen.…
Non-engineers want to know: what happens when a big bug is found in
your software, and the bug is causing real users real problems, and
you’re the one who wrote the code? 
 Engineers do sometimes write bad code, and sometimes it makes it into production, it’s true. 
 But shipping production software involves a lot more than writing
code. It goes beyond that one…
When we were growing our team of Python devs at CMG, I was involved in a lot of interviews. I really enjoyed it, meeting and hiring interesting and talented engineers. 
 I’m not a big fan of quizzing people on technical minutiae in interviews. I do think that asking some questions about technical likes and dislikes can be very illuminating though. 
 For example, “ What’s…
How do you comprehensibly explain to non-programmers the challenges of programming? Why can’t you “just tell the computer what you want it to do”? 
 A classic teaching tool for this is the “make me a peanut butter and jelly sandwich” demo. 
 Put out on the table a jar of peanut butter, a jar of jelly, a loaf of bread, and a knife. Tell them you are a robot…
I’ve been working as a remote software developer for over five years now. I gather that some outfits do this better than others. In case they’re useful/inspirational for anyone else, I want to highlight the key things that have made this workable for so long. The key idea: Treat your remote workers as first-class, full-fledged members of the team. 
 
 Have a chat server which…
First in an occasional series where I show how old I am by reminiscing about the ’90s World Wide Web. 
 Do you remember the Altavista search engine? I don’t mean the thing that Yahoo bought and buried. I mean the original 1990s version. 
 
 Altavista was an exciting game-changer when it arrived at the end of 1995. Web search had a lot of room for improvement.…
I’ve been reflecting recently on my twisty path from being a kid with a computer to being a grown-up who is (apparently) a bona fide software engineer. 
 My first computer was a TRS-80 Model III. It had a 1MHz 8-bit Z-80 CPU, 64KB of RAM, and two 5.25" floppy disk drives (after upgrades). 
 I used it to play games, write papers, and learn how to write software – mostly in…
(This is another thing I found myself writing on Quora and wanted to keep. The question was “Does Python have any scalability limitations?”) 
 “Scalability” is a term people like to throw around, but the less specific you are as to what you mean by it, the less substantial the answers will be. It is not a simple linear measure on which languages can be given some…
(Somebody on Quora asked about “traits that the best programmers seem to have”. Here’s what I said.) 
 Breadth of understanding . They are not dogmatic. They have used (at least in passing) more than one language, framework, operating system – and understand the strong points of each. 
 Communication skills . They can explain their decisions. They can write code…
Last summer I switched from OS X to Ubuntu for my day-to-day work. It’s gone well. Here’s a condensed rundown of some of the things I’ve noticed. 
 Things I miss when using OS X: 
 
 ctrl key on both sides of the keyboard 
 one-key app switching 
 System-wide package management 
 ctrl-alt-T default to bring up a new terminal 
 
 Things I miss when…
Once in a while I look at a sampling of recent dpaste activity. Partly I do it so I’m not totally out of touch with what my site contains. Partly I do it because it’s just interesting. 
 And I do it to confirm that the site is actually used by people who want to share code snippets, not just spambots who fire their cannons into every porthole. 
 I just sampled 10 random items…
In July, I switched from OS X to Ubuntu as my workday environment. For three years my personal MacBook Air had been pulling double duty, personal computer plus workstation at my job (each role with its respective user on the box). When the combined demands for disk space exceeded the 250GB SSD, I took that as a sign that it was time for a change. I work outside my office enough that an external HD…
Recently I switched my work environment from OS X to Ubuntu (a post on that project is in the works). 
 For years I’ve been using the standard Apple Keychain app, which has several points in its favor: it’s included with the OS, it integrates well with a lot of applications, and is not trying to “freemium” me into a paid tier. However, it’s OS X only, which meant…
Eight years ago, I launched a simple pastebin site written in Django. 
 In those early Django days I spent a lot of time in the #django IRC channel . I thought we should have a pastebin that knew how to correctly colorize our code, and which was written in our framework to boot. So I wrote one. Eventually its URL ended up in the channel topic, then in the Django source code itself . 
 Over…
O’Reilly Media recently asked in their “Programming Today” newsletter: 
 
 For many old-school software engineers, developing code has always been
as much an art as a science. But as the industry focuses more on
practices such as Test-Driven Development, and Patterns become the
lingua franca of programming, is there any room left for real creativity
in…
A little-known bit of trivia about our book, Python Web Development with Django : we wrote the manuscript in Markdown . 
 I think it was my idea. One of the major motivations for using a text-based format – versus the unfortunate de facto standard, Microsoft Word – was integration with good developer tools and workflow. 
 Our manuscript and all our project code was in a…
Today I’m launching my first Google App Engine site. While I built it largely to play with GAE, it is also useful in its own right (I like to think so anyway). It does two different things: 
 Link shortening without redirection. Put in a godawful long Amazon link and get back a shorter Amazon link. Works with eBay and a few others too. I welcome recipes for other sites. (For the…
I move between a couple different computers regularly: my old 12" PowerBook and the 15" MacBook Pro my job provides me with. Like all multi-computer users I periodically bump up against the challenges of what files (and versions) are where, especially when there’s work in progress. 
 To further complicate things, I also have an extra laptop running Ubuntu. And sometimes I just SSH to my…
At work I still mostly use Subversion for version control. Its main selling points: stable, performs as expected, integrates nicely with Trac, holds all our old stuff (legacy inertia). 
 Note that “pain-free branching and merging” is not on that list. (And don’t give me the old “branching is cheap in svn!” line. It’s not about the branching, it’s about…
Spam is occupying more than its customary share of my attention in recent weeks. I’ve long had a morbid fascination with sleazy human communication (hence Purportal.com ). That makes the always-relentless stream of spam, though not exactly welcome, at least interesting. 
 Spam volume also seems to have increased during this period. The number of spam attempts my mail server rejects per…
Among the many anti-spam measures on my mail server – which help me reject 5000 spam attempts per day – is SPF . SPF allows domain name owners to specify which mail servers are allowed to send its mail. That makes it an excellent way to detect address forgeries, a favorite spammer tool. 
 One of the early questions raised about SPF was: won’t spammers just buy their own…
I’m still loving my iPod touch. It’s really a great little handheld computer. I’m able to do almost everything I need with the stock apps, but there are a couple free third-party apps that have earned a permanent place on it. One is the game Chess With Friends from NewToy . 
 This is a version of what is also known as “postal” or “correspondence”…
This evening, the Western Mass. Developers Group was treated to a talk by Ben Fry of Processing fame. It was excellent and inspiring. Having not much prior exposure to Processing or his work, I left hungry for more. (The title of this post is taken from the name of the group at the MIT Media Lab where Fry did his PhD work.) 
 I liked the graphical- REPL flavor of his live demos. Surprisingly,…