October 2011
2 posts
Procedurally Generating Images in the Style of...
Introduction Piet Mondrian was a Dutch painter. His paintings with orthogonal lines and rectangular splashes of primary colors on white backgrounds are very recognizable. I wondered what it would take to programmatically generate Mondrian-esque images. Here’s what I came up with. The Algorithm The algorithm operates on a two-dimensional grid. Initially, the grid is empty (white or...
Oct 26th
5 notes
Ricochet Robot
My friend introduced me to a board game called Ricochet Robot (or Rasende Roboter in its original German form). It’s a fun game, but I found it even more fun as a programming problem. I implemented the game in Python, including a user interface and a solver. After that, I sped up the solver tremendously by porting it to C. The Rules The board is a 16x16 grid. It is made up of 4...
Oct 3rd
3 notes
August 2011
5 posts
If I'd Had the Internet...
I learned how to program at a young age. My dad bought a Commodore 64 when I was probably 7 or 8. I learned very basic aspects of the BASIC programming language. You know… 10 INPUT "What is your name?"; NAME$ 20 PRINT "Hello "; NAME$ 30 GOTO 20 When I was a little older, we had a Tandy 486 with Windows 3.1 and I spent a lot of time playing around with QBasic. The only resource I had to...
Aug 10th
I'm not an "IT Guy"
The minute someone finds out I’m a software developer is the minute someone asks me to help them with their computer problems. Or I might be referred to as an “IT Guy.” This is something of a pet peeve for me. I generally try to avoid these situations altogether. It’s usually something like this: Person: “So what do you do?” Me: “I’m a computer...
Aug 9th
2 notes
Traffic Lights
When I was a kid, I had a mild obsession with traffic lights. I built models of them with my lego blocks. I dreamed that they were controlled by people who lived in the electrical boxes at each intersection, who had to shout at each other to stay in sync. I also sketched top-down drawings of roads and intersections. As an adult, I still find traffic control interesting and I loathe inefficient...
Aug 8th
Aug 8th
Hello, tumblr.
Aug 8th
1 note