This week I have mostly been writing perl

essuu on 2002-11-23T13:28:40

All in all, this has been a good week for me. True, I haven't launched my new company website like I promised myself I would do without fail but I have had fun with perl.

London.pm technical meeting

We had a tech meet. Lot's of people have written about it, including Acme, Barbie, Ranguard, Spyhg and twoshortplanks. Many thanks to the latter (a.k.a. Mark) for organising it & to Profero for hosting it.

I love tech meets. I like learning unexpected things, such as finding out about a module that's going to make my life easier. I like catching up with people I haven't seen for a while. I always come away from a meeting more enthused about perl than I was before.

Personalising Flash

My work project this week has been writing some little cgi scripts to process data for a client-side e-invite written in Flash. Simple requirement, add the invitee's name into the movie and capture their response when they click on various buttons. Oh, and email them with the link to their invite. And can we see who's responded ?. Ah, and we'd better send them a confirmation email if they've said yes. Don't you just love the shifting sands of client requirements :)

Using perl, SQLite and some Apache rewrite rules I soon had it all working nicely. One of my favourite reasons for using perl is that it allows me to generate html if I want to, or text, or run from the command line or as CGI. Perl is happy in all these environments. So much more flexible than torturing asp, coldfusion etc etc which are the hammers I've seen other companies use to drive in these sort of screws.

Two lessons I learned though :

  1. Flash is like perl, it has lots of facets and few people know them all. I was surprised to find out that the designers knew nothing about Flash's interactive capabilities despite them being excellent graphic designers. I found myself having to learn some Flash just to get the project working. I shouldn't be surprised I suppose, I know next to nothing about writing gui apps in perl yet I am reasonably confident with cgi and data munging.
  2. Self contained scripts are fine but the instant you start cutting and pasting that DBI connect string and some SQL code into the next script, paste them into a module and share it between your scripts. You will be grateful for it later, when the next request comes along !

Quizz of the Week

I haven't had much time for this over the last 2 or 3 weeks and procmail has been piling up unread emails in the qotw mailbox for me but the heat and light around the "use strict and warnings mantra" debate put it back on my radar. I tried this weeks quiz today and made a passable attempt at it. It was fun to try and unlearn all the idioms I usually use. I think it resulted in a better solution so I must try to be similarly objective in my normal coding.