O'Reilly haven't announced "Perl: The Good Parts", but it's a book that's crying out to be written....
— Piers Cawley, Healthcheck: Perl
O'Reilly's not going to do that book, but Piers is right -- it's a book that needs writing. I've used Perl for over a decade. I've asked and answered questions on Perl Monks since its inception (as the second user to register for the site). I know a little bit about project management, a little bit about testing, and a little bit about working on projects in a team composed of developers with divergent skills and interests -- even some about mentoring.
I also know a little bit about writing, editing, and publishing books.
I'm looking for feedback on the idea now. Would you be interested in buying, reading, promoting, reviewing and offering feedback on, and/or handing out a book called "Modern Perl" which teaches the language and the principles behind the language so that you can take advantage of the good parts, ignore the bad parts, and ameliorate the awful parts? Would you read or comment on a similarly themed weblog in conjunction with the book?
Of course it will cover some of the best modern CPAN modules.
If you're interested, please feel free to reply here, to my email (chromatic at wgz dot org), or even @chromatic on identi.ca.
Update: dmp2k suggested that the name "Modern Perl" is better than "Maintainable Perl". I agree. Do you?
Re:yes please
hex on 2009-01-16T21:31:32
What he said!Re:yes please
sigzero on 2009-01-16T22:21:35
What they said!
Re:yes please
Till on 2009-01-17T14:19:02
Yes please indeed! Especially if it has some yummy 5.10 examples or discussion.Re:yes please
jjames on 2009-01-18T03:53:47
I would use this with Perl Best Practices for defining engineering guidelines at work. At this point, I have to write the equivalent myself as a style guide. How quickly can you have it out?:) Re:yes please
mock on 2009-01-20T22:37:43
As said, this would be great for engineering guidelines, especially to help programmers who are new to perl. We have interns from the local university at our office who don't know perl. This would be really useful for getting them pointed in the right direction. I'd definitely buy one personally, and get a few for the office.
How do you picture this being different from Perl Best Practices?
Re:Yes
chromatic on 2009-01-16T21:14:56
PBP isn't primarily a didactic book. If you don't know Perl, I'm not sure you'll learn it from reading the book. It's a great book, and there's definitely some overlap, but I have in mind something like a very streamlined version of the Camel that's deliberately non-exhaustive. I feel free to say "Here is how to think about a useful feature in such a way that you can remember it and use it productively... and here's a feature you can safely ignore and avoid, because it doesn't work right or it's just too hard to use."
Also I don't forsee discussing coding standards at any length. The best comparison is to JavaScript: The Good Parts.
Re:Yes
amoore on 2009-01-16T21:26:55
Ah, sounds more tutorial than reference. Good idea. I think that would be useful to me and to others.
As far as a companion blog goes, that sounds useful, too. I've often thought that a site that shows how one could improve perl found in the wild would be interesting. I'm picturing something like MJD's red flag talks, crossed with refactormycode.com, and a little bit of best practices or code review thrown in I guess. This sounds vaguely related. I think you would be good at it.
Sounds interesting. But if you see it as a streamlined Camel book, then I would suggest complimenting it with a Modern Perl Cookbook (i.e. a task-focused guide).
I'd be willing to find a way to contribute to either.
-- dagolden
Re:Modern Perl Cookbook?
chromatic on 2009-01-16T22:16:47
That's a lovely follow-on idea, though it will need a different name to avoid a trademark scuffle.
Re:Modern Perl Cookbook?
draegtun on 2009-01-16T23:08:40
"Modern Perl" is definitely a better title.
Other possible title alternatives...
* "The Perl Way" (ala"The Ruby Way";-)
* "use Perl"
* "using Perl"
* "Enlightened Perl"
I'm kinda liking the last one myself as it nicely associates itself with EPO efforts (www.enlightenedperl.org)
/I3az/ Book name
duff on 2009-01-17T02:28:40
How about "Living Perl"? It puns a few good ways.
:-) Re:Modern Perl Cookbook?
dagolden on 2009-01-17T13:01:16
Well, if O'Reilly is the publisher, they might go for it -- I could see making a case for how it leverages the brand and recognition of the original Perl Cookbook and that would improve sales.
Another idea is to just have "Modern Perl" be in two parts. Part I is the language and Part II is a task-focused cookbook. It would make it a pretty hefty tome, though.
-- dagolden
Re:Modern Perl Cookbook?
chromatic on 2009-01-17T19:22:09
Well, if O'Reilly is the publisher, they might go for it....
O'Reilly is very unlikely to publish this book.
Re:Modern Perl Cookbook?
jjames on 2009-01-18T03:49:54
Is there a reason you can share with us why not?Re:Modern Perl Cookbook?
chromatic on 2009-01-18T04:09:14
O'Reilly doesn't think there's a market for Perl books anymore. That's all.
Re:Modern Perl Cookbook?
jjames on 2009-01-18T07:04:31
They clearly haven't seen this thread!
The only weakness I can see is "modern" becomes "classic" in a short IT time span. I don't have a better title though.
Re:About the title
draegtun on 2009-01-17T09:30:40
Hows about "Hypermodern Perl" then? (the chess enthusiasts out there may appreciate this meaning!).
/I3az/ Re:About the title
jplindstrom on 2009-01-19T00:26:23
Isn't that solved by a new edition as what's modern changes?
Re:About the title
chromatic on 2009-01-19T08:18:15
I have that in mind.
I would buy the book because I support the community but it would end up sitting on my shelf collecting dust and be eventually given away.
I have done the same with 15-20 other such perl books. I have probably only ever opened 4 or 5 of them and haven't read more than half of any one of them.
That's just me and has nothing to do with the quality of the book or author.
I would would participate in a weblog.
I would prefer to collaborate with you (or anyone else with time) on the book I have been meaning to write for 3 years now. I will email you about that.
Our friend Daisuke Maki just wrote the book titled Modern Perl and it will be out in mid February 2009.
Modern Perl is a good concept, but antique Perl style also needs explanation. Only very few programmers never have to maintain the old stuff.
A while ago I started a wiki page for this, http://www.perlfoundation.org/perl5/index.cgi?ancient_perl but I never got around to finishing that.
Also, while old stays old, the definition of "modern" is constantly changing. It'd be a bold move, especially in print, but I think this book needs a timestamp ("Modern Perl 2009") in the title, and constant (biennial?) review.
When we first started teaching Perl there was the temptation to show off all the things Perl could do. So we showed off $" and $,. That lasted for about 3 courses. Then we decided that the students really should learn to use join instead.
Our course notes deliberately avoid mentioning as many of the bad-old ways as possible, although we still start the file chapter with ugly, old-style file handles because they are so overwhelmingly prevalent (see the first few actual examples in perldoc -f open and perldoc perlopentut).
I probably wouldn't buy such a book for myself; but I'd probably have it as one of our strongly encouraged books for our students and clients. We are responsible for about 30 Programming Perl and 40 Perl Best Practices book sales each year. (This only works if you publish with someone our book supplier has agreements, which is essentially Manning and O'Reilly).
Re:I would vote for Enlightened Perl
zby on 2009-01-17T10:42:33
A second thought - Renaissance would also be a good name.Re:I would vote for Enlightened Perl
chromatic on 2009-01-17T19:37:13
I like the names, but worry that they're a little too cute and non-obvious for the intended audience. I'd like to expand all of the knowledge about how to take advantage of Perl features added in the 21st century to a wider pool than the upper 15% of PerlMonks and most posters on use.perl.org.
That said, there may be ways to pull these ideas into a unifying concept -- though likely in tagline or design rather than title.
Re:I would vote for Enlightened Perl
titivillus on 2009-01-20T15:57:01
I too run into the class confusion when terms such as "Modern" come up. To me, the Moderns were the ones who came to creative blossom between the World Wars. What's the meaning of the Modern practices for a Post-Modern language?
I'd suggest "Contemporary". But if people listened to me, they wouldn't call it "Classical Music", either.Re:I would vote for Enlightened Perl
chromatic on 2009-01-20T17:42:23
But if people listened to me, they wouldn't call it "Classical Music", either.
Don't get me started. Sometimes I listen to Handel or Vivaldi just so I can give the "It's in the definition of Baroque" lecture to people who ask "Do you like classical music?"
Is this really an introduction to a language (Perl 5) that will surely have a declining adoption rate by the time the book is published? Or is it instead intended for current Perl 5 users who wish to learn not with outdated patterns, syntax elements, and libraries, but with a fresh look at the best Perl 5 has to offer? The latter is certainly more likely, and more likely to inform the Perl 6 user-to-be. A book with this angle is better titled "Postmodern Perl", as the approach is in reaction to classic, or "modern" usage of Perl.
I always feel like I'm having to learn the history to understand why things are the way they are in the world of Perl (particularly, in the CPAN and lots of old core modules.) Perhaps a modern book can attempt to bypass this history lesson while also focussing on modern methods?
But how do you cover objects? Would you use Moose?
Re:Learning Perl in the 21st Century
chromatic on 2009-01-18T17:56:22
Perhaps a modern book can attempt to bypass this history lesson while also focussing on modern methods?
Exactly. It can explain just enough theory to help the reason for the design decision explain the syntax and design, but avoid the "In yon blessid days of the 20th centuree...." which plagues much of the Perl core.
But how do you cover objects? Would you use Moose?
bless
has to make an appearance (at least to explain what legacy code does), but I think Mouse is close enough to the 80% of Moose that everyone needs and simple enough to explain that it's the right approach. We'll see.
I think a book like that is a good idea. I'd be more than willing to contribute to its writing process. As for buying it - I'm not sure yet, but I'm leaning towards a yes - given price and other constraints. Did I mention it should be made available online?
In any case, I think this book is a good idea. One thing I noticed is that I advertised many books that I read and still have, but no longer read often on the local open-source mailing lists, and hardly anyone wanted to borrow them. I also tried to borrow some books from other people and hardly anyone would let me know of books they have. This makes me sad.
Excellent idea. I especially like the idea of recommending particular CPAN modules, less so for those of use who have been using Perl for years, and more for those who are just starting.
The choice on CPAN can be overwhelming, and having a list of you-can-rely-on-these modules would be very useful for a novice.
What has happened in many previous Perl books, though, is they recommend modules-in-planning as 'the new standard', and those modules never get written.
In a book about contemporary Perl programming, I'd like not just read about a compilation of best practices and modern CPAN modules.
Over the last few month with all the discussions about Perl getting old-fashioned and even dying, I realized that I don't miss a "new shiny better Perl" itself, but something different entirely.
Recently there was an article on arstechnica about some JavaScript-Gnome object-glue-scripting thingy. Main argument: "Many people already know web programming with JavaScript, so let's make it easy for them to hack little Gnome apps!" GtkPerl - and the whole bunch of Gnome supporting modules - hasn't even been mentioned. PyGtk was.
Some months ago, O'Reilly published a really nice book about statistics/mash-ups/poor man's data mining ("Programming Collective Intelligence"). Years ago this would have been a Perl book. Now it's a Python book.
Nokia cell phones from the S60 series come with a Python stack for scripting your own cell phone apps. Cell phones using Open Source widget sets use Qtopia. There's no working Qt Perl API right now. There was a Symbian Perl, released in 2005, one release only. So, what about micro/tiny/mini Perls to be used on all kinds of embedded platforms?
The really large universum of "EVE online" (MMORPG) comes with a GUI on the client side, written in Python. How about Perl in the gaming world?
So, if I put all this together, I'd like not just read about modern, fashionable, contemporary Perl practices and modules, but also contemporary, modern, fashionable use cases. Perl and fancy GUIs. Perl, fun and games. Perl on mobile devices. High speed Perl. Perl and Unicode. Perl on Arduino. (The really, really cool microcontroller platform which made microcontroller accessible "for the rest of us".)
My entirely biased and subjective view might be simply due to the fact that I haven't done much web development over the last years and I'm not a system administrator either - but I use Perl for literally everything if possible and I'd really like to see Perl better advertised in fields beyond web programming and text processing.
And I would love a certain spirit of "doing the cool stuff with Perl" - not just read about security, productivity and stability.
But I buy it anyway - even if it's about "Perl, book keeping and tax paying."