Last Thursday, Milton Keynes Perl Mongers held our second technical meeting of the year. How organised of us!
We had a typically varied, interesting set of talks, reflecting the different things we use Perl for.
Colin Bradford told us more about how Lovefilm used memcached to scale their popular Perl Web applications for hundreds of thousands of users. Colin gave some interesting suggestions based on hard won experience. My favourite tip was "avoid using methods called 'set' and 'get' because you will mistype them and fail to spot mistakes in code reviews. Use 'store' and 'retrieve' instead."
Tony Edwardson gave a brief introduction to Moose, which proved useful for our attendees who aren't die hard Perl developers, and offered a good overview for those of us who haven't done much with Moose yet.
I showed how developers can use CPAN's toolchain to develop and distribute their own private code. I chose not to use slides, and went for the live demo option which fortunately went fine.
Finally, Peter Edwards told us about using WxWidgets to develop cross platform GUI applications in Perl. The Padre Perl IDE has recently made this more popular: Peter told us about an older application he supports. I liked that he told us about supporting tools that might life easier without language bigotry: some of the most useful Wx tools are written in Python.
Unfortunately our meeting clashed with the London Perl Mongers' technical meeting, which affected a few people who wanted to attend both. Still, I consider this a good problem to have: We have several active Perl groups in England meeting regularly.
I'm currently organising our next set of talks some time in July. Please let me know if you would like to present a talk, or keep an eye on our Web site, mailing list or IRC channel if you would like to attend.
I find Test::Deep very useful when writing tests. It's very handy for checking complicated data structures in all sorts of different ways.
Recently I wanted to use Test::Deep in my own Test::Builder test subclass. I discovered Test::Deep::NoTest which seemed useful: it lets me call functions from Test::Deep without them expecting to run directly within a test script themselves.
So, Test::Deep::NoTest and eq_deeply() looked like what I wanted. And they did a fine job, except when comparisons failed: I could find out that a comparison had failed, but not why.
After a brisk stroll through Test::Deep's source code and a quick chat with its author, I wrote a patch to expose and document its cmp_details() method. This lets you compare data structures and get a description of any differences, if they exist.
If you want to use Test::Deep within your own test class, download version 0.104 or newer of Test::Deep and see the new documentation on Using Test::Deep with Test::Builder.
Cambridge Perl Mongers held our first meeting in a while last night. Seven of us met in a pub and discussed all sorts of things - even a little Perl.
We plan to meet every month - next month's meeting will take place on April 1st.
Unfortunately, several people who might have attended didn't know about the meeting due to a recent mailing list migration. If you think you're on the list, it's worth signing up again. Hopefully, the old list's subscribers will soon find their way on to the new list automatically, but that hasn't happened yet.
Despite its low attendance, the meeting went well. We drank various beers with confusing TLA names like JHB and IVB. Thankfully I managed to avoid asking for IVF.
If you're anywhere near Cambridge and interested in Perl, please subscribe to the mailing list, join us in #cam.pm on irc.perl.org or join us in the pub next month.
We also plan to hold a technical meeting before long with various talks about Perl. It's all quite exciting.
Milton Keynes Perl Mongers held our first meeting of 2009 on Tuesday.
Most of the meeting consisted of lightning talks where the speakers told us how they have used Perl to solve problems at the BBC, the Open University, Lovefilm and various investment banks.
We also heard about how the new online shop Penny's Arcade relies on Perl.
I have linked to the the speakers' slides from our Web site, so please take a look if you're interested in online retail with Perl, specifying module versions with only, Chart::Gnuplot, memcached, creating PDF files with Catalyst or exceptions and Perl.
Please get in touch if you would like to present at one of our future meetings, or if you'd like to come along to watch the fun unfold.
I'd promised a Milton Keynes Perl Mongers technical meeting for some time, and on Thursday we finally got round to holding one.
We've found that the Perl Mongers group has plenty in common with the local Linux User Group so we decided to hold a joint technical meeting. We've had joint social meetings for several months.
The meeting started with Dave Cross, our guest speaker, giving an Introduction to the Template Toolkit. Dave did a great job of showing what TT does well. I'm already a fan, so I hope Dave prompted other listeners to discover its wonderfulness.
Adam Lowe told us about some of the projects he's working on at The National Museum of Computing at Bletchley Park. They have some scarily huge machines - some of which work! - that can't even store an MP3 file on their tape drives. As Dave pointed out, this seems strange given that we used to store music on tapes not that long ago. Adam's talk made me want to revisit Bletchley Park and see what the Computing Museum people are up to.
Oliver Gorwits told us about Oxford University's network and how it works. There's lots of Perl, Linux and other open source in there, as you'd expect. I particularly like that SNMP::Effective plays a role in there, as Jan and Oliver have bounced around ideas for its development on the #miltonkeynes.pm IRC channel.
I've put all the slides online at http://miltonkeynes.pm.org/.
Conveniently, we found a real ale festival after the talks. We enjoyed a few beers and met up with Tony, who hadn't been able to make the talks.
So, for a group that's just over two years old, I'm pleased with what we've done. I'm looking forward to some great meetings in 2008 with the regulars, our old friends (I'm expecting visits from Birmingham.pm and Matt Trout), and hopefully a few new visitors too.
It's also great to watch the open source community grow in the city where I live. It seems we have lots of people doing interesting things here, but mostly we're not talking to each other. We're slowly improving this.
I hadn't been any conferences this year, so I thought I'd visit the first ever Pycon UK as it's nearby, in Birmingham, and I know almost nothing about Python.
So far the conference seems very well run: we have frequent coffee breaks, good Internet connectivity, talks keeping to schedule and a fairly tasty lunch.
Fortunately, I chose some interesting talks to attend this morning. It's always hard to know what you'll enjoy beforehand.
I started out in Paul Johnston's talk about SQLAlchemy, an ORM for Python. I've been hacking on DBIx::Class lately as my job involves lots of databases at the moment, so this area interests me. The issues Paul mentioned seemed very similar to those that DBIx::Class has tackled: don't issue too many queries; work well with pre-existing databases; build database schemas from code.
Paul also showed how to incorporate SQLAlchemy with a templating system, which reminded a little me of the talk I gave on Class::DBI at the London Perl Workshop in 2004. Apparently Python programmers have strong opinions about the different templating systems available, just like we do with Perl.
Next, Michael Foord showed how to run Python code in Web browsers using IronPython (Python within
Terry Jones's talk about representing and processing information had little technical content, but instead covered ideas about how we treat objects and attributes in the real world and in computing environments. For example, I can form an opinion about Birmingham and share that opinion without needing anyone's permission. In computing, we too often think of objects as having owners and permissions. Terry's ideas reminded me a little of a few years ago when I got excited by RDF and thought about metadata. We can regard any data as either data or metadata depending on our perspective: all data types intrinsically exist as both data and metadata, but we choose one description depending on how we model things.
Some of Terry's ideas, particularly personalised searching, reminded me of discussions I've had with Nigel Hamilton, the author of the Trexy search engine. I might have to play with Terry's marbl.es search tool when it goes live.
Finally, Michael Sparks talked about Managing Creativity. Michael mostly described how his colleagues at the BBC structure their project's Subversion repository to maximise creativity, experimentation and sharing. Essentially, all work goes in the repository: even if one developer considers something they made worthless, another developer might value it or part of it. As well as the traditional trunk and branch structure, each developer has a sketchbook where they put their experiments. Developers can view each others sketchbooks, but have no guarantee what state they will be in. Finally, you can't merge your own work onto the trunk. This struck me as a very good way to enforce peer review.
After lunch, I felt tired so I've sat in the sun and slept a little. I'm just about to head back for the lightning talks, and I'm looking forward to some interesting informal conversation over the conference dinner this evening. I have a place at the Memory table: each table has the name of a Python exception type.
I've been looking forward to today's London Perl Workshop for ages. I've put together a talk, "Testing When You Don't Have Time", that I thought would fit well with the workshop's theme.
I felt really tired last night, so I went to bed early despite friends texting me, inviting me to the pub.
Today I woke up feeling rough. I've only just got up, as of 11am, and I can't face the journey down to London.
Until now I had spoken at every (well, both) London Perl Workshops, so it's a shame to miss this one at the last minute. I hope everything goes well for the organisers, speakers and attendees, and I hope to see everyone I'd looked forward to talking to soon.
Like many people, I use DBD::SQLite in my unit tests so I don't need to rely on a live database.
I've been using File::Temp::tempfile() to create temporary files for me use as SQLite database files. Yesterday, I noticed that tempfile() and DBD::SQLite don't play nicely together. I could use tmpnam(), but as this doesn't create the temporary file a small race condition exists.
I discussed this with Matts last night and he pointed me towards SQLite's in-memory databases. My test cases don't use huge amounts of data, so I can run everything in memory and avoid hitting the disk:
DBI->connect('dbi:SQLite:dbname=:memory:', '', '');
This means I don't need to bother with temporary files any more, making my tests simpler and faster.
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 useds/\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...