Cold Hard Code

December 2009 Archives

My favorite feeds.

By J. Shirley on December 9, 2009 12:14 PM |
Comments welcome

Continuing my entry from yesterday, I'd like to just list some of my favorite feeds at the moment.  These are just the various blogs that I'm particularly enjoying at the moment, and I decided to limit it to only 3.

nothingmuch's blog at http://blog.woobling.org/
It's hard to find someone who knows so many languages and can communicate the knowledge in such a thorough and easy to understand way.  His blog is simply a glimpse into his capabilities, but mostly he provides recipes for simply doing things better.  He has a knack for simplifying common tasks (with the usual side effect of added robustness).
lestrrat (Daisuke Maki) at http://mt.endeworks.jp/d-6/
I like Maki-san for a variety of reasons.  He's probably one of the most entertaining Perl hackers to be around at a conference. He has a really phenomenal view of Perl and programming in general, because he's making a living running a consultancy in Shibuya (Tokyo) and also running the Japanese Perl Association.  When he writes it's interesting to read his perspective, since I think he offers a fairly unique perspective.
The downside of his blog is that many entries are in Japanese.
Stevan Little at http://stevan-little.blogspot.com/
Stevan is the attentive care giver of Moose (founder, guider?) and all around encyclopedia of programming knowledge.  He offers a perspective that is fairly unique, because of his very deep understanding of what seems to be all programming languages.  Oh, and of his crazy involvement in Moose.  It's pretty amazing what he manages to accomplish.

There are many more blogs I read, but lately these have been the most interesting. As my interests or the content shifts, I'll post updates to my favorites (and try to limit to just 3 people in each post).

Comments welcome

Being in Open Source.

By J. Shirley on December 9, 2009 12:06 PM |
Comments welcome

My wife and I have been together for over 7 years. In that time, she has watched me go from a developer to an Open Source contributor. The latter transformation is largely due to the Catalyst framework, and in particular mst encouraging me to actually contribute.

I don't think she understands why, and I'm not sure if I did either. To be very clear, I'm not a contributor in the truly giving sense of a word. To be fully honest, I contribute in a way that benefits myself. I have learned more from the core hackers than in any job, course or conference. This is my ultimate motivator to stay involved in the community.

The main take away from participating in the Perl community is my own personal and professional development. I learn. I learn quickly and discover many great things I wouldn't discover on my own. There is an additional benefit of finding a way to work on some very fun things.

It saves me time and troubles doing what pays me, so my job gets easier and better as time goes on.

I try to make a difference, but I know that my contributions are nothing remarkable. Anything that I've done that was remarkable was simply because I happened to arrive at a point first.

Even though my contributions are functionally marginal, I feel incredibly gifted and thankful to be accepted in a community as great as the modern Perl hackers.

These inventors of great things spontaneously evolve an idea into a functional product in amazingly short time. To witness these moments is something you cannot get in any office, Internship or academic setting.

I'm involved in Open Source because I've never found a more efficient and thorough vessel of learning. The skills I've developed while simply being around these giants are, at least for me, unattainable anywhere else.

Out of the various Open Source projects I've participated in, none have been as influential as the Perl community. In particular, the Moose and Catalyst sub-communities.

Thank you all who have made this community what it is.

Comments welcome

Plack and the Perl WSGI (PSGI).

By J. Shirley on December 8, 2009 8:13 AM |
Comments welcome

For those not familiar in what's happened since Rails has taken off, and Django has become a very robust and popular framework, there has been a movement towards something coined WSGI, Web Server Gateway Interface. This is a specification that is very prevalent in the Python community, and is generally accepted as a Good Idea. In a nutshell, it tries to normalize and enhance communication from an application to the frontend webserver (so that lighttpd, apache and nginx differences are nullfied)

Ruby has a reference implementation called Rack, which takes and shares many ideas of WSGI, but makes it Ruby-ish.

Perl now has Plack, an astounding effort by Tatsuhiko Miyagawa. Plack has been awarded the "Module of the Year" award at London Perl Workshop, and in my opinion is very well deserved.

Within Plack, you can write very lightweight applications just using what Plack offers. You can also use Plack to handle deployment of several other frameworks, including Catalyst (via Catalyst::Engine::PSGI).

As an example of what can be done, I first saw Tatsumaki. Tatsumaki is an event-driven HTTP server that handles streaming (as well as long-poll comet services).

I built an application using Tatsumaki to handle streaming live race results to people who couldn't make it to the track.

It worked out very well, except for a small memory leak (that has been fixed). I had, at peak, 615 concurrent clients with an average of about 380 concurrent clients.

I was using the Plack server directly (Tatsumaki::Server), and having clients connect directly to it. I had a peak throughput of 10Mbps, with an average of 1.6Mbps of data going through Tatsumaki.

I call that a fantastic success, and thank Miyagawa-san for his hard work in getting this software to where it is. Without Tatsumaki, and Plack, I would have been doing a hacky long-poll solution that would have been much slower and less featured.

I also built a YUI3 based Multipart XmlHttpRequest library so that I can stream using YUI3 (I prefer this over jQuery) but IE failed to work, so I had to fall back to long-poll clients which worked more similarly across all browsers.

Comments welcome

Advent Season is upon us..

By J. Shirley on December 7, 2009 10:00 AM |
Comments welcome

There's a lot of Perl Advent articles around this year. It's very neat to see this, and rather than add yet another article, I'll instead reference the articles I find to be very useful and stand out.

How Catalyst Happens
mst's great writeup on how Catalyst evolves, works with contributors and collaborators. If you're curious how large open source projects handle a large number of contributors, this is a good read (275 contributors at the time of writing)
RJBS writes about Sub::Exporter
One thing I think has turned a lot of people away from Perl is the exporting and namespace handling (partially due to the out-of-the-box weakness of Perl's OOP). RJBS thankfully wrote Sub::Exporter, and it cleans up this into a very sane API.
Convert CGI apps to Plack
If you haven't heard of Plack, you're missing out. Miyagawa's awesome new reference implementation of PSGI (Perl's WSGI) is simplifying a lot of lives, mine included. This little recipe shows how you can convert your old school CGI apps to a managed and sane Plack-handled set of scripts. Of course, there is a lot more to Plack you should read about.
Using local::lib
I love local::lib, and this article by Stephen Scaffidi is a good writeup on setting it up. The big thing to remember with local::lib is to upgrade Module::Install and Module::Build to make sure everything runs as smoothly as possible

That's it for now, I'll post more of my favorite advent articles as we get closer to Christmas.

Comments welcome