Day: April 29, 2004

  • XHTML in Easy Steps

    XHTML in Easy Steps
    XHTML in Easy Steps (subtitled Web Pages for the Desktop & Mobile Internet) is probably the best book on modern mobile markup that I’ve ever seen.  The book is part of Barnes and Noble‘s in Easy Steps series.  These books are $10, no BS guides to the subject covered.

    They remind me of what I would have liked the Visual Quickstart Guide series of books to be.  I’ve looked at serveral Visual Quickstart Guides, but have never been able to jive with the format and layout of the books.  They feel too cluttered, and too “hey look what I can do” for my tastes.

    In contrast, the in Easy Steps layout is simple but functional.  There’s usually some full page text discussion at the beginning of the chapter, followed by several examples.  A typical example page will consist of XHTML and CSS listings followed by (get this) the design as displayed by the Nokia browser as well as what it looks like in a shrunk down IE window.

    How freaking cool is that?  The author gets across basic XHTML markup concepts while keeping the user focused on “how is this going to look on a phone?”

    The huge thing for me is the audience that this book is geared for.  It’s not designed for bleeding edge developers who are eager to learn advanced mobile markup.  This is a boook that your mom might pick up if she had the sudden need to learn XHTML.  It’s going to be the cheapest tech book I’ll buy all year.  It’s absolutely wonderful.

    My hat is off to you, Mike McGrath and whoever is behind the in Easy Steps series.  Good move.  Freaking genius move.

    Update: it looks like Barnes and Noble has exclusive distribution rights in the US, but the book can be purchased for under 8 GBP at

  • Finding Bad Feeds in Your Rawdog Feed List

    Rawdog has been segfaulting on me for awhile now.  It was definitely not Adam Sampson’s fault, it was totally mine.  I aparently copied and pasted an HTML link to my feed list instead of an RSS feed.  Oops!

    Anyway, I’ve not been able to get my RSS fix for some time, and I finally got around to writing a few lines of Python to diagnose the problem.  In about 9 lines of code I’m able to read my config file line by line, check to see if the line represents a feed listing, grab the url from the line, print the feed url, and parse it using Mark’s feed parser (the same version that Rawdog is using).

    The feed section of a Rawdog config file (usually in ~/.rawdog/config) can look like either of the following:

    feed 60
    feed 1h

    The top line is what the older version of Rawdog uses, the lower line is what newer versions of Rawdog uses.  Luckily each line is “feed” + <time> + <url>, so the string can just be split and I can grab the URL with foo[2].

    Here is the result of my two minute hack to figure out where the segfaults are coming from:

    import feedparser

    f=open('config', 'r')
    for line in f.readlines():
      if line.startswith('feed'):
        foo = line.split()
        print 'parsing ' + foo[2]
        data = feedparser.parse(foo[2])

    This will skip over any comments (lines that start with #) and other directives in the Rawdog config file.  I ended up making a backup, running the checker until I came across an error, commented out the offending feed in the backup file, and then removed all feeds in the file I was checking up to and including the offending feed.  This way I wasn’t hammering feeds in the beginning of the list.  Rinse, later, repeat.  It wasn’t until down at the bottom that I found the link that was causing the segfault: a link to one of my posts.  Sheesh.

    But hey, with a few lines of python and a few minutes, I’m back up and running.

  • KVMJab: Still Kicking!

    If you find or hear about an open source J2ME/MIDP library or app, it tends to either be extremely out of date (from 2001 and designed for early MIDP1.0) or so bleeding edge that it doesn’t work on most devices.  I was pleasantly suprised to find KVMJab, a Jabber library for MIDP 1.0 (though it should work fine with MIDP 2.0), alive and kicking.  There is a new release of the source code just a few days old that is updated to work with Sun’s Wireless Toolkit v2.1.  It looks like much of the source has not been touched since late 2000 or early 2001, but if it works, it works.