Archives - May, 2008



19 May 08

Tonight I was trying to convert the old custom quote system I used for #arc to qdb just for fun. I was trying to find out the code used by qdb.us/bash.org but came across this peice of code called OSQDB.

Here’s an exerpt of code called whenever a new quote is added.

$get = mysql_query("SELECT * FROM quotes ORDER BY id DESC LIMIT 1");
 
while ($count = mysql_fetch_array($get)) {
    $tempid = $count["id"];
}
/* Increment the id */
$newid = $tempid+1;
$sql = mysql_query("INSERT INTO quotes SET id = '$newid'");
$sql = mysql_query("UPDATE quotes SET quote = '$newquote' WHERE id = '$newid'");
$sql = mysql_query("UPDATE quotes SET comment = '$comment' WHERE id = '$newid'");
$sql = mysql_query("UPDATE quotes SET ip = '$ip' WHERE id = '$newid'");

1) It loops through 1 entry trying to find the latest entry number (I’m sure max() is faster than order by and limit).
2) Once its it found, it does one insert with the id being set. Then it does 3 more queries setting each field in its own query.

That sorta explains why the db doesn’t have auto_increment fields turned on, but its scary. I’m afraid of looking at much more of the code. Luckily I then found Rash Quote Management System. I don’t like this one very much either.. but they are more personal reasons versus code issues.

I should clean up and submit patches (it doesn’t seem to have been updated since 2006) for rqms.


Filed under: Coding

Trackback Uri






4 May 08

I have to say, I’m totally surprised at this game. I was told before hand it was a pretty decent game, and it did keep me entertained for the week I rented it.

Now the game, as the anime, is very repetitive. I didn’t find it too bad, but I ended up not finishing all the optional missions because I got tired of the racing missions.

The timed ones in general were not bad, but when you got 5-10 minute long races with traps that can easily delay you enough so you can’t get to the next checkpoint it gets really annoying. The worst was the last one I did. I got to one gate from the end, then got stuck behind a trap. It took forever to get that far.

I also found the jutsu really awkward to do in battles too. You had to knock the other guy away far enough to wait for the bar to fill up fully. Luckly you could do smaller powered ones quicker. I ended up mostly just doing rapid regular combat combos.

But as I said, the game was overall enjoyable, and I did manage to finish the game.. at least I think I did, I got the credits, but then i was thrown back into town, so I’m not sure.

Either way, I’m glad I rented it, It doesn’t have enough replayability to buy the game, but the one shot rental was kinda cool.


Filed under: xbox360

Trackback Uri






4 May 08

Free comic book day yesterday was kinda cool. I got a bunch new books which will hopefully get me interested in comics (again).

There were so many people there though, including a few in costume. I wish I got a shot of supergirl and two face. Those are still awesome costumes, I’m totally impressed.



Filed under: People

Trackback Uri