Author: Matt Croydon

  • 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.

  • Nokia 6682 Getting Ready to Drop?

    From this post on the massive Nokia 6682 thread on Howard Forums:

    I just called the NBO line and the rep said that the 6682 will be officially available as of tomorrow, the 5th of August through their NBO dept.

    I think NBO stands for “National Business Office,” for larger companies with national accounts. I’m guessing that it will still take some time to get to retail outlets, but this is definitely a good sign for those like me waiting to snag a discounted 6682 on contract.

  • WSDL for Series 80

    I just saw the the Nokia WSDL-to-C++ Wizard fly by my aggregator:

    The Nokia WSDL-to-C++ Wizard is a Microsoft Visual Studio 2003 .NET add-in that creates Symbian C++ code for accessing a web service described by a WSDL file. The code generated by the wizard uses the Service Development API of the Nokia Series 80 Second Edition developer platform and the generated code can therefore only be used on S80 2nd edition compatible phones. The preferred way to use the wizard is together with the Nokia Developer’s Suite for Symbian OS 1.1.

    This should broaden the horizons for C++ app devs targeting Series 80 2nd edition. I’m a big fan of RESTian web services, especially on a mobile device. I wonder how much work it would take to get one of these SOAP toolkits running on Python for Series 60.

  • The Django Shuffle

    Lots of changes are happening in the newly formed Django world these days. Tons of bugfixes and feature additions have been streaming in to the subversion repository. One of my recent favorites is Changeset 384 which adds a django-admin.py inspectdb command. It’s not perfect yet but it should help out people trying to integrate existing databases with Django. The new command will do its darndest to output a Django model given a particular database name.

    In other news, congrats to Eric (slashzero) on the new gig in Naples and to Adrian (adrian_h) on his new gig at The Washington Post.

    Update: Hugo’s at it again and has notes on using Django with Apache and mod_fcgi which build on his experience with Django, lighthttpd and FastCGI.

  • Comment Spam Sucks

    I’ve been doing a poor job at keeping up with comment spam lately. While I still need to go back through all of my comments and delete the spammy ones, I’ve decided to try Spam Karma 2 hoping that will take care of the horde of comment and trackback spam. I think the built-in RBL stuff is snagging all of it, but if you have any problems posting a comment, send me an email at matt at ooiio dot com.

    Update: SK2 seemed to behaving badly in some instances, so I’m going to give WP-Hashcash a go for a bit.

  • The Revolution Will Be Geotagged

    Over the weekend I’ve been working on a Python for Series 60 project that I thought up a few days ago while exchanging information with Gustaf between Google Earth instances. It really should have hit me when Google Sightseeing packed its sights in to a KML file, but what can I say, I’m a little slow.

    After sending a .kml file via email to Gustaf, I decided to take a look at what exactly made up a .kml file. I started to drool a little bit when I read the KML documentation. The first example is extremely simple yet there’s a lot of power behind it. A few lines of XML can tell Google Earth exactly where to look and what to look at.

    Proof of Concept

    With this simple example in mind, I started to prototype out a proof of concept style Python app for my phone. Right now everything is handled in a popup dialog, and for the time being I’m just going to save a .kml file and let you do with it as you please, but over the next few days I plan to re-implement the app with an appuifw.Form, get latitude and longitude information from Bluetooth GPS (if you’re so lucky), and work on smtplib integration so that the app can go from location -> write KML -> send via smtplib.

    Rapid Mobile Development

    When I say that I’ve been working on this app over the weekend, that’s not strictly accurate. I prototyped the proof of concept over about 20-30 minutes on Friday night using the Python for Series 60 compatability library from the wonderful folks at PDIS. I then spent the rest of some free time over the weekend abstracting out the KML bits and reverting my lofty smtplib goals to saving to a local file on the phone. I’m not sure if the problem is due to my limited T-Mobile access or if I need to patch smtplib in order to use it on my phone.

    There’s also one big downside to trying to use smtplib on the phone, and that’s the fact that smtplib (and gobs of dependent modules) aren’t distributed with the official Nokia PyS60 distribution, so if I’m going to distribute this app with smtplib functionality, I’ll have to package up a dozen or two library modules to go with it. I’m going to mull it over for a few days and see if I can get past my smtplib bug or investigate alternatives.

    from kml import Placemark

    I’ve started a rudimentary Python kml library designed with the Series 60 target in mind. It’s rather simplistic, and so far I’ve only implemented the simplest of Placemarks, but I plan to add to it as the need arises. It should be quite usable to generate your own KML Placemark. Here’s a quick usage example:

    >>> from kml import Placemark
    >>> p=Placemark(39.28419, -76.62169, \
    "The O's Play Here!", "Oriole Park at Camden Yards")
    >>> print p.to_string()
    <kml xmlns="http://earth.google.com/kml/2.0">
    <Placemark>
      <description>The O's Play Here!</description>
      <LookAt>
        <longitude>-76.62169</longitude>
        <latitude>39.28419</latitude>
        <range>600</range>
        <tilt>0</tilt>
        <heading>0</heading>
      </LookAt>
      <Point>
        <coordinates>-76.62169,39.28419</coordinates>
      </Point>
    </Placemark>
    </kml>

    Once I have my Placemark object, saving to disk is cake:

    >>> f=open("camdenyards.kml", "w")
    >>> f.write(p.to_string())
    >>> f.close()

    If you have Google Earth installed, a simple double click should bring you to Camden Yards in Baltimore. The simplicity of it and the “just works” factor intrigue me, not the fact that this can be accomplished in a few dozen lines of python but the fact that KML seems so well suited for geographic data interchange.

    Camden Yards in Google Earth

    It’s About Interchange

    If you are really in to geographic data, and I mean so at an academic or scientific level, KML probably isn’t the format for you. You might be more interested in the Open Geospatial Consortium’s GML (Geography Markup Language). It looks like it does a great job at what it does, but I’m thinking that the killer format is aimed more at the casual user. KML is just that. From a simple Placemark describing a dot on a map to complicated imagery overlays, KML has your back covered. I find the documentation satisfying and straighforward, though I’m no expert on standards.

    In the very near future conveying where you are or what you are talking about in a standard way is going to be extremely important. Right now there’s only one major consumer of .kml files and that’s Google Earth. Expect that to change rapidly as people realize how easy it is to produce and consume geodata using KML and .kmz files (which are compressed .kml files that may also include custom imagery).

    I would love to see “proper” KML generators and consumers, written with XML toolkits instead of throwing numbers and strings around in Python. I would love to have a GPS-enabled phone spitting out KML using JSR-179, the Location API for J2ME. I hope to use Python for Series 60 to further prototype an application that uses a Bluetooth GPS receiver for location information and allow easy sharing of geodata using KML.

    The Code

    If you’d like, take a look at the current state my kml Python library, which is extremely simple and naive, but it allows me to generate markup on either my laptop or N-Gage that Google Earth is happy to properly parse. A proof of concept wrapper around this library can be found here. I hope to expand both in the coming days, and I hope to soon have the smtplib-based code working properly on my phone with my carrier.

    Update: Oops, forgot to add the <name/> tag. Fixed. The name should now replace the (ugly) filename for your Placemark.

  • Pythonic Wensleydale?

    I’m guessing that the PyPI folks got tired of pronounciation issues and being confused with PyPy. And so cheeseshop.python.org was born, or at least I’m assuming that’s how it came about.

    I wonder if they’ve got my Wensleydale in yet.

    Update: Looks like it’s just a hostname switch according to AMK.

  • Why Yahoo! Music Unlimited Makes Sense

    This is yet another observation that I had a week or two ago that’s been sitting in the WeblogPostIdeas queue for far too long. It’s a rather obvious actually, but it seemed to “click” after Rio released a firmware update that included PlaysForSure support to a few of their more popular models. This meant that a sexy little 2.5, 5, or 6 gig player that can be easily had for less than $149 could make use of subscription audio and not just the $n per download model.

    In a perfect world I could go online, pay my $.99 (or $.89, or $.79), download a song, and be able to do whatever the hell I’d like with it. Unfortunately we just don’t live in that type of world. Yes there are a few companies out there that “Get It” and provide unencumbered plain-jane mp3s when you pony up your cash. Yes there are ways of getting around iTunes and other types of DRM, but it’d be nice not to commit a crime in order to use the music you paid for in a manner that you see fit, like stashing a copy of it on your laptop, desktop, protable player, music server at home, and your desktop at work. I mean that’s just something you should be able to do with something you’ve paid $.99 for.

    But I digress. You pony up your buck and you don’t actually own the music and you can’t really do what you’d like to. That’s realy okay. Like I said, there are ways around most of it, but that’s not something that Joe User should have to deal with.

    That’s where Yahoo! Music Unlimited comes in. It fills that gap between price per downloads that you don’t own and higher priced subscription services.

    What have they done right? They’ve gotten the price point down to the “no-brainer” level. Really. Five bucks a month (if paid annually of course) for all you care to eat, and you can listen to it as long as you pony up monthly or annually. It’s easy to pay more than that on a coffee run to Starbucks. Yeah you don’t own your music and there are restrictions, but that’s not much different than the stuff you paid your buck for.

    Having said that, it’s not perfect. Y! Music Unlimited only works if you’ve got Windows, which leaves out Mac, Linux, and other people out of the loop. Still, for a lot of people this music service makes a lot of sense.

  • N-Gage: SSX Isn’t Tony Hawk

    I’m a bit bummed after picking up SSX: Out of Bounds for the N-Gage platform. I’ve been eyeing it ever since it was released at $34.95. I have a lot of trouble paying $34.95 for any game, let alone a game that I can’t demo for a platform that’s becoming harder and harder to find.

    There’s still a mini-aisle of N-Gage stuff at my local game merchant, but the people behind the counter can’t do much more than use their cognative skills to match the game box you’re talking about with the one behind the counter. They don’t know anything about “that N-Gage thing” and nobody seems to have used games for it anymore. Tony Hawk was the best five bucks I’ve ever spent on a gaming platform, hands down.

    That brings me to my review of SSX: Out of Bounds. It’s pretty good. I’m getting in to it a bit more, not always placing last, and even landing most of my tricks. But it’s just not Tony Hawk. (Read: Tony Hawk rocks.)

    I still love my taco though. I forget about it every so often, but it’s always there in my backpack, ready for a quick game or to let me listen to the evening edition of Marketplace.

    There are some promising titles slated to come out for the mobile gaming platform that wouldn’t die (or hasn’t pulled a Zodiac yet).

    In September, there’s going to be a release that should have been a launch title: Atari Masterpieces Volume 1. Comeon, everybody loves retro gaming!

    Then in November I’ll be paying full price for the new Pathway to Glory title, simply because Pathway was so much fun. I’ve gone on to the Arena looking for a quick game, and there were a few people around right after launch, but nowadays I can’t seem to find anyone to play a quick pickup game with. It’s a shame too, because online/multiplayer was the killer feature of an already killer game. That doesn’t make me feel good about the total number of Pathway copies sold. I already feel like the only N-Gage user on the Eastern seaboard though.

  • Mozilla Minimo .007

    Very early this morning I saw a story fly by on Yahoo! News about a preliminary release of Minimo for PocketPC. I thought that was kind of neat so I checked out the Minimo homepage but didn’t see any downloadables. Lo and behold just a few hours later, PocketPC Thoughts has tracked down a screenshot and a link to the download. I think the tabs are critical for me.

    I would also love to see Minimo on the Nokia 770, though the device ships with Opera which looks like it will have a lot of polish. Even so it would rock to have browser alternatives such as Minimo and GTK+ WebCore.

  • Shuttle Fleet Grounded

    A bit of sad juxtaposition back to back in my aggregator this evening:

    CNet: Blog: Scanning today’s postings, a reader might think the world was somehow transported back to the dawn of the Space Age. …

    BBC News: The US space agency Nasa says it is grounding the shuttle fleet after debris fell from Discovery.

    Bummer. I don’t know how many more blows like this our space program can handle. The shuttle program is far outdated and needs replacing, but we’re not pulling out the platinum Amex.

    This news makes me sad.

  • Django on Dreamhost via FastCGI

    Thanks to the hard work by Hugo and an excellent efford by skabber and jdanks, there are now instructions for installing Django on Dreamhost using FastCGI on the Dreamhost Wiki.

    I’m still amazed at how quickly Django development is happening and how quickly a community is being built out around it. Keep an eye on the Django Trac timeline for a glimpse at the latest and greatest.

    Update: Sorry about the mislink, Jay.

  • Symbian Community Newsletter Bits

    I can’t tell you how much fun I have every time a Symbian Community Newsletter hits my inbox. It’s a great resource and there are always at least one or two juicy morsels that I feel compelled to share. This month my favourites are search.forum.nokia.com and a DVD on programming Symbian, Series 60, and UIQ.

    The meta-search covers forum.nokia.com, Series60.com, PreminetSolution.com, softwaremarket.nokia.com, and symbian.com and is powered by google. The DVD looks like it covers a lot of ground and is quite reasonably priced at $24.95.

    Thanks again to David Mery for the excellent (as always) newsletter!

  • Anaranjado

    The other day I was musing out loud (in #mobitopia) about weather an Orange network in Spain would be called Orange or if it would be called Anaranjado. With the announcement that FT plans to buy Amena, Spain’s third largest mobile carrier, I may just find out. My nickel says that Amena will slowly be transitioned in to Orange branding over the next year or two and that in 2-3 years Orange (or Anaranjado) will be at least the #2 carrier in Spain.