Category: Projects

  • Embedding 3GPP in HTML

    Now that QT supports 3GPP files by default, I thought I would look in to embedding 3GPP content in HTML.  It’s quite simple.  Pretty much everything you need to know can be found at Apple’s <embed> page and Apple’s <object> page.  This is how I would embed my little tea movie in HTML so that both IE and Mozilla-based browsers should be able to deal with it (thanks to Russ for the type addition, it should work in more browsers now):

    <OBJECT CLASSID="clsid:02BF25D5-8C17-4B23-BC80-D3488ABDDC6B" WIDTH="128"HEIGHT="112" CODEBASE="http://www.apple.com/qtactivex/qtplugin.cab">
    <PARAM name="SRC" VALUE="tea.3gp">
    <PARAM name="AUTOPLAY" VALUE="true">
    <PARAM name="CONTROLLER" VALUE="true">
    <param NAME="type" VALUE="video/quicktime">
     
    <EMBED SRC="http://postneo.com/vid/tea.3gp" WIDTH="128" HEIGHT="112" AUTOPLAY="true" CONTROLLER="true" type="video/quicktime" PLUGINSPAGE="http://www.apple.com/quicktime/download/">
    </EMBED>
    </OBJECT>

    The size of a 3GPP file from my Nokia 3650 is 128×96 pixels.  Apple suggests adding 16 pixels to the height of your file in order to fit in the controls.  I’m just following their instructions on that one.

    To avoid pissing off the people that read my blog via RSS, I won’t show an example of this in action, but you can check it out at my 3GPP tea test page.

  • Thoughts on Series 90 SDK 2.0

    I’ve been going over some of the docs that cover what’s new in the latest release of the C++ Series 90 SDK.  I have not been able to download the new release, and the Series 90 page has been in flux throughout the day.  Hopefully the correct downloads will appear soon.

    Here are my thoughts so far:

    • ‘Themes’ or ‘Skins’ are the new big thing.  Skins are so dot-com era.  I thought we had moved on.  There is an example of a few skins that do look pretty cool though.  It looks like Nokia/Symbian have allowed skins while retaining a basic overall look and feel.
    • You can now work in Visual Studio 6.0!  I’ve got to find my copy of VS6 (it’s kicking around somewhere), but the more options the merrier.  I’m not too fond of CodeWarrior, but Erik does have a good point: it’s consistent across platforms and targets.  It does a basic level of functions quite well, but I’ve been spoiled by things like Visual Studio, IDEA, and Eclipse.
    • It looks like the new emulator has goodies like access to camera functions and hopefully browsing support.

    I’m pretty much a baby step beyond the basic Hello World Series 90 app, but it’s been a bit of a long process just to get there.  There are a very many options buried in very many files.  True, this is great for localization and the way that Symbian development is done, but I’m having a bit of a hard time adjusting to it.  Going from the basic Hello World app to a base that I can start coding from took longer than it should have.

    So far I have not seen any basic ‘create new project skeletion’ wizards/helpers.  You either start from something simple like a Hello World app, or you create a new project in CodeWarrior and start creating the required files.  For ease of use and quicker developer uptake, a basic project setup wizard would rock.

    Overall my experience has been quite positive, but there are definitely barriers that make coding in C++ for Series 90 not for the feint of heart.  The naming conventions took a little while to get over (but it’s no big deal), and there are tons of magic macros that do a lot of the heavy lifting.  The MVC structure that is imposed on programmers is a good one IMHO.  It promotes good patterns and discourages doing things in a quick and dirty way.

    I’ll keep stumbling along…

  • New Series 90 SDK On Its Way

    According to a press release, Nokia has a new version of their Series 90 SDK on the way out, though their Series 90 web site has not been updated yet.

    One of the new SDKs main features is an emphasis on browsing over TCP/IP.  This will be a welcome addition to content providers and mobile web developers.

    I’ve been waiting for browsing support since the first version of the SDK came out, and I’m quite happy to see it included in this upcoming release.  By the woding of the press release, I’m not sure if they’re unifying the two SDKs (Java and C++) or if that was just Press Release Speek that should be ignored.

    More as it comes in.

  • Groovy?

    Must check out Groovy  at some point.

  • LOAF Wiki Launched!

    My self-proclaimed Official LOAF Wiki launched this evening.  It needs a bit of refactoring, but it is positioned to serve as a LOAF clearinghouse.  Also check out the LOAFful badge to the right (generated by the Kalsey button maker)

  • LOAF Roundup

    I’m quite amused to find LOAF become a mini-meme this morning.  Here is a list of implementations that I have seen so far:

    There are also two graphics for you to choose from for your LOAF branding.  Where is that perfect LOAF implementation in Haskell?

  • Series 90 C++ Emulator and Development Environment

    I downloaded the demo of CodeWarrior for Symbian and the Nokia s90 C++ SDK this afternoon and I can say without a doubt that the C++ emulator is ten times better than the j2me emulator.  You can definitely get a feel for the environment with the C++ emulator.  I built and ran the C++ Hello World program (which is a helluva lot more complex than the j2me hello world) and was blown away when the above screen popped up.

    The environment is beautiful.  I took the time to poke around a little bit, and everything seems to make sense so far.  The only thing I am worried about is text input.  It looks like your two options (at least on the 7700) will be tapping away at a virtual keyboard or using a pop-up text regognition box.  Below are examples of these two types on input.

    I continue to be impressed with the environment, though I do find the C++ toolchain a bit cumbersome.  The Metrowerks IDE is pretty much required for writing C++ for the 7700.  The C++ SDK is also a lot beefier, but you get an awesome emulator with it!  The build process is run on special build files either at the command line or from within CodeWarrior.  I can’t complain, I just wish that it was easier.  From grokking the various examples that are included with the SDK, the C++ route is definately the harder way to go, but it so much more powerful.

    The basic Hello World app requires the following files:

    • HelloWorldBasic.cpp (DLL entry point)
    • HelloWorldBasicApplication.cpp (Application that creates a new blank document and defines the app’s UID)
    • HelloWorldBasicApplication.h (header)
    • HelloWorldBasicDocument.cpp (A document object representing the data model, constructs the App UI)
    • HelloWorldBasicDocument.h (header)
    • HelloWorldBasicAppUi.cpp (App UI object that handles the commands generated from menu options)
    • HelloWorldBasicUi.h (header)
    • HelloWorldBasicAppView.cpp (Application View object that displays data to the screen)
    • HelloWorldBasicAppView.h (header file)
    • HelloWorldBasicView.rss (Resource file.  It describes the app’s menus and string resources.)

    The build/make/run process isn’t too hard after that:

    bldmake bldfiles
    abld build winscw udeb
    epoc

    I’ll be diving deeper in to the development environment and emulator in the coming days.

  • My PythonToolbox

    I have posted PythonToolbox, a list of modules and resources that I use quite often with Python.  It includes modules that I commonly use for database access, markup, XML input/output, templating, searching, and classification.  It also has a section on resources that I always seem to be turning to.  Russ also helped out by adding some additional resources.

    As always, it’s a wiki page, so if there’s something that you think should be in my PythonToolbox, feel free to add it.  Enjoy!

  • PyCon DC 2004

    Okay, under no circumstances will I miss PyCon DC 2004:

    DC 2004 will be held March 24-26, 2004 in Washington, D.C. It will contain many of the features of DC 2003, including a development sprint and a similar cost structure. Registration will be open by October 1.

    I flaked out of PyCon DC 2003, but I have to go this time.  I’ll also try to whip up a few proposals, we’ll see how it goes.

  • Channels Are Back

    Sorry for the outage, but I’ve not been using categories for quite some time because of space issues.

    My web provider recently gave me more storage, so I’ll be posting to categories again.

    Enjoy.

  • Flagpoleware

    Russ:

    Releasing your code as open source is a pain in the ass. I never realized this before, but after six months or so of having code out there, I’m realizing the truth of this. You’re always responsible for your code and it suuucks. The whole idea of OSS sounds great, “build it and they will come” and all that… but in reality it’s just a headache.

    Most of the projects (or prototypes) that I have released are pretty much Flagpoleware: run them up the flagpole and see if it is useful to anyone else.  I’d highly suggest reading the rest of Russ’ rantlet on small open source projects and support if you’re into that kind of thing.

  • Quick tblib Tweak

    I tweaked tblib to use a user agent:

    User-Agent: tblib/0.1.0 Python

    I’ll probably tweak that a bit before the next minor tblib update.

  • tblib Backward Compatability

    I was reading over the trackback page this afternoon and discovered that the current implementation of trackback is slighly different than it has been in the past.  It looks like just a few changes need to be made to tblib in order to gain backward compatability.

  • URLs, Life: Linkage From Japan

    I always feel like a rock star when I get linkage from The Diary Formerly Known as The Diary Formerly Known as Go Ahead and Make My Day.

    Babelfish usually does a half-decent job at translating it for me.

  • tblib Submitted to Freshmeat

    I submitted tblib to Freshmeat.  Hopefully you’ll see it scroll by soon.  I didn’t post this to the front page, as my regular readers are probably bored of hearing about tblib.

    Here it is in all its glory: a freshmeat release.

  • tblib Has a Home Page

    I created a one-stop tblib page.

  • tblib Command Line Client

    Here it is, that command line client using tblib that I promised you.  It’ll be fairly useful under a unix-like environment, as you can just type ./tbclient.py <args> while in windows you have to do python tbclient.py <args> or use PythonWin or something.  Here is a sample session from one of my Linux boxes:

    [user @ box tb]$ ./tbclient.py
    Usage: tblib <args>
      Valid arguments:
        -tburl foo: ping the trackback url foo
        -title foo: title of your trackback or weblog post
        -excerpt foo: Uses foo as the excerpt to be posted to the trackback
        -url foo: The url to point to (usually the url of the post in which you ref the trackback)
        -blogname foo: The name of your weblog
    [user @ box tb]$ ./tbclient.py -tburl http://Queue/weblog/mt-tb.cgi/7 -title "My Title" -excerpt "My Excerpt" -url http://postneo.com -blogname "My Weblog Name"
    Trackback command line client here.  Preparing TrackBack...
    TrackBack URL: http://Queue/weblog/mt-tb.cgi/7
    TrackBack Title: My Title
    TrackBack Excerpt: My Excerpt
    Your URL: http://postneo.com
    Your Weblog Name: My Weblog Name
    Pinging http://Queue/weblog/mt-tb.cgi/7...
    HTTP Response: 200 OK
    TrackBack Error Code is: 0 (zero is okay)
    Done!

    The client, as the library is released under GPL, but I’m waiting for someone to speak up and I’ll be flexible on licensing.  There are a couple of gotchas in the current (really simple) client.  For example, you need to enclose arguments that are more than one word in quotes, otherwise it will truncate to the first word.  I’m really not dealing with command line args as well as I should be, but you can view the source for a quick and dirty way to DIY.

    That’s about all the functionality that you get in this 0.0.2 release.  The source code is here.  It relies on tblib-0.1.0 or greater (unless I break something in the future).  Send any questions or comments my way.  Over the next day or two, I’ll try to complete the client with an -autodiscover option.  I also want to clean things up with the option of -a || –autodiscover, etc.  I know it’s quite easy, I just didn’t have the energy to google it up.

    I still owe you some real docs and an actual project page, but that will come eventually.

  • tblib in Action

    Here’s a shot from the trackback section of a MovableType weblog I have running behind the firewall:

    tblib

    For the record, implementing these functions in Python was trivial.  The source for tblib is pretty darn short even with a bunch of comments.  I could compress it a bit, but I’d like to keep it as readable to the newbie as possible.  Perhaps grokking the source to tblib would be the next logical step for a newbie after reading my ftplib example.  After they read Dive Into Python, of course.

  • tblib 0.1.0 Released!

    I managed to pick up tblib this evening and start working on it again.  I implemented some basic error checking and autodiscovery.  (Yay!)  The previous version of tblib would just consume the XML that resulted from a trackback ping.  Now it parses the xml with a really simple regular expression (thanks Steve!).  If it was a successful ping, self.tbErrorCode will be 0 (which is a good thing) and self.tbErrorMessage will be None.  If something went wrong, self.tbErrorCode will be 1 and self.tbErrorMessage will hopefully help you a bit.

    Here’s an example for you:

    >>> import tblib
    >>> tb = tblib.TrackBack()
    >>> tb.autodiscover('http://Queue/weblog/matt/archives/2003_01.html#000007')
    >>> print tb.tbUrl
    http://Queue/weblog/mt-tb.cgi/7
    >>> tb.blog_name = 'My Weblog'
    >>> tb.title = 'This Post Will Ping That Weblog Entry'
    >>> tb.url = 'http://postneo.com'
    >>> tb.excerpt = 'I released tblib 0.1.0 today.  It supports autodiscovery...'
    >>> tb.ping()
    >>> print tb.tbErrorCode
    0

    Here’s the source: tblib-0.1.0.py.txt.  To use it, save it (as tblib.py) to a directory, create a script in that directory, and put import tblib at the top.  It doesn’t use anything bleeding edge, but I’m pretty sure you’ll need Python 2.x.  See my original tblib weblog post for additional info.  It is currently licensed under the GPL, though if that is stopping you from including it in your project, email me and I can dual-license it or something.  Also use that email link to send me any questions or comments.

    Eventually, I’ll code a setup script for tblib, and I still owe you a command line trackback client using tblib.

  • My New Python Best Friends

    I’d like to give a quick shout out to a few of my favorite new Python modules:

    • httplib: The httplib example page has some excellent usage examples for both GET and POST methods.
    • urllib: urllib.urlencode is your friend if you need to encode a url for inclusion in a POST request.
    • urlparse: I started to parse and split up urls by hand using regular expressions and string manipulation.  Then I found urlparse.  It will take a url like http://postneo.com/projects/wapblog and turn it into a useful tuple: (‘http’, ‘postneo.com’, ‘/projects/wapblog’).  This improved my quality of life considerably, and makes POST requests via httplib possible.

    P.S. These libraries converge to make working with RESTful interfaces DUH-simple in Python.