Year: 2005

  • Agile Web Development with Rails

    Rails Book

    Choo Choo! My copy of Agile Web Development with Rails showed up at my doorstep like a lost kitten this evening. I’ve skimmed the beta book but it’s great to have a reference available in dead tree form. Dave, David, and the rest of the crew: you rock. Thanks so much for getting the beta book in front of our eyeballs.

  • Yahoo! News RSS Thumbnails

    I noticed that throughout the day several Yahoo! News RSS feeds that I subscribe to gained a small thumbnail on the left hand side of each entry. It really does a great job of adding a little context to the story and it’s great to have a visual aid while skimming my aggregator. Nice touch!

  • Django Markup Template Tags

    Changeset 467 contains template tags for renderingTextile (using PyTextile), Markdown (using python-markdown), and ReStructured Text (using docutils). You can find usage examples and some basic tests in markup.py.

    You need to make sure that you have the correct modules installed to do the heavy lifting, but the tags are extremely easy to use:

    • {{ textile_content|textile }}
    • {{ markdown_content|markdown }}
    • {{ rest_content|restructuredtext }}
  • PyCon 2006

    AMK confirms that PyCon 2006 will be held in Dallas on Feb 23-26. I’m sad to see it leave DC, but it sounds like they’re going to get an amazing bang for the buck thanks to the hard work by the D/FW PUG. With the community agog over Django and my continuing interest in Python for Series 60, I’m going to do my best to make it there. It’ll be harder though since I can’t just hop on the metro and head downtown.

  • I Shall Call It Opera Mini

    Via JibberJim on #mobitopia, Opera has released a miniature version of its browser that does some wicked stuff. First off it should run on any J2ME-enabled phone. This increases the potential install footprint dramatically. The other thing they do is parse and render using their desktop technology on the server side, then reformat it to fit a mobile screen. The content is then sent over in Opera Binary Markup Language and displayed by the J2ME client.

    While this is the same basic technology behind WAP 1.0, Opera have definitely “done it right.” Opera Mini is currently available in Norway, but I can’t wait to see this go worldwide.

    Update: Carlo has further coverage at MobHappy.

  • Browser Options for the Nokia 770

    It looks like users will have several browser options to choose from when the Nokia 770 drops.

    Since web browsing is one of the core uses of the 770 it’s great to have so many varied options even before the device is available. While I expect the bundled Opera browser to be top notch, I have a lot of respect for both Gecko and KHTML, the little rendering engine that could. It’s really amazing to have so many options.

  • Orb Networks API

    PocketPC Thoughts points out that Orb Networks has released an Add-Ons API. They don’t seem to be promoting it on their site as far as I can tell, but it’s out there. The API itself is documented and there is an example Add-On available for download. You might also want to look at their developer forum. For now it’s a C++ on Windows thing, but the documentation does make reference to Linux and Mac versions in the works.

  • Dude, Where’s My Freehand?

    I failed to notice this the other day, but aparently Macromedia has ditched Freehand in Macromedia Studio 8. It’s still a standalone product (for now), but start getting used to other tools.

  • Welcome Home

    STS 114 Logo

    “…and Discovery is home.”

    Welcome back to Earth, STS-114.

    I can just feel the releif at Nasa as Discovery touches down.

  • Django: Tutorial 4 and RSS

    Today Adrian posted Django Tutorial 4 which covers form processing and generic views. Everyone dive in!

    In other news, if you’re looking to generate RSS using Django “the easy way,” look no further than this #django log and associated pastebin.

    As always, svn up if you haven’t in the last few hours.

    Update: The pastebin dissapeared, so here’s a transcribed version of what was in there. Typos are mine and not Adrian’s of course.

  • HTTP Headers and Django

    Andrew Brehaut has a hot tip about HTTP headers and Django:

    HttpResponse objects contain a headers dictionary, that you can easily add and remove headers from using dictionary notation

    You can read more about it and see usage examples in his post.

  • Macromedia Studio 8

    MacMerc points to Macromedia Studio 8 which includes Dreamweaver 8, Flash Professional 8, Fireworks 8, Contribute 3 and FlashPaper 2.

    It will be interesting to see what impact Adobe has had on the product line after its purchase of Macromedia. I’m a bit suprised to still see Fireworks alive and kicking, but I guess it makes sense given the level of integration and look and feel between the different Macromedia products. This may be the last independent Macromedia Studio release, but I could be dead wrong.

    There’s a lot of overlap between Macromedia and Adobe products (Indesign vs. Dreamweaver, Photoshop vs. Fireworks, etc), and I think it’s just a matter of time before some products get their red stapler taken away from them.

    From the feature tour it looks like Dreamweaver has taken some cues from InDesign with some very photoshop-esque guides. It is also great to see Dreamweaver finally start to focus on CSS-based design over table layout. It also looks like Dreamweaver is able to parse and display RSS feeds, as you can see about 3/4 through the feature tour. Interesting stuff.

  • GPE-Calendar on Maemo

    Matthias has made progress on a GPE-Calendar port to the Maemo platform. Porting GPE-Calendar is a lot harder than a lot of ./configure; make; make-install “ports” to Maemo, and it looks like it is coming along nicely. The Nokia 770 is still officially not a PDA mind you, but the more solid apps available for the platform on launch day the better.

  • Using Asterisk with Gizmo

    This wiki page contains instructions for setting up Asterisk to use your Project Gizmo account for both incoming and outgoing calls. It’s a nice little hack and sounds like a perfect way for me to tinker with outbound VoIP using a spare box and a generic card that I picked up on Ebay months ago. BroadVoice‘s Bring Your Own Device plans also sound worthwhile.

    I’m extremely impressed with the configurability of Asterisk. You can do just about anything you can imagine with it, including routing incoming calls based on caller ID info, and extremely complex outbound routing. With the right configuration it’s no big deal to use POTS for outgoing local calls and even multiple VoIP accounts if one has cheaper rates in a partiucular area, all matchable by dial string.

    It’s definitely overkill for a simple answering machine, but it’s truly powerful platform.

  • Feed Fixed

    Sorry about that, when I downloaded WP-HashCash I aparently included a few extra lines at the end which made my feeds not validate and didn’t work in Firefox. It’s fixed now though. I’m going to try this instead of Spam Karma 2 for a bit. It seems to be doing a good job so far, but let me know if you have any trouble leaving comments.

    (Thanks for pointing it out, Mike!)

  • When Text Ads Make My Eyes Bleed

    Text Ads are a beautiful thing. There are now many fine purveyors out there for you to choose from: Google’s AdSense, Yahoo’s YPN, BrightAds by Kanoodle, BlogAds, and I’m sure a bajillion others. The aparent thought process among many out there is “if one text ad good, two must be great, and 4 would be perfect!” I think the opposite is true.

    Text-based advertisements on the web work so well because

    1. They’re almost always targeted well. Text ads are powerful because of their context.
    2. They don’t “get in the way.” You don’t have to punch the monkey.
    3. They often add value to the surrounding content. If they’re well targeted (see #1), the ads may provide the exact information a reader is looking for.
    4. They don’t make my eyes bleed (see previous reference of punching the monkey).

    The problem with text ads is that you can’t just cram them in to every nook and cranny of your weblog and just sit back and cash your checks. Actually, I guess you can, as I discovered in a post by Barry at Search Engine Journal (via Jeremy). Barry has 3 rather large AdSense blocks in his main content pane (they’re all of the square/rectangle variety) and a BlogAd on the left column. At first glimpse (after I cleared the blood from my eyes) I had a hard time discerning content from advertisement. I hate to pick on Barry, because he’s definitely not the only one doing it.

    Please, use text ads sparingly. I know there’s a lot of temptation to just fill ‘er up, but while that might bring in more money, it’s going to start costing you readers. I tend to shy away from eye-bleeding websites be they big or small. I’ve grown far too acustomed to tuning out annoying ads on sites that I value, but I can only tolerate it up to a point.

    In the interest of full disclosure, I use and love text ads on this weblog. I do try to use them sparingly and I also try to shield my regular readers as much as possible. Most of my regular readers catch content via my RSS feed, in which no ads appear. Anyone who types postneo.com in to their browser will see nothing more than one small text ad below the header. Internal referres see the same. I show a much bigger ad to people coming in from external referrers, since a vast majority of those are via search engines, and they tend to be big clickers.

    I’m never going to become a millionare by using text ads as sparingly as I do. I may even experiment with another ad in the sidebar or below the main content. These little ads do however cover my hosting costs, with a little extra on the side for the “gadget fund.”

    So please, think twice before making my eyes bleed.

  • Is Content Self-Publishing the Next Step for the Blogosphere?

    After hearing about Lulu through Erika Dreifus I couldn’t help but browse around the site. What I discovered was a treasure trove of self-published and publish-on-demand books, calendars, and music. There is everything from Matt Raible’s Spring Live published by SourceBeat to Herman the Homeless Hermit Crab by Scott Fisk, an awesome little childrens book available in paperback for $7.99 and in PDF form for less than a buck

    Seeing this broad range of quality professional content, sometimes priced quite affordably in ebook form, I couldn’t help but think that this is the next direction the blogosphere might take. It makes perfect sense if you think about it. There are so many talented yet rather obscure writers on the web out there that know a whole heck of a lot about what they write about.

    If every domain expert (or every average joe who knows a good bit about a topic) out there were to publish something and make it available in print or PDF at a reasonable price, we might just have something. The Long Tail goes on and on.

  • Migrating Your App to Django

    A few days ago I mentioned Changeset 384 which included a new command, django-admin.py inspectdb <dbname>. It has also been tweaked and improved since it was initially committed. The other day I tried it out on a simple database structure, but I decided to throw a more complex example at it.

    I decided to take the final depot application from the excellent Agile Web Development with Rails book. Beta books rule by the way. I executed the SQL in rails-code/depot_final/db/create.sql from the the code tarball to set up the database structure. I then created a new project with django-admin startproject and edited settings/main.py to tell Django how to log in to my mysql database. After exporting the correct DJANGO_SETTINGS_MODULE I ran django-admin.py inspectdb depot_rails which gave me the following model:

    # This is an auto-generated Django model module.
    # You'll have to do the following manually to clean this up:
    #     * Rearrange models' order
    #     * Add primary_key=True to one field in each model.
    # Feel free to rename the models, but don't rename 
    # db_table values or field names.
    #
    # Also note: You'll have to insert the output of 
    # 'django-admin.py sqlinitialdata [appname]'
    # into your database.
    
    from django.core import meta
    
    class LineItem(meta.Model):
        db_table = 'line_items'
        fields = (
            meta.IntegerField('id'),
            meta.IntegerField('product_id'),
            meta.IntegerField('order_id'),
            meta.IntegerField('quantity'),
            meta.FloatField('unit_price'),
        )
    
    class Order(meta.Model):
        db_table = 'orders'
        fields = (
            meta.IntegerField('id'),
            meta.CharField('name', maxlength=100),
            meta.CharField('email', maxlength=255),
            meta.TextField('address'),
            meta.CharField('pay_type', maxlength=10),
            meta.DateTimeField('shipped_at'),
        )
    
    class Product(meta.Model):
        db_table = 'products'
        fields = (
            meta.IntegerField('id'),
            meta.CharField('title', maxlength=100),
            meta.TextField('description'),
            meta.CharField('image_url', maxlength=200),
            meta.FloatField('price'),
            meta.DateTimeField('date_available'),
        )
    
    class User(meta.Model):
        db_table = 'users'
        fields = (
            meta.IntegerField('id'),
            meta.CharField('name', maxlength=100),
            meta.CharField('hashed_password', maxlength=40),
        )

    Per the comment block at the top, you’re not home free yet, but at lot of tedious work has been done for you. This should definitely jumpstart the porting of existing applications to the Django platform.

  • Swik is Slick

    Swik by SourceLabs is really awesome. It’s part wiki and part search engine. I first heard about it through the Django page, but have since poked around and there’s a lot of great information there. There’s a plethora of information on Ajax and related technologies, platforms, and projects. Swik is also folksonomy-enabled (buzzword++). For example, here’s the framework tag, python tag and java tag.

    It’s a great little service.

  • Geolocation Information Gaps

    I’ve been seeking out interesting data sources to plot in Google Earth after learning the basics of KML. I’ve been wanting to do something cool with NOAA’s XML weather feeds since I heard about them, so I thought I would download the 700kb list of stations serving up XML and spit out some KML from that data as a “neat” first step.

    I’ll probably still do that, but after parsing the data, I’m a bit dissapointed. As always there are huge gaps in geolocation information. In order to get my hands on the data I turned to xmltramp which is an awesome library for accessing simple XML documents in a pythonic way. I then whipped up a few lines of Python to walk through the data:

    import xmltramp # http://www.aaronsw.com/2002/xmltramp/
    
    f=open('stations.xml', 'r')
    doc=xmltramp.parse(f.read())
    count = 0
    total = 0
    for station in doc['station':]:
      total = total + 1
      sid = str(station['station_id'])
      lat = str(station['latitude'])
      lon = str(station['longitude'])
      if (lat != 'NA') and (lon != 'NA'):
        print "Station ID: " + sid + \
        " (" + lat + "," + lon + ")"
        count = count + 1
    print str(count) + " out of " + str(total) + \
    " stations are geolocated."

    Here’s the output of the above code:

    mcroydon@mobilematt:~/py/kmlist$ python kmlist.py
    Station ID: PAGM (63.46N,171.44W)
    [... snip ...]
    Station ID: KSHR (44.46.10N,106.58.08W)
    422 out of 1775 stations are geolocated.

    Well that’s a bummer. 422 out of 1775, or less than 25% of all stations are geolocated. While that’s still 422 more stations than I knew about previously, it’s a far cry from a majority of weather stations across the United States.

    Another thing you will notice is that some stations appear to be expressed in degrees in decimal form (63.46N) while others appear to use Degrees/Minutes/Seconds (44.46.10N).

    It’s gaps like these that can make working with “found” geolocation data frustrating.