Book mini-review: Modern Perl May 3, 2011Posted by claudio in Uncategorized.
Tags: book review, Chromatic, Modern Perl, Perl
Ok. You are really lazy, curious and want to know my opinion? Buy the book. It’s great. If you are less lazy, keep reading.
I was really exited about this book. Even before the book was published, chromatic regularly posted very interesting articles and, maybe more importantly, posed questions. It felt like chromatic was thinking out loud and he welcomed everyone who wanted to take part. The text for the book is open for collaboration and lively discussions took place in his blog. He goes a step further and offers the ebook and pdf version for free. It’s a good feeling to be sure that you are not buying a cat in a bag.
What kind of book is it? It’s the kind of book that it’s fun to read (sadly this is not that common in the IT world). It’s not the kind of book that offends your intellect by trying too hard to be funny nor the dry stuff that put you into sleep. It’s not a reference. It’s not a tutorial. It’s not the book a would suggest for someone who wants to learn Perl, but it certainly be the one to read after that (if your friend is serious about programming he will not stop at “Learning Perl“).
Because the pdf is freely available you can have a look yourself at the contents, but just glossing over the titles of the chapters gives you a good idea:
- The Perl Philosophy
- Perl and Its Community
- The Perl Language
- Regular Expressions and Matching
- Style and Efficacy
- Managing Real Programs
- Perl Beyond Syntax
- What to Avoid
- What’s Missing
Modern Perl is not the book that teaches you specific technologies du jour. chromatic aims higher and moves the bar from “how” to “why”. By doing so it’s clear that for the author the Modern Perl revival is more than the sum of new CPAN modules fixing what’s broken in Perl 5. It’s a book about understanding the basics of Perl 5. The good and the bad stuff. And how to use this knowledge, a quest for Good Programming. I specially appreciate “The Perl Philosophy” as it manages to explain clearly the basic assumptions of Perl (and at the same time give a valid answer to the “write-only” accusations). Even if you have programmed Perl for a while, you’ll be surprised on how nice it is to see things clearly explained what you probably “kind-of” knew. chromatic’s inviting style helps a lot.
I pre-ordered the book on Amazon before it came out and I haven’t regretted it for a second. It lives next to my “Perl Best Practices” copy. I appreciate when content providers treat me with respect and not as a pirate (DRM!). That’s why I hope this publishing model is viable (open content, free pdf, free epub, companion site). I don’t mind voting with my wallet.
Make noise like a camel! March 8, 2011Posted by claudio in Uncategorized.
Tags: Modern Perl, Perl, Perl core
1 comment so far
In December 2007 Perl hackers worldwide received a fantastic present. Five years and half after the previous major release (5.8) we got new language features and improvements to the perl interpreter itself. More importantly, it was the starting point for shorter and regular release cycles. Thank you, p5p!
Fast forward to today. The Perl community revitalised significantly and Modern Perl has a strong momentum. Books that reflect the community best practices were published and organisations created around the efforts of the Perl community to remove the baggage and create what was lacking. Already in 2005 “modern” applications and distributions started appearing in CPAN to complement core Perl: PPI (2005), Perl::Critic (2005), Catalyst (2005), DBIx::Class (2005), Moose (2006), Strawberry Perl (2006), local::lib (2007), Padre (2008), Dancer (2009), Try::Tiny (2009), perlbrew (2010), cpanminus (2010), etc. (And my excuses for the many modern projects I forgot to include.)
There is now some noise in the perl blogsphere that suggest that a very small window is open to introduce new things to Perl core, or rather move things from CPAN to core. Maybe the window is too small to get what we need (IMHO, a complete OO framework). Or it may be already closed due to the complexity and the quantity of extra work for the already heavy charged core developers.
Nevertheless, it’s a good thing (TM) that people defining the direction of Perl 5 know what Perl developers think. People that care and work with the language. Developers that –in stark contrast with fanboys– know what the strengths and the weakness are of their preferred language.
Perl core, documentation and Moose (aka “can of worms”) March 5, 2011Posted by claudio in Uncategorized.
Tags: Modern Perl, Moose, p5p, Perl
It seems I am not alone on the subject I raised in my New Years wishes (wishes, not demands). Good.
I wished –and still do today– that Perl releases would include Moose. I also wished for a tutorial/chapter on Object Oriented programming based on Moose for Perl newcomers. For this second wish I was specifically thinking on the upcoming release of O’Reilly’s “Learning Perl“. The nice authors answered (see comments) and stated that they foresee the inclusion of a Moose chapter, but in the more advanced title “Intermediate Perl” instead.
On perl5-porters, the mailing list where Perl 5 development occurs, there is now a related discussion triggered by David Rolsky’s work on a new Object Oriented tutorial to be included in the Perl core documentation. It is certainly a welcome update to the present tutorial, but its use of Moose as a best practice seems to be rather polemic.
Tom Christiansen made a valid argument against a new core tutorial that included Moose:
Please don’t include anything in the standard distribution that tells people they can’t use the standard distribution.
If you want to include something in the standard distribution whose entire focus is outside the standard distribution, then you should bring the thing that is outside, inside.
Of course, this is an argument to keep references to non-core CPAN libraries out of the core documentation (isn’t CPAN not our biggest selling point?). It does not take a lot of imagination to turn the argument around and use it for the promotion of a modern Object Oriented framework to core. I am aware of the serious problem caused by the dependency chain of Moose, but it’s not that bad.
By talking with a lot of people at the Perl booth at FOSDEM I was positively surprised by the level of interest in (modern) Perl. Newbies seemed really curious and old perlers that long ago moved to other languages (“Were is Perl 6?”) were enthusiastic to give Perl a second chance. The Moose examples in chromatic’s“Modern Perl” book were a very convincing illustration of what Modern Perl was.
When (re-)introducing people to 2011′s Perl I don’t want to explain boilerplate that is difficult to grasp for new programmers (or myself ). Besides, people who are new to Perl are not necessarily new to programming and they are right not to be willing to put up with the overhead of plain OO Perl. The people I have encountered in this situation (or introduced myself to Perl) welcome –without exception– Moose as innovative and stylish (yes: the holy grail of readable code). In 2011 no one, except ironically the people writing Moose itself and “legacy programmers”, should be forced to write OO boilerplate code.
The people are there, the code is there, the momentum is there. Do we dare to take the chance?
(Picture by Dunechaser)
Perl@FOSDEM and some photographic impressions February 8, 2011Posted by claudio in Uncategorized.
Tags: belgium, fosdem, fosdem 2011, foss, Free Software, Modern Perl, Padre, Perl, perl::staff
All right. FOSDEM was –as always– great. 4 to 5000 Free and Open Source people on the same event has to rock. While I attended many talks about different technologies (Devops aka “System Engineering meets development”, Monitoring, Go Programming language, …), I focussed mainly on the Perl activities (pun intended).
Following Gabor’s initiative (this guy runs on Duracell batteries), last year (2010) we set up the first FOSDEM Perl booth: one table, some volunteers, many visitors and great reactions. This year (2011) everything was even better. We had a big booth at the main hall, attributes (a giant Camel (!) and probably the biggest Perl book collection in the world (!)), books to sell, a packed developer’s room on Sunday, a Perl dinner and many volunteers. There were at any time several people at the booth and sometimes even too many . With so many volunteers it was possible to attend whatever session you wanted and also participate on the Perl developers’ room.
Here follow some pictures I took with some comments:
David Leadbeater’s Tracing Perl with DTrace/SystemTap
Liz and Wendy were to
crazy nice enough to bring their giant camel and the biggest Perl book collection in the world. Both attributed really attracted visitors.
We had several books to sell… but not enough. We were sold out of chromatic’s Modern Perl halfway the first day (20 books!) and dams’s Perl Moderne (not the same book) was almost sold out as well!
Wendy and dams (from Dancer and “Perl Moderne” fame).
Although we didn’t have Automating System Administration with Perl at the booth, several people passed and showed us proudly their copy bought at the O’Reilly stand.
Those guys had something to celebrate: a new Debian stable was born.
Our perl-friendly neighbours…
No pun intended (the text reads “Whinging Bastard”,
DevOps? – More than Marketing by James Turnbull) .
Spike Morelli’s I’m Going M.A.D..
We had 13 people attending the Perl dinner! From left to right: Zeno, Bart, Gabor, Liz, Wendy, Dirk and Balint (the rest arrived later).
Mark Overmeers’s Perl data structures.
David Leadbeater’s Tracing Perl with DTrace/SystemTap: very interesting for a Solaris guy like me.
Introduction to writing readable and maintainable Perl by Alex Balhatchet.
Paulo Castro (Packaging Perl and it’s deps…) took us to the Dark Side…
The image integration facilities of WordPress.com are pretty poor. If it wasn’t for some command line Perl foo, I would have given up posting this message. There is no way I would have gone through if I had to click 10 times for each picture…
Perl’s new wave February 16, 2009Posted by claudio in Uncategorized.
Tags: community, Modern Perl, Padre, Perl
We all remember the “Perl is dead” hype from not so long ago. In short: Perl 6 wasn’t there yet and perl ironically wasn’t a copy of the language of the day (python, ruby, c#, …).
I was positively surprised by the response of the perl community. It wasn’t the typical “our programs run fast” (to ruby fanboys*) or “space as syntax wtf?” (to python fanboys). Instead it seemed that community took notice of the criticisms and made pretty clear that waiting for Perl 6 was not an option. Today, Perl 6 is doing fine (you can write code in Perl 6) and so is Perl 5.
So what did the community do? Well, Perl Best Practices -and corresponding module Perl::Critic- was a milestone telling people to stop writing perl 4 scripts and respect sane best practices to achieve clean and elegant code. Next to the many great modules already at CPAN (DBI::*, POE::*, DateTime, DBIx::Class (after PBP), WWW::*, etc), the community decided to address some clear shortcomings.
Moose (inspired by Perl 6) was an answer to one of the -in my opnion- greatest shortcoming of Perl 5: the basic OO framework. Perl-based Catalyst jumped on the Ruby-On-Rail wagon. chromatic, a core developer and important community member, started to think out loud what actually “modern perl” means and how we can improve perl by getting rid of obsolete features and bad practices.
An other missing piece, was a beginners-friendly and perl-centric IDE. Padre is aiming to fill this need. Gabor Szabo was able to quickly form a community developing padre (including Alias of Strawberry Perl and PPI fame). I guess this was the kind of project I was waiting for.
I hope that by being part of this project I can contribute to this positive perl new wave.
* fanboy != user