• Anthony Stevens

More About Cloud 302

Cloud, Personal, Teaching

Last night I taught the second of nine classes in the UW PCE Cloud Computing certificate program.  This came after a two-week delay due to the Martin Luther King Jr. holiday, fortunately timed for us given all the snow and traffic problems that we ran into last week.

I’m really enjoying this.  The actual teaching part, the minute-by-minute instruction.  It requires focus and task-orientation and I interact with the students and while I’m there I get into a mini-flow state, where I’m just enjoying the moment, and not thinking about a hundred other things that are going on that could distract me or disappoint me or depress me.  It’s fun!

Last night we covered the remainder of what I’ve been calling the “Cloud Fundamentals” – and I sound like a huge knob for even using that term – but here they are: serialization, regular expressions, APIs, REST, screen scraping, message digests, proxies, and browser dev tools.  Then we got to spend the last half of the class doing a hands-on Azure deployment, which wasn’t enough time to get into the really interesting stuff, but which allowed us to build a framework that we can extend  next time.

I get good questions from the students.  These are adults, with experience in their fields, and not some Hollywoodized exaggeration of a callow 19-year-old from the Valley who can’t be bothered to stay awake in class, let alone engage with the material.

They are also, to some greater or lesser degree, self-motivated, ambitious, proactive, and energetic, as anyone must be to pursue additional education or certifications or degrees in mid-career.  I like that.  It’s a personality trait that I find very attractive.

Today I’ll be posting the code snippets from last night onto Github; creating a short homework assignment; posting the slides to the course Moodle; and following up on a few student questions regarding licenses and tools and such.

The life of a a VERY non-tenured, extremely temporary, barely-qualified lecturer in a professional/continuing education program.

Loving it Smile

No Comments

Fraught, Fraught

Personal

I haven’t blogged in a while.  Which is sort of curious to ponder, in me-as-observer mode, considering that quite a bit has gone on recently that has been above and beyond the normal background noise of the everyday:

  1. I started a new contract a couple weeks ago, doing .NET and AWS development and configuration management for an e-commerce startup
  2. Snow here in Seattle slammed us HARD, and then – *poof* – disappeared
  3. I taught my first class in the Cloud Computing program at the UW PCE
  4. etc.

About that last “etc.” I may have more to say later.  Still deciding.

But, to take the rest of the list in reverse order, I taught my first class two weeks ago today, and it was WAY FUN.  I felt underprepared, but I wonder if all first-time instructors feel that way.   The second class is tonight – in about an hour, no less – and I feel much more confident after having gone through it one time already.  The first class went really well – good attendance, no A/V issues to speak of, good interaction with both the online and offline students – but of course there is always more, much more, one can do to make it the best experience possible for the students.  I’m working on that. Smile  But so far so good.  Someone asked me recently if, based on one class’ worth of experience, I would make another go at teaching, and the answer is unequivocally YES – assuming the rest of the quarter goes approximately as well as the first class did.

Next: snow!  Joyous snow!  Pure, unique little – wait, they’re gone.  Yes, the week of snow that is now a dim memory.  But while it was here it played the usual havoc with traffic, commutes, electricity, and much more.  A rumored 12” once-a-decade storm turned about to be about 4”, but it was enough to cause major disruption.  I had a bit of fun, but was also quite busy with work and kids and etc. (yes, that again) that I didn’t get to really play in the snow.  The kids did, though, and had a blast.

Finally (maybe) – a new contract, with an e-commerce startup.  So far so good; it’s a fast-growing niche and has a very experienced founder and CEO, so I expect lots of success.  We’re right in the  middle of crunch mode, and it’s a little difficult to get all the clarity I might like on tasks, deliverables, definition of “done”, and more, but I’m sort of trying to lend my experience and expertise without totally rocking the boat or upsetting the apple cart or whatever it is that the kids with a chip on their shoulders do.  Along the way, I’ve also managed to learn a lot of nitty-gritty detail about things like AWS ELB setup and configuration, nuances of SSL cert encoding, cert chains, SSH, and more.  LOTS more work to do in the next week or two, so we’ll see how it all shakes out.

Regarding the “etc.”: I don’t want to talk about it, write about it, think about it, toss it around in my subconscious, or anything.  I want to be done.  I want it to go away.  I want to move on.  And, as Forrest Gump famously said, “that’s all there is to say about that.”

p.s. Why am I not writing a novel?  Riddle me that, Batman.

No Comments

RT Zappos.com: Oops, My Bad

Web

An email in my inbox from Zappos.com this morning:

First, the bad news:

We are writing to let you know that there may have been illegal and unauthorized access to some of your customer account information on Zappos.com, including one or more of the following: your name, e-mail address, billing and shipping addresses, phone number, the last four digits of your credit card number (the standard information you find on receipts), and/or your cryptographically scrambled password (but not your actual password).

THE BETTER NEWS:

The database that stores your critical credit card and other payment data was NOT affected or accessed.

SECURITY PRECAUTIONS:

For your protection and to prevent unauthorized access, we have expired and reset your password so you can create a new password. Please follow the instructions below to create a new password.

We also recommend that you change your password on any other web site where you use the same or a similar password. As always, please remember that Zappos.com will never ask you for personal or account information in an e-mail. Please exercise caution if you receive any emails or phone calls that ask for personal information or direct you to a web site where you are asked to provide personal information.

PLEASE CREATE A NEW PASSWORD:

We have expired and reset your password so you can create a new password. Please create a new password by visiting Zappos.com and clicking on the "Create a New Password" link in the upper right corner of the web site and follow the steps from there.

We sincerely apologize for any inconvenience this may cause. If you have any additional questions about this process, please email us at passwordchange@zappos.com.

I’m a little unclear about that phrase “cryptographically scrambled password (but not your actual password)".  If it was “scrambled” appropriately (read: strongly enough), why would I need to change my password on other sites?

No Comments

Querying IIS configuration with PowerShell

Software

A recent little task I took on required me to verify, programmatically, that IIS 7 was set up in a certain way.  This seemed like an ideal task for PowerShell, and, with the assistance of the IIS PowerShell Snap-In, pretty easy.  There were some odd little gotchas that I’ll outline below.

First of all, to get the IIS PowerShell Snap-In, go here: http://learn.iis.net/page.aspx/429/installing-the-iis-powershell-snap-in/.  Download the 32- or 64-bit version as appropriate.

Right off the bat, I know what you’re thinking.  You’re thinking, “Snap-in?  Why not a module?”  The short answer is, I don’t know.  Nobody has apparently bothered to do the simple translation to the newer module way of doing things.

Second: querying IIS.  Well, you can do more than query with the cmdlets that you get with this snap-in, but I had to query, so the new provider namespace IIS:\ became available to me, and, well, yay!  You can do things like this:


get-webconfigurationproperty –filter system.webServer/directoryBrowse –name enabled –PSPath “IIS:\Sites\Default Web Site\app1”

…which tells you if directory  browsing is enabled on the application “app1” in the website “Default Web Site”.

Or this:


get-webconfigurationproperty -filter system.web/customErrors -name mode -PSPath "IIS:\Sites\Default Web Site\app1"

…which tells you the current setting for the Custom Errors configuration property for "app1". (You may, for example, want to verify that this setting is not "Off" on a production server.)

There are other things you can do.  You can query the bindings for a given website to verify which port HTTPS is bound to:


get-webbinding “Default Web Site” –protocol https

You can also check IIS:\SslBindings:


gci IIS:\SslBindings |? {$_.Sites -eq "Default Web Site"} | select * | fl

…for example, maybe to get the cert thumbprint to query into the cert:\ provider.

So, the gotchas.  The Xpath-type filter structure is sorta weird, to be honest.  It roughly matches the format of the web.config file (for the system.web filters) or the %windir%\system32\inetsrv\config\IIS_Schema.xml file (for the system.webServer filters), but the documentation doesn’t do that great a job of showing the relationships among entities, or pointing out the subtle difference between getting the configuration vs. getting a configuration property.

There is also the traditional PowerShell problem of having multiple ways to do things.  That’s a problem whose only guide is experience.  In the last example above, you can also get the certificate thumbprint with the following command:

(get-webbinding “Default Web Site” –protocol https).Thumbprint

(in fact, in IIS:\SslBindings, the thumbprint is called the “certificate hash”.)

The get-help documentation for the cmdlets is sparse.

Having said all that, these PowerShell cmdlets for IIS are very useful, especially for deployment and configuration management, as well as verification, and I’d urge you to add them to your arsenal if you use PowerShell as part of your deployment process.

No Comments

How to Tell If You Have Microsoft .NET Framework 3.5 SP1 installed

Software

…programatically, that is.

It turns out it’s not *quite* the piece of cake that you might imagine.  There’s a good Stack Overflow post that outlines some of the various approaches, and I crafted a little PowerShell script that uses the inspect-the-uninstall-Registry-key solution, but I’m not happy with the approach.  It’s sort of like asking the question “Is there an elephant at the zoo?” and being told the way to find out is to look for a large pile of elephant poop, and deduce that yes, there is an elephant at the zoo.

This approach fails if I willfully (or neglectfully) mess with the source \framework\3.5\ directory, or do any number of other bad things that leaves this particular registry key intact.

Ah well.  Enough caveats.  Here’s the code:

# Is35SP1Installed.ps1
# Checks to see if you have .NET Framework 3.5 SP1
# installed on the machine that this script runs on
$result = $false
gci "hklm:\\software\microsoft\windows\currentversion\uninstall\" -recurse -force |% {
    $key = $_
    $displayName = $key.GetValue("DisplayName")
    if ($displayName -eq "Microsoft .NET Framework 3.5 SP1") {
        Write-Host $displayName
        Write-Host ("Version {0}" -f $_.GetValue("DisplayVersion"))
        $result = $true
    }
}
$result

No Comments

The Day Before Boxing Day

Personal

It’s done, another holiday season come and gone, all the tinsel and sugarplums and smell of newly-cut fir and carefully arranged crèches all receding into the past, consumed, expelled, exhausted, like a tenor’s deep exhalation that has come to a final dramatic concluding note and is now silent.

Normality. Is there anyone who celebrates the day who doesn’t feel a twinge of – well, something – the day after Christmas?  Boxing Day.  Notable for English Premier League matches, sales, and not much else. Off to your normal business, mind your step, watch the tracks, there’s a good boy or girl.

As IF!

We’re changed.  Well, I’m changed.  Imperceptibly, at the very least, but perhaps more so, more so as I grow and learn and observe and evaluate and reflect and consider.  It’s true that every moment is an opportunity to learn, but big milestone events, big major holidays and anniversaries and birthdays and the like, give us more obvious grist for the mill.  What have I learned?  As is usual, I’ll plead a bit of ignorance, engage in a bit of delay, and tell you truthfully I don’t know.  I’m not sure.  I suppose that’s part of the reason I blog; I work out the meaning of things slowly, like a long-maturing wine, and I can’t (or won’t?) come to any certain conclusions for some days or weeks or even months.

Some facts.

Fact the First: I survived.  This is a tricky bugger, survival; it has come to mean so much more than just the life of the corpus, of breath and pulse and electrical activity in the hippocampus – in the context of big events, the word strongly connotes an element of okayness, of resilience, of (dare I say) imperturbability.  I survived.

Second: I love my kids.  Like any parent, I experience those moments where I’d like to box them up and list them on eBay with no minimum, but those are infrequent and transient.  I still love the smell of my son’s hair, and the feel of my daughter’s cheek, and am perplexed and amazed every day at the little people they are, and are becoming – long limbs, gapped teeth, bundles of scrapes and smiles and dirty fingernails and impossibly large feet, half kangaroo by genetic ancestry to be sure.  I love the way that they see the world.  I love the way that they have their little eccentricities and quirks and characteristics that make them unique and identifiable and (mostly) predictable.  I love the way they ask for help, and help me in other areas.  I love the way that they occupy themselves when they think no one is looking.  I love that they are still enthralled with the idea of Santa Claus, although I fear that this may be the last year for that particular weltanschauung.

Third: I have really, really, really good friends.  I could write a book.  Okay, maybe a short one, a novella, but it would be dense with emotion.

Fourth:  Is there a fourth fact?  Of course there is, there are an infinite number of facts, but their narrative usefulness declines exponentially.  This is actually a problem I’m terribly interested in at the moment – what is the optimal number, or even upper limit, of things we can be concerned with at any given time and still be effective happy?  Is it “one”, as the reductionists insist (no multitasking!) or is it some large, as-yet-unapproached number, greater than we think possible?  In the spirit of investigation, I’m leaning toward the latter, and we shall see.  For the moment, I’ll  leave off with three things, and come at you tomorrow or the next day with more.

Remind me to write my “Best of 2011” list.  Candidate entries are percolating in my subconscious.

Off to code.  Because wouldn’t you rather, etc. etc. etc.

No Comments

One-way Many-to-Many NoSQL Representation Design

Software

An interesting NoSQL representation problem:

  • A TEST can have zero or more QUESTIONS.
  • Within a TEST, QUESTIONS are arranged in particular way.
  • A QUESTION can be reused among multiple TESTs.
  • A QUESTION may be shown in different places on different TESTs.
  • Given a TEST, I need to be able to quickly get the list of included QUESTIONs.

So, how to represent this in a NoSQL schema?  I briefly considered just creating the entity tables and then a many-to-many join table:

  • TEST (test_id, etc.)
  • TEST_X_QUESTION (test_id, question_id, sort_order)
  • QUESTION (question_id, etc.)

…but then thought about it again.  I wanted to experiment a little bit with the representation.

What I ended up doing is this:

  • TEST (test_id, etc.)
  • QUESTION (question_id, (test_column_1, test_column_2, … test_column_n), etc.)

Huh?  Well, what I’m doing is taking advantage of the “schemalessness” property of NoSQL data stores (in this case, Amazon’s SimpleDB) and creating columns on the fly in the QUESTION table that refer back to the TESTs that the QUESTION is included in.

The format of the various test_column_n column names is simple:

<prefix><transformed test_id>

Where <prefix> is a compile-time constant that never changes for the QUESTION table, and <transformed test_id> is a simple transform of the test_id value to allow me to use it as a column name (aka attribute name) without any fear of death-by-special-character-restriction.

So, given two TESTs, one with an id of “abcdef-123456” and the other with an id of “foo”, I might end up with a persisted Question with the following attributes:

question_id zyxvut-987654
question_text What is the capital of Finland?
tabcdef-123456 1
tfoo 3

This says that this particular question is associated with two TESTs: on the first test (“abcdef-123456”), it is the first question shown; on the second test (“foo”) it is the third question shown.

Querying: given a TEST id of “foo”, and a well-known prefix of “t”, the Amazon query to get all the questions for a test looks like this:

SELECT * FROM Question WHERE tfoo is not null

The value of the “tfoo” column is the sort order.

There are some restrictions.  Using this approach, your QUESTION can only be listed on as many tests as there can be attributes (I think SimpleDB is probably 1024 total attributes per item).  There is also the “reverse lookup” problem: given a QUESTION id, it’s not too easy to construct a query to get the list of TESTs that the question is included on (you’d need to parse columns after retrieving the result from SimpleDB).  I don’t really need that function; if I did, perhaps a traditional join table would be more appropriate.

Gotchas: for the sake of illustration, I chose differently-formatted TEST id values in my example; in real life they are GUIDs.  This prevents clashes or overlap between the prefix and the actual ID value embedded in the attribute name.  The attribute name is thus always

<prefix><condensed guid>

where <condensed guid> is the GUID with the hyphens stripped out.  It’s an easy lookup and conversion to get the actual TEST ids back.

So, for low values of n, where n is the number of distinct tests that a question can be present on, this approach seems to be working just fine.  I’m not sure if it’s any more performant than a real many-to-many join table would be, and haven’t tested it, but for n < 1024, I don’t really care that much anyway.

No Comments

Creepy, Interesting Fruit

Humor

I ran into this at Whole Paycheck – it’s called a Buddha’s Hand and looks like a small yellow octopus.

IMG_0562

I have no idea what it tastes like.

I wonder if Mark Driscoll thinks that eating this fruit is incompatible with Christianity.

No Comments

Those Crazy Entrepreneurs

Humor

barfboutique.com

I’m afraid to go to the website to see what this is all about.  The owner probably rakes in the dough and has a 2nd house in the San Juans and a suite at the Clink.  #@*$&@#$

No Comments

We Have Not The Words

Personal

A swirl.  A whirlwind.  Poised on the knife’s-edge of – something –, the steepening dusk throwing glum shadows across the redlands, people busily wrapping up their days, their jobs, their lives, boxing them up, identical plain cardboard boxes, not thinking, un-thinking, actively forgetting even, going through the motions, but senselessly, on grooved instinct, no glancing around, myopic, sightless, flightless, ground day by day into identical tin ball bearings by the same weight that spreads vast across the yoke of the world.

Someone asks a question.  A founder.  A cofounder.  A first hire.  It’s a story problem, the kind you find in the junior high school algebra books.  It’s my territory, this hiring and selecting and curating technical talent, of evaluating nuance and drive and initiative and ability to work independently-yet-collaboratively, of one’s ability to learn, to grow, to adapt, to maneuver; of the concreteness of one’s ideas about Topic A and the malleability of other ideas about Topic B.  It’s a tough thing, evaluating a person, even in the limited domain of work, career, nine-to-five; no wonder we give up, we revert; patterns, stereotypes, tropism, repetition.  We murder our new ideas in their sleep, infanticide, because we don’t have the words to describe them and can’t bear the thought of the work it takes to hold onto an indefinite idea indefinitely.  There are so very few n-dimensionally new constructs; we can’t shoulder their weight.  They crush us with their uncertainty.  Even taking a step outside of the chalk lines we’ve so painstakingly convinced ourselves are there because we want them is a step too far.  There’s no word for “over there”, as opposed to “here”.  We have a million words for the latter, but none for the former.  Eskimos know snow, but what of the desert? We can’t imagine a life beyond the line, even a minute beyond the line.  And yet we would presume to be able to answer questions about a visitor from the desert.  It’s a non-question.  A null question.  Unspeakable, save for the life that naming something gives it.  We name things that are unreal, and yet can not name real things that are far more important, far more appropriate to dwell on, far more tangibly advantageous.  No wonder people seem to natively understand that not-thinking is a mercy.  We have not the words.

Tom Peters, certainly one of the more enlightened among us, wrote a book called “Re-Imagine!” (his exclamation point, not mine).  How wonderful the impulse, how difficult the task.  Why?  Why are we, collectively and individually, not yet the sum of what has come before us, but rather a rough-hewn drawer filled with thin, well-thumbed snapshots, of cloudy focus and distorted angles?  Reimagine.  As if.

The sun rises, the sun sets.  People are hired, fired, welcomed, make their goodbyes, start, stop, launch, withdraw, burrow, hide, cave.  And almost all without a thought, a real thought, a sensitive awareness of the real stuff underneath the patina of welcome familiarity.  Superficial analysis.  We mistake a two-dimensional scrimshaw for a three-dimensional object and think ourselves geniuses for our insight.  We plow furrows right behind, and right ahead of, our neighbors, and consider ourselves unique little snowflakes.  It’s all blindness.

No Comments
« Older Posts