Tag Archives: Programming

First Seven Languages

My #FirstSevenLanguages: BASIC – I remember programming BASIC on my parents’ IBM PC around the age of 6. For a long time it was mostly copying simple code from books and writing tight for loops. Eventually I progressed to QBASIC and some simple graphics stuff. C – My dad taught me C when I was [...]

JavaScript Flickr carousel

My wife and I made something a couple of weeks ago, and her name is Simone. Our families and some friends want to see lots of pictures, but most people don’t want us to flood their Facebook feeds with baby photos (nor do we want to). So we’ve been uploading them to Flickr mostly, but [...]

A bunch of sort algorithms

Whenever I’m trying to get back into the swing of building and optimizing and evaluating algorithms, my first step is always to write a whole bunch of sorting implementations. I’m also trying to improve my knowledge of the core syntax of python. So here are four sorts in python: insertion, merge, heap, and quick. (The [...]

Choosing random keys

Say you had code that generated random keys. These random keys were 6 letters long, all caps, with no duplicates. Here’s a few, as an example: NTCYAR DHIEWM INBVTX IOELUC RKNBJX GKRANB DRYVQU YIFKTS VAUPSG ALWPOS CERSUY WAHJVM MTXJSZ RNLFXZ VFIEXT VEOKIH What are the chances that the key that you generate will be in [...]

Watching every MLB team play a game

Last April, to no one in particular, I asked the following question: “What’s the shortest possible trip (in miles) to see every MLB team play at least one game this season?” It became clear, after a brief discussion with some friends, that the shortest possible trip is somewhere on the order of a hundred miles. [...]