Heading to Jamaica!

Zatko, Amanda, Jared, Kris, and some other dudes and gals, including parents, are going down to Jamaica tomorrow at 7:25 AM! We'll be arriving somewhere where a bus can take us to Sandals at Ocho Rios by bus presumably. We'll probably be at our hotel by 1pm hopefully. I have to be at the airport at about 4:30am officially, but might be getting there by 5am. There will be an butt ass ton of pictures when I get back. Probably on my facebook profile and I'll link them here. I'm long overdue for a vacation. Peace.

Eclipse bombed on me

Thankfully, I was able to find the answer to my problem in German! Here is the forum I read. I found a lot of English speaking topics with the error message I was getting, but they were having slightly different problems. Basically, I renamed the file in the ".safetable" folder, reimported my project, and everything's fine. Weird. Good thing, too, I've been getting tons of comment spam on my pictures because I haven't implemented my anti-spam mechanism on there. I will employ the same method I use here.

Spore Creature Creator!!

I removed the contents of this post because it had an old spore thing in it, and its html sucked, and messed up my new page... Sorry

Age verification is dumb

How many times do you go to watch a video on a site that's not porn and it asks you for your date of birth? There's plenty of videos out there that do that... video games are the ones that annoy me the most. Especially since the sites that I watch videos on, I am registered for and my date of birth is stored with my profile. Sometimes it's just a 3 box combo of month, day and year where you have to type, other times it's 3 drop down boxes where what is automatically selected is January 1, 2004. Other times it's 3 drop downs for month day and year but no default date is selected. On GameTrailers.com, these are the least annoying. They don't have verification code built in so you can just press "OK" and it'll let you watch the video without selecting anything. On the ones with the 3 drop downs where January 1 2004 is automatically selected, I just drop the year down to 1980 or earlier, even though 1990 will suffice now (jeez, people born in 1980 are already 28). The only ones that get my real date of birth are the text box variations where it's easy to type. Seriously, the drop downs gotta go.

These are so dumb and annoying. But I guess you gotta be responsible. Annoyingly responsible to those who could watch R rated movies for 12 years now. To those who can buy anything where an age restriction is in place. To those of us who could almost run for president of the USA (35 is the minimum if I recall correctly). The only thing I can't buy, age-wise, is a house in my parents' community because you have to be 55 or older.

But I guess you gotta be responsible. You definitely want to make it a good warning that you should be of X years (13 for PG-13, 17 for R, etc) before you watch the movie, play the game, drink the beer, etc. But of those, I think it's only actually illegal to drink if you're not old enough. Still, those sites should save your birthday as a cookie or something so you don't have to enter it 120 times. That can't be used to track anything that they wouldn't already know or could even get any information from... how many people were born on March 23, 1979? Well, I guess, how many people were born on March 23, 1979 in the IP range that I use? Probably far less. But still. Hold onto my date of birth or make it so if I just press "OK" I get to watch it anyway :) I like that bug.

New Server!

This new server is about 4 times more powerful than my previous server, but for the same price. I will now definitely be putting lots of new stuff up on here to get the full use out of it. I have my subversion server running off of it, and again, an open invitation to anyone who wants all the free awesome code they can handle :P

Be wary of hosting companies installing MySQL for you. They might install the latest version of it (5.x), but in my.cnf specify that it should use the old password hashing method, the insecure one used before MySQL 4.1. This old method only generates a hash 16 bytes long, whereas the new one is 41 bytes (with a leading *). I did notice it but didn't think anything of it until I tried to login to my website here to post a new item. I had just finished getting all of my passwords for my websites input too. This required looking in the config file that I read to connect to the database to get the current password out, then running "grant all privileges on database.* to 'user'@'localhost' identified by 'password'" for each one. Ridiculous. I think I got them all right on the second go, I didn't feel like reading in the config files again. This site works, and so does Jim and Kate's site (which is awful and is long overdue for an upgrade). Vacre Tei works too. Stringed.org might work but not all of the name servers are pointed correctly yet, so I can't see it. It might work for you, it worked at the office.

Also, if you get "Can't connect to MySQL" and it's running, chances are it isn't allowing networking. I just commented out those two lines (old-passwords and skip-networking) and if I got all the passwords right, everything should work fine. Overall, the transition from the old server went without a hitch, but was a pain in the ass. Here's the breakdown:

  1. Zip up the websites on May 24 and promise not to upload any new files because then they'd also have to be pushed over.

  2. Zip up the databases and promise not to make any new posts or anything.

  3. Zip up tomcat since I don't want to have to reconfigure it

  4. Download them (the size of jasontconnell.com gzipped up is currently over 600 MB)

  5. Upload everything to the new server.

  6. Extract everything where it belongs.

  7. Update the MySQL passwords

  8. Set JAVA_HOME

  9. Hope it works

There were some other steps in there and perhaps at a later date I will be willing to tell them, but that's the gist of it. Enjoy!

Fixed my event class

Here's the updated code which should work all the time.

var EventList = new Array();
var g_eventIndex = 0;

function Event(obj, type){
if (obj._eventIndex){
if (EventList[obj._eventIndex][type]) return;
obj._eventIndex = g_eventIndex++;

if (typeof(EventList[obj._eventIndex]) == "undefined")
EventList[obj._eventIndex] = new Array();

EventList[obj._eventIndex][type] = true;
this.handlers = new Array();
this.type = type;
this.obj = obj;
this.obj._event = new Array();
this.obj._event[type] = this;

if (typeof(this.obj.addCustomEvent) != "function"){
this.obj.addCustomEvent = function(type, fn){
if (typeof(fn) == "function"){
return true;
return false;

this.raise = function(sender, args){
for(var i = 0; i < this.handlers.length; i++){
this.handlers[i](sender, args);

// addEvent(obj, "event", func);

function addEvent(obj, evType, fn, useCapture){
if (typeof(obj._eventIndex) == "number" && EventList[obj._eventIndex][evType] && obj.addCustomEvent){
var r = obj.addCustomEvent(evType, fn);
return r;
else if (obj.addEventListener){
obj.addEventListener(evType, fn, useCapture);
return true;
} else if (obj.attachEvent){
var r = obj.attachEvent("on"+evType, fn);
return r;
} else {
alert("Handler could not be attached");

Now it will handle events of the same name in different objects. I just didn't want to have to come up with different names for events in different objects that did nearly the exact same thing.

I was reading a bit on the internets about how people do this type of thing. I read a post on Yahoo! that said the YUI event handling mechanism is "only 2KB". This is 55 lines with liberal white spacing. The thing about computer science is that sure, there might be something out there that does what you need it to do, and you can get it for free, but it's gonna do tons of other stuff that you really don't need. Not yet anyway. Same goes for software in general. If you need a simple photo editor, you're not gonna pay $600 for Photoshop when iPhoto will do (part of a $79 package with tons of other neat software, which also is overkill if you don't need that other stuff). So, if I need something very specialized, small, and easy to use, I'll write it. If you need this as well, feel free to use mine directly or for knowledge. It's not big or special, but will be used as part of a big and special project :) That will come soon.