Tuesday, April 14, 2015

Diversity in I/T

Last night, after the Moncton User Group meeting, I tagged along to the Irish pub to socialise and hear war stories.  As is usual with such convocations, it was time well spent.

One thing I've found funny and frustrating about software folks (all other left-brain proclivities aside) is their our tendency toward "religion" when it comes to platforms, languages, coding styles, source control tools, development environments, you-name-it. 

Yet, at our table we were two Mac users, one Windows user, and one Linux freak--at least when it came to primary operating systems at work. Bi-fluency in O/Ses is certainly not uncommon, and tri-fluency not unheard-of.  One Ruby on Rails dev., one .NET dev., one Go dev. and one PHP dev.  Two Git users, one Mercurial user, one unknown.  One SQL Server user, one Postgre user, one MySQL user, and one of unknown database preference.  Two emacs users, one Visual Studio user, and one Geany user.   But we unanimously agred that keyboard shortcuts trump the mouse when editing--which spawned a hands-on demonstration in how to select/insert multiple lines in emacs.

I trust I've made my point?

If even folks like us (who are notoriously rabid about our tools) can have that fun (and productive) of a time over a few beers (and pineapple juice...more diversity), what the heck is wrong with the rest of the world?

Friday, April 10, 2015

It's not self-help if you have to subscribe: A rant

Heads-up for Moncton-area folks:  There's another network-marketing thing going around.  If someone pitches you books/CDs/DVDs/internet-radio-syndicated content based on the "Three Cs" or "Eight Fs," that's the one.   Based on a short conversation I had with someone with whom I'd done business once, I was under the impression that they were trying to recruit a local leadership group.  Bad me for not asking enough questions up front.

Oh, well--having company over was a good excuse to jump-start spring cleaning.  And bake banana bread.  So there's that.

I might probably have said this before, but I can only boggle at the perpetual cash-cow that is the self-help market.  Honestly, I'd love to see the trade put out of business, because human time and talent and hustle could be put to more pragmatic uses--i.e. solving tangible problems, rather than soothing the angst of adult professionals.

Why, in the cold, slimy name of Cthulu won't folks just deal with a reality that can't be neatly packaged?

Yeeeeesh.

Your parents were making it up as they went along.  So were their parents, probably from an even earlier age.  You are too, no matter how much "content" you consume.  Just cowboy up and acknowledge that and you'll save yourself a lot of internalised stress.  Possibly a bunch of trees and/or plastic as well.

Everybody successful you've ever heard of had at least a little bit of luck.  Not to mention somebody to do the actual, you know, work while they were being fawned over by Inc., and all that.  There is no checklist.  No paint-by-numbers outline.  No habits to slavishly cultivate.   If anybody had it figured out, the bookstore would have to find something better to stock on those shelves.  Me, I ain't holding my breath.

Introverts succeed.  So do extroverts.  Morning larks and night owls.  Left-brainers and right-brainers.  Technocrats and alpha-marketers.  Type As and Type Bs, plus the whole alphabet soup that is the Meyers-Briggs.  It's not a DNA or brain chemistry kind of thing.

Beware the narrative--most especially in the first person.  History isn't always written by the winners (as the Illiad, the Bible, the Arthurian tales, and the Chanson de Roland all aptly demonstrate).  But it is more often than not cherry-picked when there is a point to be made.

Treat mistakes as if they were copyrighted by the RIAA/MPAA and the ghost of Sonny Bono will curse you with "I Got You, Babe" as an earworm, even into your next life.  I.e., do try not to plagiarise anyone else's screw-ups; don't let anyone else cover yours if you can help it.  'Nuff said.

If you need mentors, get off your butt and recruit them instead of trying to buy them in syndicated form.  Respecting the fact that you might have something to offer a mentor is key.   Don't even think about entering into that kind of relationship if you don't already have a plan to pay it forward.

Bottom line, just get the heck out there, add value, and insist on being fairly compensated for your time and trouble.  Oh, and never trade your definition of "success" for anyone else's, m'kay?

Monday, April 6, 2015

A belated "Happy Birthday"

My bad.  I knew last week that Microsoft's 40th birthday was coming up, and then completely spaced it out over the long weekend.  My brush with the company actually came fairly late in a Generation Xer's development.  My trajectory was TRS-80 to Apple II, followed by a three-year hiatus, and then MS-DOS alternating with early Macintosh for a bit, finally settling on Windows 3.1 and so on up.

These days the Windows development stations don't have much to do except wait for updates and the day when one will end up doing the duty of both and the other is recycled as a home server.

But even as a Linux user, I realise that monoculture, even in operating systems, is infeasible. Particularly in my trade, which is expected to support Mac, Windows, Blackberry, Android, iOS, and various flavours of UNIX.  Moreover, as both the Irish Potato Famine and the rash of script-kiddie-fueled havoc of the 2000s taught us, monoculture can be downright disastrous.

Still, it would be distinctly un-Hufflepuff of me not to acknowledge the audacious moon-shot that Bill Gates, Paul Allen, et. al. (nearly) pulled off.  A computer on every desk, running DOS/Windows (depending on the decade).

It wasn't Borg-like single-mindedness, nor even plain luck.  Painting with a broad brush, some of the key factors in Microsoft's ability to make three billionaires and a whopping 12K millionaires from its 1996 IPO are, IMLTHO:

The Economics of Complementary Products:  Meaning that if the price of peanut butter drops, you should be able to sell more jelly as well as more peanut butter (even if the price of jelly remains stable or even rises a little).  Personal computer prices were plummeting even as their capabilities followed the logarithmic trajectory of Moore's Law.  That made it easier to justify spending more money on software.  The trade-off would become more opaque as new PCs and laptops began shipping with pre-installed copies of DOS/Windows.  And then the greater volumes spurred more efficiencies (some good, some appalling) in the electronics industry, and...well, here we are...

Apple in a Tail-spin:  Jobs had been pushed out by Scully and Woz had bailed as Apple's first act was fizzling out.  (If my Gentle Reader's memory of Apple before iPods and Macbooks is a little fuzzy, think Robert Downey Jr. between Ally McBeal and Ironman and you're pretty close to the mark.)

Stepping-stone Partnerships:   After Microsoft adapted and optimised (or in programmer parlance, "ported") the CP/M operating systems for IBM PCs, it retained the rights to its own version of the resulting PC-DOS.  As PC clones rushed into the market, the go-to operating system (MS-DOS) was no-brainer.  Microsoft also collaborated with IBM on the OS/2 operating system, but DOS (and other business ventures) eventually proved too lucrative, and Microsoft dissolved the OS/2 partnership.

A Bigger Bogeyman:  Strangely, there was once a time when Microsoft was an underdog.  It's generally accepted that, as the PC boom was mushrooming, IBM made superior hardware.  Alas, at a higher price-tag and with absolutely zero intention of following anyone's standards but their own.  PC-DOS and OS/2 work notwithstanding, Microsoft found itself part of an intrepid little band that also included Intel and Lotus in the battle for how RAM is used by programs.  (And people cheered them on!)

"The Second Mouse Gets the Cheese":  Because first-mover advantage is overrated.  Particularly in new markets where consumers aren't sure what they're supposed to want yet.  I think that fairly characterises the mid-1980s when people wanted a computer because all the cool kids had one.  (As, later, they just had to have their AOL, and Facebook, and iGadgets, and...)

"Knowing Where the Bodies are Buried":  Microsoft's inside knowledge of their operating system gave an insurmountable strategic advantage to developers of the Office suite of products.  In other words, it's developers could take short-cuts through the operating system that companies like Lotus (of 1-2-3 fame) or Corel (WordPerfect) couldn't even know without first reverse-engineering. 

Lack of Complacency:  At least in the 1990s, Microsoft was highly jealous of its dominance, and targeted threats--real and imagined--with extreme prejudice.  Which was reflected in Gate's now-(in)famous "Pearl Harbor Day" reaction to an entire realm of software (a.k.a. the internet) that had materialised outside the fiefdom of the desktop operating system.  As many of us likely remember, shenanigans ensued.  Any web developer who still has to support Internet Explorer 8 could probably make the case that we're still paying for those shenanigans today.

Embracing Hardware Diversity:  It's basically the network effect, in that the value of a network is a function of the square of its number of members. Thus, the more things you can do with a computer, the more valuable it is.  That encompasses hardware as well as apps.  And goodness knows I've wasted enough (sometimes fruitless) time with Linux and wireless to appreciate when "it just works."  Yes, there's a Microsoft Mouse, and the XBox, but overall, Microsoft has not let itself become too distracted by new hardware form-factors.


Alas, Microsoft's relationship with third-party developers, historically, has enjoyed levels of dependency and dysfunction normally not found outside Tennessee Williams' plays.  Obviously, there has been a lot--and I mean a LOT--of (ahem!) "unsportsmanlike conduct" perpetrated from Redmond, WA.  Let's not gloss over that, not by any means.  Nope.

Worse, I'm not even referring to Steve Balmer's lizard-brained "cancer" characterisation of open-source software.  Microsoft took a PR black eye after it copied a feature from Blue-J, then initiated a patent filing--even after management was aware that the work had been pilfered.  In that instance, MS (wisely) backed off.  But Windows developers are/were (or should be / have been) all-too-aware of the truth in the ancient Greek blessing "May the Gods stay far from your destiny."  To wit:  Make a Windows app. or plug-in that's too successful, and Redmond might just bundle a knock-off with the next version of Windows (or the applicable application).  Which puts said developer out of business--after taking on all the risk and sweat of prototyping and marketing.

But, hey, at least that's a real product, and not mere weaponised marketing--a.k.a. vapourware.  I'd hate to know how many companies or proto-companies tanked simply because someone at Microsoft whispered in the ear of Slashdot or Wired or PCWorld or what-have-you.  

Yet.

And yet...

When it's all said and done, I'm not entirely convinced that my Gentle Reader and I would know each other were it not for the aforesaid moon-shot  Where I used to work, we had the acronym "BHAG" (pronounced "Bee-hag") for Big, Hairy, Audacious Goals.  And there is something--actually multiple and varied somethings--to be said for a company that can score a BHAG.  Despite the lean, uncertain times.  More importantly, despite the smug, Dom-and-Beluga fat times.

Microsoft, for its all its sins (both myriad and legion), literally changed the world.  And I think that needs to be acknowledged...even by open-source partisans such as your faithful blogger.

Thursday, April 2, 2015

Rational superstition

A couple days ago, I was ready to upload spanking new code to its web server, to find that the FTP server wasn't accepting my password.  Just in case I was imagining things, I ran through every single password this hosting account has had during its history.  No joy.

I won't mention the name of the web hosting provider, but let's just say that they're middle of the road.  By which I mean not the kind of outfit that will ride out Global Thermonuclear Armageddon with five nines, but not bottom-feeders catering to spammers either.

So I logged into my account and went to the control panel interface to reset the FTP password.  Or tried to.  Instead of being automatically passed through from the main account page, I was again challenged for a password, and again every possible option failed.  Now I haven't changed the password, so the "Who's been eating my porridge" alarm bells went off.  Mercifully, I still had sufficient access to my account to be able to submit a support ticket.

This is where my experience as the resident SysAdmin comes in handy--not so much that I have all the tools I need to debug the problem, but that I can speak the dialect of those who do.  Which includes having a good idea of what they might need from me, and trying to supply it before they even ask.  The preliminary diagnosis was a blacklisted IP address.  Because I'm in Canada talking to a U.S. provider, I guess that wouldn't entirely surprise me.  (Nothing crosses the border easily these days, don'cha'know?)

But upon further review, my IP address was found to be above suspicion, and seeing no other flags, the support tech simply rebooted the firewall and the problem disappeared as quickly as it had appeared.  Rather like one reboots a PC/laptop to "fix" an intermittent, unexplainable problem.  Or we reboot the router when we know darned well that Rogers (our ISP) needs to replace the gerbil powering their DNS servers.  Or how I deal with a repeatedly crashing text app. on my Android phone by restarting it.  Or back up email before installing system updates.

Bottom line is, even if were able to run any gremlin to ground, we still might not be able to chivvy it out of its lair to finish it off.  At least not without a lot of collateral damage.  Simpler just to reboot, as though the process is some ritualised purification ceremony that exorcises the demons.

Sigh.  As much as I'd like to believe that we I/T folks are ruthlessly logical and relentless in pursuit of root causes, we don't often live up to the standard.  Granted, we're nowhere near as superstitious as some breeds--notably actors--but I can rationalise it as efficient laziness, yes?

Monday, March 30, 2015

"Back to the Future": The coding version

So there's this.  Tongue firmly lodged in cheek, I call it "The Mark I" (code name "Sylvester.")


See, over the past 10 years, we've tried training Mister Kitty to stay off the counter.  With the result that he's merely become progressively stealthier about it.  Which basically makes it an arms race.  Opening a new front in the war, the "Mark I" compensates for our less-than-preternatural hoomin hearing.

The thing hanging off a mini-USB cable at the top right is a programmable microcontroller (an Adafruit Trinket).  The green rectangle with all the pin-holes is a mini-size solderless breadboard, used to connect all the pieces.  The white square inside the green rectangle is a passive infrared (PIR) sensor.  The black button under the yellow and blue wires is a Piezo element (for making sounds).  And a pushbutton is trying to hide under the second blue wire.

The microcontroller is programmed to listen to the PIR sensor for the signal that it's detected movement of a warm body within its radius of operation.  Finding movement, the microcontroller has the Piezo element play a few bars of Tweety Bird's song ("I tawt I taw a puddy-tat...").  The pushbutton arms and disarms the device.

Crude?  Sure.  Ugly?  Yep.  But it scored its first success this morning when I busted His Doodness.  One yell and he was downstairs, not to be seen for a couple of hours thereafter.  The hope is that eventually he'll realise the futility of his schemes and keep his filthy litter-clogs off the counter.  And then I can re-use all the parts in other projects. 

As a programmer, this sort of project is something of a departure from the norm.  For one thing, software takes second place to hardware.  As the builder, you're responsible for making sure all the circuitry works and you don't fry components, blow fuses, or burn down the house.  That's not something that I normally have to worry about, even when, say, adding more memory to my PC.

But even the software side takes some getting used to.  It's not the language (which is a variant of C++, something I learned back in Programmer School) that's the issue.  It's the confines of the platform.  The Trinket's hardware isn't too far ahead of what went into 80s arcade games.  So you're not going to be writing the War and Peace of computer programs, right?

More significantly, there is no operating system--the processor merely runs the same program over and over until power is interrupted or new code is uploaded.  Now, if you've never written code for a web browser or a smartphone, the only thing you need to understand is that both these environments are set up to be able to do several things at once.

For instance, when you type a search into Google, each time you type a letter, the web browser goes out to a Google web server and lets it know what's currently in the search-box.  The web server responds by sending back its best matches.  That's how the results can change even as you type.  The major point is that the browser can listen for your key-strokes, fire off its information, and present the results as three loosely-connected processes.  In a word:  Multi-tasking.  Just like we easily-distracted hoomins can do.

The Trinket, by contrast, can only do one thing at a time.  In the case of the "Mark I," for instance, it can't listen for the reset button while a note is playing.  So I have to sneak in a check on the button's state in between notes.  But even then I have to be precise about the timing because the button needs time to "debounce" (don't worry about the definition of that--it's not important) and I have to make sure that doesn't add too much of a pause before the next note.

It took more error-and-trial than I should probably admit to, just to make something relatively simple like that work.  I suspect that the browser/smartphone mindset I've lived in for over a decade has a lot to do with that.  Unlearning is always harder than relearning.

Trust me, I'm absolutely not whining.  Back when the Trinket's processing power would have been considered cutting-edge, I would have had to program it in Assembler.  Which is the coding equivalent of building the Taj Mahal one Lego at a time.  Maybe that's what hipster programmers do; I dunno.

But I will say that having this little thing basically kick my butt is actually pretty fun in a "retro" sort of way.  Building like it's 1982...partying like it's 1999.

Friday, March 27, 2015

Frivolous Friday, 2015.03.27: Geeks and Bees

The winters of 2013-2014 and 2014-2015 have been a double-whammy for bees.  At least in our backyard.  Damp autumns, soggy plus dangerously late springs.  I'm not holding out much hope for the handful of hives barely visible in the backyard.  And I'm not at all happy about paying a ridiculous price to basically start from scratch in less than a week.

See, the problem is that the go-to source for imported honeybees, a.k.a. the United States, is pretty much off-limits (some Queens excepted) because of parasite/disease issue (and no doubt the usual tribal stupidities besides...glad we passed NAFTA and all...).  The most logical Canadian sources (Vancouver Island, southwestern British Colombia, and southern Nova Scotia) don't seem much interested in filling the gap.  Or, for all I know, they're just overwhelmed.  So obscene amounts of fossil fuels are expended to import honeybee "packages" (basically starter colonies) from--I kid you not--New Zealand.

From what I can see, the importers (at least the ones we're working with) are almost gratuitously conscientious about it all--even escorting the bees on their journey and making sure they're fed and all.  I'm not knocking them...however much I might envy their trip to New Zealand this time of year.

Okay, so I'm willing to meet Mother Nature more than halfway by tilting at the windmill of keeping honeybees alive into the next spring by dint of making sure they're healthy and well fed (to the extent that such contrary beasties will allow me to intervene).   I'm certainly not above hacking besides.  (Mind you, with electronics--i.e. logging temperature & humidity readings--you're fighting the triple-whammy of unreliable power supplies, the even less reliable elements, and the bees' propensity to shellac everything that's not comb with a substance known as propolis.   Making it all affordable for beekeepers working on precarious margins is another subject altogether.)

Those are the challenges.  But I would take it kindly if the governments of Canada and the United States would, in tandem, extract their craniums from their backsides and figure out how allow healthy, cold-tolerant bees to cross the border in volume.  Even back in Wisconsin, I found the reliance on southern (by which I mean less cold-hardy) bees silly.  Particularly when some of the most notable pollinator research in the U.S. is being done by the University of Minnesota.  I would argue that, all other things being equal, regional boundaries count for much more than national ones.

Given that one out of three bites we take has to be pollinated, my left brain fails to grok how this sort of thing is not a priority for any government.  Particularly for a government so obsessed about national security that it has time to care about who wears what during a citizenship ceremony or is willing to bomb people on sketchy second-hand rationales or wants to classify anything threatening the economy of Canada as "terrorism. "

Thursday, March 26, 2015

Trinity

Triads such as those that show up in medieval poetry were, as I understand, a memory device.  And, of course, three is a magic number in a lot of places--literature, religion, what-have-you.

The trinity upon which I sort of bumbled now--prompted by a passage from the somewhat fluffy and unconvincing first novel of The Dresden Files--has to do with one's life as a craftsperson.  Even in a mostly intangible craft like mine.

Student - We have to start somewhere.  But we need to step into other levels as quickly as possible, or it's all just academic.  Worse, we never gain any meaningful confidence.  That only comes from stepping beyond the pre-fabricated exercises, failing, figuring out why, and (hopefully) fixing.  And while it is a dangerous thing to expect to be in this mode indefinitely, it is more dangerous still to think that everything is still ahead and that you have nothing to share with anyone behind you in the journey.

Practitioner - Now we've learned to do something...probably many related somethings.  If we don't know exactly how just yet, we can look it up...or piece it together from StackOverflow, tutorials, YouTube, whatever applies.  Often, we can get by on understanding the "how" more so than the "why."  It is a dangerous thing now to think that we are forever past the Student phase.  It makes us afraid of mistakes which makes us afraid of experimenting, and too attached to what we already know.

Teacher - Stepping into this role should be profoundly humbling.  Humbling by dint of sheer panic and frantic research when we realise that our understanding is not nearly so fleshed-out as we imagined.  Because teaching is ultimately an exercise in creating context in which knowledge can be transferred from experience to inexperience.  This forces us to verify things that we took for granted as Practitioner--taking us full circle back to Student and probably Practitioner besides.  Or should, anyway.  Because if it doesn't, that's the most dangerous state to remain for any extended length of time.

And so the healthiest head-space for any craftsperson to live at any given time is all three. Learn. Do. Teach. Repeat.