Sunday, August 23, 2009

The progress of cringer

So, in my last post, I talked about cringer, the gajaxapis-irc-bot that I'm working on. In the month+ since I posted that, cringer has gone from a concept to a functional, if still experimental, bot which utilizes the Google AJAX Search and Language APIs to provide useful functionality in the #googleajaxapis channel on irc.freenode.net . It has also been infused with the ability to make snide remarks about things like MSIE and Flash/Flex. And it has a help facility which allows users to utilize its different resources (and find interesting tidbits about several regulars to the channel).

To be certain, cringer has developed quite nicely, thanks in large part to the ideas shared by friends and colleagues in the channel. But one thing has eluded me thus far. I have found myself unable to implement the ability to evaluate Javascript in the channel via either SpiderMonkey or (as one of the Googlers in the channel suggested) V8. Now, this is undoubtedly due in large part to the fact that I've never attempted to compile one of these JS engines independently before. So this week, as I have opportunity, installing at least one of them - probably SpiderMonkey - on my Mac will consume my idle time. If anyone has any insights, please don't hesitate to send them!

Wednesday, July 15, 2009

Building a better bot

So, it's no secret that I spend an unhealthy amount of time hanging around the Google AJAX APIs. Between the Google Group and IRC channel, I certainly find enough to do to keep myself out of trouble (or get myself in trouble, if you ask my wife). For the last several months, people in the channel have kicked around the idea of building an IRC bot to help out in the channel and have a little fun. Well, this past weekend, I sat down and started tinkering.

The result: http://code.google.com/p/cringer

Now, I know there's no code there yet, but it's coming. cringer is a Perl-written IRC bot that will eventually run Javascript, search the web, listen to your troubles, and even make snide remarks about MSIE and Flash.

So far, I've learned that getting Perl to talk to IRC is extraordinarily simple with the right modules, giving it a very rudimentary level of artificial intelligence is a snap, and getting it to run with DBD::mysql means making sure you have the right version of MySQL installed on your computer. What I'm needing to learn now is how to make it interact with TraceMonkey, Mozilla's brand-spanking new JS engine. So it's back to work for me!

Sunday, June 28, 2009

The marvels of a good host

I do not have my own data center. In fact, I don't know of too many people who do. The things are large, and complicated, and take an abundance of resources and manpower to run and maintain. In fact, as much as I'd love to, I don't even have my own production server due to the prohibitive costs of sufficient bandwidth in my area. So I, like countless other webdevs, am compelled to rely on hosting companies that all too often offer the world but deliver nothing more than a box of rocks.

In the past nine months, I have struggled with two such hosts. Although it is not my intention to badmouth anyone (thus I won't go into details), I do feel it important to mention the companies as a cautionary for others who might consider them today or in the future.

With the first, Christian Web Host (now a reseller for Jumpline), I had enjoyed an excellent relationship for several years. Their service was always reliable, their support was always prompt and relatively competent, and their prices and offerings were at least in the realm of competitive. Then, about ten months ago, all of that changed.

And the second, StartLogic, I had hoped would be an adequate replacement for CWH as my go-to host. On paper, they offered unbeatable pricing and service, but within just a couple of months of signing on the dotted line (right after the money-back guarantee expired, of course), a number of issues with performance and a glaring problem with the quality of support quickly spoiled that hope.

So the third time around, I was earnest about finding a good host. For about six months, I researched packages and pricing schedules and read reviews on an almost daily basis. To be certain, it was nearly overwhelming. Several times, I thought I had narrowed the list to one or two, only to then stumble across a number of reviews that brought into question one or more of the things that webdevs find important in a host. Finally, though, one company managed to find its way to the surface.

I was impressed when they responded to my sales inquiry within fifteen minutes. I was astonished when, the first time I contacted support, they answered - competently - within the hour. And I was overwhelmed last week when they helped a client in an incredible bind when their former host hosed their site. But I must take a moment to explain.

The client had built an incredible library of topographic imagery weighing in at over 155GB which they tied into a Google Maps interface to showcase and sell. The host they were with had billed their service as "unlimited storage" and "unlimited bandwidth," but apparently had an undocumented limit of 25GB storage. When they discovered the massive photo library, they of course sent notice that it would be removed for taking up too much space. The problem was that, since they sent so many promotional emails and such, the notice went into the client's junk mail system. There was no follow-up of any kind until one day the client discovered that the whole thing was gone.

I should mention, since most of us don't upload that kind of data on a daily basis, that uploading 155GB to a new server would have taken my client more than a month, even assuming they could absolutely saturate their upload capacity.

Enter HostGator.

Not only did HostGator set up a dedicated server for a reasonable price, but they then went above and beyond to converse directly with the data center so that, rather than having to upload the entire folder again, my client could mail a hard disk directly to the data center and have it connected to the server. It was a violation of ordinary security procedures, but HostGator support made it happen.

So the moral of the story is simple. HostGator has it all. Performance, reliability, support, and an unusual dedication to meeting the customer's needs.

Now, who knows. HostGator could tank in a few months or a few years, but for the time being, they've earned my seal of approval.