Supporting the good guys
Graeme (@mathie) Matthieson is one of the good guys. He’s also one of the people behind the Scottish Ruby Conference (née Scotland on Rails).
The personal website of Piers Cawley
(they/him)
—
FolkSinger, photographer, carer and occasional programmer.
Graeme (@mathie) Matthieson is one of the good guys. He’s also one of the people behind the Scottish Ruby Conference (née Scotland on Rails).
So, Giles Bowkett asked me on facebook “Why Perl?”. This is the long answer.
There’s something satisfying about reaching the point when you can’t decompose an object any further and all your methods are tiny and do one thing - it’s especially gratifying when you learn something new in the process. Sadly, it doesn’t happen as often as I’d like, there’s usually annoying bits and pieces where you have to placate the language in some fashion that breaks the flow of what you’re writing.
In Ruby, when you’re doing division on integers, things can get a little counter intuitive. For instance, 6/4
is obviously 1
. At least, it is until you decide that you’d rather have numbers that behave a little more like ‘real’ numbers and you do require ‘mathn’
, a module in the Ruby standard library (ie, it comes as part of ruby). Then you enter a whole new world of rational maths, where 6 / 4
returns 3/2
.
tap tap… Is this thing on?
At last! Start your compilers everybody.
Back in January, I wrote that I was choosing Perl to revisit as my language for recreational programming.
Back in (crikey) February, I gave a talk at the London Perl Mongers’ technical meeting about Moose for Ruby Programmers and wrote it up here. Mike Whittaker was in the front row of the audience with his iPhone and, a couple of minutes in, started a voice recording and gave me a copy.
Mum was often the only women [at British Leyland sales conferences]. In those days it was apparently common for presenters to slip the occasional naked lady into the slides “just to keep everyone awake”. When this happened, there’ be slightly embarrassed laughter and a few heads would turn to look at mum. Who ignored it. It doesn’t happen so often any more
I’ve just written my first ‘real’ real post for the new Freedom is in Peril website. I’ll try and keep the political stuff on that blog from now on, but if you’re at all concerned about the erosion of what has traditionally, if cornily, been called “British Liberty”, then I hope you’ll swing by, and link to, the new site.
I’ve just pushed the second version of Test::Class::Sugar (first discussed here). It’s pretty much as discussed in the original article, but after some discussion with David Wheeler, I’ve dropped the +uses
clause from the testclass
declaration in favour of less DWIMmy (and thus easier to explain behaviour).
This seems like a more appropriate poster somehow:
I got a bit of stick on IRC last night for some of the choices I’d made when I was writing Test::Class::Sugar, in particular because one of the prerequisites is chromatic’s handy and opinionated Modern::Perl module. The ‘controversial’ aspect of Modern::Perl is that, when you use it, your code won’t run on any Perl before Perl 5, version 10.
In which your correspondent does magical battle with the guts of Perl and emerges bloodied, but unbowed with a useful principle to code by.
One aspect of coming back to Perl for ‘recreational’ programming is that if, like me, you’ve declared war on @_
and boilerplate code, then testing can be somewhat trying. The Perl testing framework that best fits my head is Test::Class, which is an excellent Perlish implementation of xUnit style testing. If you’re unfamiliar with the, library, Ovid is writing what’s shaping up to be an excellent series of introductory articles about it at http://www.modernperlbooks.com/.