We held our third technical Perl Mongers meeting this evening. I enjoyed it and learned things. Great! I suspect I'll put the slides on our web site once I've caught up with some sleep.
Lee started out by telling us how he uses Perl in his work as a bioinformatician. Nik noticed that anti-spam code uses some of the techniques he described, which made me think a little about evolution and spammers. Lee had very detailed slides that supported his talk well.
Robbie told us about the fun and pitfalls of running an online game. He explained how he used HTML::Template to let players customise their in-game views; he told us how he used
s/\bgay\b/hard/ on a messaging system used by frustrated teenagers.
Then we took a quick break to chat to each other before I waffled about things I learned at YAPC:Europe. Well, some of them, at least. I forgot to mention the Chartreuse and making people miss their flights home.
Finally, Nik gave us a great introduction to SVK. Unfortunately, my clever idea of him pulling out the network cable to work offline couldn't happen as he had an SSH connection open to the machine at the other end of the cable. By now I should have learned that my clever plans don't work.
But we had fun. And I guess it's more or less our first birthday now as a Perl Mongers group. I'm still surprised we can draw this kind of audience for Perl in Milton Keynes, but really pleased that our group does so well.
And as Jonas says, "MiltonKeynes.pm sounds more like a solicitors firm than any other Perl Monger group." I choose to take that as praise..
For my sins, I look after ActivePerl installations on several Windows machines including my desktop machine at work. If you don't sin enough to use Windows, the following won't interest you much.
Read on if you use PPM and regularly encounter error messages like:
Unable to recognise encoding of this document at C:/Perl/site/lib/XML/SAX/PurePerl/EncodingDetect.pm line 96, line 251.
Unable to recognise encoding of this document at C:/Perl/site/lib/XML/SAX/PurePerl/EncodingDetect.pm line 96, line 265.
Unable to recognise encoding of this document at C:/Perl/site/lib/XML/SAX/PurePerl/EncodingDetect.pm line 96, line 274.
Unable to recognise encoding of this document at C:/Perl/site/lib/XML/SAX/PurePerl/EncodingDetect.pm line 96, line 279.
Unable to recognise encoding of this document at C:/Perl/site/lib/XML/SAX/PurePerl/EncodingDetect.pm line 96, line 287.
Version 0.13 of XML::SAX introduced a rewrite of the pure Perl SAX parser. This parser has behaved awkwardly for a few people: I've noticed it when using PPM on machines with XML::SAX::Writer installed.
After a quick nose through the documentation for XML::SAX::ParserFactory, I installed XML::SAX::Expat through PPM. I then taught XML::SAX to use this parser instead of the whingeing XML::SAX::PurePerl parser by putting the following line in C:\Perl\site\lib\SAX.ini:
ParserPackage = XML::SAX::Expat
PPM now complained about a missing ParserDetails.ini, so I created an empty file at C:\Perl\site\lib\XML\SAX\ParserDetails.ini.
I feel a little guilty about avoiding the problem with a quick hack rather than creating an elegant solution. On the other hand, PPM doesn't spew errors out at me, so I laze around in the sun drinking. Errrr, I mean get on with other mission critical business tasks...
It's almost two weeks since our first MiltonKeynes.pm technical meeting and I've finally got round to putting the slides on our Web page.
We got a respectable attendance: ten people showed up including the four speakers. The speakers covered a good variety of topics from Nik's talk about Testing Legacy Code, using clever tricks like overriding CORE::GLOBAL from within modules to affect how scripts run, through Dave's Databases and Perl, covering DBI and Class::DBI with good explanations of problems you might encounter, and my Gathering information from the Web with WWW::Mechanize to Rod's talk (no slides) about using Perl to tie together a variety of large systems.
The range of talks did justice to Perl's versatility and power: you can override its internals, hook into databases and Web sites easily, or use it as the Internet's duct tape with a few convenient scripts.
It's funny how time flies: tomorrow we're off to the pub again.
For a small city, not known for its computing industry, we're doing well enough to provoke London.pm into holding a long overdue technical meeting. In a moment of weakness, Dean persuaded me to talk at that, too.
So I gave a lightning talk on Tracing Code with Aspect.pm which Dominic Mitchell has summarised well. From the other talks, I learned a bit about OCaml and JSON both of which have lingered on my things to learn about list for too long.
This evening, I found myself fixing a Postfix installation on a Fedora box using yum. I've used none of these before, but still managed to get everything working. I didn't do this out of the goodness of my heart, though: I did it to guilt trip Robbie into talking about how he uses Perl to run a multiplayer game in his spare time at the next MiltonKeynes.pm technical meeting. Watch this space.
In the WWW::Mechanize talk I gave at this year's YAPC::Europe and NPW, I describe how I have passed invalid HTML through the command line tool tidy before passing it to XML::LibXML to process.
I mention that I don't use HTML::Tidy because it doesn't actually clean the HTML, it just checks for warnings. At least, that's what I thought.
Robbie, who I work with, has just showed me some code where he calls clean to do this. In my defence, the documentation confused me by saying this method returns true, whereas it actually returns the cleaned content, which happens to evaluate to true. I should get into the habit of reading documentation on AnnoCPAN, which mentions this.
I hope I haven't encouraged too many people to use a separate process to do something a CPAN module already does. The module's name makes its purpose clear enough.
I gave a couple of talks at the Nordic Perl Workshop a week and a half ago, organised the first Milton Keynes Perl Mongers meeting last week, and there's a London.pm social on Thursday.
I really enjoyed the Nordic Workshop. I agree with jonasbn's comments: having a single track with around forty atendees worked well.
Both my talks went well. As I get more practice speaking I find myself feeling more confident and relaxed. The audience laughed at my jokes and asked good questions. Even without bribery.
Then there's the London.pm social in two days. I should go because I've missed the last few and haven't seen everyone for a while.
It's easy to forget I started using Perl to write code when I've ended up speaking, organising meetings and using it as an excuse to go to the pub. Even at work, I've found myself spending more time organising and writing up meetings, determining requirements and talking to people than writing code. I guess I'll keep going with the flow and see where it all ends up.
Dear Neglected Journal,
Since I last wrote I have done many things. Here, I should just mention that I went to Portugal and enjoyed a mostly-wonderful YAPC::Europe.
Somehow I've ended up agreeing to give twice the number of talks I offered at the Nordic Perl Workshop.
But you don't care about that. You want to know what you would do if you ever found yourself as a Perl monger stranded half way between London and Birmingham in England.
Naturally, you would join the fresh, new Milton Keynes Perl Mongers group. We're officially Buckinghamshire's most friendly, exciting Perl group.
We'll do the usual things: learning lots about Perl while enjoying ourselves. Join us!
Satisfaction guaranteed, or we'll refund your free subscription.
Once upon a time, when I started using arrays in Perl, I found myself wanting to write things like
my $house = @street. It took me a while to understand that I should use a scalar,
$street, instead of an array slice,
@street. I felt that as I was dealing with an array, I should use the
I've noticed others making the same mistake, and I've had trouble helping others learn the difference between
$ in this context. In English, we might translate
my $house = $street to my house is the 87th on the street. Or rather the 88th house if we count from zero, but that's another story for another day.
$street shares its meaning with the word the in English. If I also own the house next door, I should use an array slice to say
my @houses = @street[87, 89]. Or in English, my houses are the 87th and 89th on the street. The
@street also translates to the. This doesn't help me understand the problem.
Translating this to French, or any language that inflects definite articles, provides a clearer understanding. Unless I'm horribly out of practice, we use la 87ème for the 87th and les 87ème et 89ème for the 87th and 89th. Just as French uses la (or le) for the singular and les for the plural, Perl uses
$ for the singular and
@ for the plural.
I've understood the linguistic concept of inflecting pronouns for over fifteen years, and the difference between Perl's array slices and scalars for almost ten, yet I'd never equated the two. Now that I've written this down it all seems so obvious.
I wonder whether native French speakers find this Perl idiom easier to grasp, and whether speakers of languages that don't use definite articles would prefer a programming language that lacks sigils.
The talk went alright, and as a consequence I feel I delivered it much better in Belfast the week after.
I started out by introducing my talk and explaining that I was practicing for YAPC. I asked the attendees to let me know what they thought afterwards, as any feedback would help me do a better job the week after. I deliberately mentioned that I wanted both positive and negative feedback, as any opinions would help me improve.
Wow! I got some wonderful feedback from several people, who provided lots of encouragement and insight, pointed out my weaknesses and suggested improvements I could make.
I managed to incorporate some, but not enough, of these improvements before Belfast. Still, I have plenty of useful ideas to bear in mind for the future.
So, I wonder what to do: Should I always ask for feedback or will this make me seem unprepared? Perhaps it depends on the occasion. Regardless, I have plenty of things to think about for the next few talks I give.
How should I respond to others' talks? I don't want to seem rude by offering unwanted criticism, but I don't want to hold back opinions that might prove useful. Maybe it's all about diplomacy and tact, skills that all programmers have in abundance. Oh, wait a minute..
Finally, I don't want to suggest that I didn't get any feedback in Belfast. I got some very satisfying responses but, as I hadn't asked for it, less insightful criticism and suggestions for improvement. Anyone?
It's some time since I've written to my journal, so I thought I should catch up with it and mention the (few) Perl-related things I've done since last time.
My last job didn't work out - although I did some interesting things with Class::DBI, Template Toolkit and Subversion - so for the last four weeks I've been commuting into London. It's been fun but tiring. I've discovered that I find commuting harder than I expected.
I gave a lightning talk on Class::DBI and wizard interfaces to London.pm in July, which described using a series of subclasses, each with more functionality, to model the evolution of objects through a wizard interface. You can construct an object using any class in the series, which automatically reblesses the object according to the amount of information currently known about it.
A few people I talked to seemed sceptical about this idea: Why bother reblessing things instead of using one class and checking parameters? I think the best answer is that you can map interfaces to the series of classes. Rather than having to perform tests against an object to see which stage of the interface to display, you can display the interface associated with a particular class.
I hope to write this up coherently at some point, ideally abstracting the code as a CPAN module. It's all a matter of time, or the lack of it.
Lastly, I've almost finished writing my paper for this year's YAPC::Europe. It's overdue, which is frustrating, but I've felt too tired to give it the attention it deserves until this weekend. I'm going to practice it at London.pm's technical meeting on 9th September. It's turned out more Webby than Perly, but I think it's still relevant for people working in both these areas. Perl developers who have no interest in the Web will find it very dull, though.
I've just started the second week of my new job after a couple of months split between taking things easy and applying for jobs.
I had a few thorough interviews, which taught me a few things about myself that I hadn't considered too carefully. Apart from that, I spent my time doing very little, very slowly. I had planned to do all sorts of things after my previous job ended, but did none of them. As a consequence, I feel very well.
I also planned to move somewhere different and assumed fate would drag me to London. I ended up accepting a job in Bletchley, nearer to my house than anywhere I've ever worked (apart from when I was self-employed and only had to climb the stairs each morning).
Didn't someone else once write about discarding your initial plans?
So far, accepting this job seems like a good move. My first task is to rewrite some LAMP code of the worst sort: Red Hat, PHP, MySQL. I'd forgotten how awkward I found RPM to work with, and PHP really is as ill conceived as I suspected. I suggested that rewriting should involve FreeBSD, Perl and Postgres, and that's what we've decided to do. I've suggested we contribute some of our work back to the open source community, and this seems approved of. Fingers crossed.
So, we built a new development server this afternoon, having bought the parts late on Friday. The contrast of working in a small company (there are 5 of us) to a lazy, disorganised bureaucracy (as opposed to 7,000 of us) has really cheered me up. My previous employer didn't officially use Perl, yet I still used it to get my job done on time. One of my colleagues used XML::Twig to deal with a legacy database with 250,000 users, but I haven't a clue what his managers think he uses. You've heard this story before. My point is that I appreciate the change.
Unfortunately we listen to Radio 2 (for those who don't know: dull) in the office, but I'm sure I remember it being much worse. I suspect this shows I'm aging. It's mostly tolerable, occasionally good. Not the typical nu meejah thang.
So far, the most important thing I've learnt from my job is that Felix cat food in Scandinavia is called Pussi. I suspect knowing this might help avoid various embarrassing situations.