Ajaxy Goodness + My Latest Programming Project

Ajaxy Goodness
One of the books I picked up from the library this week was on how to write AJAX, “asynchonous javascript and xml”, which is a hot buzzword when it comes to web-programming. Recalling the wise advice from one of the job-search books, “hey, rather than saying your skills are transfereable to networks, why don’t you go home and network together the computers in your house so you so you can say you’ve had experience networking”, I decided that AJAX had a high bang for the buck when it comes to time required to learn a new skill that might look good on my resume.

So I found a nice book on AJAX designed for visual learners (lots of pictures and arrows rather than wordy paragraphs) and read enough of it to waste my morning yesterday, creating button to replace the quote on my browser start-page dynamically. Really, that only required reading chapter 1, but I kept flipping ahead to see what else was covered in the book and happened to find the page on how to add proper error handling and things and threw those in.

Surprisingly, it worked like a champ in Internet Explorer, which is usually known for being quirky and the bane of web-programmers. But Firefox, you’d click and nothing happens. I think I learned more about AJAX trying to google what could be wrong with it than I did from skimming and reading the book. In the end, after having upgraded firefox to the latest version and rewriting pretty much the entire thing a few different ways, I discovered the problem was Firefox expected some particular function name in all lowercase, even though the book and internet explorer were perfectly happy with the suggested CamelBackCase.

After I got that working, I decided to take it to the next level, and update two unrelated things on the page at once, which although it sounds only a trivial amount more complex from a user perspective, from a technical implementation standpoint it increases the complexity considerably. Rather than a string, you need a whole XML document. In the end, I had less trouble with that than I did the @#$@# firefox bug. The Firefox bug was hard to google too, because every time I’d google my problem, I’d get back a bunch of results about an unrelated firefox bug where if you set the request to be synchronous, it will cause similar behaviour; of course that wasn’t my problem. So now I can feel confident in listing AJAX on my resume, and its not really that hard (** if you already know javascript, xml, and php, big ifs).

My latest Programming Project
And then this afternoon I spent more time working on my bible reading tracker program that I started earlier in the week. I’d come up with a fairly concrete idea for a program that would be useful to me that it seems no one else has ever done before (nor done anything remotely close to before).

The basic idea is an electronic version of the reading check-charts that come in many bibles. The advantage to an electronic version would be calculation of statistics. You have some concrete metrics to measure your progress. Plus you can model the data visually into graphs and charts (I took a graduate level data-modelling in college…) which is a way more fun way to mark your progress.

Phase II of the reading tracker implementation would involve tracking trends over time for more fun statistics.

There might additionally be a phase III with features like integration with other bible software, customized reading plan generation, and so on.

I’d already started implementing it but had come to a block about how to represent such large quantities of data (there’s over 30,000 verses in the bible). At the chapter level, there’s over 1000 chapters. And at the book level, 66. At any of those kind of numbers you’re out of the range of what’s easy and reasonable to do by hand, and where you need to write scripts just to mangle the data into a format the computer can deal with. In the Logos bible software there are over 400 abbreviations of book names that are allowed by the software. And I, of course, want my software to be flexible and easy to use, so I want to support a maximal set of abbreviated versions of the book names. And looking at their set of abbreviations, it pointed out issues I hadn’t thought about, like that for 2 Chronicles, just for how a user would represent the 2, you have: 2, II, Second, 2nd all as valid options.

From a techical standpoint, this isn’t too difficult of a project to tackle on my own. But it brings up a lot of interesting design problems that you have to solve to handle the scale of the data to prevent tedium or the program being unnecessarily slow. So its been fun to ponder over and begin to implement.