Entries in the ‘Software Development’ Category:

Spin: The Game

Spin is a new Flash game I’ve been noodling on for a little while. It’s a Puzzle Bobble type game, except that the balls can freely spin like a pinwheel. The rotation is physically accurate, so as balls fall off of the board it changes speed and direction. When a ball hits the board the ball’s momentum is transferred to it, so if the board is turning slowly you can speed it up or make it turn the other way by firing the balls at it.

The feature list was miles long, but I’m getting too busy to work on it. Look forward to a second version when I can get back to it.

Tags: ,

Leave a Comment


Mako Cache Permissions

Just a quick tip about a problem I ran into with Mako recently. When it creates the cache directory for compiled template files, it sets the directory’s permissions to rwx——. This will cause a problem if you use a constant cache directory like the Mako documentation, because only the first user to run the program will have access to the compiled templates.

To get around this, be sure to use a unique cache directory for each user. On Linux, you can append the effective user id to the cache directory name like this:

CACHE_DIR = '/tmp/mako'

# ...

module_directory = '%s-%s' % (CACHE_DIR, os.geteuid())

Tags: , ,

Leave a Comment


Taco Bell Programming

Ted Dzuiba makes some pretty good points in this post, but once you have to scale past one server things start to break down.

Taco Bell Programming

Tags: ,

Leave a Comment


Progress in Real Time Content Distribution

Dave Winer is doing some interesting work towards a new real-time content protocol he’s calling FeedHose. It’s like a feed aggregator combined with a subscription hub. It’s similar to the PubSubHubBub/rssCloud to XMPP bridge I made last year, but better. He’s pretty good at forming communities around his protocols, so hopefully this will gain some traction. We need some progress in open, real-time content distribution.

Tags: , , , ,

Leave a Comment


Tech Startups Change Hiring

There is an interesting article in Slate about how hard it is for tech startups to find good employees.  They claim that the talent pool has been drained by big companies, but I think the more likely reason is that people are less likely to take a risk with a startup during a recession.  The article is right that recruiters are practically useless these days, but that’s probably bad for everyone.

Tags: , , ,

Leave a Comment


Fail Early, Fail Noisily

The Fly was on TV yesterday, and it reminded me of an important, often overlooked rule of programming: the Rule of Repair

Repair what you can — but when you must fail, fail noisily and as soon as possible.

A corollary rule is to always check for errors and inconsistent program states, even in prototype code. A simple assert(genetic_codes==1) would have saved Seth Brundle a world of trouble.

Tags: , ,

Leave a Comment


Better billboarding in Papervision3D

The Papervision3D wiki has an example for making billboarded sprites with just three extra lines of code. Trouble is, it doesn’t really work. Anyone who’s tried it may have noticed that when the planes get too close to the camera, or if the camera rotates around it’s z-axis at all, the planes start rolling instead of staying vertical.

The problem is that the lookAt method defaults to using the world y-axis as “up” for the billboards, which isn’t usually correct. Of course we don’t really care about the world y-axis with billboards. We just want them to be vertical in the camera. Here’s some code that does it.

// calculate the camera vertical in world coordinates
var up : Number3D = new Number3D(0, 1, 0);
Matrix3D.rotateAxis(camera.transform, up);

// billboard is the plane you want to billboard.
billboard.lookAt(viewpoint, up);
billboard.roll(180);
billboard.pitch(180);

Tags: , , , , , , ,

Comments (1)


Silly Jessica Simpson Game, Pizza Hut Codes

I don’t get it, but my wife loves the celebrity gossip, so when all this stuff about Jessica Simpson started coming out I whipped up this little game to make her laugh. It’s an homage to an old Mac game I haven’t seen in years called “Slick Willie.” I’m also keeping track of Pizza Hut’s sweepstakes codes here. Have fun.

Click on “more” to play the game.

Read the rest…

Tags: , ,

Comments (2)


Flash 9 in Linux

Those of you in the know already know that Adobe recently released Flash 9 for Linux. An official, honest to god, up to date version. The best part? It actually works.

I’ve had problems with Flash since I switched to Linux, because I foolishly chose the AMD64 version of Kubuntu. After messing around with a 32-bit chroot for awhile, I finally discovered Swiftfox, a version of Firefox compiled to use 32-bit libraries but optimized for, and compatible with, 64-bit systems. I could watch Flash movies again. Sound didn’t work, but who needs to hear them anyway? Oh, and since Macromedia never released Flash 8 for Linux, there were more and more SWF’s that I couldn’t watch. And it crashed the browser a lot.

Okay, so it totally sucked.

Even so, I was pretty disappointed after I upgraded to Swiftfox 2 and found that Flash stopped working. Imagine my surprise when I clicked on the missing plugin button and saw that Flash 9 was available. I knew Flash 9 for Linux was out, but I’ve never had the plugin search feature actually work correctly. Then, right before my eyes, Flash 9 installed, the page reloaded, and the SWF started playing. With sound. “Thus Spoke Zarathustra” came on the radio, the sun broke through the clouds of winter storms, and a chorus of angels heralded, or trumpeted, or whatever it is that choruses of angels do.

It’s almost as if big companies are starting to take Linux seriously.

Tags: , ,

Leave a Comment


KPAX, SLIME, and SBCL

I’ve been struggling on and off to get KPAX to work for the past few days. It turns out that the default method SLIME uses to communicate with the Lisp interpreter causes problems with the way s-sysdeps sets up the socket listening function in SBCL. The workaround is to set swank:communication-style to :fd-handler, but it has to be set before SLIME starts, so put the following form in ~/.swank.lisp

(defparameter swank:communication-style :fd-handler)

Now to get KPAX to work with mod_lisp…

Tags: , , , ,

Comments (1)