Monday, July 20, 2015

Beware the fair-weather meteorologist

Today, as a favour to a client, I spent about an hour on the phone with a consultant who was helping him be reimbursed for some of the cost of "our" application via a government program.  The aim of the program is to promote research and development into new products/designs...even when those things don't necessarily pan out.

This app. certainly qualifies in that regard:  At the start, we had no idea that it would even work.  Two years and a few significant adjustments later, we're still rolling the bones on each iteration.

My part in this interview was to basically tell the story of each stage in the application from a boilerplate format something like this:
  • What was the problem we were facing?
  • What did we do to address the problem?
  • Did it work according to expectation?
  • If so, by how much?  
  • Or if not, by how much?
  • What unexpected problems/obstacles (if any) cropped up?  
Pretty straightforward stuff.  Particularly that last part.  Because no software design ever survives its contact with the real world unscathed...assuming it survives in the first place.  But I was caught a bit off-guard by the interviewers admonition to tell him all about the problems, even (as he put it) the kind of thing that I wouldn't have told my client.

Uhhmmmm, there's no such thing as those kinds of things.  I only sit on problems long enough for one of the following to happen:

Option A:  I have (at a minimum) a strong gut-level diagnosis plus a plan to verify/disprove that hypothesis.

Option B:  No immediate diagnosis is forthcoming, but I know exactly where I'm going to start looking.

Arriving at either option shouldn't take very long.  Half an hour, maybe.  Basically, experience/instinct kicks in...or it doesn't and my Google-fu skills get a workout.

But that's not really the important part.  What's important is choosing to work with clients who understand that freaking out at problems only makes them harder to solve.  Not only the problem(s) at hand, but future problems as well.

Sure, freak-outs guarantee that you (as a client) won't hear about a lot of the small problems--at least not the kind that are easily and quietly fixed.  Maybe you'll sleep better for that.   At least until the less-easily-fixable small problems fester into big ones.  All because energy that could have been spent on diagnosis is instead channeled into suppressing the symptoms.  (And let's not even count the time wasted on blame-slinging and finger-pointing.)  I have no sympathy for a client relationship run on a "no bad news" principle.  It's tantamount to  only accepting sunny forecasts from the meteorologist.  Or buying stocks from perpetually bullish brokers.  Die of pneumonia in the poor-house, and who's to blame, really?  Exactly.

Yes, I realise that no one likes to report (much less hear about) project line-items slipping a schedule date, or costing more than initially budgeted.  Or that off-the-shelf software will require more customisation than advertised.  Or that a Zero-day security hole has to be patched and rushed out the door in the middle of a release cycle.  Or that Google/Facebook/Bing/Microsoft/Apple/PayPal/Etc. has arbitrarily changed their terms of service.  Or that a massive DDOS attack is measurably impacting an app.'s response times.  Whatever.  Stuff happens.  Professionals deal with it.

In lieu of falling into a "no bad news" mindset, here's an alternative.  You (again meaning the client) can't insist that there will be no bad news.  At least without everybody knowing you're on holiday from Reality.

But you can--within reason--insist on no surprises.  Obviously, things like security flaws, third party service failures, etc. aren't always predictable. (Hence, the "within reason" qualifier.)  Developers, you can insist on a working in a No Freak-out Zone as the price of landing no surprises.  (Pro tip:  If you're not sure about the client's commitment to the "no surprises" credo, find a small, no-brainer problem to test the waters.  Bring it--and your plan to fix it--to the client in person or over the phone.  None of this passive-aggressive end-of-the-week-hoping-they've-already-left email nonsense.  Nope.  Own it.)


Eliminate the freak-outs, minimise the surprises, and the a lot more of the problems will sort out much sooner.  After over a decade in software, I can pretty much promise you that. 

Monday, July 13, 2015

In scripto veritas*

The last few (work)days have been a blast back to my DOS past--at least in the sense of being very script-oriented.  (The similarities end there.  My first computer, an 8-bit Epson 8088, was powered by two 5.25" floppy drives and was certainly not networked.) I've had the luxury of a web-based interface to the MySQL database, but otherwise all interaction with this new server has been via SSH, SCP, and SFTP.  White text on the black background of a command-prompt, in other words.

Threading through the maze of branches of a file system (in the case of SFTP, on the client- as well as server-side) definitely requires a bit more presence of mind than a "windowed" UI.  Particularly when you need to make sure you're not uploading Beta code to a Production system...or vice-versa. Then there's the fact that misspelling anything will generate an error message.  And in a Unix-based system, that means even perfectly matching the capitalisation.

But oddly, the lack of a pretty UI over the top of those interactions is oddly reassuring.  When I launch a script via a command-line and collect its output from a log file, I feel like I can trust what it's telling me.  Ditto when keeping an eye on the system processes after a scheduled (a.k.a. "cron") job launches.  Maybe it's just that I was "raised" on the command-line.  Or maybe it's the fact that *nix doesn't try to protect its users from their own fumble-fingering or short attention spans.

Either way, I appreciate the straight-talk.  Normally, I distrust truth rendered in terms of black-and-white.  But this is definitely an exception.

- - - - -

* I'm riffing on the Latin "in vino veritas," which translates as, "In wine, [there is] truth." 

Monday, July 6, 2015

The irony of "Internet time"

Normally, moving code and data from one server to another is something I try to do in the middle of the weekend (e.g. late Saturday night).  Alas, even the best-calculated schedules sometimes are thrown awry.  In this past weekend's move--a.k.a. "migration"--I was actually ahead of the usual curve of permissions not being correctly set up (which is normally the biggest show-stopper).  But then my connection to the server would drop intermittently.

I've chosen the new hosting company for this application (and others yet to come) largely based on the fact that customer service is a matter of sending an email or picking up the phone.  Not punting a form submission into a queue picked up halfway around the globe.

True to form, debugging has been ongoing since Saturday evening, and the preliminary diagnosis is a DNS issue.

Now, if you're not in I/T, the only thing you really need to know is that DNS (or the Domain Name System) basically functions as the phone book of the internet.   Networked servers, just like phones, are known by a number.  But we humans know the people (and companies) associated with those phones as names.  So, just as you would search WhitePages.ca by name (and city) to find a number, your web browser queries a DNS server to translate the human-readable "www.duckduckgo.com" to the network address "107.21.1.61."

That lookup and translation happen so immediately and (usually) so seamlessly that it's easy to take for granted.  (Unless, of course, you're a Rogers customer.)  Until it doesn't work and a website you know is legit. 404s.

Unlike many other networking issues, DNS problems can take a long time to completely resolve.  The reason is that when a web URL moves from one server (which is a number, remember!) to another, it can drop off the internet's radar.  That's because not all DNS servers update at the same rate--some of them can take up to 72 hours.   It's the price we pay for the decentralisation (and thus the robustness) of the internet.

But boy howdy, does a potential 3-day lag ever slow down debugging.  Not to mention that having a key feature of the modern internet move so glacially feels more than a bit ironic when everything else has been speeding up over the past 20+ years.   But it's not like irony and the internet are strangers, right?

Thursday, July 2, 2015

"How much do you charge to make a website?"

That's a fair question, and as a freelance programmer, the very last thing I will do is roll my eyes at it.  It's just that, when it's asked, I am often the least qualified person to answer it.

Here's why.

But first, a story.

The real estate agent who schlepped us all over La Crosse, WI to help us find our house was an interesting--and instructive--character.  From him I learned the adage, "The head of the fish stinks first."  Also that home-canned beets don't taste horrid like commercial ones.  ("Look at me, Doreen:  I know food.")  And the location of the best coffee shop Downtown.

But he also hammered something into my brain that should have been learned while shopping for our first house:  The "true" price of the house is the price at which it's sold.

That sounds a bit like a solipsism, but it's actually a little more Zen than that.  See, when you buy a house, the price you will pay for it is actually the result of a number of constraints pulling in different directions.  And only one of those constraints, I must stress, is the budget.

For instance...

Constraint:  Family.  Who's going to have to share a bedroom?  How much schedule-Tetris in the bathrooms will be involved getting everyone out the door in the morning?  Is there enough yard to kick the kids off the XBox and into the outside during better weather?

Constraint:  Proximity to Work/School.  Long work commutes suck, which definitely puts a radius on the feasible options.  But if some schools have better reputations than others, that will shut down even more options.  Or maybe the converse is true--maybe you just want to put as much distance as possible between yourself and the rest of everybody.

Constraint:  Resale Value.  Most homebuyers don't plan on coming out the door the last time in a toes-up state.  Is the neighbourhood gentrifying or showing signs of hitting the skids? 

Constraint: Upkeep.  Really, how house-proud are you?  Are you buying it with visions of Norman Rockwell Thanksgiving dinners dancing in your head?

Constraint:  Amenities.  Is single-story required for someone less mobile?  How about shop space?  A dry basement for all those boxes you're not going to get around to opening...maybe not until the next move to see what the heck you put in them this time?  Is going off the grid (even if only after extreme weather) a priority?

The point is that a lot of different--maybe even conflicting--priorities have to be juggled.  Each non-negotiable moves the price up, while compromises often nudge it down.

But here's the thing:  You can't start house-shopping until you do two things:
  1. Identify your priorities--i.e. why are these things important?
  2. Sort out their pecking-order--i.e. why are some more important than others?
Think for a minute how silly it would feel to call a real estate agent and ask her/him, "How much does a house cost?"  (Because agents' commission is a percentage of the sale price, you'd also put yourself in dire danger of being sold more house than you could possibly want and/or take care of.)

Similarly, the cost of a made-to-order software application is (at least partly) a function of your priorities.  And until those questions are answered to your own satisfaction, the cost of matching them can't be answered, either by you or the developer.

There's one critical difference between a house and an app., however:  The "value" of your house is largely bounded by where, geographically, you are willing and able to hang your hat.  You may be able to move the needle only so much on that.  A secondary difference is that the math of determining exactly how much something (e.g. a baby barn) is really worth is pretty fuzzy because it's mixed up with so many other factors.

When, on the other hand, you have to turn away business because you don't have a way of keeping tabs on everything currently in the pipeline, "value" is mere accounting.  Ditto failure rates or schedule slips.  And if it's not mere accounting at this point, please don't waste your money/time by pulling in a software developer until you do have a price tag on that pain.

Now, it's possible that development and associated costs could add up to more than the problem they're meant to solve.  No matter what Silicon Valley tells you, there are still some things better done by human intelligence.  But the problem at least places an upper bound:  Any solution must provide a return on investment.

The best assurance of recouping that investment is to make sure that the developer has as thorough an understanding of the problem as you do.  (Pro tip:  If a developer leads off the meeting with more answers than questions, find another one.)  After that point, "How much do you charge?"  is a completely reasonable question to ask.  But not before, please.

Monday, June 29, 2015

Half-glassing it

Executive overview for folks who don't work in software:  There's a stage in an application's life known as the "Beta."  It has nothing to do with fish--not enough "T"s, for starters.  Basically, it means that the developers--or at least their managers--think that the code is reliable and useful enough to let outsiders look at it.  "Beta" used to come in two flavours:
  • Limited Beta, wherein hand-picked outsiders were allowed access to the application.  (Read:  Friends/relatives/ex-coworkers were nagged into taking it out for a drive.)
  • Open Beta, wherein any interested party had access to the app. with no guarantees that it wouldn't crash their computers and/or eat their pets.  (Yay, Slashdotters!)
In later years, hybrids of those models have evolved.  Remember when you revived your high school sucking-up-to-the-cool-kids skills to score a GMail/Ello invitation?  Yeah, that's one of those hybrids.

Anyhoo.  I'm the developer for an app. scheduled to go into an invitation-only Beta phase within a few weeks.  I'm stiffening my spine by re-reading Eric Ries's The Lean Startup for, like, the 2nd or 3rd time (I forget which).  Because, by my usual standards, the code (and infrastructure) quite honestly suck.  But by "lean" startup standards, that's absolutely OK.  In fact, it's considered optimal.

The "lean" methodology takes its cue from the "lean" manufacturing processes that were all the rage a couple decades ago.  And while my view of management-by-fad is not significantly different from my view of kings and queens of centuries past (or not so past) who kept pet astrologers, "lean" management at least admits that it's a calculated--yea, even disciplined--response to certain types of uncertainty.

According to "lean" doctrine, the holy grail of the startup is the "MVP," or "Minimum Viable Product."  Interestingly, MVPs can originate from established companies (that haven't ossified to the point of knowing nothing beyond milking the existing product-line or desperately scrabbling for a hold on the trailer-hitch of the the latest-greatest bandwagon).  The central idea is that you focus your efforts on the single thing that scratches an itch no one else has been able to reach...at least for your target demographic.  Sure, not everyone itches in the same place--heck, some folks really only need a vigorous massage, when it comes right down to it.  But the early adopters will give you the revenue and insights you need to go mainstream.

The problem is that MVPs are UGH-lee.  Features that should be no-brainers are missing.  And features are vastly outnumbered by bugs.  Performance is slow...assuming the whole thing doesn't crash altogether.  Error-logging is practically non-existent.   Cut corners and hard-coded "special cases" are the norm rather than the exception.  Customisation?  That's done by directly editing the database.  And automated build-processes?  Puh-leeze--getting a new version out the door would make Rube Goldberg weep tears of blood.

That's excruciating to the software developers who have to hold their noses, grit their teeth, and shove the dewy-eyed Beta version out into the cold, cruel world.  There's no post-release euphoria, because the pre-release sprint is merely the warm-up for the iron-keyboard marathon of whack-a-mole bug-fixing and the unholy offspring of Tetris and Calvinball that determines the next set of features.

Example:  One of the enthusiastic early adopters wants this one extra feature that will put them eighteen months ahead of their closest competition.  And--get this!--they're willing to pay for it.  Woo-hoo!  Problem is, their pet feature so whacked-out that it will change the overall architecture of the app.  Worse, absolutely no one else has asked for anything close to this.  Ever.  So...do you shut up and take their money?  Or do you focus your already-overstretched resources on making the app. more appealing to the mainstream?  That sort of thing.  Fun times.  And just another day in Beta-land.  Ah, the sexy glamour of software development...

But subjecting my code (yet again) to the rigours of the Real World(TM) makes me realise that, at some point in its life, code exists in a quantum state.  There's the optimism (i.e. glass half full) that it will be "good enough" to add value for its early adopters...and have enough time/resources to evolve for a wider ecosystem.  There's also the cringing awareness (i.e. glass half empty) of just how much duct tape tenuously holds together too few features...that all have your name (and reputation) on them.

Typically, that "quantum" state isn't long-lived.  Which is a mercy, because it's rather uncomfortable.  If I were Schroedinger's cat, I'd be gnawing my way out of the box by now.

Thursday, June 25, 2015

Debt and currency in the "favour economy"

I owed a former colleague a couple of favours--one of them definitely outsized--dating from more than a decade back.  Fortunately, (most) favours don't accrue interest, but when the opportunity came this week to pay one of them back, I was more than pleased. 

Alas, "repayment" involved the squirmy discomfort of having to give a thumbs-down review of an interviewee.  (I don't like to see anyone stay unemployed, but...daaaaaaaang...)  Worse, I'm almost certain that the review was ignored as soon as it was out of my mouth.  Which means that a few months (weeks?) hence I'll have to put on my "adult professional" hat and keep the "Neenerneener--told you so!" to myself.

That's when I realised how different "paying it back" can be from "paying it forward."  Namely, there's significantly more leeway with the latter.  Often the timing and even the coin itself are left to the debtor.  That's more than likely why paying it back feels so much more legitimate.

Don't get me wrong--I'm thrilled to (finally!) scratch one off the accounts.  I'm never comfortable with debt, monetary or otherwise.  Besides, having something to offer can be pretty darned validating.  Pretty much any tight-knit community (business, recreational, or otherwise), runs on trust--on which the exchange of favours is of course predicated. 

But I suppose the whole uncomfortable experience provides an extra incentive to up my game on the "paying it forward" half of the equation, right?