Monday, March 23, 2015

Whimsical chagrin

A reminder from Dennis reading aloud to me while I was washing dishes after he made dinner tonight:
"From a drop of water," said the writer, "a logician could infer the possibility of an Atlantic or a Niagara without having seen or heard of one or the other.  So all life is a great chain, the nature of which is known whenever we are shown a single link of it.  Like all other arts, the Science of Deduction and Analysis is one which can be acquired by long and patient study, nor is life long enough to allow any mortal to attain the highest possible perfection in it.  Before turning to those moral and mental aspects of the matter which present the greatest difficulties, let the enquirer begin by mastering more elementary problems."
- Sir Arthur Conan Doyle, A Study in Scarlet

Welcome to computer debugging, Mr. Sherlock Holmes.  Only in place of that drop of water substitute "It doesn't work!" and you'd be perfectly at home in the 21st century.

Wednesday, March 18, 2015

Vicious cycles, Part II

Back in 2009, when "Views from the Bridge" were but a wee lass, I poked fun at a weakness I share in common (solidarity?) with other crafters--namely, the infamous Designated Tote Bag Syndrome(TM).  As it turns out, I was being too narrow in my satire. Because, apparently, it's not just a crafter thing.

Alas, the Moncton area's options for dealers in off-the-shelf electronic components is pretty thin right now.  Also, the loonie-greenback exchange rate being what it is(n't), it's becoming more expensive to mail order certain kinds of stuff.  And, as always, the wanna-be mad inventor can also expect to pay through the nose on shipping.  That confluence of costs makes bulk-purchasing more attractive.  Even for a tight-wad such as your faithful blogger. 

So, pitting my frugal Upper Midwestern upbringing against itself (i.e. saving money by dint of spending money), I ended up with eight programmable micro-controllers (a.k.a. "Trinkets"), because at that quantity they were under 10 loonies a pop (ignoring tax and shipping, as our consumer-geared brains are wont to do).   Those micro-controllers, however, aren't much use to me without a mechanism to plug them into something--in my case, a breadboard. 

But the good folks at CE3 pointed me to BJW Electronics, who were happy to solder headers onto them.  (For the record, I'm not deep enough into this hobby to justify a soldering iron plus accessories.  That, and my Mom still has the toolbox I tried soldering for her in middle school Industrial Arts, and it's frankly embarrassing--like Nidavellir collectively sneezed on cheap sheet metal.  But that's just how Moms roll, so...#whaddyadoamirite?)

That all--again minus HST and whatever shipping costs are associated with me picking them up myself--added about five loons a pop.  But it's still better than the $30-40 CDN you'd pay for a full-blown Arduino, yes?

I already have two--okay, probably three--projects earmarked specifically for the Trinkets, and I assured myself that the other six or five will come in handy.  Sometime.

But then I thought of Halloween.   

And how I can certainly figure out how to make red, white, and yellow LEDs imitate candles in lieu of waiting for the Grande Digue winds to (inevitably) blow out the usual tea lights inside the Jack-o-lanterns.   

And there's no reason (apart, of course, from rain) why the LEDs couldn't be triggered by a passive infrared sensor.   

And as long as I have to pay postage for a PIR sensor anyway, I might as well get a handful.   

And at that point, it might make sense to have another PIR sensor trigger a servo-motor to loose a gravity-propelled "ghost" on a guy-wire strung between the pine trees and our front door.

Aaaaaaannnddd....

My Gentle Reader sees where this is heading, right?

The problem is, now I definitely don't have enough Trinkets to make this happen.  And the irony of it all is that we average two sets of trick-or-treaters per annum. 

But that's just the problem.  With some people, the means infers the motive...and then the motive infers the means...which then again infers the motive...and so on.

Culturally, I suppose, it's a good problem to have.  Except for when the credit card bill arrives.

The unresearched project is not worth doing*

I've been hoping that Clay Shirky's low profile on his blog means that he's flogging away at the keyboard on another book.  Frankly, I'm jonesing...to the point of re-reading Cognitive Surplus for, like, the fourth time.

Chapter 1 reminded me of the McDonald's milkshake research project.  (And, unsurprisingly, the engineer's urban myth about General Motors's vanilla ice cream problem**.)

But what do fast food and cars have to do with software development?  In a word, problem-solving.  (Okay, maybe that's two words...except when I cheat by hyphenating.  So there.)  Anyhoo, problem number one is making sure you're solving the right problem in the first place.

In the case of McDonald's, their problem was lacklustre milkshake sales.  The obvious attack vector on the problem is of course, experimenting with the formula and taste-testing it.  That gives a number of variables:
  • Sweetness
  • Flavour profile
  • Consistency
  • Mouth-feel
  • Temperature
The problem is, McDonald's could spend millions of dollars in the lab tweaking the formula along multiple axes.  But what if the formula is not the issue? 

As it turned out, 40% of milkshake sales were purchased not as a dessert or treat, but as a commuter-friendly breakfast***.  The milkshake could be consumed one-handed, didn't leave crumbs (or stickier things) on the car (or commuter), and had more staying power than a doughnut.  Moreover, milkshakes, because they take longer to consume, had the added value of providing frequent (momentary) distractions during heavy traffic:  
  1. See the car ahead start to roll forward...
  2. Accelerate...
  3. See the brake lights of the car ahead come on...
  4. Step on the brake...
  5. Pause...
  6. Reach for the milkshake...
  7. Sip...
  8. Put down milkshake...  
  9. Aaaaaaaannnnd repeat until the commute or milkshake run out.
Not surprisingly, the researcher who identified the important commuter demographic (Gerald Berstell), didn't do that from inside the lab.  He sat in a McDonald's for 18 hours for that epiphany (among others).  And then came back to quiz customers--not about how they thought the milkshake tasted, but what kind of problem it was solving for them.

And while I'm sure that Mr. Berstell's time and observational skills don't come cheap, they're infinitesimal compared to a whole bunch of biochemists and nutritionists and marketers flailing around in labs and focus groups.

Moral of the story?  Research done before the project starts is cheap--dirt-cheap.  In fact, it has a negative cost when compared with the cost of solving the wrong problem. 

- - - - -

* A nod to Socrates' "The unexamined life is not worth living."

**  Snopes classifies the story as "legend," but it's a fun read and far too believable because there's no substitute for hands-on debugging.

*** Clay Christiansen, Scott Cook, Taddy Hall, What Customers Want From Your Products - Harvard Business Review, 16 January 2006

Friday, March 13, 2015

Frivolous Friday, 2015.03.13: Tall tales for tourists*

Returning home from Moncton on Wednesday, I happened to fall in behind a truck towing a power-boat north on Hwy 530.  Now, Wednesday had, hands-down, the nicest weather of the week, so my first thought was that someone was being a just a tad optimistic.  But the driver eventually turned into the driveway of the local boat hibernation grounds, so I’m assuming that they were having some tweaks or maintenance done.  Which makes more sense, although I still think I caught a whiff of wishful thinking.

But it’s a reminder that we’re on the downswing of winter, even with the 25-40 cm of snow that next week is throwing at us.  Which means it’s time to start prepping L’Acadie for the spring rush of cottagers and summer rush of tourists.

The first order of business, of course, is to melt all the ice and snow.   Fortunately, Canadians have figured out how to harness their two national resources in tandem to accomplish just that.  My Gentle Reader is of course aware that snow and ice reflect sunlight.  But it might never occur to her/him to juxtapose the timing of maple syrup production with the end of winter.

Of course, tourists don’t visit New Brunswick in the winter, so they don’t see the huge parabolic reflectors that collect and concentrate the reflected sunlight.  (The reflectors are ferried away to Shediac Island around April 1st, which is well before anyone is willing to come venture north of the border to see if New Brunswick even has daylight yet.)  The energy is harnessed to boil the maple sap in ginormous underground vats.  Once the sap has been reduced and caramelised into syrup, it travels through long and winding pipelines.  Its transit transfers all that heat to the ground, which melts the snow and incidentally cools the syrup enough for bottling.

Clever, huh?

Naturally, the whole point of a tourist economy is to give people experiences they can’t have at home.  One obvious choice in these parts is moose encounters.  But for moose, the novelty of having their photo taken wore off even before the advent of the instant camera.  So to compensate for that, some areas have taken to lining their roads with tourist-friendly “Moose Crossing” signs.  Huge lettering, big flashing lights.  Facebook-friendly enough that people like pulling over just to photograph a road sign.  I probably shouldn’t let the proverbial cat out of the bag, but the moose are usually hiding just a skip off into the woods, laughing into their hooves.  Apparently, it never gets old for them.

Anyone who’s seen the tourism brochures for New Brunswick will likely recognise the Hopewell Rocks.   The current story is that they were formed over millions of years, but in fact the area was the development ground for the “crystal growing” science kits that were a thing back in the 70s.  (In the early days, matters got a little out of hand before the product was ready for the market and, well, there you go…)  Unfortunately, after the fad ran its inevitable course, interest dropped off.  So the Tourism Board fell back on the boring, hokey old “natural wonders” shtick to keep the credulous coming through the gates.

There’s a darker side to our tourist economy, however, and that’s the slaughter of countless lobsters for the p’tits pains d’homard (lobster rolls) that are the staple of nearly every eatery hereabouts. Mind you, the buoys and boats are just for backdrop—nobody around here actually fishes for them.  No, no:  It’s much more sinister than that.

Anyone who’s driven through Shediac on Hwy 133 can’t possibly miss the “World’s Largest Lobster,” and they can be completely absolved of assuming it’s pure kitsch—I mean, it’s right next to the Tourism Centre, after all.

What outsiders don’t know is that, every year, the lobster is trawled out to sea to make an appearance.  Because years ago, the locals were able to convince the lobster tribes of Maine and the Maritime provinces that the giant lobster is their god—a god that demands sacrifice.  So each tribe is required to provide a given amount of tribute each year.  Which in itself is bad enough.  But that set up perpetual war between the tribes, so that what it turned over each spring and summer is largely captives.  A horrible, horrible secret history of this place.  Which is part of the reason I refuse to eat the stuff on principle.

But don’t hold it against all of us up here, okay?  There is a movement afoot (aclaw?) to put an end to the madness.  Sadly, we all know how it is when humans develop a taste for religion and war:  We can’t expect lobsters to be better than we are, right?

On the more positive side, we go to a lot of trouble to spruce up the joint for visitors.  Mulching all the (unclaimed) skis and snowshoes lost under meters of snow.  Paving the snowmobile trails we’ve commuted over for months.  Cleaning half a meter or so of dead maple leaves from the half-submerged bathtubs just so the Virgin Mary statues don’t give us the side-eye when we put them out to soak up the summer sun.  Pulling out our flashcards and re-memorising our French and Chiac to do our part for “local colour.”  (Another guilty secret:   Everyone speaks English when no one from out of province is listening.)

And though we can’t eliminate the mosquitoes, we have been able to selectively breed them to apologise after they’ve zapped you.  (These critters survived the extinction of the dinosaurs, for cryin’ in yer Molson’s; there’s only so much even genetic engineering can do.)  Unfortunately, we haven’t figured out how to make it loud enough for you to hear yet.  We’re working on it.

So make sure your passport is up to date, and do give Acadie and New Brunswick a second look as you’re planning your summer vacation.  You’ll have plenty of amazing stories to take back to the folks at home, guaranteed.

- - - - -

* Credit due to Dennis for the inspiration of the Hopewell Rocks.

Wednesday, March 11, 2015

A Hufflepuff's rebuttal

Today for, like, the second or third time since moving to New Brunswick, someone has advised me to recruit clients from out of province and/or out of Canada.  Without deliberately trying to use straw-man arguments, I think that they're doing this based on two (at least partially faulty) rationales:

1.) "You're in I/T, so you can work from anywhere."  Yes, I've made no bones about the fact that I have the luxury of living where other people come to vacation.  Yet it's 2015 and videoconferencing still leaves A LOT to be desired.  And that's when you're lucky enough to be a moving postage stamp on someone's screen and not just a Basecamp avatar (and when the latencies are appreciably better than the Mars Rovers'.) 

There's simply no substitute for being able to read body language, for being able to size up the vibe in the room before the meeting starts, or the random productive collisions that happen as people are streaming out of the conference room.

Also?  Time zone differences suck.  True, I've never been accused of being morning person--so that delta might just level the playing field when I'm collaborating with the proverbial "larks" pre-lunch.  But mostly it just messes with me getting into (and staying in) The Zone.

In other words, working locally has a decided benefit of reducing the wear-and-tear on the client relationship that the friction of distances almost inevitably involves.

2.) "Exporting your services brings fresh money into the local/provincial economy."     Ah, but the nature of my trade (database and the un-sexy business logic parts of web applications) is providing my clients with a strategic advantage over their competitors.  Sometimes in markets that don't yet exist.

In that case, I ask you:  Would you, as a hypothetical New Brunswicker, prefer that I do that for businesses inside or outside the province?  (Granted, I might give one NB firm an edge over another, but I think that the point still stands.)  Short-term gain vs. long-term pain, yo.

. . .

Yes, it's been quite awhile since I made peace with the fact that I was sorted into Hufflepuff (and not the more glamourous Gryffindor or Ravenclaw).  But that's not why I'm writing this.  Loyalty can, sadly, be a euphemism for the sunk cost fallacy when it applies to people or causes.  Yet in the case of my trade, at least, I think you can make a fair case that working locally, like buying locally, is good business sense.

Of course I wouldn't turn away out-of-province clients and any tasty problem they care to pay me to solve.  Business is business, yes?   But given my 'druthers, it's in my tactical as well as strategic interests to collaborate within a reasonable commute.

Monday, March 9, 2015

Another cost of commoditisation

Twenty years ago, when internet usage started up steep slope of its hockey-stick growth in adoption rates, web programming was much "closer to the metal" than it is today.  I'm certainly not advocating for a return to those days.  (For one thing, FTP via command-line is tedious unless you're a preternaturally fast and accurate typist--and I'm certainly not.)

Nor do I think that it's a loss to my trade that content management systems such as WordPress, Joomla or Drupal have taken a lot of grunt-work out of setting up a website.  They've certainly given people less of an excuse for not updating their website content, too, which is all to the good.  I'd muuuuch rather be working on business logic or databases than jerking pixels around on a screen.  More power to them who can do it without their brains leaking out their ears.

Plus, I've hand-coded a blog in HTML before.  Booooooorrring....  So I'm glad that Blogspot--and to a lesser degree the messier Tumblr--have made formatting a highlight-and-click operation.

It's great that the tools have become slick enough that someone with little to no programming/database knowledge could click an icon, step through a wizard, and have their own customised website.  And, if they're willing to put up with a certain amount of jankiness, they can hook it into a shopping cart and payment processing for an online store.  Sweet.

But the increasing sophistication of the tools and platforms for putting words and images on the internet are making my life difficult in one respect.  Namely, that when I do need to open up the "black box" to (figuratively) poke and prod, I'm seeing less and less ability to do that.  At least with shared hosting, which is the cheapest (and thus most commoditised) way you can rent web server space from someone. 

But as such tools/have lost their rough edges and hidden the complexities and underpinnings of the system, the server "landlords" have--in my experience--been removing access to those underpinnings.  Sometimes in ways that make absolutely zero (if not, in fact, negative) sense.  For instance, I'm finding it difficult to fine-tune access to my databases because the tools are incomplete...when they're not completely unavailable.  Without being too technical, that's a Big Deal(TM) for me because it impacts overall web application security.  When you make it difficult for me to protect my clients' data to the best of my ability, we have a problem.

In other words, the lid of the "black box" has been nailed down.

Worse, trying to make the support techs understand that is wasting more of my time than I can afford to spend lately.  Which tells me that I'm dealing with people who are more used to fiddling with the dashboard than going under the hood.  That's disconcerting. 

I'm all for making the toolset more ergonomic, even (maybe especially) in the cognitive sense.  But that doesn't require taking away powerful, if somewhat more arcane tools.  Even in the name of saving screen space.  In fact, hiding the latter toolset behind an "Ugly Tools" header would pretty much encourage anyone who doesn't, say, know how to write a stored procedure to back out after the first curious peek.

I realise that it can often be negligible, but there is a difference between mainstreaming technology and dumbing it down.  The current state of things (at least as I've experienced them in the last year or so) has definitely crossed that line. 

Then again, I live in a world where people are willing to pay top dollar for a slick interface to a walled garden--or should I say Apple orchard.   Which is precisely the problem.  I won't buy an iPhone on principle.  Yet there are any number of alternatives that don't think I'm too incompetent/precious to, say, add more memory, change the battery, side-load apps., etc.

But when commoditisation of the web hosting market not only limits my choice, but interferes with my due diligence as a web developer?  That just makes me crabby.  Look, I'm glad that we've can scale solutions to problems mostly likely to befall the fat head (not a pejorative term) of the long tail.  But some of us are out there tackling problems for the niches who may someday become mainstream.  Don't make our work any more challenging, alright? #grumble

Friday, March 6, 2015

Frivolous Friday, 2015.03.06: Anthropomorphism is a two-way street

We humans (or "hoomins" in lolcat-speak) are narcissistic creatures.  We see our image in way too many things...and when we don't, we do things like Mount Rushmore.  So it's no surprise that someone could parlay people captioning cat photos into a multi-million dollar empire.  (Truth be told, pretty much everyone who's not Mr. Huh should be ashamed of her/himself for not thinking of it first.)

But every once in awhile, you'll encounter humour that turns anthropomorphism on its head...even in an age diminished by the retirement of The Far Side's  Gary Larsen.  One of the better samples is If People Acted Like Pets.  Also, Things Cats Do That'd Be Creepy if You Did Them. 

With dogs and cats, those folks are reaching for the low-hanging fruit.  Yes, I have a standard-issue Office Cat.  He keeps a fairly regular schedule.  There's the regulation morning lap takeover.  (And he acts like he's King of the World for jumping up, even after I've invited him.  Dork.)  Then it's usually nap-time until about 1.5 - 2 hours before Second Kibble Time, during which he becomes insufferable.  Mercifully, he equates opening the office door with feeding and zooms into the hallway...after which I shut the door on him (and his whining) and turn up the volume accordingly.  Then Second Kibble Time and then a second lap takeover and finally post laptime-naptime (which not coincidentally is the most productive part of my day). 

But the Office Finches I'm stuck with the entire time I'm clocked in.  We brought six of them north with us.  Four were already older than the average life-span for their species.  The other two--a Zebra finch and an African Silverbill finch--were very young.  So it was a shock a few weeks back when the Silverbill (first named "Belle" and then "Bill" and then "Belle" again because she liked gender-bending before finally laying the question to rest...along with several eggs) caught us off-guard by sickening and dying in less than a day.

The remaining finch (named "Harpo" for a raucous call that's all too reminiscent of the blond Marx brother's famous horn), freaked out at being alone.  So for three days I streamed YouTube bird songs to calm her down until I could make it into town to recruit an acceptable substitute for Belle.  I found it in a Society (a.k.a. Bengalese) finch with two toes that point upward instead of downward.  (It seems to do just fine, btw.)  New finch is a golden-brown (sort of a buff colour) which suggested names like "Buffy" or (in homage to my country-of-residence) "Timbit."  But I try not to be superficial, and held off to allow it to name itself.

And so, after Belle's dainty ablutions in the water-dish were replaced by wholesale splashing and drenched newspaper, new finch duly earned its tribal name of "Duck."  Yep--this one has a freaky side.  And I wouldn't want it any other way.

But just as cats and dogs hold up a fun-house mirror to human behaviour, the same can be said for finches.  For one thing, finches are maniacally social (not surprising for flock animals).  The only exception I've known in 18 years was a runty Lady Gouldian Finch named Irene who didn't like anyone...except a damaged little Silverbill rescued from the horrible PetCo on the north side of Rochester, MN.  She'd peck anyone else out of her personal space...yet "Vir" was allowed to sleep absolutely plastered up against her at night.

Less humourously, finches are pretty ruthless about enforcing the pecking-order.  They can literally bite the hand that's trying to help them.  They can be stubbornly picky eaters and throw away a lot off perfectly good food.  They can be dreadful parents (at least in the case of some Gouldians).  And sometimes even "normal" relations can become abusive.  (As much as they would have preferred to share the same cage, Harpo's grooming of Belle was enough to pull out feathers, and so they had to have adjacent cages.  They sat as close as the bars possibly allowed.)

But finches can also reflect the qualities that we "hoomins" prize most about ourselves.  When Dennis & I made the trek from Wisconsin to New Brunswick, I was more than worried about Skip, a Gouldian male who was extremely near-sighted.  The poor little dude spent most of the trip on the floor of the cage, but valiantly survived...and lived for most of year afterward despite being well into the upper end of Gouldian life-expectancy.  When Joe, another Gouldian, became frail and also extremely near-sighted with age, he kept his spirits and his song until a week or so before the end.  My hero.

There are the escape artists who who made me laugh even through the frustration of trying to catch them.   The Gouldian pair who kept up a steady Statler-and-Waldorf commentary through the Green Bay Packers radio broadcasts.  The Society finches who would have happily tried to brood a football until it hatched.  The Gouldian who generously let me top up her babies with finch formula at night...but glared at me the whole time as if I was feeding them Skittles & Mountain Dew.  The Society finch who could hang upside down like a bat.  The ones with whom I (apparently) made a communication breakthrough, because when I made a certain noise, they would respond in a specific way.  (I have absolutely no idea what we were discussing but...whatever.)

I miss them all.  Dreadfully.  But the current pair reminds me that there is plenty of quirk still left in the world.  They've already shown a tendency to yell bloody murder when I dork around with piezzo buzzers on the Arduino.  Sometimes they also yell at my music choices.  (Problem is, with finches, I'll never know if they're actually objecting to my tastes or just ironically shouting "Freebird!")

Yet I'm pretty certain that my code would lose something without their chatter and (mostly) harmless madness in the background.  And my sense of noblesse oblige would most certainly take a hit if I only had to think of my own care and feeding.  When you sometimes don't make it outside the house for a week at a time, it's a reminder that you don't necessarily have to surround yourself with humans to maintain contact with your humanity.  Or "hoomanitee," as the case may be.