The earliest memory I have of ‘programming’ is in the early/mid 90s when my father brought home a computer from work. We could play games on it … so of course I took the spreadsheet program he used (LOTUS 123, did I date myself with that?) and tried to modify it to print out a helpful message for him. It … halfway worked? At least I could undo it so he could get back to work…

After that, I picked up programming for real in QBASIC (I still have a few of those programs lying around), got my own (junky) Linux desktop from my cousin, tried to learn VBasic (without a Windows machine), and eventually made it to high school… In college, I studied computer science and mathematics, mostly programming in Java/.NET, although with a bit of everything in the mix. A few of my oldest programming posts on this blog are from that time.

After that, on to grad school! Originally, I was going to study computational linguistics, but that fell through. Then programming languages (the school’s specialty). And finally I ended up studying censorship and computer security. That’s about where I am today!

But really, I still have a habit of doing a little bit of everything. Whatever seems interesting at the time!

Chess Puzzles 1: Get moving!

Here’s something I haven’t done much1: chess puzzles! I’m still not sure entirely what I think about the game in general. There is certainly quite a lot of strategy, which I like, but to really get good at chess, there’s also some amount of memorizing openings and closings. That’s something I’m a little less thrilled with.

Still, it’s the perfect sort of came to work out programming exercises with. It’s a game of perfect information, so you don’t have to deal with what a player knows and doesn’t. The pieces have well defined, regular moves2 There’s a fairly intense branching factor, but not insurmountable–Deep Blue (chess computer) proved that.

Anyways, enough chatter. Let’s play some chess!

read more...


Number words

Today’s five minute post brought to you via Programming Praxis / Career Cup:

Given a positive integer, return all the ways that the integer can be represented by letters using the mapping 1 -> A, 2 -> B, …, 26 -> Z. For instance, the number 1234 can be represented by the words ABCD, AWD and LCD.

read more...


Onwards and upwards

Huh. Things suddenly look a bit different around here, don’t they?

Long story short, I finally finished a project that I’ve been working on off and on for the better part of two years: converting my blog to a static website.

read more...


Updating dotfiles

After all of these updates to my dotfiles, I finally want something that I can use to keep them up to date. For that, let’s write a quick script that can do just that.

read more...


Regex search and replace

Another random task that I find myself doing distressingly often: performing a regular expression search and replace recursively across a bunch of files. You can do this relatively directly with tools like sed, but I can never quite remember the particularly flavor of regular expression syntax sed uses.

read more...


Git aliases: undo, ud, and wipe

A few new git aliases:

  • git undo - Undo the most recent commit, unstaging all new files
  • git up - Update remote branches and submodules, delete merged branches
  • git wipe - Remove all current changes, saving as a seperate branch

read more...