Showing posts with label technology. Show all posts
Showing posts with label technology. Show all posts

Sunday, December 2, 2012

Sabbatical Report: Goals


Welcome to Sabbatical Report #3; for explanations, you may want to read Sabbatical Report 1.

This week I concentrated on nailing down what I want to accomplish on my sabbatical.  Of course, I want to spend some extra time with my family, and do a few touristy things, as I mentioned in the original sabbatical report (see above).  But I also want to work on some personal projects, and I thought it wise to give myself some concrete goals.  Otherwise I’ll sit on my ass for 6 weeks and accomplish nothing except watching a lot of TV and eating a lot of holiday candy, and I’ll feel stupid and lazy (and fat) when my sabbatical is finally over.  So I decided to give myself goals.  And I’ve been fiddling with them, trying to get them to a point where they’re achievable, but not too easy.  I think I’m there finally.

First thing I did was give myself a little padding at either end.  My sabbatical is six weeks long in the sense that it’s 42 days, but it’s not actually six calendar weeks, because it started on a Wednesday.  So it’s really like half a week, then 5 weeks, then another half a week.  I decided that my goals would be applied during the 5 week stint.  The half weeks on either side would just be used to ease into it, and then to ease back out of it.

So, during the 5 weeks (of which this week was the first), I’ve decided to accomplish 3 broad goals.  I’ll explain them, from simplest to most complicated.

First, I’ve decided to finally clear out my (personal) inbox.  I got my Gmail account about 8 years ago, mainly as a backup account.  I still had my own business back then.  But, as time went on, and my company’s servers gradually stopped working, my Gmail “backup” became my main email account.  By the time I realized this, though, my inbox was already a mess, and it hasn’t gotten any better since then.  Oh, I read my emails (well, most of them), but I never seem to actually do anything with them.  I need to file them, or delete them, or maybe even reply to them every now and again.  When I looked at my inbox at the beginning of my sabbatical, there were nearly 500 emails in my inbox.  Fine: 500 emails, 5 weeks—all I need to do is clear out 100 emails a week and I’ll start back to work with a clean inbox.  I’m happy to say I’m currently on track (ahead of schedule, even) with this goal: my inbox right now stands at 352.

Secondly, I have a todo list.  There are two sorts of items on this todo list: things that need to be done once and then can be deleted permanently, and recurring tasks.  My recurring tasks, of course, never actually leave the todo list.  They float to the top sometimes, I do them, then I punt them back to the bottom until it’s time to do them again.  These are things like doing my laundry, fishtank maintenance, grocery shopping, etc.  But the one-time tasks are the more interesting ones.  I do the recurring ones—every week, or every month, or whatever—but I do them.  They never get passed over.  But those one-time tasks ... they just sit there a lot of the time.  Over time, they accumulate.  Before you know it, you’ve got stuff on your todo list you’ve been meaning to accomplish for a year and never touched.  It makes you feel sort of lame.  So I decided I would take advantage of sabbatical time to prune that list a little.  I figured, I’ll do 1 task every day.  Then I decided to make it 1 task every weekday—save the weekends for the recurring tasks, and maybe some chilling out time.  5 weeks, that’s 25 tasks, which must all be one-time tasks, and they must all have been on the list when sabbatical started—no cheating by adding new one-time tasks and then doing them, because that doesn’t actually help achieve the goal of shrinking the overall list.  So this week I should have accomplished 5 tasks, but so far I’ve only got 3.  Maybe I’ll sneak in 2 more before tomorrow.

Finally, the big stuff.  Over a month ago, I started making a list of bigger projects I wanted to accomplish during sabbatical.  Some were short, well-defined tasks, like pulling out my old mountain bike and taking it to a bike shop (which necessitates actually locating a bike shop, of course) and either having it fixed, or having it pronounced dead and buying a new one.  I might actually exercise if I had a working bike.  (I probably won’t, but we’ll never know unless we try, no?)  Others were more nebulous, like working on my book, which could go on for quite a while and never see completion.  So the trick here was to figure out how to turn these larger projects, with all sorts of different lengths and levels of achievability, into concrete goals.

My original thought was to just try to polish off X projects a week.  There were several problems with this plan.  First off, some of them didn’t have definitive endings, as I mentioned.  But, worse: I had so many that I would need to polish off one every day to get them all, and that wasn’t even remotely practical.  Plus I’d need to start one, work on it frantically, and take it all the way to completion before I could mark it off and move on to the next task.  That’s too much like work, which is what I taking the sabbatical to get away from.  I need to be able to hop around from task to task, doing whatever mood strikes me, but still working towards concrete goals.  On top of everything, the fact that some tasks would take only a few hours, while others might go on for days, meant that I would have no idea how to make sure I was on track for hitting my targets.

So I hit on the idea of counting my hours.  When I work on work stuff, I track my hours.  (This comes from many years of being a consultant who gets paid by the hour.)  I know that, in a 40-hour work week, I generally achieve about 30 hours of real, solid work.  I briefly considered trying to do 30 hours per week on sabbatical.  I promptly discarded this idea.  What’s the point of being on sabbatical if you can’t slack off a little?  But not too much ... I’m currently trying to achieve 20 hours per week instead.  Of course, so far I’ve only got twelve, so that’s a poor start.  But, hey, I’ve actually achieved a few cool things.

First off, I just released a new version of one of my CPAN modules, Method::Signatures.  This involved fixing a few niggling bugs and just getting things organized and properly put out on the Internet.  I really love making progress on this particular module, because it’s probably the most high-profile thing I’m known for (even though I didn’t write the original version), and I hope to expand on it even more as time goes on.  I don’t know if I’ll ever actually have a Perl legacy, but, if I ever do, this will probably be the cornerstone of it.  If you’re into Perl, you can read more about this latest release on my other blog.

Secondly, I figured out how to make a “lab” (i.e. a personal page for my custom creations) on my favorite Pathfinder site, d20pfsrd.com.  So far it’s just an empty page, but you’d be surprised how much effort it took to get even that far.  Google Sites may be an awesome thing (not saying it is yet, only that it may be), but intuitive it ain’t.

Finally, I started working on the project of identifying all local file modifications to my laptop.  This is necessary for upgrading to a newer laptop, which is another project on the list.  So far, I’ve got a list of directories, sorted in order by the modification date of the most recently modified file, with the obvious stuff (like the /tmp directory, or my Dropbox directory, which is already on the cloud and thus doesn’t need to be backed up) removed.

So I’m 8 hours short, but I’m not feeling lame.  Yet.  I may have to revise my weekly goals to 15 hours though.  We’ll see.

Anyway, I have to wrap this up now, as we’re out to pick up yet yet another furry child.  Should keep the holidays interesting ...

Sunday, October 7, 2012

Things We Lose in the Timestream


Well, as it turns out, I’m swamped with doing stuff this weekend, so there’s no blog post for you.  Not that you should care anyway, of course.

You know, it occurs to me that occasionally I come along and tell you I’m busy with stuff, but I never actually tell you what the stuff is.  In retrospect, this seems unfair.  You come along (despite repeated warnings to the contrary, even), expecting to see some blather you can kill some time with, and here I am telling you there’s nothing to be read and not even bothering to say why.  Well, fear not, gentle reader: today I shall regale you fully with tales of my goings-on.  And this shall, hopefully, convince you never to wonder again.

So, firstly: often people mention what they’re reading, or listening to, and all that sort of thing.  Right now I am currently working on book 7 of the Dresden Files, and determined to push all the way through to the end.  It’s just getting really good (it was good before, but now it’s really good, if you follow me).  Musically, I recently picked up a digital copy of Extractions by Dif Juz, which is one of the 4AD bands that I somehow missed all this time.  I knew Richie Thomas’ fine saxophone work from Victorialand, of course, but I’d never heard this album before, and it’s quite good.  You should give it a listen if you’re into dream or ambient or that sort of thing.  Visually, I just picked up my Blu-ray of The Avengers, which of course I had seen in the theater, but it was just as good the second time around.  That Joss Whedon really knows what he’s doing behind a camera; I hope he does more of the superhero movies.

Now, of course, all of that is not really keeping me from writing.  There must be other stuff going on around here ...

Well, I do still have a few hours to put in for $work.  I would tell you a bit about my work, but I’ve had to sign so many things at this point saying that I will not ever “disparage” the company that I feel a bit like Stephen Colbert talking about Islam: my company is a great and true company and Blessings and Peace be upon my corporate overlords.  Don’t point, even.  You’ve seen enough of that one.

So, tomorrow I have to do a presentation for my new co-workers (of which there are quite a few), plus I have a meeting about my current project, which I just started, and I’d really like to learn a bit more about it before I have to start explaining it to other people.  But mainly I want to prepare a bit more for the presentation.  I could just wing it, and I’d probably do fairly well, but the more prepared I am, the better I’ll do (most likely), and one does want to make a good impression on people that you’ve just hired.

Let’s see ... what else ... well, there are still some weekend chores left, despite the fact that I generally try to knock those out before Saturday night, or else I find I have no time to myself.  I’ve still got to go to the grocery store, and direct my older children to clean the den so that you can actually walk in there again.  (The youngest is excused from such things, although I’m sure she’d like the floor to be cleared as well, as right now there are a lot of things blocking her from getting to the catfood, which just pisses her off.  Nothing feels quite the same rolling around inside your mouth as a big ol’ handful of catfood.)

In hobby news, the things which are supposed to be my relaxation from other parts of my life occasionally have the power to provide their own sources of stress.  For instance, in my role as a CPAN author, right now I’m about three issues behind in taking care of some issues for the Method::Signatures module I work on, and one of them is for a guy who’s fairly well-known in the Perl world (and, even if you don’t have any idea what I’m talking about, the fact that the guy has his own Wikipedia page should give you a clue).  And, in my work to keep my favorite game going, we’ve been working hard to address a number of issues with one of our recent releases.

So, there’s lots to do, and (as always), little time to get it all done.  It seems that, the older I get, the less likely I am to have one big excuse for not doing what I should.  I mean, remember, back in college, when the reason you didn’t finish your essay for class was because of a party (or the resulting hangover), or one of your friends broke up with their boyfriend or girlfriend and you were up all night with them, or you were helping someone move?  But nowadays it’s never one big thing; it’s a million little things, that peck away at your time jot by jot, frittering away your ability to focus in dribs and drabs.  It’s death by a thousand cuts.  But such is the way of life.  The older you get, the more you take on, I suppose, and the more people you meet, the more that end up depending you for one thing or another, in large ways or in small.

Which is all a very roundabout way of saying to you, my oh so persistent blog connoisseur: no cookie for you!  Not this week, in any event.

Sunday, April 8, 2012

Shell Game


[This week I’m essaying a very technical topic.  This is partially because I want to spit out something fast, and I can do technobabble pretty easily.  Plus I’ve always wanted to write this down, because people—other technogeeks, obviously—ask me about this all the time, and it’s difficult to sum up in a quick sound bite.  But, if you’re not a techie (and specifically a *nix techie at that), you may wish to pretend that I scribbled out another “I don’t have time to write a proper post this week” interstitial post.]

Let’s talk for a moment about shells.  Linux shells, I mean, although we’ll speak in broad enough terms that it shouldn’t matter which flavor of Unix you prefer.  If you don’t what a shell is, you may as well find another blog post to read.  If you do, you probably know most of the history I’ll cover below, but it’s a nice refresher anyway.

The original Unix shell was the Bourne shell (sh), by Stephen Bourne, which goes all the way back to 1977.  Like all things Unix, there was nearly instantaneously a competing product: the C shell (csh), released in 1978, by Bill Joy (who also gave us vi).  The C shell has a number of improvements over the Bourne shell, but they’re utterly incompatible: the syntax isn’t remotely the same, in some cases to the point where you suspect Joy just did the opposite of what Bourne had done, out of spite.  Broadly speaking, the shells that followed hewed to one or the other syntax, giving us two “families” of shells, which are mostly compatible among themselves and not at all with each other.

So, next to come along was the Korn shell (ksh), by David Korn, in 1983; then the Tenex C shell (tcsh), by Ken Greer, later that same year; then the “Bourne-again” shell (bash) by Brian Fox, in 1989.  On the one side, we have the Bourne shell family (sh/ksh/bash); on the other side, the C shell family (csh/tcsh).  There are some other options out there, but these are the most popular by far, with the youngest member of each family eclipsing (for the most part) their elders.  And, these days, bash has emerged as the clear winner, and the others are hardly ever seen.

Well, except on my machines.

You see, I have the following philosophy on *nix shells: use tcsh at the command line; program with bash.  These days, at least on the Linux machines that I work on, that means having to install (or request to be installed) tcsh manually.  Many people ask me why I cling to tcsh.  This post will hopefully explain why.

Now, the first thing you must understand is that, when I came along, it wasn’t a choice between tcsh and bash: it was a choice between tcsh and ksh.  I never even saw a machine with bash on it until sometime in the 90’s, and I was well-established in my patterns by then.  So some of the reasons I made my decisions don’t even apply any more: bash has features that ksh lacked, and is just as good as tcsh these days in many areas, such as history.  But there are still enough reasons that do apply that I continue to refuse to switch.  If you think I’m wrong, though, I welcome your comments to show me the error of my ways.  However, realize that, while I always switch my personal account, I never switch the shell for the root account, so it’s not like I never use bash at the command line.

So, why is tcsh better for an interactive shell?  First of all, let’s look at some of those reasons that don’t really apply any more.  I won’t go into too much detail here, since ... well, since they don’t really apply any more.

  • Tab completion.  ksh didn’t originally have it at all; the ‘93 ksh added it, and bash can do it pretty much as well as any other shell around.  But tcsh was basically invented for this, and had it first and best for many years.  Completion of history commands, in particular, I have never gotten to work right in either ksh or bash, although both claim to support it.
  • History recall.  Now that bash does it too, it’s easy to forget how awesome !! was when only the C shells could do it ...
  • Command line editing.  tcsh lets me use vi keys to edit my command line (which drives anyone trying to use my terminals crazy).  I’m pretty sure bash can do this as well; if ksh ever could, I never knew about it.

Now, what about the reasons that do still apply?  (Or, at least, do still apply as far as I know ... no doubt bash might have snuck some of these in when I wasn’t looking.)

  • Shell redirection.  If I want to redirect both stderr and stdout of a command in the Bourne shell family, I have to do something like this: command >/dev/null 2>&1.  Ick.  In the C shells, it’s simpler: command >& /dev/null.  The Bourne versions let you redirect the two separately, true, but, in practice, I never want to do that on the command line.  Whereas redirecting both at once is very common.
  • “Separate” environments.  This one is more conceptual.  Shells maintain variables, and those variables can either be visible to subshells (and other child processes) or not.  In the Bourne family, you think of them as two different types of variables.  I can set a variable, and it’s local; I then “export” that variable and it becomes global.  In the C shell family, you think of them as two different sets of variables.  If I want a local variable, I use one command (set), and if I want a global variable, I use a whole different command (setenv).  No mixing.  Perhaps it’s just a personal preference, but this really works for me much better.
  • Alias arguments.  All shells will let you define aliases.  But, in the C shells, your aliases can have arguments.  So I can define lln as ls -lhtr !* | tail (and I have, as it happens).  In the Bourne shells, the arguments to your alias go at the end of the command line, period, no exceptions.  If you want it otherwise, you have to write a function.  Why do I want to write a function when I have a perfectly good alias?
  • Customized prompts.  It’s true, bash has come a long way in this department.  But I still find tcsh easier.  My current prompt is "[${LOCALHOSTNAME}:%.04] ".  To do that in bash, I’d have to fiddle around with $PROMPT_DIRTRIM or somesuch, and I’m still not convinced I could end up with exactly the same thing.

Now, on the flip side, I would never use tcsh for a shell script.  The only scripting I ever do in tcsh is in my .tcshrc, and even that I find almost unbearably painful.  I regularly have to look up the syntax for loops and even if conditionals.  I originally used ksh for all my shell scripts, and I even held on to it long past the point when it was rational to do so: past the point where I was manually downloading pdksh because no one was shipping ksh any more.  I finally made the switch to bash about 10 years ago, and, other than having to change all my prints back to echos, it was fairly painless.

The definitive proscription against using the C shells for scripting is of course Tom Christiansen’s Csh Programming Considered Harmful, but I’ll give you my personal breakdown:

  • Shell redirection.  In a shell script, I quite often do want to redirect stdout and stderr separately, and not being able to do so in the C shells is practically a non-starter.
  • Unset variables.  In the Bourne shells, an unset variable expands to the empty string, which makes sense.  In the C shells, it expands to ... a syntax error.  You have to use $?VARNAME to see if the variable is set before trying to use it, unless you’re very very sure that it will be.  That’s just annoying.
  • Backquotes.  Trying to use backquotes for capturing command output just sucks.  The ksh/bash construct of $(command) is so much better.  Interpolation works, nesting works, it just ... works.
  • Basic string manipulation.  In ksh or bash, I can chop off prefixes or suffixes, do global substitutions, put in default values, and all sorts of other stuff.  In tcsh I pretty much have to echo my variables to sed or somesuch.
  • Basic arithmetic.  In ksh or bash, it’s $(( $VAR + 6 )).  In tcsh, I’d have to pipe that to bc or something.
  • Newlines in strings.  You just can’t in the C shells.
  • Getopts.  No such thing in the C shells.
  • Trap.  No such thing in the C shells.
  • Extended pattern matching.  No such thing in the C shells.
  • "$@".  No such thing in the C shells.

I could probably go on.  Or you could just read Tom Christiansen’s essay, linked above.  I don’t agree with everything he says, and some of what he says is nitpicky and doesn’t actually come up that often, but it’s comprehensive, and Tom has experience with “considered harmful” essays.

So hopefully the next time someone asks me why I still use tcsh, after all these years, I’ll pass on a link to this post and that’ll be the end of it.  I don’t mind switching to newer things when it makes sense (I did, eventually, switch from ksh to bash, as I mentioned above), but right now my .tcshrc is nearly 250 lines of painstakingly handcrafted customization over nearly 20 years, and there’s too much effort for not enough gain to try to get used to bash on the command line.  Maybe one day ... but probably not.  Maintaining compatibility with the Bourne syntax inherently creates some difficulties that I simply don’t have any need or desire to overcome.  Perhaps if tcsh ever gets as hard to come by as Betamax machines or PS/2 MCA buses, I’ll reluctantly give it up.  Until then ... why should I?

Sunday, November 20, 2011

If You Meet the Hype on the Road, Kill It

There is a principle known as Occam’s Razor; no doubt you’re familiar with it.  Ask most people what Occam’s Razor is, and they’ll happily tell you:

The simplest explanation is usually the correct one.


Actually, this is a bit of an oversimplification (but then, we’re fond of those, as I’ve written about before).  Perhaps a more correct formulation might be:

Simpler explanations are, other things being equal, generally better than more complex ones.


At least that’s how Wikipedia chooses to present it, although it notes that the actual words that Mr. Occam (supposedly) said were:

Entities must not be multiplied beyond necessity.


(Only he said it in Latin, ’cause that made him sound smarter.)  What you might notice about these successive phrasings is that it gets less and less emphatic.  First it’s “usually,” then it devolves into “other things being equal,” and finally ends up at “beyond necessity.”  Any way you slice it though, the point I’m making should be obvious: there’s a huge difference between the simplest explanation always being true, and it maybe possibly being true, unless necessity dictates otherwise.

Happily, as a Baladocian, I’m perfectly happy to believe both at once: the simplest explanation should be true, but it needn’t be.  I’m pretty easy-going on several sayings like that.  Here’s another one:

If it seems too good to be true, it probably is.


I absolutely agree with that ... especially the “probably” part.

The other day I was talking to a good friend (and co-worker) of mine, and he pointed out that he’s always highly suspicious of techniques (or processes, or solutions) that sound like a religion.  If you think about it, that’s just the “too good to be true” thing all over again.  In the computer world (you’ll recall that I’m a technogeek by profession), we run into this all the time, and I’m sure you’ve experienced it too, even if you’re not technical yourself.  Got a friend who owns a Mac?  Then I’m sure I don’t need to explain the Cult of Apple to you.  And technology is full of those: there’s the Cult of Microsoft to battle the Cult of Apple, likewise the competing religions of vi and emacs, the people who so slavishly follow Excel that they use it for everything, from grocery lists to corporate databases, and on and on and on.

When I was a young (and foolish) programmer, I fell into such a cult myself: the Cult of OOP.  OOP, or object-oriented programming, is a way to write software that is usually contrasted with procedural programming, although these days it’s more fashionable to compare it to functional programming.  If none of that means anything to you, don’t sweat it—it isn’t crucial to my point.  The point is, when I first had OOP explained to me, it didn’t sound that cool ... it sounded sort of simple and obvious, actually.  Then I read a book on it—not even a very good book, as it happened, but enough to make me understand what OOP really meant.  And, let me tell you: the skies opened up, and angels came down and blew their golden trumpets, and golden rays of sunlight lanced down, and all the darkness I had ever known was lifted, and I did see the light.  Glory, glory, hallelujah.  I didn’t know it, but I’d been converted.

Back in those days, OOP was just getting started: I really got in on the ground floor of that cargo cult.  There weren’t loads of people wandering around proclaiming that OOP was the One True Way of programming ... not then.  That would come later.  If they had been around then, I, like my friend, would have most likely turned up my nose.  But, as it turned out, now I’m one of the evangelists.

And here’s the thing: so is my friend.  Because, you know what? OOP really is better.  Not the “One True Way,” of course, because nothing can ever be that, but, given a system of sufficient complexity, that needs to be built at an average level of abstraction, OOP is almost always the best way to go.  Call me a religious nutjob if you must, but it really is true.  OOP lives up to the hype.

And yet there are still people out there who dig in their heels and put their fingers in their ears and go “LA! LA! LA!” and refuse to listen to the advantages of OOP, because those of us who know how to use it are just so goddamned enthusiastic about it.  It’s very frustrating to someone like myself.  Or my friend—I’ve seen him fighting with people who stubbornly refuse to listen to him when he’s extolling the virtues of OOP, and I know that expression on his face.  It’s irritation, plain and simple.

So imagine how I feel when here I am explaining to him about something that I know really is a whole new awesome way of doing things—agile, perhaps, or TDD—and he’s telling me he’s suspcious, because he smells dogma.  Well, sure: I’m suspicious of crazy zealots too.  God knows, when my other friend (and co-worker) tries to tell me how awesome his iPhone is, I mentally close the door in his face, just as I would for any Jehovah’s Witness (or Mormon) that shows up and rings my bell.  But, dammit: this particular stuff I’m talking about is different!

Of course, now I just sound whiny.

The title of this blog post is a reference to a saying attributed to 9th century master Lin Chi:

If you meet the Buddha on the road, kill him.


What this actually means, of course, is up each individual to determine, but a typical interpretation explains that the “Buddha on the road” is our conception of what Buddhism actually means, a symbol of the instruction of teachers and masters.  And we must “kill” that external image, because enlightenment can only come from within.  As the Buddha also (allegedly) said, as he was dying: Be lamps unto yourselves.  Which (purportedly) means, don’t listen to what others tell you to do, work it out for yourselves.  Of course, there’s a paradox here too: if we don’t listen to the authority of others because the Buddha told us to ...  I talked about this in reference to quotes, but perhaps the best way to illustrate the words of the Buddha is with the words of another great philosopher: Steve Martin.

Now let’s repeat the non-conformists’ oath:

I promise to be different!

I promise to be unique!

I promise not to repeat things other people say!

Good!


The hype of whatever the latest technical methodology is presents us with a similar paradox.  Popularity is no measure of quality—in fact, it’s more often the opposite.  But, then again, if a new thing really is as awesome as these things generally claim to be, how do you expect people to react?  Won’t they want to go around telling everyone, trying to share the good news with as many people as possible?  Exactly like ... a cult.  Which makes us suspicious.

I mentioned two things that many technical people find cultish: agile and TDD.  There have been many screeds against both: Steve Yegge (who I mentioned last week) has a really famous one knocking agile, and here’s one plucked at random from a Google search which talks about TDD.  Note how both use the word “cult” freely—gleefully, even.  Both of these articles are very very wrong ... but, then again, they’re both right.  They’re right about how people slavishly follow things they don’t fully understand and how stupid that is, even as they slavishly rant on, Dennis Miller style, about things that they don’t fully understand.  I’m into paradoxes and all, but this is enough to make a guy’s head spin ...

In case you do happen to be a technical person, I’ll point you at one last article.  This is a blog post by J.D. Hildebrand (an old friend of mine, as it happens), where he talks about how agile started out fighting the system, and now has become the system to be fought against.  It happened, if I may paraphrase J.D. (who is indeed paraphrasing others, to some extent), because people joined the cult.  They didn’t question what they were adopting, they just heard it was the latest cool thing and they picked it up and followed all the instructions to the letter.

This is wrong.  One must always question.  One must always be skeptical.  But does that mean that one must turn up one’s nose at things just because they are touted by the masses?  If we sneer at all those mindless drones, just to be hip, without truly knowing the facts, how are we any better than they are?  A suspicious mind is not the same as a closed one.

Sunday, October 30, 2011

Further Tales of the CPAN


It’s been a CPAN weekend.

Now, several months ago, I talked about uploading my first module to CPAN.  I basically said then that I had no idea why it had taken me so long to finally get off my ass and upload something.

Well, now I know.  Because as soon as you start uploading crap to CPAN, people expect you to actually support it.  And, man ... that takes time.

It’s not that big a deal, really.  You don’t have to support your modules, of course, but I think I explained in some detail the whole “pride of ownership” thing, right?  And people judging you by your CPAN modules?  So you do end up feeling a sense of responsibility for making things work if other people are trying to use your code and having problems.  Plus you’d hate for your fellow Perlites to come along and think you were a slackass who never responded to bug reports.

So I try to keep up, and I try to make things work well.  Besides my first solo module, I’ve also been named comaintainer of another module that I’ve contributed heavily to, plus I agreed to take over yet another module that had a bug in it and its author had gotten out of the Perl game.  I’m still working on the first official release of that last one; I’ll probably have to spend part of what little remains of my weekend working on it, in fact.  There’s some weird problem in one of the test files, which I changed from the original because I found a bug in there, which I found when I tried to fix the original bug ... I’m dealing with three modules here, and I’m already starting to feel a bit overwhelmed!  How do people with a buttload of modules handle it?  Crazy, man ...

Actually, a big part of what I’ve been working on this weekend is repository surgery.  If you’re not a technogeek like me (and assuming you’ve bothered to read this far (which I don’t know why you would (but then I don’t know why you’d bother to read at all (reminder: see name of blog)))), perhaps you don’t know what I mean when I say “repository.”  It’s where you put your source code, for your software, when you want to keep track of all the history of it.  Now, as it turns out, some code that I originally wrote a long time ago, and have taken with me to various jobs, is actually being used by somebody other than me.  Not via CPAN, because I’m too much of a lameass to have put it up there, of course, but by a former co-worker who got it from me directly.  And recently (okay, like 3 weeks ago) he emailed me to ask me if he (or I) could put it up on CPAN now.  And, since I’m a bit less of a lameass now, I thought that was a pretty good idea.

So step 1 is to get the thing into a repository.  And, while it’s not absolutely necessary, I really would prefer for that repository to have the complete history of all the code.  But the code in question is only part of a larger repository that’s in an older format (i.e. Subversion) instead of the newer format I use nowadays (i.e. git).  So I have to convert and trim it down and move it over, and it still won’t be fit for release onto CPAN until I at least clean up the test suite a bit.  But I made a good start on that this weekend.  It’s not done, but ... well, it’s a start.

I’ve also been considering starting another blog.  Something a little more focussed on Perl, that perhaps might be more interesting to my fellow Perl travelers.  Which, on the face of it, is ridiculous.  First there’s my opinion on blogs in general, which certainly hasn’t changed.  And then there’s the fact that I barely have enough time to write this blog every week, much less write another one.  But, hey: I’m not gettin’ any younger ovah heah.  I’ve been doing Perl for about 15 years, programming professionally for over 20 (roughly half my life, at this point), programming in toto for around 30.  It’s not that I have a burning desire to be famous or anything.  But there’s a certain freedom that comes with recognition in your field, and I think it might be nice for a change to comment on a post on the Internet or somesuch and have people know that you actually know what you’re talking about instead of having a knee-jerk reaction of “who is this guy again?”  I dunno, maybe it is all selfish self-aggrandizement, but it seems at least worthwhile, if not strictly necessary.

If nothing else, it’ll give you twice as many options for ignoring me.

Sunday, July 10, 2011

The Demon Sony

So, it looks like I’m spending my entire weekend playing Little Big Planet.  This is because the past three years’ worth of Little Big Planet costumes, objects, decorations, and building materials, collected by three out of four humans in our household in quite serious fashion, were on the PS3 that finally broke down.  And Sony, in their infinite brilliance, designed the PS3 so that you can’t retrieve data off a dead machine.  Clever, eh?

Now, you may say to yourself, but a PS3 just has a standard hard drive in it, right?  Just pull that sucker out and hook it up to a PC.  Easy enough, but then you can’t read it, because Sony has encrypted the entire drive.  Copy protection for their games, don’t you know.  No problem, you might think.  Put the old hard drive into a hard drive enclosure with a USB interface and treat it as an external hard drive on the new PS3.  Nope, doesn’t work: not only is the hard drive encrypted, it’s encrypted with a key taken from the hardware chip in the machine.  In other words, hard drives encrypted with one PS3 can’t be read by another PS3.  Again, copy protection.  Well, you say, I heard that Sony just invented a new data transfer thing so that you can copy directly from one PS3 to another ...  Nope.  You have to be able to fire up the old machine in order to start the data transfer.  How convenient for their customers.

Not that Sony is particularly concerned about their customers.  As we can tell from the fact their security is such a joke that a handful of anonymous hackers took them down for 26 days.  Think about that for a minute.  All the press reports I’ve heard want us to be pissed off at whichever hacker group fired off this attack (although we still aren’t completely sure which one it was).  But screw that.  I want you to think about it.  A multi-billion dollar company with employees and offices worldwide got pwned by what was most likely six to ten nerds hanging out in their moms’ basements.  It’s sort of like if your bank came to you and said “Well, all the money in your account just got stolen by a couple of teenagers in ski masks.  We’re real sorry about that.  These criminals must be stopped!” Would you really feel sorry for your bank, taken advantage of like that by evil kids?  Or would you wonder why this giant institution that makes tons of money off you isn’t taking more seriously the idea of keeping your shit safe?

On the positive side, at least it probably cost them a billion or so.  Serves ’em fucking right.

So we waited for 26 days to be able to get back online, to be able to get stuff from the Playstation Store and play online levels with the world and whatnot, and then almost as soon as it’s back our PS3 goes YLOD.  Of course, I didn’t even know what that meant until it happened to me, but apparently it’s quite common.  Certainly a Google search for “ps3 ylod” turns up nearly 2 million results.  It stands for “yellow light of death” (in a nod to the infamous Windows BSOD), and it’s called that because the little light on your PS3 that’s usually either red (if it’s off) or green (if it’s on) turns to yellow and it won’t boot up.  It results from overheating, which is, again, something Sony most likely could have prevented with a little tighter quality control issues.  (And, if you think they couldn’t have, riddle me this: why is it that the newer models don’t suffer from this problem?  Obviously it’s possible to avoid it.) Sony itself offers you nothing to help with this problem.  If your machine is still under warranty, you can get a new machine, but, of course, your data is just lost.  If you’re not even under warranty, you’re really screwed.

So I went online and found someone who does electronics and specializes in fixing these sorts of problems.  And he fixed it.  And it worked ... for a while.  Then it started having a whole different problem, and now it won’t even come on at all.  I took it back to the same fellow, and he says the GPU (that’s the graphics processing unit) is fried.  And you can’t replace it.  So we’re back to being just screwed.

So we bought a new PS3 Friday night.  It’s another $350 down the drain, and now we have to rebuild all our saved stuff.  The only saving grace is that anything we actually purchased is still available for download, so at least we don’t lose all the money we’ve dropped on Sony over the past three years.  Just all the time we spent unlocking levels and collecting stuff.

While Little Big Planet is the biggest loss for us—three quarters of the humans in our house are fairly well addicted to it—it’s the not the only one.  Since my friend Benny first showed me a tower defense game on his iPhone, I’ve been obsessed with that class of games, so of course I have PixelJunk Monsters, one of the best examples of the genre.  Looks like I’ll be starting over on that one too.  My elder son will be starting over on Half-Life 2, Portal (both 1 and 2), and Fallout New Vegas.  My younger son has already started fresh on Costume Quest (a very cute little game; if you haven’t heard of it, you should check it out).  And those are just the biggies.  There are countless other games in which all progress has been erased.

Now, my general attitude towards video games is that they’re time wasters.  I learned long ago (when my college roommates pointed out to me that I’d lost a whole day to Phantasy Star IV, in fact) that I can’t afford to spend too much time on them.  And I try to teach this attitude to my children as well.  It’s just a game, I tell them.  And so it is.  But it still pisses me off to lose all this time just because a greedy company cares so little for me and my data.  It reminds of what may possibly be the most awesome footnote ever written, which appears in the book Good Omens, by Terry Pratchett and Neil Gaiman.  In it, there is a character named the demon Crowley, and he happens to have a computer.  There is a description of said computer, which leads to this footnote:


Along with the standard computer warranty agreement which said that if the machine 1) didn’t work, 2) didn’t do what the expensive advertisements said, 3) electrocuted the immediate neighborhood, 4) and in fact failed entirely to be inside the expensive box when you opened it, this was expressly, absolutely, implicitly and in no event the fault or responsibility of the manufacturer, that the purchaser should be considered lucky to be allowed to give his money to the manufacturer, and that any attempt to treat what had just been paid for as the purchaser’s own property would result in the attentions of serious men with menacing briefcases and very thin watches.  Crowley had been extremely impressed with the warranties offered by the computer industry, and had in fact sent a bundle Below to the department that drew up the Immortal Soul agreements, with a yellow memo form attached just saying: “Learn, guys.”


I mean, seriously: if demons are cribbing notes from our software EULAs, I think there must be something wrong here.

So today I’m quite down on corporations.  Not that I’m ever up on corporations, of course.  But even more so today.  And, as I’ve spent about 48 hours now trying to keep my children from killing each other as they try to work together to restore all their LBP swag, I’m a bit tired as well.  Not the way I saw spending my weekend.  Video games are supposed to be fun, right?  Thanks a bunch, Sony.  Now I’m even cursed by my gaming consoles.  Sigh.

Sunday, July 3, 2011

On Conferences, and Travel

I just got back from a conference (I was traveling this time last week, which explains why there was no post, not that you care, I’m sure (and, if you do, you aren’t paying attention to the title of the blog—wake up, people!)).  Now, I understand that there are some business folks who attend conferences regularly: salespeople, or marketing reps, or ... well, salespeople, I suppose.  Anyone whose business revolves around networking (in the social sense, not the technical sense) has a very valid reason to travel long distances to hang out with people they don’t really know, I suppose.  Us technogeeks are a slightly different story though.

On the one hand, we more than anyone have a need to stay current with what’s going on in our industry.  The tech world changes at lightning speed, and it’s hard enough to keep up with either hardware or software, much less both.  This is one reason techies are news freaks (see Slashdot) and gossip mongers: it’s not just idle curiosity—sometimes the latest news from Microsoft or Google or Oracle changes our entire job function.  A conference is excellent for that sort of thing.

On the other hand, there are all sorts of logistical issues.  Tech areas can be radically different and radically arcane, so it can be difficult to put together a set of presentations that will have mass appeal.  People at different levels of experience have radically different needs as well, so that complicates matters even further.  Often people chosen to speak are not well known, and often the people who might be well known are not great speakers.

On the other other hand—which turns out to be the biggest hand in this case—technogeeks don’t generally like meeting people.  Hell, most of us got into this business because computers were much easier to talk to than humans.  I’m sure many of my colleagues look at the prospect of being alone in a room full of strangers in roughly the same light that you might look at being alone in a cage full of tigers.  It’s not quite that bad for me, but I freely admit that there’s a fairly long list of things I’d rather do than sit in an uncomfortable airplane seat for six hours (each way) in order to spend four nights in an uncomfortable hotel bed in between long sessions of uncomfortable mingling.  On the scale of introvert to extrovert, I’m a little of both.  I’m very extroverted around people I know; once you get to know me, you’ll probably find that you can’t shut me up.  But I’m not that guy who brazenly walks up to people and introduces himself.  When it comes to hanging out with crowds of strangers—even crowds of people just as geeky as me—I relapse into introversion.

And at the convention I just returned from, I was quite comfortably in the middle of the geek scale.

It’s YAPC::NA, which is the North American version of the “Yet Another Perl Conference,” which trades on the Linux tradition of “yet another"s (such as yacc and YAML), even though it’s more accurate to say that YAPC is the Perl conference, and any other such conferences are “yet another"s themselves.  YAPC::NA is, in fact, the original YAPC, so it really is a bit of a misnomer.

It was quite a good conference for all my whining above, and I’m glad I went.  This was my first time going, even though I’ve been using Perl for many years now (since ‘96, approximately).  Partially my delay has been financial (even though the conference itself is cheap, the airfare and hotel stay can be prohibitive, depending on which city is hosting), and partially just reluctance to wander off and hang out with a bunch of people I don’t know (as previously mentioned).  But this year the company I work for is footing the bill, so most of my excuse is gone.  I was hoping to present a talk, even, but my submission wasn’t accepted.  No worries; that saved me the hassle of standing up in front of a bunch of strangers and pretending I was more interesting than the next guy.

I got to meet many of the Perl luminaries, which is nice.  Among those I actually got a chance to speak to were Matt Trout, Piers Cawley, and Ingy, as well as others I saw from afar, including Stevan Little, and, the progenitor of Perl himself, Larry Wall, who was there with his wife and two of his children.  During Larry’s talk (which opened the conference, naturally enough), he said “I’ve always taught my children that it’s okay to be weird, so of course now I have weird children,” which is definitely something I could relate to.

So I chatted a bit, and learned some things there, and I attended some talks, and learned some things there, and I went to both of the “bad movie night” after-hours gatherings, where I had the pleasure of seeing the MST3K version of It Conquered the World (even though it didn’t) and the live action Aeon Flux with the RiffTrax commentary (which was far more enjoyable than the first time I watched it, when I had to actually listen to the characters speaking).  Overall it wasn’t a bad outing, and I think I got my company’s money’s worth out of it.

I am glad to be home though.  When I travel for business, I often try to arrange to take my family, but it wasn’t economically feasible this time.  You’d think I’d enjoy some time away from the family, and I admit I often think that I will, particularly when they’re all yelling at each other and expecting me to play referee.  I might say to myself, well, at least I have that week off coming up, and I’ll get some peace and quiet for a change.  But then I go off and a funny thing happens: I wish they were there.  As annoying as it is to be packed into a small room with all of them, and as even more annoying as it is to be packed into a small vehicle with them for travel purposes, I generally find that I wish they were around when they aren’t.  I suppose it helps that I don’t think of them as obligations, but more as pals.  I like hanging around with them ... well, most of the time, anyway.  When I’m on my own, I think how nifty it would be if they were there with me, and I could chat with them about all the things going on.  I’ve never actually cared much for being by myself ... in fact, I’ve never lived alone.  (In fact, the last time I counted roommates I’ve had over the years, I got to 30 without even trying very hard, not even including anyone who could be considered “family,” and, if you don’t think your family counts as roommates, you should rethink your perspective.) Now, I did share a hotel room with a coworker (who I can’t say I know well enough yet to call a friend, but I suspect that one day I will), and that definitely made it bearable a lot of the time, but I still missed having the family around.  I’m very comfortable around them.  I’m much more relaxed, and my introverted side is a bit more muted, and I think that helps me open up to people.  Perhaps next year it’ll be possible to bring them along.  I wonder how much different the trip would be with them.

Still, I’m glad I went.  If nothing else, I got to be part of Piers’ human theremin.  (The YAPC videos aren’t up yet, but you can check out the Bobby McFerrin experiment that Piers was cribbing off of.  Admittedly, Piers wasn’t able to add the melodic counterpoint that you see in that video, but then McFerrin didn’t tell me about cool ways to introduce my kids to programming either.)

Sunday, June 19, 2011

Curse of the Computer Gods

You know, the hardware gods hate me.

I currently have 7 corrupted hard drives with valuable data on them, two dead laptops and one I’m trying to reinstall to, and any number of other bits and pieces I’m too afraid to throw away.  I’m sort of getting tired of recreating files at this point.

I’ve started saving my data on Dropbox to help alleviate this.  These days, everyone wants you to store your data “in the cloud”; I’m a little leery of that overall, but the nice thing about Dropbox is that it stores your data in the cloud and on your local machines.  All of them, even.  So even if the Dropbox folks disappear tomorrow (which is always a problem with these ventures), I’ll still have multiple copies of it.  That beats my old solution, which was bidirectional sync’ing with Unison.  Which worked okay, but it was a pain in the ass if you made changes to the same file in two different places, and it doesn’t work at all if you can’t get Unison installed on a machine.  Another nice thing about Dropbox is, worse comes to worst, you can always use a browser to get at your stuff.  Of course the downside is that you have to have enough local storage space on every machine to hold all your stuff, but hard disks are cheap.  About the only thing I can’t reasonably put on Dropbox right now is my music.  I’d have to pay for the premium service to fit my 25Gb of MP3’s there, and I’d have to have 25Gb of space lying around on all my machines.  Which is problematic.  On the upside, I can get to my files from my phone, even.  So that’s nice.

Still not sure what to do about the music.  Amazon has a music vault service, but it has limited space, and you have to use their proprietary programs to upload and to download.  Not a very good option.  Google supposedly has a similar option, but too similar to be any better.  There are also streaming options like Subsonic, but the way they work is to stream your music off one server (which must always be available) which you can then access from other servers.  Moderately convenient, but it doesn’t solve the problem of what happens if the hard drive on that server bites the dust.

I also have several external hard drives, including two Passports.  They’re convenient, but I don’t want to have to lug drives around with me everywhere I go, and it still doesn’t solve the problem of what happens when the drive goes belly up.  Or when technology outpaces it: I have another pretty hefty USB hard drive that none of the newer computers I try it on will read.  Sort of like all those Jaz disks I have that I’ll never see the data on again.

And don’t even get me started on the tape drives.

I’m a technology guy.  I’ve been programming professionally for more than half my life; casually for nearly 75% of it.  I’ve built my own machines, installed hardware in everything from laptops to servers, even worked as a hardware technician for a while in my youth.  And I still hate dealing with hardware.  As a programmer, if there’s some piece of software I’m missing, I can always write it.  Now, granted, I may not be willing to write it; there are many classes of programs—hardware drivers, GUI applications, music players, spreadsheets, etc—that I wouldn’t bother wasting my time trying to create.  But I could write them if I wanted to, if I had the will and the gumption and the time.  But if there’s a piece of hardware that I’m missing, I have little choice but to go out and buy it.  And, even if I had a degree in Electrical Engineering and the brains (and will and gumption and time) to put together my own circuit boards, I’d still have to go out and buy the components.  You can create software from nothing.  Hardware requires stuff.  That’s why it frustrates me.

And the stuff is always changing.  I long ago gave up trying to keep track of all the latest technologies.  Many technogeeks (including many of my friends) do so, of course.  It’s like being a car guy and knowing what all the latest engine technologies and all that are coming out.  You can know all that cool stuff if you really want to, but it requires a significant investment of time and effort, and I just don’t have the patience for it.  Besides, I can just ask my friends and cheese off the time and effort they’ve already put into it.

The Internet (and, more recently, the “cloud”) have promised us a new technology life, a life free from the concerns of operating system or CPU.  We’re getting to that point, but we’re not there yet.  I’m looking forward to it, myself; we’re a multi-OS family around here, and, at any given time, there are several Linux machines, Windows machines, and Macs floating around the house.  I mostly like to work on Linux, but I’ll admit that its desktop apps have always lagged behind the Redmond giant.  I despise Windows, but there are some Microsoft products I like: Excel, for instance, pounded the nails in the coffin of Lotus 1-2-3 with both authority and flair.  Word’s always been a bit of a bloated whore, but Excel has always been a slick app, and, while Google Spreadsheets has managed to recreate some of its flash—and even surpassed it in a few small ways—honestly, it still lacks a lot of Excel’s magic.  And, of course, there are still programs that just only work on Windows, although those are growing fewer and fewer with the passing of the years.  Mostly it’s specialty programs, such as the excellent mapping program for one of my favorite hobbies.  So I like to have some Windows machines around.  And, while I’ve never been able to make myself love the Mac the way many have (primarily because it’s not keyboard-friendly enough for me—which is really an understatement: Macs are downright keyboard-hostile), I’ll admit to occasionally envying its ease of hardware use and a few of its programs (I’d love to be able to produce presentations in Keynote, for instance).  So why shouldn’t I be able to have all three operating systems running?  And be able to access the majority of my useful files from any of them?

I think we’ll get there eventually.  For now, I still feel like I spend just as much time configuring computers as I do using them, which pisses me off.  But that’s my curse.  I have offended the gods of hardware, and they do exact their price.  Perhaps I’ll go sacrifice a chicken.  Or a lolcat.  Something.

(In case it wasn’t obvious, I’ve spent most of the day reinstalling my laptop and didn’t really have time for a proper post.  So you got this crap instead.  See title of blog.)









Sunday, April 3, 2011

Perl, Procrastination, and the CPAN

I just uploaded my first CPAN module today.

If you’re a technogeek like myself, that may mean something to you.  If you’re not, you’ll wonder what the hell I’m on about for the remainder of this post, so let me see if I can explain it to you.  (Some of this some of you will undoubtedly know, so please don’t get offended if I overexplain.)

So I’m a computer programmer, right?  And, when you program, you use a certain language: just as we humans speak different languages depending on when and where we’re raised, computers and programmers speak different languages too, and that often has to do with when and where they’re raised.  My first computer was a Commodore 64, and it only spoke BASIC, so I learned BASIC so we could communicate.  And then I learned that BASIC wasn’t the only language it spoke: in fact, BASIC wasn’t even its native tongue.  And all the misunderstandings we were having trying to talk to each other, and the reason it took my poor computer forever to figure out what I was trying to tell it to do was that it actually spoke 6502 Assembly (and, yes, I know the processor was actually a 6510, but the Assembly dialect was the same, that’s the important bit).  So I taught myself that.  This was around high school time.

Later, in between college and college (I took an extended break from college at one point), I ended up getting my first programming job, because one of my neighbors told my new boss that I was a “computer whiz.” She thought this, of course, because she too had a Commodore 64 which spoke BASIC, and her computer and I were on good terms.  My new boss was a salesman, and he had people to talk to computers for him, so he had no idea that being able to talk to one computer doesn’t mean you can talk to all computers, and he hired me.  Now here I was presented with an IBM 8088 PC, and I was told I had to speak to it in a new language: C.

So I taught myself C.  And then, later, I taught myself C++, which is kind of like going from Spansish to Portuguese: many of the words are spelt the same, but it sure doesn’t sound anything like it.  And I loved C++.  I loved the expressiveness of it, its elegance ... writing C++ was like writing a technical paper where you get to use all sorts of really big, impressive sounding words that you typically don’t use because normal human beings have no idea what they mean, but somehow when you’re writing for PhDs none of that matters.  You know, those five-syllable words that express a concept that otherwise would have taken a paragraph to explain.

But the problem is that writing that stuff is tedious.  Writing technical papers can be partially fun, but there’s also lots of boring bits: you have to define all your terms at the beginning, and you have to provide a detailed bibliography at the end, and in the middle there’s footnotes, footnotes, footnotes.  After a while, you wonder if you spend more time writing references than writing text.  In C++, it’s libraries instead of references, but the concept is very much the same.

Then I discovered Perl.  And the thing about Perl is, it was designed by a linguistics student, and linguistics students understand something that most people who write computer languages don’t: humans like to have different ways to say the same thing.  Most computer languages want everything to be very cut and dried, with exactly one way to say everything you can say.  This is convenient if you’re writing a compiler (that is, the computer program which changes a given computer language into the computer’s native tongue), but not so much when you’re a programmer.  In other words, most computer languages were created by translators, not speakers.

Translators hate ambiguity.  They hate connotation vs denotation, and abstract idioms, and subtleties of context, and nuances of conjugation, and all the other things that make it hard to say “this Mandarin phrase means exactly this in Italian”.  But speakers love ambiguity.  In English, I can give you a “gift,” or I can give you a “present.” What’s the difference?  Some people would say nothing.  Some people would find tons of very subtle differences.  If I know you, and I know that you know me, I could conceivably communicate worlds to you with my choice of words that have “identical” meanings.  And, sometimes, you’ll spend weeks worrying over what I meant by choosing this word instead of that one even when I didn’t mean for there to be any difference.  This is just part of the joy of language.

And Perl really gets that.  It’s a language with not only verbs and nouns, but adjectives and adverbs, with indirect objects, even, and, most importantly, with context.  How do you know the difference between “bat” and “bat”?  One’s a small flying mammal and one’s a hunk of wood you hit a baseball with, but how can you tell which one I’m talking about?  They sound the same.  They’re even spelled the same.  But, 99% of the time when I say “bat,” you’re going to know exactly which one I meant.  Because of context.  Perl’s got that, in spades.  In fact, many programmers hate it for that very reason.  Many programmers have fled to computers precisely because they didn’t like having to talk to people, where language was messy and easily misunderstood.  Reproducing that for the computer seems horrific to them.

But I’m an English major; I’m a wannabe writer.  Words and language are everything to me; their subtlety and beauty fascinate me.  So while I may be a technogeek programmer and I may have just as much desire as the next technogeek programmer to have my computer understand what I’m saying in a very precise manner, I also appreciate a computer language with context, a computer language where There’s More Than One Way To Do It (which, as it happens, is one of the unofficial mottos of Perl).

So I loved Perl from the moment I learned of it, but the real reason I switched to it from C++ is because all those footnotes and references and bibliographies that I’d spent ever so much time writing in C++ ... they were all written for me in Perl.  Oh, sure, they might not be written exactly as I’d have done them, but they’re close enough for a quick copy and paste.  If I need to tweak them a bit, I can do that: after all, I have the full text of the references right here.  And there’s a full set of references, formatted any way I can imagine, combined with other sets in any way I can imagine, set out according to as many different style guides as I can imagine.  Remember that in my analogy, “references” are libraries, and, in Perl, libraries almost all come from one place: the Comprehensive Perl Archive Network, or CPAN.

But how do they get there?  You can certainly imagine how wonderful writing research papers would be if practically every possible set of references you might need were precompiled for you and put into a giant collection for you to pore through and pick out the one that was perfect for you, but wouldn’t you wonder who had actually put them there?  Sure you would.

To really beat this analogy to death, let’s imagine that you’re a new graduate student.  You’re in the campus library, working on a research paper.  With you is your good friend who’s been a graduate student for years now, so she’s an old hand at writing research papers.  Imagine a conversation like this:

“Man, I don’t mind writing research papers, but doing all these bibliographies and junk is boring.”

“Why don’t you just use the RPRAC?”

“The what-prack??”

“The RPRAC.  You know, the Research Paper Reference Archive Collection.”

“WTF is an RPRAC?”

“It’s the ... look, I’ll just show you.  Here, look at this.”

“Hunh.  This is ... oh, that one’s nice.  Yeah, this is ... wow, I would’ve spent days ... holy crap!  This thing is awesome!!”

“Duh.”

“This’ll save me shitloads of time.  Where does all this stuff come from, anyway?”

“People like us.”

“Henh?  Whatchoo mean, ‘people like us’?”

“I mean, people like us, of course.  Anyone who wants to can add references in there.  Original ones, or ones derived from others in there.  I’ve got a couple in there myself; nothing too exciting, but they’re useful from time to time.”

“But ... well, if anyone can put stuff in, there must be lots of really crappy ones in here ...”

“Oh, sure, some of ’em are.  But not as many as you might think.  Look right there: your name’s on it.  So, if it’s crappy, everyone knows that you put some crap in the collection.  Poof! there goes your reputation.”

“Yeah, but some people won’t care about that.  Some people are just dicks.”

“True.  But most people do care.  And the ones who are dicks wouldn’t take the time and effort to add to the collection anyway.”

“Yeah, that’s another thing: why do people spend the time and effort.  I mean, these people are all graduate students, like us, right?  They’ve all got lives, and other papers to write, and families and shit ... why spend your free time putting crap in a book just so other people can save time?”

“Because some people just like being helpful.  Some people like to know their name’s in the book.  Some people like to show off their stuff in the book when they’re applying for grants, to show how good they are.  Some people just figure, hey, I spent all this time putting this together, seems a shame if other people have to start from scratch.  I think all those reasons come down to one thing, though: pride of ownership.  Here’s something you can point to and say: see, I contributed.  I gave something back.  And this is mine, and I’m proud of the work I did.  And I want everyone to see it.”

“Wow.  Maybe someday I’ll add something to the collection.”

“I’m sure you will.  Someday.”

So, do you see?  That’s what CPAN is to Perl programmers.  And I’ve been a Perl programmer for nearly 15 years, and I have used dozens—nay, hundreds—of CPAN modules to help me write my own programs faster and more easily and more efficiently.  And never once have I taken anything I’ve written and put it on the CPAN.  Until today.

In some ways, this is almost a rite of passage for a Perl programmer.  In many ways, I just now “became a man” in the great Perl tribe.  And, like so many rites of manhood, the first time you do this one is pretty terrifying.  And, after that, it’s no big deal.

I’m pretty sure the reason it took me so long to get something up there was just plain fear.  As I indicated in my imaginary conversation, there is a certain amount of useless crap on CPAN, but not nearly as much as you’d expect.  And part of the reason for that is your name gets forever associated with whatever you upload.  Like any facet of the Internet, whatever you put up there is there forever—even after it disappears from CPAN, it’ll still be on the BackPan.  Any time you apply for a Perl job, they will inevitably want to know what you’ve contributed, if anything.  And your fellow members of the Perl tribe, they shall know you by your CPAN modules.  Any person you meet online in a Perl capacity is going to judge you by what you have on CPAN, and how well written it is, and how well documented it is, and how popular it is, and how many stupid mistakes it contains.  They may not even mean to, really ... but they will.

So it’s definitely not the case that having something—anything—on CPAN is better than having nothing.  Having something stupid could well be worse than nothing, by a long shot.  It’s also not necessarily easy to get something onto CPAN.  Like any system run by volunteers, there are many different ways to do it.  If you want help figuring out how to do it, there are hundreds of guides out there ... and they all give you slightly different approaches.  You have to apply for an account, and you need to format your stuff properly or other people won’t be able to use it, and you may need to register a namespace, and you’re supposed to talk about the name of your module first so that everyone can tell you what a stupid name it is and what a much better one would be (I freely admit I skipped that step).  And then after you submit something, there is a huge network of people who (completely automatically) download your contribution and test it out, on different operating systems, using different versions of Perl, with different configurations, and, if anything doesn’t work right, they post it up on a web page so you (and, of course, everyone else in the world) can see it.  And, assuming you survive all that, there’s a rating system, so someone can still come along and tell you suck.

All in all, it’s rather daunting.

And I think I let my fear of not having it “just right” cripple me.  Supposedly Meg Whitman (former CEO of eBay, one of whose subsidiaries is thoughtful enough to provide my biweekly paycheck) was fond of saying “perfect is the enemy of good enough.” I’m not sure I agree with her 100%—I think often “good enough” is the enemy of “not going to collapse on you when you least expect it”—but in this case she really had me pegged.  As part of my CPAN upload, I have to provide a “Changes” file, which documents all the versions of the module on CPAN.  But, since I was making a big point in my module’s documentation that I’d been using this thing in production code for over 10 years now, I decided that I should provide the change history of my module even before it finally got to CPAN.  That meant scratching around in 2 or 3 different places, digging up historical data, and actually putting dates to all the changes I’d made in the past 10+ years.  And I also figured out the date when I first started the version that exists today, the version that I specfically built from the ground up to be my first CPAN release.  It was August 7th, 2008.

I’ll pause while you check the date of this post and do the math.

Yes, that’s right, it took me almost three years from the point I decided I would create a CPAN module to the point where I actually uploaded the first, neotonous, cautionarily designated as a developer release, version.  That’s just insane.  And, sure, I can make other, perfectly good excuses: I have two beautiful children that I love spending time with, things were going on at work, including the lauch of two major initiatives during that time that I was responsible for leading on the tech side, I was buying my first house, which was certainly something that demanded a lot of attention ... but you know, all that comes down “I didn’t have time,” and the only thing I didn’t have time for was getting things perfect.  Getting things good enough, I could have done months and months ago.

But now it’s done, and I have my first CPAN module.  And, you know: it wasn’t that hard.  Hopefully my next one will take much less time.

Sunday, November 7, 2010

Once Upon an Email

Why do people have such issues with email?

First and foremost, it’s 2010. We’ve had email, in one form or another, for about forty years now. Over 75% of us in North America have email (about 20% worldwide). It’s not really a new-fangled thing any more.

But still I have to deal with people who want to call me on the phone. I’m working on buying a house right now, and trying to get my real estate agent, my loan officer, or my escrow people to deal with me in email is like pulling teeth. I can’t seem to convince my doctors to communicate via email either. I know I’m a technogeek by profession, but seriously: get with the times people.

Basically, it’s like this: A conversation consists of a series of responses. Perhaps the first exchange in the conversation isn’t a response, but, if you think about it, many conversations are just picking up where a previous conversation left off, so even that first bit of communication is often a response. Now, if you call me on the phone, what you’re saying is that you want to deliver your responses at a time when it’s convenient for you, regardless of how convenient it may be (or not) for me. If I call you instead, it’s really the same thing, only reversed. If you insist on us talking face-to-face, it’s even worse. When you have a meeting at work, it’s often a time when it’s equally inconvenient for everyone, including the person who called the meeting. But when we communicate via email, each person can deliver their response at the time that’s most convenient for them. If you’re a morning person, you can respond to my emails first thing in the morning, when you’re bright-eyed and bushy-tailed. I, of course, will likely be sound asleep, or at best barely conscious. But then I can respond to your email in the middle of the night, when I’m most productive and you, perhaps, are long asleep.

Of course, we constantly hear cautionary tales about miscommunicating in email. After all, we’re told, you can’t see a person’s facial expression or read their body language, so you’re likely to misconstrue what they said. This is basically a giant crock of shit. People have been communicating with each other via letters for millenia. Hell, what do you think literature is? I can’t see Shakespeare’s facial expression while I’m reading Romeo and Juliet, but I’m pretty sure I know what he’s talking about. Ah, but people write emails hastily, we’re told. That’s the difference. Basically what this is saying is that email communication is “inferior” because people are too stupid to reread what they’ve written before they hit “send.” What kind of sense does that make? It’s a poor workman who blames his tools.

In an email, I can ask you more than one question at a time and not have to worry about you forgetting any of them. What happens if I try to ask you multiple questions in person? Just watch a press conference or listen to a call-in talk show to find out. But, in an email, all the questions are right there in front of you, easily referred back to. Not that that helps most people. The majority of the people I send multiple questions to in email don’t come even remotely close to answering them all. Personally, I intersperse my answers in the quoted email, answering each question or responding to each point; this insures that I don’t miss anything. I have been accused of being rude or mean in my emails because of this: that somehow I’m “dissecting” others’ emails to me and “attacking” the points therein. This, again, baffles me. How did “thorough” come to mean “rude”?

I’ve also been told that I say things in email I wouldn’t say face-to-face (and, to be fair, some say that other people do this as well). In my case at least, this is also bullshit. I don’t say anything to you that I don’t want you to hear, and the medium of delivery is irrelevant. I do think that most people feel they have a right to be more offended by an email than by a spoken comment though. I’ve had people get their nose completely out of joint in response to a comment that I made in email when I’ve made the same comment to them in person many times and they just smiled. Whether this is my fault or the fault of the receiver (and you can probably guess which opinion I favor), that doesn’t matter: either way, I feel fairly confident we can agree that it isn’t email’s fault.

In a business context, we’ve become utterly schizophrenic about email. Have an important business conversation in email and someone is sure to bitch you out for not just getting up and talking to the person “to avoid misunderstandings.” On the other hand, have a series of personal conversations about an important business topic and you’re bound to get bitched out sooner or later for not keeping a permanent record of the decisions you came to. When we have a business meeting, someone is supposed to take notes. Well, here’s a news flash: if you conduct the conversation via email, no one needs to take notes.

In fact, having a permanent record of the conversation is one of the main reasons I prefer email. Especially for confusing things like monetary amounts required for escrow. How am I supposed to remember what you told me on the phone three days later? I can barely understand it today. But do these people put things like that in email? No, they produce reams of incomprehensible legal documents that they want to get faxed around ad infinitum, and then they attach notes saying to call them if I have any questions. WTF???

Another thing that bugs me with email is the complete ignorance about how to use the “reply all” feature. I’m constantly reading things that tell people never to use this, because it’s “bad.” This is moronic. If you don’t want me to reply-all, don’t include the entire world in your distribution list in the first place. Other than the email equivalent of loudspeaker announcements (like company-wide emails), I always use reply-all. I’m assuming that if you CC’ed those people originally, you must want to keep them apprised of the topic at hand. And, likewise, if I CC someone on my email to you, you better reply-all when you reply. I actually have an acronym that I use when I forward an email from some moron who doesn’t comprehend how to use reply-all: OBOTR-AI, or “on behalf of the reply-all impaired” (occasionally abbreviated “AAARRRGGGHH!!!”). It’s amazing to me how difficult it’s been convincing these new house people to include Christy on their replies. Pointing out that Christy is the person who actually writes the checks doesn’t seem to do the trick. Pointing out that she checks her email more often than I do and therefore CC’ing her will get you a faster response doesn’t make an impression either. I’ve actually had to change my email signature to remind them to do it. This results in about a 50% success rate. Which I guess is about as good as I can reasonably hope for.

So here is this wonderful invention called “email” which radically increases my efficiency at communication, and I’m stuck dealing with people who can’t seem to use it. I have similar problems with instant messaging. I can easily conduct four or five simultaneous IM conversations, and often do other work at the same time, and still I have to deal with sending people an IM and then hearing the phone ring, or have them walking over to interrupt me. If I wanted to talk to you in person, I could have got up or picked up the phone myself: don’t screw up my workflow by deciding that face-to-face communication is “better” and doing me the favor of taking matters into your own hands. Even worse, don’t assume that I’m being lazy if I send you an IM when you’re three cubes away. That’s just insulting. I’m happy for you that you love to talk to people in person. Just keep it to yourself.

But unfortunately there’s no point in telling people this at the time. In the first place, they get all whiny about it. Like I’m insulting them by stating a preference for communicating more efficiently. (And, yes, it’s more efficient for them as well: just because they don’t like it doesn’t negate its advantages.) And then there’s the point that, if I didn’t have time to talk to you face-to-face, I sure as hell don’t have time to explain to you why I don’t have time to talk to you face-to-face. Overall quicker to just sigh to myself and stop what I’m doing and pray that I remember where I left off and give up and let you babble on. I hope your damn facial expressions and body language are worth it. Generally they’re not.

So I’ll soldier on and keep trying to communicate as best I can, and hope the rest of the world catches on at some point. Many people have. There are at least three or four people at work that I can count on to communicate with me electronically, and very effectively at that. I have no problem understanding what these people are saying, and I don’t miss seeing their faces. I see their faces every day anyway, sooner or later. These people give me hope that one day, when I move to the middle of the jungle or something like that, I will still be able to communicate with the world.

Well, the ones that count, anyway.