I can’t contain the excitement. Though it has been done before, I just finished implementing a ratings system for the real site. I’d like to do an article about how I did it to submit that to the world, but for now, just be prepared. Content can start flowing now!
Archive for July, 2008
e-Thang.net the site is soon ready
July 18th, 2008Production mode cluster conundrum
July 16th, 2008I wish I had some cool screenshots for this one, but hopefully a text-based description will suffice.
So I fixed a bug at work, where certain AJAX calls were failing. It turns out that our view templates were making some assumptions that they ought not to have been making. I fixed that error, and our QA team pushed that code out to our test servers (along with other things– I wasn’t that important). Well, the error, or at least its symptoms, showed up again. Now, it only showed up sometimes, and only on the test server. “It works on my machine,” not being much of a solution to a bug, I started investigating.
I looked into the error logs that were being generated, and saw what looked like the sort of error you get when you call a helper method which doesn’t exist. As part of the bug fix, I added a helper method. We checked manually the code that was running on the server, and it had the helper method and the full new version of the code. At this point I began suspecting the work of some foul dark wizard– or at least a gremlin. I mean, why else would a view template not be able to find a helper method that is there after the server has been restarted?
I’ll tell you why. We have a cluster configuration, and Capistrano or something else, hadn’t shut down every process running the old code. Since AJAX calls are full-blown server requests that just happen not to refresh the whole browser page, some of those calls were directed to server processes that hadn’t actually been restarted. Rails doesn’t auto-refresh code in production mode (Good Thing), so those old processes quite naturally didn’t find the new code. We killed the old processes and, presto! The world is right again.
So, if you ever find yourself wondering why your view template can’t find your helper method, check to make sure that your server restart restarted ALL instances of your application. We’re still not entirely sure why all instances didn’t restart though.
So, Dark Wizards may still be involved.
Window shopping PBBGs
July 6th, 2008For those of you who don’t know what a PBBG is, find out here. It stands for persistent browser-based games. Basically, it’s a game whose world is persistent (i.e. it doesn’t go away when you shut it down– it keeps running), and you interface with it via your browser. I’m sure there’s some debate as to whether or not Flash is allowed in one, and I’m of the persuasion that that is fine. You have to download html code to run all the others, and basically everyone has Flash installed.
But I digress.
I’m going to be making one in the near future, hopefully. My plan is to reverse-engineer some features in some neat ones that I’ve played and write up some articles on how I did so. Part of this all though is market research– I like to look at what other games are out there to get some ideas. So I go to pbbg.org and follow their links to the list of games they have. Then I click on a lot of those games to check them out. That’s the process of market research for me anyway.
In it all I have this to say: INCLUDE SCREENSHOTS! Take that all caps as simply raising the volume, not yelling in the I-hate-you sense of yelling. Seriously though, the games that don’t have screenshots lose me instantly. I’m not going to sign up, providing email address and all that jazz, for a game I know 0 about except the title. While a screenshot doesn’t really give a feel for how the game will play, it is to me an essential bit of pre-information before trying a game out.
Anyone else feel the same or different?
Happy…
July 5th, 20084th of July Holiday! Culture be d***ed. I don’t want to offend anyone. So I wish you all a happy early July day.
Actually, Happy Independence Day everyone. America is a pretty special place, despite her problems, and it’s worth celebrating her birth.
I also wanted to have moment of solidarity with all new parents (or old parents) who are trying to sleep-train their child(ren). Nothing is as heart-wrenching as hearing the distress cries of one’s child. So, hang in there moms and dads!