10 Years Later, Only 250 SLOC

| 3 Comments

I had a crazy idea last Thursday, and I reached for Perl.

I used Dist::Zilla to create a new project. I used Git over ssh to set up a new repository.

I built a small database schema for SQLite and used DBIx::Class::Schema::Loader to build DBIx::Class schema for it.

I found a custom CPAN distribution for a web service I wanted to use and added a very small piece of code using WWW::Mechanize to scrape the rest from another website.

I added a couple of Template Toolkit templates and a loop to turn my database objects into nicely-formatted HTML. Then I added a bit of JQuery to add some UI niceties.

I wrapped this all in a slightly modified design from Open Source Web Design and the silly little project has gone from "Hey, how would that work?" into something I can show my friends and family to explain just what I do.

I'm a better programmer than I was a decade ago certainly (some of my design decisions made a lot of code I'd have had to write then completely unnecessary now), but the tools and code available now are amazing.

David A. Wheeler's SLOCCount says I have ~250 lines of Perl 5 in this, and I could cut that down a bit further. This is truly a great time to be a programmer, especially in a community like the Perl community.

3 Comments

I think yours is the realization that comes with Open Source and all the great modern tools we have - you don't need to write software, just integrate and deploy! Sure, integration can be tough, but even that is getting easier.

absolutely. I realized the same thing last week - on a slightly lower level, though :-)
I used a .csv as my database and wrote some nice reports with charts to an OpenOffice document in less than 200 LOC.
Modules used: DBI, DBD::CSV, OpenOffice::OODoc, Chart::Clicker,
and Tie::Hash::Indexed

I am still deeply impressed..

Nice.

Just don't forget the learning curve involved. You need to know all these tools (modules, languages) to be able to integrate.

I guess that's what the 10 years refers to in the title.

Modern Perl: The Book

cover image for Modern Perl: the book

The best Perl Programmers read Modern Perl: The Book.

sponsored by the How to Make a Smoothie guide

Categories

Pages

About this Entry

This page contains a single entry by chromatic published on August 15, 2011 1:11 PM.

You're Already Using Dependency Injection was the previous entry in this blog.

Templated Separation of (Business) Concerns is the next entry in this blog.

Find recent content on the main index or look in the archives to find all content.


Powered by the Perl programming language

what is programming?