A CivSpace Christmas

December 25, 2018 Comments off

Twas the night before Christmas, and across his wide grounds

Terendurr the Black Stone listened for sounds.

His wide ears were twitching both downwards and up

And his head swiftly turned like the most nervous of pups.

His own sounds were sickly, twiddling and coarse,

An orchestra drained of all its force.

When I could stand it no longer I had to yell out,

“Boss! What’s the problem? What’s it about?

Alien invasion? Quantum death-beams?

A party of Keret forming volley ball teams?”

“The night is quiet, Blair,” he said,“Too quiet for me.

I fear some plot of fearsome degree.”

“No help for it now,” he said, nodding his head to the door,

“Go out to the city and search out the score.

Do not return until the danger is known –

Then I, a genius, the solution shall intone.”

He seemed so sincere I didn’t dare scoff

so grousing and grumbling I departed straight off.

My first stop was Bartoe the Monitor,

a lawman grumpy but tough as a boar.

“MacAlister!” he growled, “Trouble as always!”

“Thanks, Bartoe,” I said, “From you that is high praise.

But tell me, straight-up, any evil brewing tonight?

The Black Stone is nervous and fearing a fight.”

“No, nothing,” he barked so onwards I strode

My next stop, a Phair, to cash a favor long owed.

“Terril, you thief, you inveterate cad,

you owe me some info, so don’t make me mad.

A job is happening, this very eve.

Tell me the play and I’ll let you leave.”

His bald head he nodded, big eyes he blinked,

“Lovely Blair, I’m not so bad as you think,

no crime is planned across the town tonight.

In fact I intend a solemn and personal rite

Where clothing is optional and qualms passé –

What say we share a moment outré?”

In reply I just slapped him down to his bench

(Why should an alien know French?)

and headed out to the dark. My geas unlifted,

weary across the silent town I drifted

till at last I encountered a rare thing indeed,

an Oro-Ka, moving at speed.

Chaotic beings, of power great and manifest

He was my last chance to finish my quest.

“Hail, your worshipfulness!” (an ancient expression we scoundrels all favor).

“Questions I have I know you will savor.”

“What’s this, a Terran?” he cried.

“A child race – upstarts, infants – my patience you try!”

“Calm yourself,” I scolded, “lest dignity you misplace.

A riddle I have ,as great as space,

That I would pose.

Will you answer? Chose!”

“Ask,” he replied, sparks of power flicking about his head.

“My riddle,” I began, not without dread,

“concerns nothing, nothing at all.

When we are threatened by ‘nothing’, what defender shall we call?”

“’Nothing’, you say?” he stroked at his chin.

“A riddle from the Terran Sphinx’s kin.”

His powerful hand indicated the stars.

“Child, attend to the answer I tell.

Time is infinite, and space as well,

both curving, both swerving, both infuriatingly grim.

Back upon themselves they bend, an enclosing rim,

Tighter and tighter and the end – Is nothing – Unless.”

“Unless?”

“Unless a fracture is introduced. Foolish primate.

Only by that can you avoid your fate.

At the beginning of things the answer lies,

When quanta were mist and atoms dreams.

I am done, and so are you I deem.”

There was a shimmering flash and he was gone,

Leaving me to ponder the night alone.

Above were alien stars, around me alien air,

All lonely, cold, beyond care.

But in that moment I smiled, and laughed —

the Oro-Ka was right, and not by half.

Back to the compound I sped,

Till through the silent doors I did tread.

Distant sounds drew me on, breathless,

To the Great Hall when, blinding light left me helpless!

For there was Madeline the Raylic and the Trang, Pierre,

Bearing wrapped gifts, the grinning pair.

And the Black Stone as well a present he had

(its wrapping I must say was terribly bad).

“Apologies, Blair,” he boss announced,

“for the false assignment so lately pronounced.

Too late I learned that gifts are needed this night

For your Terran celebration to be observed aright.”

And we laughed, and talked, till Terendurr inquired

“Christmas, Blair, what is it? besides presents acquired.”

“The beginning of things,” I said, thinking on The Oro-Ka.

“We choose how the symmetry cleaves, what flaw

Shall set our yearly path towards we know not where.”

“Hrrmphh,” he grumbled, “Unaccustomed for you, wisdom quite rare.”

Then shaking his head he left, off to his office to ponder,

On problems I’m sure most dire and somber.

But I heard him exclaim, as he tromped to his lair—

“Happy Christmas to all, but most to you, good Blair!”

Categories: Writing

Ask not for whom the app logs-in, it logs-in as thee …

September 8, 2018 Comments off

With this installment’s title I must extend apologies to John Donne, though had he lived today I’m sure the great metaphysical poet would have been concerned with more inevitable eventualities than death … like the inevitable need to go online and once there, to login to something.

Logging in and getting a personalized experience with our apps is a universal expectation, not to mention in lots of cases a logical requirement. Back in the day we’d blithely enter our email address yet again, and use the same ‘ol password, just to register with a site we’ll probably use only 1 time in our lives. Well, those days are gone. Not only are users weary of all these separate logins, I as a developer want to minimize the effort I spend on basic stuff, so I can save it for the specific features of my app. So what I decided to do is use OAuth, the standard that allows sites to cooperate on user-identity. In vastly-condensed summary: OAuth allows different applications to share identity information based on shared keys. When you got to a site and see “Login with Facebook”, and click that, here’s what happens:

  • The site formats a link to the identity provide – in this case Facebook – that includes a signature. The signature is a long string of data created by processing some input with a secret key.
  • The user’s browser is sent to page hosted by Facebook. Behind the scenes Facebook checks the signature, using its own copy of the secret key. Then it asks you, “App such-and-such wants access t your email address, etc. You good with that?”
  • Assuming you click “Yes”, Facebook re-directs back top the original site, including its own signed and encrypted data. because that data was  created, once again,  with the same secret key, the app can read it and find your user-name, along with whatever other things you may have approved.

That’s the theory. Now in practice I want to have such a “Login with Facebook:” button on my site. To do that I do what most developers do: Google “rails facebook oauth login”. As expected the 1st page of results had 3-4 tutorials on how to do just that.

What’s the next step? if I was at work I’d most likely read through the candidate articles, pick the best one, then write out the requirements and steps in a new document, then do that. At home, well, I can only say I have a more carefree attitude. I started following the steps of one tutorial that was based on Omniauth and React-Rails (more on React later) but decided after a hour or so that was too much UX work than I wanted to do just now. So I stopped that path and started a different route using Devise, a Rails-based framework that is a largely pre-made authentication system.

Then the hackery began. I removed the original routes I had added with the 1st version,  then used the Devise utilities to generate new ones. if you’re not familiar with Rails, its ‘generator’ facility is used all the time to create config files, stub files, and much more. For example:

rails generate device:install

will create a complete devise configuration, prompting you for settings along the way. Alas, I couldn’t do that all-in-1 step because of the 1st attempt stuff I had in place, so I set out doing it piecemeal.

In the end it all worked, but the process wasn’t pretty. I did have to spend about an hour trying to resolve an error, where I had only this log text to go on:

F, [6 #8279] FATAL — : [c6e010f3-c1b9-4675-90d6-9bdaeb42c1b5] ArgumentError (wrong number of arguments (given 0, expected 1)):
F, [7 #8279] FATAL — : [c6e010f3-c1b9-4675-90d6-9bdaeb42c1b5] app/models/user.rb:19:in `from_omniauth'[ 

This was one of those that looks specific to the problem – line 19 in file user.rb is messed up, right? – but actually did not explain anything. I tried different things, to no avail. Finally I brute force rescued the exception and printed the “real” stack trace, which was:

F, [5 #8280] ERROR — : [7120f455-99a1-4427-922c-053742c6194d] wrong number of arguments (given 0, expected 1)
F, [6 #8280] ERROR — : [7120f455-99a1-4427-922c-053742c6194d] /app/vendor/bundle/ruby/2.5.0/gems/devise-4.5.0/lib/devise/models/database_authenticatable.rb:166:in `password_digest’/

So the crash wasn’t in my code, it was in the Devise framework. The problem turned out to be this: I created my original user-model to use a Rails option has_secure_password. This requires a database column and model-attribute password_digest. However the Devise framework adds its *own* method named password_digest that takes 1 argument. The fix: remove has_secure_password and the password_digest column.

So there it is. If you’re of a mind you can Try the FB Login Demo here.

My closing thought … software frameworks, like cars, are things that people build and because of that you’d think we know everything about them. Well, we don’t. The picture below captures this thought:

mechanic

Next time: SM Geeking takes on user-interface. Systems architect that I am, comedy is guaranteed. Don’t miss it!

Categories: SM Geeking, Technology

Saturday Morning Geeking: And So It Begins

August 25, 2018 Comments off

Been quite some time I posted anything here. Anyway I’ve started work on a personal coding project and it occurred to me might be useful / fun / get-something-out-of-my-yearly-Wordpress-subscription to write about how the project progresses. Finally, there’s the (probably vain) hope that starting a thread about the project will induce me to keep working the project. And hope is a fundamental aspect of programming, as anyone who has ever deployed to production can tell you, so here goes …

What is the project about? 2 things: My wife Kim (String-Or-Nothing) is an expert in textile arts like embroidery and knitting. Way, way back in the day I did a site for her, wiseneedle.com, that was a searchable catalog of yarn reviews. The data for that site is long-since sold, but we’ve often chatted about doing another textiles-related project. The second part comes from me recently taking a seminar at Google Cambridge where Google folks presented their latest cloud services and APIs. The machine-learning stuff got me thinking, and looping back to the textile-arts thing, I thought maybe there’s a fun learning opportunity here. So the overall goal of the project is to use Google Cloud and their APIs to make a site for some textile thing, that also uses machine-learning. I know you all thought that was were this was going from the start, right?

What do you need to start such a thing? past few years I’ve been doing a lot of Ruby on Rails, so that’s going to be my main framework. And I said I wanted to use Google Cloud Platform; you get an  account with $300 credit and access to bags ‘o APIs. However, while tis all well and good to ordain yours tools and your platform, getting the twain to meet is another matter. Google has lots of ways to deploy and run stuff: App Engine, Kubernetes, and Compute Engine; here’s an overview for using these with Rails.

Scanning through the options, I wasn’t super-enthused by any of them. Well, as most coders will tell you, you Google enough you’ll find an answer. the answer I found is called Nanobox. Billed as “PaaS V2” it struck me as not unlike Heroku, a PaaS I was familiar with from my last job. This tutorial, on using Nanobox to deploy a Rails app to Google Cloud I was able to read in about 3 mins. In my experience that means I could probably complete and verify the actual steps in about 3 hours. Anyway what Nanobox does is it layers on Google Compute Engine (an IaaS service similar to AWS EC2) a deployment model that allows you – or , me – to de isolated from details of what VMs, what storage, what load-balancers, etc. are needed for your app. Well, I am all about isolation, so at about 10:30 I started in …

Long story short – it worked! The only hitch was, while I created a role for Nanobox to use that had all needed Compute Engine permissions (it had to create a lot of stuff on my behalf), I hadn’t enabled the Compute Engine API in my account. It in fact took a little digging to determine that was the root cause of stuff not working. Well, after fixing that Nanobox deployed “all the things” as we say and my Hello world app was running.

Next time … the wonders of Facebook plus OmniAuth. Booyah!

Categories: SM Geeking, Technology

Looking into the Sun

June 13, 2015 Comments off

Electricity non-bill

I shared some info on this on Facebook.  Last year Kim and I decided we wanted to do solar photovoltaic on our home.  We knew we had a nice, south-facing open roof, it seemed big enough, and we all see fairly frequently articles on how cost of solar is dropping, so we took the plunge and started looking at options.

In our town there are many people with solar; I can see 1 such home from my back porch, and SF writer acquaintance of mine Jeff Carver also has a solar system.  Asking about online I saw that there were two active solar installers used by people in Arlington, one of which is Sunbug Solar.  Anyway I contacted Sunbug, the other outfit, and yet a 3rd, state-wide installer I found online.  The other outfit never got back to me, and bachelor #3 seemed technically not very savvy, so I went with Sunbug.

What do I mean by “technically not very savvy”?  I’m no expert in solar systems, but I can use Google, and I know that there are different grades of panel with different efficiencies, and that there are different ways of  gathering the DC output of the panels and turning it into AC, which is what your house needs.  The non-savvy solar people could not answer a single question, they had a set system they were pitching me, take it or leave it.  Meanwhile the folks at Sunbug seemed to like talking about this stuff – were excited, even – and that made the decision to go with them very easy.

The system I arrived at with Sunbug has 24 SunPower 327W panels. This means that under ideal conditions the system can deliver 7.85 kW of power.  Of course conditions are never perfect, and the sun don’t shine 24 x 7.  Here’s what production looks like on a day of typical sun:

solar-output

Power generation reaches close to peak at about 10 am and stays there 3:30 pm or so, then drops.  The highest output I yet have achieved is 7 kW.

Anyway the system makes more electricity than I use – thus my negative electric bill for last 3 months.  I may not stay negative all through the summer – in the hot months I run dehumidifiers in my basement and they draw considerable power.

Of course all this is not free.  The system, fully installed, cost just under $39,000.  But right off the bat you get a Massachusetts rebate of $1,250, and a federal tax credit (not deduction) of 30% of your costs, plus a $1,000 Mass State tax credit.  All this put the upfront cost at about $25k.  But there’s more!  Massachusetts supports SRECs or Solar Renewable Energy Credits.  In brief outline, SRECs work this way: Different states want to encourage use of solar.  They therefore require utilities to show a proportion of their output comes from solar.  Utilities can do the generation on their own and meet the regulatory requirement that way, or they can buy from me the right to put forth my solar generation as credit towards their obligations.  SRECs are traded in a market like commodities and their prices will fluctuate based on plain ‘ol supply and demand.  Essentially utilities pay me to generate my own electricity by solar.

Bottom-line: Even with the minimum forecast prices for SRECs, my capital costs for the solar system will be recouped in 6 years.  For the 24 forecast years of system life after that, it is free electricity, no electric bills, and maybe even a small surplus.

Certainly this won’t be for everyone.  6 years seems like a short time to me but it may be an eternity to you.  And as fun as is is to gloat over a $0 electricity bill, you may have other more pressing needs for your money.  Finally be aware there’s other ways to get into solar than owning the whole show, like leasing the system.

In the end, panels or no, we all need sunshine, sometime.  I’ll leave you with The Soggy Bottom Boys, till next time …

Categories: Technology Tags: ,

You keep using that word …

April 4, 2015 1 comment

Master swordsman (not strategist) Inigo Montoya

And, what is the word?  No, not inconceivable – the word I have in mind is strategy.

Working in software products of course I have heard “strategy” in one context or another on a daily basis 20 years of more, and now as a product manager I hear it even more, if such a thing is possible.  However what the vast majority of self-styled strategists are really talking about is just features, like “Our strategy is to have web-based something-or-other”, or “Our strategy is to use middleware to achieve this-or-that”.  These kinds of statements are not strategy, they are just features or architectures.

What is strategy?  Among the things that stuck with me from my time in B-school at Babson was a statement from a professor (a former partner at Bain & Co.) answering that very question.  He said:

Strategy is: Where do you play? and How do you win?

 

“Where you play” is your target segment.  If you are not targeting some specific thing, you already don’t have a strategy.  Certainly the very biggest players in some industries can address really big and wide markets, but even the obvious examples – like Apple – use some targeting.  If asked about the target market for Apple I bet a lot of people would answer, “Everybody”.  Not true.  Apple targets higher-income consumers, and adapts for sub-markets in that group, like convenience-oriented multi-tasking men age 25-55, or family-oriented women age 20-40 who use technology to stay connected with friends and family.  I think segmenting is in fact even more important in the business software world.  I often hear vendors – my own employer included – saying things like “We sell to the biggest enterprises” or “We aim at the mid-market”.  These are probably true statements but they’re not helpful.  All business have specific problems inherent to their place in their market – they need to sell faster, or need to communicate with more customers, or need higher manufacturing efficiency, things of that nature.  If the benefit you provide is too generic and doesn’t address a clear problem and pressing problem, then you are a nice-to-have, not a must-have … and, nice-to-haves finish last.

“How do you win?” is a bigger question than most people think.  Many people believe winning is solely about better features: my light bulb lasts longer than the competition, my body-spray smells better, my car goes faster, my collaboration is more collaborative, stuff like that.  But think – Why are there so many examples of outwardly inferior products dominating their markets?  In my own industry I think the most telling example is Microsoft Sharepoint.  Now I can’t say Sharepoint is especially inferior; the product has a 12 year history after all and has seen a lot of improvement in its time.  But when Sharepoint came out it was not especially innovative and even today is criticized for having lousy administration, being slow and unwieldy, and for promoting “document graveyard” styles of collaboration.  For all that, Sharepoint apparently drives $2B of revenue a year for Microsoft.  How can something so bad be so successful?

Lots of reasons, actually.  A big one is network effects. Lots of people have Windows, lots of people use Windows Server, lots of people develop for Microsoft systems … all of this creates an ecosystem where technology buyers are likely to know about Sharepoint or know someone who knows.  From this they get confidence that the Sharepoint bet is a good one.

Next is ease of acquisition.  Sharepoint is easy to buy – just an option in your per-user Windows licensing – and easy to deploy – it’s a standard Windows server like all Windows services.  This short time to value goes a long way towards easing concerns the customer might have about not getting the ideal solution, from a features perspective.

Finally think about Sharepoint’s feature-gaps – real or imagined – as opportunities and not liabilities.  Enabled by the network-effect and Sharepoint’s  ease of acquisition/deployment, there is a large after-market of ISVs who offer products and services to augment Sharepoint or address its shortcomings.  Microsoft claims over 700,00 developers write for Sharepoint.  That number is probably too high, but there’s no question there are 1000s of Sharepoint partner vendors and 100s of solutions for the platform.

Network effects; Ease of acquisition; Developer ecosystem .. almost like they planned this, right?

Anyway my point is not that Sharepoint is some great thing.  In fact I see it as just sitting there waiting to get bumped off, the way Wordstar was bumped off by WordPerfect, and WordPerfect was bumped off by Word.  The point is, Sharepoint actually has a strategy and features are only one part of it.

Anyway, happy to talk to you about strategy.  Just be aware before you come by there’s a 2-question quiz: Where do you play? and How do you win?  If you don’t pass the quiz I may send you to this master for remedial training:

Bugs studies "stragety"

Another Opening, Another Show

March 22, 2015 Comments off

Enterprise Connect 2015

In my job as a Product Manager I find myself doing a lot more travel than when I was in engineering.  Been to three trade shows already this year, IBM’s ConnectED in January, Team Polycom in February, and just this past week, Enterprise Connect.  All three were in Orlando, FL.  If you don’t know it, in addition to being the promised land for lovers of all-things Disney, Orlando hosts 100s of conferences and trade-shows each year, ranging from the tech-oriented shows that I attend, to shows like Snaxpo, “The world’s largest, most comprehensive trade show devoted exclusively to the international snack food industry”, where you can attends sessions like : The State of Snacking: Finding an Identity in a Rapidly-Changing World; and shows like the International Fly Tackle Dealer Show, “the largest international gathering of fly fishing manufacturers, retailers, sales reps, media and fly fishing organizations in the world”.  I’ll leave it to the reader to imagine the result if only these two shows could join forces.

Back to Enterprise Connect.  This show is about unified communications in all its forms.  In the past the main topics at EC Shows have been the core technology – how do things work – and to some extent, interoperability – for example, how does video from company A talk to video from company B?  This year’s show had a distinct collaboration focus, however, with a strong emphasis on solutions that are easy to use, highly mobile, and lead to fast, straight-forward benefits.  Taking their cue from “over the top” applications like WhatsApp and #Slack, UC leaders Cisco and Unify introduced their Spark and Circuit offerings respectively – both being team-oriented chat, meeting and content-sharing apps, all with a social flavor.  So one of the big takeaways was, it’s not about ‘speeds and feeds” anymore, it’s about putting tools in the hands of users that they control and can use to get work done quickly and easily.  For my own product, IBM Sametime, this is a pretty timely message – hopefully we can bring together some of the concepts we’ve been brewing to not only equal these first-movers but to surpass them.

Of course one of the charms – such as they are – of trade shows is swag.  Tramping the exhibitor hall you will see stalwarts carrying show-bags loaded down with everything from pens to stress-balls to lightsabers.  But the best time to go swag hunting is  when the exhibitors’ hall closes down, because everyone want to pack up and ship back as little as possible.  Using this strategy my friend and colleague Karl scored some cool loot from Logitech, including a BCC950 Conference Cam:Karl and his swag

Tradeshow season is winding down, till things start up again in early Fall.  Hopefully by then I’ll have some product news of my own to pitch – assuming of course I can pass up that innovative snack foods-fly fishing tie in …

Winter Streaming

February 1, 2015 Comments off

Windows Media CenterWay back in ‘06 I setup a home DVR based on BeyondTV, a pretty nicely done Windows DVR app.  That was long, long ago, but frankly we had no reason to change, so we just kept on time-shifting by doing recordings through a tuner card and our ancient Comcast cable box.

But for all things there is a time and for the old DVR, that time has come.  I wanted to do streaming, and  I wanted to cut my costs with Comcast, so I set out to build a new rig to replace the old.  A few hours on trusty newegg.com  and I had the right list of components:

  • MSI A78M-E35 Motherboard
  • AMD A8-5500 Trinity Quad-Core 3.2GHz FM2 65W Desktop APU with DirectX 11 Graphics
  • SILVERSTONE Black Aluminum / Steel ML04B Micro ATX Media Center / HTPC Case
  • SILVERSTONE Strider Plus ST50F-P 500W ATX PS
  • Scythe SCSK-1100 100mm Shuriken Rev. B 3 Heat Pipes CPU Cooler
  • Rosewill RHRC-11002 Windows 7 Certified MCE IR Remote Controller
  • Seagate Hybrid Drive ST1000DX001 1TB MLC/8GB 64MB Cache SATA 6.0Gb/s
  • ASUS Black Blu-ray Drive SATA Model BC-12B1ST
  • SiliconDust HDHR3-CC HDHomeRun PRIME digital tuner

Neat things … first of all these AMD combined CPU/GPU chips seem cool to me, literally and figuratively.  No graphics card needed, the CPU has one built in.  With 65W power, the whole thing draws little power.  The Scythe Shuriken cooler is a low-profile unit, fits just right in the case and is extremely quiet.  The Seagate drive … 1 TB and close to SSD speeds, for $80; what’s not to like?

Case and power supply are from Silverstone.  I wanted to get a fairly small case to fit in my TV stand and the Silverstone fits that bill.  The inside setup is tight, though, so make sure you get a PS as small as the Strider.

The thing that makes it all work is the HDHomeRun PRIME from SiliconDust.  It was with some trepidation I took my 2 old Comcast cable boxes and headed for their service center.  Expecting an interrogation, instead in 5 mins and with no hassle I had traded in the boxes for a cable card, a way to get authenticated content from your cable provider.  Back at home, plugged the HDHomeRun onto my home network, plugged the cable card into the HDHomeRun and, after a few short calls to Comcast activation, voila!  I now have 3 – count ‘em, 3! – digital TV tuners on my network.

The DVR app is Windows Media Center, which is a “free” part of Win 7 Ultimate.  This of course is what put BeyondTV out of the personal DVR business.  Still doing the setup to WMC, like making our recording rules.  And while I can watch all our old shows in WMC, the UI for searching through them frankly sucks.  One thing that was built in to BeyondTV was compression and commercial-skips.  Now with WMC I need an add on like DVRMSToolbox.

Lastly, with this new box I finally have a Blu-ray player.  First disk to get: Blade Runner 30th Anniversary Collectors Edition.  DVRs: Like any other machine, either a benefit, or a hazard …

Categories: Technology