.comment-link {margin-left:.6em;}

Tuesday, January 31, 2006



Well, I was outside, shoveling, and I got to thinking. I do that a lot while performing mundane tasks. The problem is that homework is a mundane task. Anyhow, I was thinking, and I realized that of the programming that I do on my own (As in, not for work or homework), it falls into three categories. Those are programs intended to be used by other people, programs I intend to use myself, and boredom programs. You can actually classify these three categories based on the amount of error handling, interestingly enough.

Boredom programs
These are essentially techdemos. I'll be sitting around one day, bored, and think of something cool to write. I'll work on it for a few hours, enough to get it in a working demonstrable state, and then abandon it forever. Virtually no forthought goes into these things, I just sit down and start typing code.

A good example is the C#-based multithreaded IRC server I wrote yesterday. I was sitting around, bored, and just started writing an IRC server. I think I spent about 5 or 6 hours on it last night, most of the time spent learning how to do things I wanted to do. By the end of the coding block, I had an IRC server that mIRC could connect to, join channels, and PM people. A very small subset of the IRC featureset, sure, but enough for casual use. Enough to connect a few copies of mIRC and actually use them.

Multithreading a network app in .NET is easy. In fact, any asynchronous socket work is more or less multithreaded by default. The way it works is through callbacks. When you listen for connections, you have a callback. When there is data waiting to be read, you have a callback. These callbacks are in seperate threads, managed by the framework. So if you are writing something like an HTTP server with no shared info between threads, it is insanely easy. Even if you do have shared data structures like my IRC server does, it doesn't much matter. All shared data in my app is done via hash tables, and a few simple checks handle data being removed before we try to do something with it.

Programs I intend to use myself

These are the types of programs where I'll think, hey, I need an app to do such and such. iPodDrop started out as such a program, and is in the process of moving to the third category. When started, the program had very little error checking. It had enough to handle cases that I was likely to encounter, but nothing to handle somebody doing something wrong. So, I might handle an unreadable file, but wouldn't bother handling funky framerates; I wouldn't pass iPodDrop a file with a framerate of 36. Of course, now that iPodDrop is moving to the third category, such checks are starting to show up to ensure better stability.

These types of apps are likely to get finished into a working state. Working, but not polished. They do what they're meant to do, and it doesn't have to be pretty.

Programs I intend others to use

A lot of my web work could be considered to be in this category. iPodDrop is moving into it. In this category, error checking is included to cover common scenarios, trying to make sure users can't do dumb stuff. I don't go overboard, I mean an "or die" for most MySQL calls in a web app is fine. Since web apps are stateless, the occasional error isn't going to bring down the system, if the MySQL server hiccups or something. But I would add error handling for any user input, certainly, or expected failures.

To be honest, I intended this post to be a lot longer and in-depth, but I started writing it 5 hours ago and got interrupted, and am only finishing it now.

Thursday, January 26, 2006


GPLv3: I'm not alone

In a previous post, I called the GPLv3 "idiotic". sfllaw replied in a comment that I shouldn't say such things without studying copyright law in greater detail.

I wasn't actually referring to the copyright part of the law though. I think he was confused by my earlier statement that I thought the GPLv2 was a bit too viral for my uses. My comment on GPLv3 was unrelated.

I actually dislike the GPLv3 not for the copyright provisions, but the policy choices the FSF has made. I haven't read through the thing, but am only going on what has been reported. The one I was talking about was how the GPLv3 forbids software from containing DRM of any kind. This, of course, really limits where you can use GPL'd software, and will drive a great many corporations AWAY from opensource (Hence my comments about the new GPL hurting opensource).

Apparently, Linus agrees, saying "I think it's insane" when referring to yet another stupid provision that requires people to make their private signing keys available. If I understand what he's referring to, he's right. If you make your private signing keys available because the GPLv3 requires it, ANYBODY can sign stuff with your key. That is worse than not having any keys at all, because it gives a false sense of security when Joe Viruswriter can sign whatever he wants with a GPLv3'd project's key. Great new way to sneak rootkits onto people's linux boxes.

Linus will thankfully not be using the GPLv3 for Linux. Thank goodness, because with the GPLv3, the FSF is trying to push their extremist views onto a world in which it doesn't work.

Tuesday, January 24, 2006



@Avery: Is publicly stating that your customers are giving you too much money really such a good business strategy? :)

It's been a while since my last post. Not much has changed. Apparently there was some sort of event yesterday, not sure what that was about. I think it had something to do with choosing colours. I hear that blue and red were quite popular. Such clashing colours, surely whatever they're painting can't match both of them? I can't think of any colour scheme that matches with both red and blue. I like orange myself, much more bright and cheerful.

I've been busy of late, and haven't had time to work on iPodDrop. I'm tempted to just release the current beta build in it's current state. It doesn't have the explorer context menus, but it does have the progress bar and time estimates, which is cosmetic and yet huge. I didn't have time to clean up the source and comment stuff, but I'll probably just release the source anyhow. Maybe seeing how bad the code is will inspire people to give advice so I can improve in the areas where I wasn't just lazy, but suck. I'm not a big fan of the GPL (A bit too viral, and the GPLv3 is just idiotic with useless anti-DRM crap that will hurt opensource), so I'll probably go Creative Commons:

Creative Commons License
This work is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 2.0 Canada License.

I'll probably put an additional restriction on it, namely that if you look at the source and find anything stupid, you're required to notify me of it. You don't have to fix it, just tell me that I'm stupid. Surely telling somebody they're stupid isn't a big burden.

For the gamers among you who are in Montreal, it should be noted that Lan ETS 2006 signups are now open. It is scheduled for March 24th, with a planned size of 400 people. Last year Roch told me that he was hoping to break ATI-Revolution's record (something over 600 I think), which was the largest LAN party ever in Canada and 6th largest in North America. I guess they had to scale it back a bit. I don't think the ETS lobby renovations freed up as much space as Roch hoped it would.

Saturday, January 14, 2006


I know.

Han Solo. Frozen in carbonite. Made out of lego. At full scale. Dave, my mind is going. I can feel it. There is no question about it.

Of course, my mind is going because of the coolness factor.

And on a totally unrelated topic, one of my cooler christmas gifts was a red swingline stapler. Unfortunately, I don't have any TPS reports handy. I'll have to print some out to place the stapler on. And if the connection between red swingline staplers and TPS reports went right over your head, you really need to get your geek on ;)

Wednesday, January 04, 2006



Ever seen something that just boggled the mind, amazed you so much you just sat there stunned? So incredible you made up a new word for a blog post?

Well, if you haven't, you will after listening to this (Use heaphones only, speakers won't work):


They call it "Holophonic" sound. It is like HRTF, except instead of providing surroundsound, it provides full 3D sound. As in, they can make something sound like it is above or below. And the directional placement is the BEST I've EVER heard out of any HRTF or related trickery. Even when it comes to pure surround this is amazing, but when the sound starts moving above and below it just blows the mind. I've heard some other so-called Holophonic demos, and they paled in comparison to this one. Whereas other demos sort of sounded like they might be at a slight angle, this really feels like somebody is shaking a matchbox under your chair.

Closing your eyes when you listen to it enhances the effect. You can just imagine a person walking around you shaking the matchbox.

The site this comes from is http://www.holophonic.ch, but it is down due to the digg effect.

Sunday, January 01, 2006


iPodDrop and the GPL

wlach pointed out that according to the LGPL that ffmpeg is distributed under, I've got to distribute the source with it.

Except, ffmpeg is distributed with GPL'd components (which my binary has compiled in), which means that the copy of ffmpeg is covered by the GPL.

Now, my reading of the GPL is that a project that "contains" GPL'd binaries must itself become entirely covered by the GPL. However, I assume my reading to be incorrect, because I've seen tons of products that contain GPL'd code and non-GPL'd code, distributed together without the non-GPL'd code being affected (NITIX itself would be an example, or virtually any linux-based firmware). So that would mean that I should post the ffmpeg source, but am not required post my own source.

Here's ffmpeg: ffmpeg-0.4.9-pre1.7z (Pretty stupid to have to post unmodified source when the ffmpeg people host it). I'll bundle the source in v1.3 I guess.

Maybe I'll opensource iPodDrop itself later. I'd like to get the source in a more friendly state before that happens. Commenting the code some would be nice.

This means I don't qualify for SourceForge. I've run a SourceForge project before, in my experience it isn't worth the effort for small projects. Setting up and configuring an sf project isn't a simple affair, and for a very short program it isn't worth it. If I opensource it, I'll just distribute the source with it.


iPodDrop v1.2 released

You're probably sick of hearing about this, so I'll keep it short. v1.2 (a huge update) is done, and you can grab it now:

Download iPodDrop v1.2

The changelog is the exact same as what I posted earlier, save for one extra item:

- iPodDrop now defaults to a video bitrate of 1024 kbit/s, and only uses 2048kbit if in TV mode.

Enjoy! Please comment!

This page is powered by Blogger. Isn't yours?