Category Archives: Web Programming

Greetings World Travelers!

Where do you all come from?As I mentioned in a previous post, I’ve begun to use statcounter.com to help figure out various statistics about people who visit my blog. It’s somewhat fascinating to realize that less than half of my visitors come from the United States. Look at the pie chart on the right which shows the nationality of the last 100 visitors to brainwagon. The Internet (and apparently my own appeal) is somewhat more broadbased than I might have imagined.

And of course, the search terms that people use to find brainwagon are equally as varied, the last 36 queries are somewhat representative:

  • hacking linksys router rt31p2
  • daily show dr. baugh
  • hand shadows pictures
  • man powered helicopter
  • build a smoker from a trash can
  • the painting from the dodgeball movie
  • pvc flamethrower
  • simple telnetd
  • boots of escaping file quality
  • treo podcast
  • autochrome world war 2
  • gadget silly
  • through-wall surveillance
  • ark of the covenent
  • drivers aiptek dv 4500
  • scheme compiler
  • mythtv freebsd
  • squarpent
  • harold yahoo.com harold
  • cg podcast
  • configure thttpd
  • mindstorms balance
  • hipster pda
  • recording podcasts on windows
  • earthquake 9-12-2003
  • aiptek dv4500 poor
  • pongmechanik
  • doom3 hints
  • autochrome color war
  • origami crane eps
  • tablespoon individual lists of usa 2005 @yahoo.com
  • sillyusb devices
  • weight watcher points joes crab shack
  • os-tan john
  • 3d tour chernobyl
  • audio 101

I’m obviously a nut.

Gathering Statistics for Your Weblog

Visits to brainwagon.orgI have to thank Russell Beattie for writing about StatCounter.com, the service that he uses to monitor his website. In the days immediately after the Apple Keynote, his website showed a significant bump in traffic. Neat. I decided to give it a whirl (for the level of traffic that I use it for, it is free, and presents no annoying ads or popups for my readers). I’m only a week into using it, but it’s really very helpful, and now it’s part of my daily “web maintenance” routine. It filters out spiders like Google and leaves you with raw counts on numbers of visitors, where they came from, and what search terms they may have used to find your website. All it requires is the addition of a small chunk of JavaScript to your webpage, and no muss, no fuss, you can access your account on statcounter.com and find out just how few actual readers you actually have. 🙂

One small thing that could be improved is that it doesn’t do any monitoring of RSS feeds, so I can’t use it to monitor who is downloading my podcasts or reading brainwagon just on an aggregator. The reason is of course that even if you put JavaScript in the feed, no aggregator would know what to do with it. It would be nice to have an all-inclusive solution to monitoring downloads, but that would almost certainly require direct access to the Apache log files.

Incidently, I have no interest in this company other than as a satisfied customer. Give it a try if you like.

Hacking WordPress…

I’ve been thinking for sometime that I should really try out the new development version of WordPress. I hacked some crude support for enclosures into my version, but I heard that there was some new code that is supposed to deal with it in the current version, so I thought I’d give it a try.

The way that I hacked the system was by the use of custom fields: basically I added two fields audiourl and audiolength, which if they were present in a posting would:

  • add the necessary enclosure tag to the RSS feed, and
  • add a link with the word “Enclosure” and the size to the posting so those without ipodder scripts could download the mp3 file

This worked fine, but was sub-optimal because it required me to type in the size of the audio enclosure itself. In the CVS version of WordPress, any link to an audio, video or image file is included in the feed as an enclosure, and the code in WordPress is smart enough to try to fetch the header for the requested item to get its Content-type and its Content-length, so that simplifies the overall process.

It took me only a few minutes to go back through my database using a python script and the MySQLdb package and issue the appropriate UPDATE SQL commands to switch one to the other. Et voila! It worked just fine.

While I was trying out the new version, I noticed that it loaded the index page much faster than mine. The key difference would seem to be the right column, and in particular the code that I got from Chaitgear for tracking referers. Digging in the code, found that it does a wasteful SELECT that probably fetches the entire list of referers. Putting a limit onto that query results in the same result, but operates much faster. That’s in place now.

If the CVS version of WordPress checks out, I’ll probably try to deploy it as soon as I can port my brainwagon “theme” over to it.

Happy Halloween!

In an effort to get in the mood for Halloween, I thought that I would change the default color scheme on my weblog until after the ghosts and spooks are gone. Enjoy the pumpkin orange colors, soon we will be back to Brainwagon blue.

On Audio Blogging

I’ve begun to become interested in the idea of audio blogging, or more generally, multimedia blogging. Ideally, I want to have a way to compose and post new entries to a weblog from a mobile location which might include sound, pictures, video and just plain old text.

Ideally, this could all be done with a single gadget. I’ve been researching PDAs for the last couple of weeks, and trying to find a reasonably inexpensive but useful gadget which can serve this purpose, and yet not cost as much as a full laptop. Unfortunately, the $300-$400 price limit I’ve placed upon this project yield only devices which are compromises. The two most promising devices appear to be:

The Dell Axim X30
This PDA costs $314 currently, includes a 624Mhz processor and has both 802.11b and Bluetooth wireless. If it had a camera, it would be terrific, as it is, it’s tempting.
Palm Zire 72
This one sells for $260 or so from amazon.com, includes a 1.3 megapixel camera, can shoot both still pictures and video, but sadly includes only Bluetooth. I’d really like to be able to take advantage of open wireless connections to send email and the like. Supposedly a WiFi card is coming, but that will consume the expansion slot, and it’s unclear if the WiFi card will include some extra flash memory.

If I expand the allowable price range to $600 (ouch), then some other possibilities arise, with some other unique capabilities. Most notably, I rather like:

Asus MyPal A730
As yet unreleased, this PDA appears to be nearly ideal. Not only does it include Bluetooth, 802.11b and IR connections, it has a VGA resolution screen, a one megapixel camera and both SD and CompactFlash memory slots. Very nice.

Okay, so let’s imagine I’ve got one of these devices. I can use it to compose audio files, snap pictures, or compose text entries. I can then send these using ordinary email to my server, and they will automatically be converted into weblog postings. That seems pretty cool, as these devices are small and convenient, and will lend themselves well to increased impromptu blogging.

But what else can we do? Adam Curry has made a plea for some software that allows him to act as a DJ: you can talk, insert bumper music and songs, and record the result as a high quality mp3 file for later streaming. This immediately reminded me of a similar program that Tom Duff wrote several years ago. Tom was nominated to be the sound engineer for a theater production, and spent three weeks coding up a nice little application that allowed you to preload a bunch of sound effects and “perform” them by hitting keys on a control console. The application handled all the scheduling and mixing internally. It shouldn’t be too difficult to do that on a modest PDA these days. Curry suggests that the Studio365 interface is nearly ideal, and staring at it, it does seem like a good starting point.

There are lots of remaining questions though. While modern PDAs are capable of decoding mp3 files in real time without great difficulty, it appears that they aren’t really up to encoding in real time (I’d love to be wrong about this, if anyone knows more about this, let me know) which means that we would have to store the resulting sound files and then compress them as a post process. Assuming that we want to keep such posts short (limited to say 15 minutes) and that the highest quality isn’t required (say 22050hz audio, 16 bit, mono) that cranks up to 40Mb, which is doable, but not ideal, particularly if you have to do the final encoding on a desktop, since sending the 40Mb of audio files over wireless or Bluetooth isn’t all that fast. Some more headscratching and research is clearly needed here.

Perhaps the greatest problem of audio blogs is one of indexing: it’s very difficult to provide searchable content when given only an audio stream. Currently my idea is simply tag audio posts with some searchable keywords, and also to limit the total length of posts to modest 5-15 minute lengths. I’ve thought about trying to do automated speech recognition to provide a searchable transcript, but given that I want to post from remote locations with the possibility of considerable ambient noise, I doubt that would be entirely successful. It won’t help to have a huge number of audio blog entries with no ability to find one that you found particularly compelling.

This is as far as my thinking takes me this morning. Feel free to comment below.

Aaron Brady, Porno for Pythons – Pixie Weblog Software – Hello & Goodbye

I’m currently using WordPress for this weblog, but I can’t help but feeling that the more that people work on it, the less I’m going to like it. After all, I have rather simple needs, and once those needs are satisfied i don’t really see a huge advantage to adding features that somebody somewhere might think is cool. Because of this, I’m constantly on the lookout for additional bits of weblog software.

Today’s Daily Python URL! brings us Aaron Brady’s Pixie Weblog Software which uses Quixote and Cheetah. I haven’t had the time to review it yet, but it seems to encapsulate some of the ideals which I think are important. Enjoy.

Universal Feed Parser

Mark Pilgrim has released a new version of his Universal Feed Parser. I have mixed feelings about the long term viability of this code, since it parses feeds which do not meet the specifications, which ultimately means that people never fix their broken feeds, but the specification itself is wooly enough that this is perhaps unavoidable. In any case, I’ve used it before, it works, and he seems to have done a lot of work generating test cases for it. Give it a try.

How To Build Your Own Blog

orange coneThe title is a bit of a fraud. This is not so much an article on how to build your own weblog as a short bit about what I think is important in building a weblogging system, what is not important and how to drive most directly toward a system that is simple, flexible and works. It also describes some experiments that I’ve been performing, and will soon deploy on my orangecone website. Continue reading

On Blogging Software…

As I work to install WordPress on this site and tweak and twiddle the look and functionality, I can’t help but think that every blog, Wiki and content management system isn’t so much an application as a construction set full of pieces that you can assemble to make a blog or website. Is there some reason why that is the case, or could a more disciplined application be designed and deployed?
Continue reading