Recent blog entries for wainstead

26 Mar 2008 (updated 27 Mar 2008 at 14:49 UTC) »

In to work by 6:58am. Still overcoming jet lag from my trip to Japan.

I think maybe no matter how one documents a software project, it's the experience that counts more... for example, I was just reflecting on how I moved the store code to use native PHP sessions. This brought to mind how sessions work in the store and the changes that happened; all of that I experienced because I did it. To convey that in words on a web page or a piece of paper somehow omits something. The essence, or perhaps the Quality of it, in the "Zen And The Art Of Motorcycle Maintainence" sense.

11 Mar 2008 »

Got tinyfugue 50b8 to compile on Leopard tonight; one line was all that was needed. Out of the box the compilation failure is:

malloc.c:15: error: syntax error before 'mmalloc_base'
malloc.c:15: warning: initialization makes integer from
pointer without a cast
malloc.c:15: warning: data definition has no type or storage
class
make[1]: *** [malloc.o] Error 1
make: *** [files] Error 2

Add this at line 13:

#include <sys/types.h>

and it should compile. I tested it against my local MOO and it worked fine.

30 Aug 2007 »

In my spare time I'm reading "Thinking in C++" and really enjoying it. I've spent a few hours trying to get the LambdaMOO code base to compile as C++; it's been really educational to change the code to get it to compile.

I have much larger plans along these lines... and will take a deeper plunge with LambdaMOO when I finish the last two chapters, hopefully in the next couple of days. Certainly by Sunday! Then I'll start volume two.

30 Jul 2007 »

Today I got rails to talk to two databases at once, and to some legacy tables, at that. This is most yay.

9 Jun 2007 »

I finally released LHHReplay today. Someone emailed me looking for it! For weeks there's been nothing but an empty SourceForge project.

LHHReplay is a Perl script that uses the output saved from LiveHTTPHeaders. The goal is cheap, easy, high level web application testing.

Some knowledge of Perl is required, and you'll have to install Test::WWW::Mechanize , which has usually required a lot of modules itself.

4 Apr 2007 »

I've been burning cassettes to CD with my new Tascam CC-222 MKIII. I've been conflicted over whether to blog about it here or on MySpace, since it's a cross between the technical stuff I do (programming, scripting) and the creative stuff from my past (old radio talk shows). But I'm kinda sorta journaling the process on my MySpace blog.

But I do want to put a plug in for rb-appscript, which lets you use Ruby instead of AppleScript to script Mac applications. Just playing with irb and appscript is major fun!

I found this weekend that I only needed to skim the first 60 pages of Agile Development with Ruby On Rails to build a quickie database entry form: CD title, original air date, burn date, notes, etc. But after I post the data, the return page doesn't tell me the ID, which I need to write on the newly burned disc. I have to dig through the Rails API docs to figure that one out.

Then I need to write an rb-appscript that prompts me for the disc ID when I insert the newly burned CD. The script will automagically fill in all the CD data for me.

10 Mar 2007 »

Been slowly reading "Getting Things Done" and found this great post on using Quicksilver for quickly adding things to a todo list. The post is out of date though; to get the "Append to..." action in Quicksilver, pull up QS's "Preferences," click "Plugins," and check "Text Manipulation Actions." Create a text file in a folder that QS catalogs, and you're all set to go.

With this setup I can add to my todo lists almost as fast as I think of them, and without interrupting my workflow by switching applications.

1 Mar 2007 (updated 1 Mar 2007 at 18:45 UTC) »

Converted my first cassette to CD last night on my new Tascam CC-222. Totally great: this unit is a dream to use and the results were fantastic. I only converted one hour, though, of about nine hundred hours of stuff. The road is long.

I signed up for Amazon's S3 during lunch so I'll have a cheap place to dump this stuff as time goes on. It's all my old radio shows.

I'm doing a kind of load test with Gallery's Java applet and Safari: upload 12,000 photos. The applet's interface froze around 3,347 photos but the uploading continues. Gallery continues to do just fine though, and that's amazing because all those photos are stored as a pickled array of AlbumItem objects.

OK, this is really freaky: the applet interface just unfroze after more than half an hour of nothingness.

So I have a lot to think about: I have maybe a thousand hours of radio shows, tens of thousands of photographs and maybe a lot of scans to store online. I need a way not just to distribute it, but a way to let people help annotate everything; a lot of the radio shows lack dates on them. A lot of the photos have no dates, or I've forgotten who the band is or who the people are. The collective memory of everyone involved can be facilitated with a Web site that's built the right way. I wonder if anyone else has tackled this idea.

27 Feb 2007 »

Ouch. Twice today I spent way too much time hunting for a bug that turned out to be a typo in a variable name! Shame on me for programming in PHP and not using error_reporting(E_ALL), which is akin to doing
use strict;
use warnings;
in Perl. It would have saved me a lot of time.

In other news, I see Sourceforge's shell server(s) are available again so I need to get cracking and release LHHReplay. I need to work out a simple document first... in fact better I relearn POD, which I haven't touched in years, so the doc can eventually be module documentation.

And my Tascam CC-222 came today, a cassette-to-cd burner with the most important feature of all: pitch control on the cassette deck. I can finally start converting my old radio shows into podcasts.

17 Feb 2007 (updated 17 Feb 2007 at 20:17 UTC) »

I finally registered with Sourceforge for a new project: lhhreplay. This is a Perl script I started developing a couple years ago to replay the output of LiveHTTPHeaders.

I'd searched high and low for a good testing solution for web applications; I should have written an article at the time. I tried Selenium, HTTP::Recorder, and a few others but one key obstacle was being able to go from HTTP to HTTPS and back again.

So I worked out a small Perl script that uses the saved output of a LiveHTTPHeaders session, and installed Test::WWW::Mechanize. This little tool has been such a huge timesaver for me that I feel the need to release it.

One of my typical uses is to open LiveHTTPHeaders, fill up the shopping cart I'm working on with a lot of items, and then save the script. Whenever I've emptied the cart I can run:

lhhreplay.pl fillcart.lhh

where fillcart.lhh is the LiveHTTPHeaders output that I saved to disk. Some of the items that go in the cart are complex, like Christmas cards that require sandwiching images and adding text; I'm spared the drudgery of doing this sort of thing over and over.

There are a few caveats I'm going to have to solve however. It's almost always a good idea to delete your cookies before you start; to log out of the web app before you start; and the set of rules that I use for Test::WWW::Mechanize are specific to my needs, so that will have to be factored out somehow. But these issues can be solved.

Inevitably I will have to factor the code out of the script in to a Perl module. And one longstanding "bug" is how the script handles 302s, but that would take up too much space here to go into.

For now I am waiting for Sourceforge to approve my project request. An example run is here. When there's failures the Test harness system reports the number of failures at the end of the run.

56 older entries...

New Advogato Features

FOAF updates: Trust rankings are now exported, making the data available to other users and websites. An external FOAF URI has been added, allowing users to link to an additional FOAF file.

Keep up with the latest Advogato features by reading the Advogato status blog.

If you're a C programmer with some spare time, take a look at the mod_virgule project page and help us with one of the tasks on the ToDo list!