I make apps for other people

Posts from January, 2008


Posted by Chris Jones
On January 14th, 2008 at 15:59

Permalink | Trackback | Links In |

Comments Off on Rawgrlgrlgrlgrlgrrgle
Posted in Games

We’ve picked up and moved around WoW servers a lot over the past month. I got Pine to 60 and kind of retired him and most of my characters on Lothar (with banks so stuffed with greens that I “might use on an alt or in a few levels” that they tended to be useless), and while I like Kirin Tor, my wife stopped playing a lot on it. She had enough hunters. 🙂

We tried Farstriders, where she’d had luck getting Blood Elf Bandit masks to drop and sell for good cash, but the server itself was one of those that was mostly populated by split, with an incredible number of 70s and a very odd market or economy. Things that should sell well didn’t, and things that shouldn’t have sold well sold very, very well. Becky was frustrated when her Engineer couldn’t turn a profit and I recommended we try another server, Moon Guard, which was low population and might be a better choice. It wasn’t, being another split server (aren’t they all now?) and with another market she didn’t like.

We landed on Drenden, or at least I did. She quickly got an engineer to a decent skill rating, got some decent sales at times (copper bars are very price sensitive, while greens tend to be overpriced at any level) and even found some recipes on vendors or for cheap on the AH. Then Becky lost interest in repeating low-to-mid level content and went back to Lothar to finish leveling her Blood Elf Hunter through the 60s and to 70. “Please tell me they’re not adding 10 more levels in the next expansion…”

On Drenden, for fun and because we thought it would be a neat “inside” joke, we created a vanity guild Rawgrlgrlgrlgrlgrrgle. I sat around in Northshire Valley for a few hours on Saturday on Neogi, my then level 20 Warlock, chatting it up, acting nice, letting newbies ogle my Succubus, and giving away Linen Bags for people who would sign my guild charter. In a short time, Rawgrlgrlgrlgrlgrrgle was born. I’ve already had over half the signatories quit, which is just fine with Becky as she didn’t want a real guild, just the tag and a way to keep people from randomly inviting her to their guilds. (I think posting the guild MOTD and information in Nerglish, and renaming all the titles to Murloc titles like Tadpole, Murloc, Cruelfin, Gluggle, and Chieftain may have alienated people.) I’d turn it over to Becky, of course, if I had a character of raiding level or was regularly doing instances with a formal guild.

Finally, I’m playing another Hunter on Drenden named Foulhoof, as is my Hunter on Kirin Tor and on Farstriders (but not Moon Guard). She’s only level eight so far, and I’m really missing the pet, but I expect she’ll overtake the Warlock in no-time as the Hunter has much, much better survivability even if the DPS over time isn’t quite as high. (I guesstimated that my Warlock was averaging something like 13 DPS from DOTs at level 19, not counting pet 7.5 DPS or 12.,8 DPS wand damage.)

I’m playing a Warlock better than I was at release (with Waffle on Lothar, eventually deleted and rerolled to Horde): I couldn’t solo her Heartswood quest at Ordil’Aran, while a couple years later I could do it easily with Neogi over the weekend. However, I still had a Warlock reality check when I learned that many mobs after 15 (or so) survive after the DOTs have worn off.

Working XML HTTP Update framework in Python

Posted by Chris Jones
On January 13th, 2008 at 17:55

Permalink | Trackback | Links In |

Comments Off on Working XML HTTP Update framework in Python
Posted in Python

I have a working, end-to-end XMLHTTPUpdate handling framework written in Python running as a CGI application. Ewww.

Download the framework here. It’s simple and probably has some bugs in it.

You can test it as well, but don’t expect it to work under Internet Explorer. I didn’t bother writing Javascript for IE, only Firefox (which means it will also run under Safari and on an iPhone). If you try it out, give it a couple seconds to fetch the time from the server.

There are obvious points of extension, starting from the Handlers.py file. I chose to explicitly check handler names rather than use them to dynamically call into code from a string passed through the update. It just seems safer. 🙂

Nifty Amazon Fresh

Posted by Chris Jones
On January 13th, 2008 at 17:42

Permalink | Trackback | Links In |

Comments Off on Nifty Amazon Fresh
Posted in General

We’ve been ordering groceries through Amazon Fresh for a few months now, since shortly after moving back to West Seattle. The vegetables, fruit, and bread are fresher and nicer than we’ve found at Safeway (Thriftway at Morgan and California is our second choice for fresh food and where I get milk that won’t spoil in a week), and the prices, if higher than when using a loyalty card at the retailer, are reasonable. Food rarely goes on special or sale with Amazon Fresh.

I’ve ordered as late as 9:30pm and still received my food in plastic totes at my doorstep by 5:30am. The only problems I’ve had are that some popular items (locally packaged fresh chicken, for instance, or bagels and some fruits) were sold out–some while I was completing my order prior to checkout, d’oh!–and that some brands or items aren’t carried (likely due to regional and distributor selection).


The totes are sturdy and clean, and come packed with a couple paper grocery bags each with your food and, for refrigerated items, ice packs, or for frozen items, dry ice.


I love the dry ice.


. . . just 90% stupid.

Posted by Chris Jones
On January 8th, 2008 at 13:27

Permalink | Trackback | Links In |

Comments Off on . . . just 90% stupid.
Posted in Python

I figured out what I was doing wrong. Nothing except for how I chose to echo or display the XML.

Since it’s a dynamic call, I can’t view the page source to see the XML that gets returned. And I never verified that I was getting a String: I assumed that because it was inside a CDATA block that the tags would be visible, but what I actually got was the tags being evaluated, and since ^<get><time /></get> isn’t part of XHTML 1.1 . . . my XML never appeared.

So in the interest of saving some future developer a few minutes or hours or days of trouble, if you’re trying to parse POST-ed XMLHttpRequest XML DOM objects in a Python CGI web application and it looks like STDIN is empty or you’re not getting the POST contents, verify that you’re reading something by checking the length and extracting a part of the string. And convert your tags.

I’m not entirely stupid . . .

Posted by Chris Jones
On January 7th, 2008 at 17:11

Permalink | Trackback | Links In |

Comments Off on I’m not entirely stupid . . .
Posted in Python

Now, I’m not entirely stupid. Lacking common sense? Yes. Forgetful of dates, appointments, anniversaries, bills? Yes. Easily confused? Absolutely.

But I’ve also been programming in Python for years and wrote my first CGI scripts in 1993 or 1994 or thereabouts. I’m kind of familiar with both environments, even if this is the first time I’ve actually put them together. Everything seemed to be meshing really, really well until I tried to get XML content from the web client through a DOM document passed into the XMLHttpRequest. (And yes, I am new to XMLHttpRequest dynamic app development. I’d always had the pleasure of using someone else’s library.)

function createDocGetTime() {
    docGetTime = document.implementation.createDocument("", "", null);
    var getNode = docGetTime.createElement("get");
    var getTime = docGetTime.createElement("time");
function updateTime() {
    timerClient = new XMLHttpRequest();
    timerClient.onreadystatechange = timerHandler;
    timerClient.open("POST", "xmltimer.py");
    timerClient.setRequestHeader("Content-Type", "text/xml;charset=UTF-8");
    timerId = setTimeout("updateTime()", 1500);

Evil code (there’s no way to stop calling updateTime() :)), tutorial-simple, and pretty obvious, or at least it should be. The problem looks to be Python.

Laying the groundwork

Posted by Chris Jones
On January 4th, 2008 at 15:37

Permalink | Trackback | Links In |

Comments Off on Laying the groundwork
Posted in Python, Tech

I’ve previously identified a few elements that are needed to make a successful web based application. Since then, I’ve been prototyping, designing, coding on the bus and while making dinner, and have a pared down, minimal proof of concept for a few of those.

  • XMLHttpRequest: I’ve verified XMLHttpRequest works with my wife’s iPhone. I expected it to, but had to make sure. This is the core Javascript call for dynamic web pages that retrieve content from servers.
  • Timer: I still need to verify this works as expected on the iPhone, but I have a demo page to verify it ready.

In addition to the front end work (of which there will be much, much more), I needed a back-end that I could develop actively. My platform choices were limited in that it needs to work on a Dreamhost shared server, work on my desktop at home, and also on my laptop for the bus or coding around the house. Tomcat had to be discarded: I’d need to set up a separate Tomcat server and Java environment at Dreamhost. Perl was discarded as I really don’t appreciate the language. 🙂 I strongly considered PHP but decided against it in the end. Ruby was also considered but I didn’t want to learn a new language while coding a new app. I toyed with using Lua. In the end, I decided on Python 2.4 so I don’t have to do any gymnastics at Dreamhost. As far as my scripts are concerned, it’s a one-line change between platforms:

#!/Python24/pythonw for Win32
#!/usr/bin/python for Linux

I have a working Python back-end that gives me a minimum of helper objects for working with HTTP requests in a CGI environment. (No WSGI here, at least not yet.) I have room to plug in different request interpreters and a complete world engine or whatever might strike my fancy as long as I keep this minimal interface in place.

Now, nobody said I had to produce anything pretty when proving this works…

Try out my first proof of concept

I’d like my next proof of concept to be an interactive “game” or other social, multi-user activity.