blog index
Replacing tabs with spaces in files 25 November 2007
I’ve got a bunch of source code that I’d written with 4-character wide tabs. I needed to replace them with spaces. I’m ashamed to admit how long it took me to figure out.
Read more →Sorting numeric values stored in character fields with views.module 29 August 2007
I spent a good chunk of time this morning trying to figure out how to get the
views module to sort a character field with
numeric data correctly. The audio module has
a normalized table of meta-data meaning that there’s one column for the tag
name and one for the value. The value is stored as a character string which
causes problem when sorting numeric data like the track numbers or years. If
you’ve got a SELECT value FROM audio_metadata ORDER BY value that returns the
range of numbers 1...13 it ends up sorted as 1,10,11,12,13,2,3...9. The
trick as I discovered
is to add zero to the field to coerce it to a numeric value:
SELECT value + 0 AS v FROM audio_metadata ORDER BY v.
Using SimpleXML with HTML 17 August 2007
PHP 5’s SimpleXML module is one of the the biggest reasons to upgrade to 5. If you’re parsing RSS feeds or the results of webservice requests it works beautifully and saves a ton of time. The only problem with it is that it’ll only load valid XML. I banged my head against it for way to long before coming up with the following:
Read more →Using PHP and CURL to do an HTML file POST 17 July 2007
After scouring the internet to find out how to do multipart post operations and finding nothing nothing, I decided to save someone else some time. The trick is that @ before the file name:
Read more →Pour one out for Steve Gilliard 04 June 2007
I was shocked to read today that Steve Gilliard, author of The News Blog, my favorite blogs for the past few years died on Saturday. He did an amazing job summarizing the news of the day with biting commentary. Before I found his site, I’d do several hours of news surfing each day. Once I started following it, I didn’t really bother surfing news anymore, if Steve didn’t post about it, it probably wasn’t that interesting. Since he fell ill, I’ve pretty much stopped reading the news. Sure I’ll take a look at Daily Kos every now and then but without Steve’s wonderful commentary, it’s just not worth the time. My deepest condolences to his family and all his other readers.
Read more →jjjjj.... j Fay Kaaaaa 19 May 2007
Read more →CSS with rhythm 07 May 2007
I’m still digesting all the cool things I came across at SXSW. The last day I was there I went to a panel called Web Typography Sucks put on by Richard Rutter and Mark Boulton. I walked out with main points from their presentation:
Read more →OMFG - What's going on? 22 April 2007
Read more →On the Lullabot podcast 13 April 2007
I’ve finally made it into the Drupal gliterati! Robert interviewed me earlier this week for the Lullabot podcast. It’s all part of my plan to become a Lullabot when I’m done and graduated. Topics included: Phlickr/Flickr, my Summer of Code project, brewing beer and my stumbling speech.
Read more →the quick way to get good drupal support 10 April 2007
Send your developer a 12 pack of local micro brew – it’ll do wonders! Big thanks to mattrock at WSUM, all your station module issues will be marked critical by default from now on ;)
Read more →Summer of Code 10 April 2007
I put in two applications for this year’s Google Summer of Code. The first was working on programming tools for Squeak and the second was creating a project_metrics module for Drupal. The Squeak proposal was definitely the weaker of the two, there were too many questions I wasn’t able to answer to write a good proposal. In contrast, the Drupal proposal practically wrote itself. I’ve done enough work with Drupal that I already know how 90% of it will work out and I’ll have enough time to figure out the other 10%.
Read more →Bottling beer 02 February 2007
I spent a good chunk of the day bottling my first batch of beer. I’m not saying it turned out great, but I had really low expectations and it surpassed those. I started with 6 gallons, bottled a total of 67, 12-oz bottles. Four bottles cracked while I was capping them, but once I started paying attention to the position of the bottle’s seam, I had pretty good luck. Once I finished, I poured the leftover flat beer from the carboy into a pitcher (it had a crazy amount of yeast in it) into a small pitcher and ended up with a nice afternoon beer buzz.
Read more →Downloading Democracy Now! automatically 25 January 2007
Here’s a PHP script I wrote for the radio station to download each day’s copy of Democracy Now!. This requires that the PHP cURL extension be installed.
Read more →KPSU on Drupal 5.0 19 January 2007
Today I finally broke down and upgraded the KPSU site to Drupal 5.0. I wasn’t too worried about core, I’ve been running 5.0 on this site since the feature freeze and I’d setup DeFordBailey.info and spannerbicycles.com a couple months back. My big concern was with the contrib modules. I’d done a couple of test upgrades over the last month and found plenty of bugs but today was the first one where most things seemed to work. So I made a back-up and said what the fuck. After the upgrade I only found one critical bug. There’s plenty of tweaking to be done in the next few weeks but now I can start hacking away at access modules.
Read more →Seeing your photos in use 05 January 2007
I put most of my photos up on Flickr under the Creative Commons license because I want people to see them and use them freely for non-commercial purposes. A few months back, I got a message on Flickr from someone at MIT who wanted to use one of my photos in one of their open courses. Today, I found a new message informing me know that the course has been posted along with my photo.
Read more →SQL Injection Presentation 16 November 2006
For my CS410 class I’ve created some slides on SQL injection attacks.
Read more →John Deere Stolen 25 October 2006
Well the good news is that I’m still drunk enough that it’s still a bit funny. The bad news is that the John Deere that you may know and love is gone. Stolen by, quite literally, by thieves in the night. I’d picked it up at the Veloshop at 5pm, rode it across the river to the Rose and Raindrop on SE Washington and Grand (for a Drupal meetup with Dries), and locked it up (with a U-lock) to a sign post. When I came back out around 8pm the sign post had been pulled out of the ground and the John Deere was no more.
Read more →


