November 2010 Archives

Why uninitialized variables are bad (Linux kernel and more)

I've always been an avid hater of uninitialized variables. I'll hunt them down, catch them and beat them to a bloody pulp and then shoot the remains.

Too much, you say? No need for the bat AND the gun, you say? Oh, quite the contrary.

Here is an example of a recently discovered Linux kernel issue. An uninitialized memory segment. The fix is really simple: to initialize it with zeros. This was done in a patch that only adds the following command:


+…

Blessed are the CPAN Testers

I was doing a lot of work on Dancer lately. We've been experiencing a few test failures on Windows with the upcoming big release. I'll admit we are usually reluctant to go to Windows-land and fix issues, but Alias sure made it clear how important it really is, so it was something that had to be done at some point.

While investigating this situation, I've noticed Cwd's realpath() function was complaining a path for a test did not exist. The path did not exist for Linux or BSD either but the test wasn't failing there.

After checki…

DancerJukebox - Dancer-based music queuing webapp

David Precious (A.K.A. bigpresh) recently wrote a nifty little webapp for MPD (Music Player Daemon) using Dancer, available here.

He also wrote an article about it which you can read here.

Props!

Internal redirects in Dancer

I really like the forward function in Catalyst. It lets you chain actions together and create a clean flow. I decided I want that in Dancer. We now have it.

Some background:
I was working with my brother on a project with Dancer. We wanted a client to be able to go to a personal demo page of the website to be able to try out editing features without destroying the actual website. The original (awful) code did this by copying all the (CGI) code into a different folder and making that available.

Our idea was to have a demo database t…

About Sawyer X

user-pic Gots to do the bloggingz