Archive for the ‘Uncategorized’ Category

just so there’s at least one october post…

Friday, October 31st, 2008

… and to mark the annual shaving of the yak chin:

in other news, things are good.

Purple Rain1

Tuesday, September 30th, 2008

Barack In the Viriginia Rain — September 27, Fredericksburg VA. I’m normally not one for the speeches, but the man talks purty. Takes him a few minutes to get going, but by the end he’s hit his roll. Worth watching, I think.

1Purple shading to blue, based on the latest polling (scroll down for the VA numbers).

sunday night

Sunday, September 28th, 2008

clearing a few tabs:

Time to bathe some kids, wash some dishes, and then kick back with a Punk’n and think about the next steps for the proto-CMS…

stable links to CPAN

Thursday, September 25th, 2008

I asked over on PerlMonks about stable links to CPAN, i.e., how to create a link that would always point to the most recent version of a particular module’s documentation.

As of this writing, there have been three different functional answers offered… TIMTOWTDI

config file handling

Wednesday, September 24th, 2008

as i alluded to yesterday earlier this month, i’m trying to whip up a little app that can run this here blog in a way that’s slightly more pleasing to me (because i figure the best way to get more updates here is to remove the things that make me go ‘ugh’ when i think about updating…) i’ve had the mental model for how it should work for the past couple of years and i’m just starting to get the first bits of that down, and i’ve run into my first yak of the project: config file handling.

i’ve got a couple of other sites where i’d like to put content that’s not quite the same as the content here, and i’m pretty sure i’m going to want to use this tool i’m writing for that once it’s done. so i don’t want to hardcode a bunch of stuff into the app, i want to be able to have a config file, or maybe even more than one config file.

now, i’m writing this thing in perl. i have a lot of opinions about a lot of perl modules, but i don’t yet have a strong opinion about the best config-handling module. looking at CPAN, i see there are quite a few configuration related modules (searching for ‘config::’ in the module namespace gets pretty close to 1000 hits).

i guess i’m going to start pawing through all those modules, just to see what i see that fits my requirements:

  • it should support a plain-text-ish key/value sort of syntax
  • it would be nice if it supported YAML syntax too because if things start to get hairy that’s probably the config format i’m going to reach for
  • ini format can hang for all i care
  • some sort of self-referential variable interpolation would be nice
  • it would be even nicer if that _didn’t_ involve full-blown perl evaluation
  • it would be quite nice if the thing took a stab at figuring out where the config file was without having to be explicitly told
  • but of course if it’s explicitly pointed at a particular file it should STFU and use what it’s given
  • i’d prefer to have getter methods automagickly appear based on what’s in the config, rather than having to supply arguments to some ‘get()’ or ‘param()’ method
  • in the long run something that’s designed out of the gate for subclassing is probably a better bet

so that’s what i’ll be hunting up on the CPAN — should you happen to have any yak razors or shaving soap handy, do let me know…

Update: wrote the above, never did get around to cleaning it up to post it, and have finally — through some combination of YAGNI and POGE have decided to go with Config::Singleton, which hits the following of the above criteria:

  • YAML
  • auto-discovery of config files (by checking in a pre-defined list of locations which can be overridden)
  • auto-getter methods
  • used by subclassing the base module into your namespace, which (partially and very kludgeably) works around the self-referential variable interpolation thing

so, anyway… onward.

bah

Tuesday, September 2nd, 2008

signs you’ve been away from your blog too long:

  1. your wife sees you looking at the front page of your site and says, “Oh, did you start weblogging again?”
  2. old skööl bloggers start calling you out on twitter
  3. as you login to the admin interface of your weblog, you realize that if the password isn’t cached by the browser you are well and truly fscked because you have no idea what that password might be…

so, anyway, not dead yet, just… busy. i’m going to be all retro and cram a bunch of completely unrelated stuff into this one post. hell, i may even disable comments. that’ll show those damn kids.

speaking of damn kids, this blog turns ten right about now. that’s ten in blog years, which is 327.67 in people years. this blog is old, crotchety, and started out as hand-coded html uploaded using ftp over a dialup connection (you know, using one of those modem thingies your grandma talks about). i didn’t have to make my own ones and zeroes, but i did have to walk uphill to the store to buy ‘em.

the last thing i did before starting to write this post was upgrade wordpress, which thanked me by crapping all over my custom theme. BAH i say. i’m falling back to the (faintly embarrassing, truth be told) default theme just long enough to finish coding my long-threatened custom weblog app, which is going to be a highly automated way of hand coding html and uploading it using scp. because i exude progress, whippersnappers.

anyway, where was i? oh, right, i was talking about where i’ve been for the last six months. mainly i’ve been busy finding and starting a new job. speaking of that, i’m reminded that i owe a shout-out to uri guttman, the perl hunter. uri was one of the people i worked with during my job search — after some very helpful advice on my resume and code samples, he got me an interview with a financial services company in nyc (i won’t say who, but it rhymes with kloomkerg) which was a really fantastic opportunity. in the end it worked out better for us to stay in the dc area, but working with uri was a real treat — highly recommended if you’re looking for a perl job, or if you have a perl job you’re looking to fill.

i did end up starting a new job in may, however — still a beltway bandit contractor, but with a different company, and working at the census bureau. unlike the last gig, this is less sysadmin-ish and more developer-ish — although i’m still straddling that line. honestly, i’d be a bit happier if i could get a bit further away from the sysadmin side, but that seems unlikely to happen for the foreseeable future. so far i’m having a good time and getting to work on some cool stuff. my commute got considerably longer, unfortunately, but i’m trying to utilize the metro as much as possible to maximize my reading time, and i’m going to try getting some coding done on the train using my eee. we’ll see how well that actually works.

and speaking of coding, i’m going to go do some now, and i’ll hopefully post something else before the 11th anniversary of the blog…

The first thing we do, let’s kill all the spammers

Friday, March 14th, 2008

My mail filter report from yesterday:

  Total  Number Folder
  -----  ------ ------
  35457       5 .BOUNCES/
12131742    3090 .SPAM/
1957617     184 .maildir/
  -----  ------
14124816    3279

Yes kids, over 3000 mails and 95% spam! Thank Ghu for SpamAssassin

couple quick links

Thursday, March 13th, 2008

tab dump // 20080310

Monday, March 10th, 2008

Sunday afternoon hacking

Sunday, March 9th, 2008

I’ve been using Hiveminder for several months now and I’m fairly happy with it — the task review interface in particular is a big win for me, as I can take 5 or 10 minutes in the morning and carve out a chunk of things that I can then focus on for the rest of the day. The tag support is top notch too, so I can easily focus on work stuff at work and home stuff when not at work just by tagging things ‘@work’ or ‘@home’.

Hiveminder provides some email tools (some with the free account, some more when you upgrade to a paid account) but they’re more oriented towards task delegation and workflow within a small group. They don’t have an interface that lets you drop a task into your list like you can when working with the web or CLI interfaces. They do have an API, however — so after a few hours of poking around this afternoon, I’ve written the mail gateway I’ve been wishing they had.

What documentation there is, including the address of the SVN repo with the code, can be found at http://trac.genehack.net/hm-mail-gateway. This isn’t a “normal” user tool; you’re going to need to modify your mail aliases, which pretty much means you need root and some understanding of how mail works. If you’re interested but don’t have that level of access on the machine where your mail lands, you could probably turn the code I have into a procmail filter without too much trouble.

Feedback welcome; as I said on the Hiveminder API mailing list, example code seems to be in short supply, so there’s probably a lot of ugly “make it work” stuff in my code.

Update On the Hiveminder API list one of the Best Practical guys pointed out that the normal Hiveminder mail interface does let you set an ‘auto-accept’ option. That isn’t quite the same thing as this mail gateway, but it’s pretty close, and if you don’t run your own mailserver, it’s probably the best way to get this sort of function.