Slash Boxes
NOTE: use Perl; is on undef hiatus. You can read content, but you can't post it. More info will be forthcoming forthcomingly.

All the Perl that's Practical to Extract and Report

use Perl Log In

Log In

[ Create a new account ]

chromatic (983)

  (email not shown publicly)

Blog Information [] Profile for chr0matic []

Journal of chromatic (983)

Friday June 18, 2004
12:04 AM

Vacationy Code

[ #19336 ]

Since I'm a programmer who writes and edits information for programmers (or, alternately, a writer who programs), I have a lot of little problems that a little bit of programming can fix. This includes several small CLI utilities and vim macros to generate common files and reformat books and articles appropriately.

It takes a bit more time to solve larger problems, though. That's a pity; I'd have the most benefit from solving them. I rarely can justify spending a couple of days automating things, though.

Fortunately, this week I'm on vacation and have planned few other productive things. So far, I've ported Everything to PostgreSQL, checked Parrot SDL into Parrot CVS, met with a potential client for a side consulting gig, and created my article manager. I'd still like to fix the SDL Perl Win32 build and port Mail::Action to Email::MIME, but that may not happen.

What's the article manager? I've needed a better way than a plain text file, saved e-mail, and my increasingly crowded memory to keep track of the status of various dozens of articles in the planning, acquiring, editing, scheduling, publishing, and paying stages. That's an ideal use of a small database.

Originally I planned to write a small CamelBones application, but then I discovered that Mac OS X isn't for me and switched back to Linux. Then I started a Jellybean version (and figured out a nifty approach to launch a new Mozilla tab from the command line) but distracted myself with something else there.

Yesterday, I dug through all of the installation requirements for Maypole, downgraded mod_perl on my laptop (not a big deal; Everything runs fine in either MP or MP2), futzed with several bugs and minor issues, and finally wrote a small Maypole application that manages articles for me.

Of course, being altogether inexperienced with Class::DBI (another learning experience goal), it took a couple of hours to figure out the right way to specify relationships. (If I'd read Simon's message on the mailing list about not using Class::DBI::Loader::Relationship unless you really need it, I'd have saved some time.) When I stopped for the night, I had boolean values showing up as textboxes and articles displaying on the author view page with their primary key as the link titles.

Today, after digging around in several modules (simplicity of use comes at a high price for implementors), I added boolean support, so the various article statuses show up as checkboxes on the edit page and checks on the view page. I also fixed the related article view to show the article description, not its primary key. In short, at the expense of possibly doing things the hard way, it does everything I want.

It could be disingenuous to say that the manual wasn't especially helpful since it's not finished yet. On the positive side, it does exist and it did point me in the right places to find some help. All in all, it was much easier than trying to figure out why my mother's computer won't detect a USB printer.

The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
More | Login | Reply
Loading... please wait.
  • Part of the problem with writing the Maypole manual is that I'm trying to explain things which, while obvious to me as someone who's done a lot of work with CDBI, TT and MVC, may not be obvious to others, and I often forget that they're not always obvious. If there's some things that you'd like to see more of or some explanations that could be done better, drop me a note and I'll try and find the time to look at it.
  • Since you seem to have a radically different definition of "vacation" from the one in my head :-)
    • Oddly enough, that sounds like a great vacation to me...
    • I travel for work every couple of months and that tends to bleed the "go somewhere else, stay in a hotel, and eat at restaurants" out of my system. My goal for this week was to leave Oregon, work on some smaller projects I wouldn't normally have time to tackle, read a couple of good books, and spend some time with my parents.

      It's a cheap and easy vacation for the one of me. That's the main attraction.

      • I'm only jealous :-)

        My idea of a wonderful vacation at the moment would be a fortnight of enough sleep and a lot of reading. My to-read "pile" now takes up two bookcases... sigh.