links for 2008-03-11

  • Renderman was the first interview on the latest Hak.5 podcast. He has some interesting article that I need to browse through.
    (tags: security)

Two Bad Mothers That You Don’t Wanna Mess With

As previously mentioned, I am going to learn how to create pixel art. I set my limits, and have decided that I need to build some sort of basic shooter before tackling something more appealing.

This first picture details one of the scariest monsters in the known pixelverse:

The Invader

But no worries! The Earth may be saved yet! Our hero is the captain of this rockin’ space tank:

Our Hero

Both of these are 16×16 pixels, but expanded for this post’s purposes. I have some of the basic game mechanics worked out, but have done some Something Bad TM with malloc somewhere… but have yet to find it. I will be firing up GDB shortly to investigate.

Easy Mecurial Repository Sync

I’ve been using Mercurial for a little while now to manage my own small projects, and have always treated the copies on my server as centralized. I would build a repository on the server, do my work from whatever system I was on at the time, and push my changes back over ssh when satisfied.

This started to be a hassle for me as I began to add repositories. I’d forget the names, have to ssh in, find the names, and then run a clone from my machine. It takes too much time, so I wrote a little shell script to do all of that for me.

It is not magical. It checks the source server for new repositories, and clones them to you if it finds any. After that, it cycles through all of your repos and performs an ‘hg pull’ followed by an ‘hg up’.

It makes the assumption that you are hosting all of your repositories in a single directory on both ends. I also recommend that you use keys for authentication and have a key agent running on your local box to avoid having to type your password during each transaction.

#!/bin/bash
 
SRC_USER=michael
SRC_SERV=styledbits.com
SRC_DIR=code
DEST_DIR=$HOME/code
 
mkdir -p $DEST_DIR
 
for x in $(ssh $SRC_USER@$SRC_SERV "ls $SRC_DIR")
do
  if [ ! -d $DEST_DIR/$x ]
  then
    hg clone ssh://$SRC_USER@$SRC_SERV/$SRC_DIR/$x $DEST_DIR/$x
  else
    cd $DEST_DIR/$x && hg pull && hg up
  fi
done

Growing Through Self-Imposed Constraints

When trying to do something creative, I tend to shy away from tools that advertise unlimited possibilities. As an example, I would much rather bang out basic drums and beats with an MPC1000 than with any software sequencer. I like to know that my device has built in limits, so I can learn how to work within them and bend the rules. Likewise, when I write a more traditional song, I prefer to start figuring things out with an acoustic guitar. This allows me to make sure the concept actually stands by itself and that I’m not getting lost in the hypnotic warmth of tube overdrive and Crybaby wah-wah pedals.

Since I’m doing some hobby game development and have zero experience in the graphic arts, I have to do something similar. If I try and make something like a 16-bit era Zelda or Final Fantasy II clone, I’m doomed. I can write the code, but I cannot do the artwork. In college I wrote one of these, but ‘borrowed’ the tile sets. That’s not right. I want whatever I produce next to be my own for better or worse.

I have to start small and simple, and am therefore setting my ‘canvas’ resolution to 320×200 at 16 colors - the same as the classic EGA mode Sierra adventure games. 16 colors may not sound like much to work with, but the heroes of old were able to do some magnificent things.

A Few Notes for a Rainy Saturday

A post to explain the ongoing of my current life to my future self and whomever else is interested:

  • Brett and I now have 20 gallons of beer brewing in my apartment. Wow. We bottled a batch this morning, have one in a secondary fermenter, and just cooked up two new ones. Saweet!
  • My favorite album these days is Cassadaga by Bright Eyes. This is Conor Oberst’s best album yet. His vocal style has matured, but still invokes that somewhat uncomfortable feeling in the listener as if they are prying in on someone’s personal life.
  • I just finished The Art of Learning by Josh Waitzkin. One of the more interesting parts of the book is his explanation of incremental vs entity learning styles. Those who treat a given problem as a challenge that can eventually be overcome with the right application are incremental learners. Those who make all or nothing statements such as “I am good at computer programming” or “I am not a good artist” are entity learners. Judging from myself, it appears that I do a bit of both. I love tough challenges in technology, but do lock myself out of certain other skill sets.
  • I have familiarized myself with the basics of the Allegro C game library, have made a silly sample application, and am ready to do something more. I have the basics of an idea, but don’t have any artwork to start prototyping. I would normally say ‘I am not good at graphic design’, but since I’m going to try and wipe out those patterns (see previous bullet point), it is time that I start working to create my own pixel art.
  • I have been doing daily meditation for over six months now, and an abbreviated yoga exercise for two. There have been definite changes in my psychological and physical state. My acid reflux and dry mouth (both of these have been with me for over 10 years) have vanished. My stress level has been generally reduced, and I am learning more and more about myself all of the time. All of this for about 30 minutes a day.
  • I think that I’ll be safe to start some vegetable seeds in my windows next weekend in preparation for transplanting them outside. This is my first serious attempt to do this sort of thing, so we shall see. Perhaps this will turn out to be like my beer brewing experience: you start out stressed about the details, and over time you begin to mellow out and just make it happen.
  • A plan is being formulated to migrate Michael on Security to a standalone Wordpress installation (rather than the Wordpress.com hosted platform), and there is a possibility that I’ll eventually collapse it into Styled Bits. One step at a time, though.