30 30 Second Songs In 30 Days
June 30th, 2009My friend Judah and I are going to collaborate on an album of 30 30 second songs, and will be releasing it August 1st, 2009.
My friend Judah and I are going to collaborate on an album of 30 30 second songs, and will be releasing it August 1st, 2009.
A friend and I were talking about deadlines, as we’re often thrown into a rushed project together, and I came up with this equation which seems to accurately model a coming deadline in the information industry.
Lately I’ve been working on a game with some of my free time. It’s a slow process made a little bit faster through the use of Box2D, which is a great 2D physics lib. In my game the user controls a robot that wheels around and smashes other robots. I decided that I would write some functions for drawing geometric primitives, and that I would draw everything into one sprite, or two, depending on how many layers I’d need. In an attempt to squeeze out some more frames per second I switched these functions over to use flash 10+ IGraphicsData API. It’s interesting, to say the least. When using the new API we loose the ability to easily draw rectangles and circles. We can still use familiar functions like moveTo, lineTo and curveTo – so I’ve written a function that draws a circle using these. It uses some fun almost calculus [parametrization of a curve in so many points] minus any derivatives or integrals. Is that still calculus? Meh. Here’s what happens:
We create a new GraphicsStroke [the line], a new GraphicsSolidFill [the fill], a new GraphicsPath [the path] and an IGraphicsData Vector to store them all in.
Now what we’ll need to do is populate the path with some commands and some points. To do this, we can use GraphicsPath’s familiar functions moveTo, lineTo and curveTo. These functions will fill path.command and path.data with commands and data, respectively. The parameters to each command are stored in the data array, where as a number representing each command are stored in the command array. You can read more about it here. So here is a function that will fill your path with points and commands to form a circle.
In this function _x and _y represent the center of the circle, r is the radius and path is your GraphicsPath. numPoints refers to the number of points you’d like to use for approximating your circle. The more points, the more “perfect” the circle will look, although more points will tax your frameRate. We can get a pretty nice looking circle with 8 points. 4 looks a little boxy, but around 8 is nice. Experiment. Here’s the next step – we’ll add the points to our path and then add the stroke, fill and path to our Vector and then have a sprite draw our graphics data:
This should draw 4 circle approximations of different resolution. This is what it looks like:
You can see that as n [numPoints] increases, the closer to an actual circle our object becomes. I hope this entry helps some of you out there save a little time.
I bought a new monitor today – a Hannspree 23″. I only paid about $180 for it, so it seemed like a sweet deal. TOTALLY WRONG. This thing hurts my eyes it’s so sh*tty. Some pixels are sharp, others are blurry. It’s like the monitor itself is stretching and interpolating the pixel points from my video card. Text is UNREADABLE on most resolutions and no amount of settings fidgetry seems to fix it. The pixels just don’t line up. This thing is auto-dithering my pixel art. I’m taking it back tomorrow and getting my money back. I’d rather have a used, scuffed up LCD from two years ago. Tried and true.
Over the past month or so I’ve been having some hosting issues – my cats would attack the server, some how it would get unplugged, etc. So now I’ve switched everything over to hosting at Mediatemple.net, which seems pretty awesome so far. So here’s to no more downtime, 404s or 500s and hopefully instead we’ll get some 808s. *cheers*
A while ago I wrote a script that formats gcc output to link errors back into TM. I updated that script with support for warnings and added some cool looking construction theme colors for the errors and warnings. Have a look see.
I wrote a little update script for my server to auto update my wordpress installation and figured it might help some other people as well. To use it you simply supply as arguments to the script three things:
1. the directory where your wordpress install lives
2. the name of the backups you’d like to create for that directory
3. the version of the wordpress install you’d like to upgrade to
For example, on my server I use this command to update my wp version:
sudo ./updateWordpress.sh /path/to/wordpress/installation efnx 2.7.1
[enter password]
[watch output]
done!
Here is the code to my script:
Or you can just download the script here [rightclick + 'save as']->
updateWordpress.sh
My bike up until this point has been a borrowed SR Maxima 
which belongs to my friend Chris [Chrispy Finch Fry!]. While he was living as a nomad I became the caretaker of two of his prized possessions: his bike and his goldfish [see Figure (B) ]. Since then I’ve continued to use his bike and take care of his goldfish.
Until today! My parents came up North [from LA] this weekend to deliver my grandfather’s washer/dryer tower and brought with them my Dad’s old road bike. It’s an Austro-Daimler SuperLeicht from somewhere in the 70′s. Vintage ace. I went to the shop today and picked up a nice Brooks saddle for it. Looks sharp.


Originally it was a 10 speed, I believe, but one day my Father had some problems with the shifter while riding and when he got home he took it down to a single speed. I like it. The simpler the better. I don’t live in SF, so I don’t need a ton of gears.
The accessories are all vintage Campagnolo, aquired piece by piece in the 70s by my Dad. The next step to making this guy look really nice is some new tan bar tape.
The OLPC [One Laptop Per Child] Foundation is starting their annual Give One Get One campaign on November 17th! Last year I donated a laptop and got mine in the mail a few months later. It’s not the fastest computer, but it’s cute and rugged and novel [did I mention hackable?]. One laptop only costs $199, and I’m sure a lot of you out there are self-employed, which means you can benefit from the write off. You get a tax break and a kid gets a computer. Sweet deal.