Tech in the 603, The Granite State Hacker

Virtual Gambit

What a pain.

A few weeks ago I posted a bit about how Windows 8 is not killing the PC market.

I’ll now take that a step further and argue about the one thing in Windows 8 that is really making me regret not having new hardware…  an actual compelling reason to really think about a new PC, for me.

Around the time I wrote the original post, I was looking at taking advantage of Windows 8 Pro / Hyper-V on my home PC…  mostly because emulators for devices such as Surface and Windows Phone 8 make use of it.  I have Hyper-V on my work system, and it’s fantastic for a variety of reasons.

I’d all but forgotten that my home PC didn’t have a processor that supported VT-x technology, meaning no Virtual Machines… so when I went to add the Hyper-V role, I was somewhat disappointed to discover it was a no-go.  

“Maybe it’s time to upgrade something,” I thought.   I could get a new machine… but it’s pretty hard to justify the chunk of change based on this one feature.  (Never mind that it’s not so easy to liberate that kind of money from the budget.)  “I’ll order a new processor that supports Virtual Machines.”  VT-x.

So I dropped the $200, instead…. placed an order for a dated, but still more feature-rich chip.  I waited for the thing to arrive, and finally sat down, lifted the old CPU out, and dropped in the new one.

After the successful screw-top surgery, I pulled up the dialog to add Hyper-V only to discover that…  the new CPU doesn’t have the guts to run Hyper-V on Windows 8 either.

Seriously miffed, (because I know VM technology is older than Hyper-V, and I just burned $200 for 2-3 more FPS in WoW) I started looking into what the deal was.  Turns out Hyper-V on Windows 8 requires an additional virtualization technology in the processor called SLAT.  

None of the processors that fit my home PC support SLAT. 

If I want Hyper-V, (which is highly desirable for coders like myself who want to use Microsoft tools for the latest MS platforms) I *must* replace the vast majority of my PC’s components… but, really… economically speaking…. I need a new PC.

So it’s an interesting conundrum that I can’t help think was designed around boosting hardware sales….  Seriously…  I can do a lot with Virtual Box and VMware Player in terms of running VMs.  I could even install Windows Server 2012 and run Hyper-V from the server OS (without SLAT) on the very same hardware.  (Only Windows 8 Pro Hyper-V requires it.)

I can’t buy a new PC for less than $2k that will outperform my current system…  so, when it comes down to it, the ONLY reason I can think of to upgrade would be for Hyper-V… what a pain.

Here’s a comparison between my PC (Hyper-V no-workey) and a much more modern i7 (Hyper-V workey)…  note that the i7 is an Intel i7-720M, but it’s processor score (6.9) in the Windows Experience Index is less than the experience index of my older Yorkfield Core 2 Quad-Q9400 (7.2).   (both systems are hobbled by their disk platters).

Tech in the 603, The Granite State Hacker

Cloud or Windows 8 Killing the PC Market?

Everyone’s busy scratching their heads as of late, and then pointing.  Who’s killing the PC market?  

Slashdotters are loving the idea that it’s Windows 8 ( http://tech.slashdot.org/story/13/04/11/002200/windows-8-killing-pc-sales ).

…but I fully call BS on that.  (Thankfully, Slashdot corrected itself to some extent.)

Then I came across this article by ZD Net blaming the cloud:
http://www.zdnet.com/whos-killing-the-pc-blame-the-cloud-7000013954/#postComment

The CLOUD?

That’s kind of like saying the Boeing 787 is killing the auto industry.

The cloud may be killing the server market, but that’s not the PC market…  the server market is busy supporting the cloud providers, though, so I don’t think they’re too bad off. 

If Windows 8 is holding the PC market back, it’s this:   I have upgraded every PC I touch (and then some) to the latest Windows 8 Pro, with no need for additional hardware, (because you were ill advised (or unadvised) if you’re a Windows user who didn’t take advantage of the $40 PRO edition upgrade offer from MS while you could.)

What’s killing the PC market is rooted in applications… especially games, on a couple levels:

1)  the fact that there’s only ever been one reason to have heavy iron at home:  games.  Games have gotten to the point that spending a few thousand dollars on a new machine won’t significantly improve your desktop gaming experience… so… unless you have that kind of scratch to waste, why bother?

2)  The games people want to play are on mobile devices.  As much as I love my desktop games, there actually have been a few mobile titles that have been engaging enough that I have taken time off from raiding to play them.

There is also the fact that the economy in general sucks, and while older PCs can continue to function, newer PCs are discretionary purchases that can (or must) wait.  

I can say from example, I’m aware of someone who has a laptop that, through what appears to be planned obsolescence, has broken in a couple of “expensive” ways… the display and keyboard are both dead.   Rather than pay a grand or more for repairs that would cost more than a new machine, or even pay the money for the new machine, the solution was to pick up a USB keyboard, and a cheap monitor… it now serves quite adequately as a desktop…  (and it was also upgraded to Windows 8).  (In any case, I’ll never waste money on that brand of laptop again.  🙂  )

If the hardware market wants me to spend, they’ve got to do something that will get me to feel like I’m not burning bucks for 10 additional frames per second, or… change their model… radically. 

Or… show me my favorite desktop title with an improved experience through touch screen…  but even this can be overcome with something like a LEAP Motion sensor for less than $100.

Bottom line… I think what we’re seeing is, for the first time, honest to goodness inflation hitting the PC market, and it’s choking on it.

Tech in the 603, The Granite State Hacker

Hedging Against The Risk of Becoming A Monopoly

First Microsoft with their late entry into the mobile market (and flubs leading up to it)… then Apple… now Facebook…  anyone notice that they kinda suck lately?  

Apple, clearly getting bored with it’s iPhone, is now turning its attention to it’s iWatch… which doesn’t make much sense to me;  I purposely gave up all other devices, including a wristwatch, in favor of a single unified mobile device.  It will take a lot to convince me to add a wristwatch back in, and I’m sure having to pay for it will be a deterring factor.   (Next thing you know, they’ll add electroshock notifications, and make it so that authorities will have the ability to lock it to the wearer’s wrist and cause it to electromagnetically bind to the nearest metal object in order to detain people… (but that’s another whole story)).

I’m always toying with social media, so when I ran across a Facebook post from an entrepreneurial acquaintance recently, wondering if his content was being suppressed, I had to check it out.   As an experiment, he posted a really cute puppy, and it picked up a fair number of responses.  His concern was that his regular posts were not getting the response he’d grown accustomed to.  To add yet more anecdote, there was recently a post on the New York Times’ blog about similar observations, tied to tweaks Facebook has made recently.  It seems posts that are engaging or paid for are prioritized, and posts that are not quite as popular are at best “deprioritized”.  It seems likely that even engaging posts tied to commercial products are likely suppressed unless paid for.  Anyone who dabbles in trying to build an audience through Facebook must pay or make sure their content is very engaging.   I like knowing about the books friends of mine are publishing.  I like knowing about their small mom & pop shop.  These posts are getting hidden from my newsfeed.  It’s not the most engaging stuff, but it’s part of what I use Facebook for.  Having this stuff drop off my radar makes Facebook start to suck more.  Yes, they want to make money, but I think there may be even more to it.

I digress.

But I have to ask…  with all the Big Data that companies like Apple, Intel, Microsoft, Qualcomm, Facebook, Google, and the rest have…  and rest assured, they have it… the analytics.  How can they really not recognize the things that are hurting their business? 

Is it intentional?

If modern history has shown us anything, it’s that free markets do not tolerate monopolies.  In every case, any time a company takes advantage of its own strength in the market, the market has pushed back, forcing one of a number of “bad” things upon the company.  Just about every global company has seen this.  I recall hearing about the Rockefeller oil breakup, but in our time, it was the Microsoft / Internet Explorer shakedown…. and there have been many others.

I long suspected the reason Linux existed and was not thoroughly stomped on by the powers that be (Microsoft) was to allow Linux to be a “competitor” in the market… something that would never have a unified corporate focus that could actually unseat Microsoft.  I know that Microsoft even supported some Linux components, which anecdotally supports my theory.  I’m sure they supported it as much as they felt they necessary in order to make sure Linux was a viable competitor.

When it became clear that Linux’s strength was flagging, a more corporate competitor became necessary.  It seems Apple filled that gap very nicely in the PC market for some time.

While Apple began to dominate the mobile market, Google stepped up to become a competitor there, partially because Microsoft wasn’t committed to the market space.  (It wasn’t enough of a threat to the PC market.)  Android has the same problems as Linux… too decentralized to be a lasting threat, so while Apple had it’s heyday and now lets itself slip in the market, Microsoft will target Google.  Eventually, I predict Apple and Microsoft will take turns with market dominance with Google there to provide another safety net.

So back to Facebook…  It seems like Twitter has become a haven for market bots, but not much more of real use to the average person.  Facebook’s power grew to near monopolistic levels over 2012, but I predict that Facebook will actually allow this unhappy situation to persist for entrepreneurial folks, encouraging them to explore Google+.  This leadership transference to Google+ will bolster Google+ as a competitor, enabling Facebook to remain free of  the shackles of being a monopoly.  I suspect they’ll both start taking turns with market dominance, but despite the market competition, I bet both will claim better results in their marketing campaigns, thus leading to higher advertising prices on both.

The nasty part, here, is that the reason for preventing and sanctioning monopolies is to prevent them from strong arming their markets.  Unfortunately, what it seems like we’re getting instead is very small oligarchies taking turns to be the dominant, but not quite monopolistic force in the market.  They take advantage of each other to develop brand loyalty which improves their profit margins and gives them near monopolistic power among their followers, yet they maintain their monopoly-free, unsanctioned status.

Tech in the 603, The Granite State Hacker

#quotehack of the day

The other day, a friend of mine posted a quote by Oscar Wilde.*   It went like this:

“I was working on the proof of one of my poems all the morning, and took out a comma. In the afternoon I put it back again.”

The coder in me immediately was reminded of code review sessions where we looked for ways to improve the codebase in really nitpicky ways.  Almost instantly, I hacked up the quote in my mind and posted the following:

Like the original, it’s an exaggeration, of course, but there’s always that kernel of truth… sometimes you get caught up in little things that don’t pan out. 

That got me thinking of a few other favorite quotes, and how an over-dedicated developer like myself might better relate to them.

“Only those who will risk going too far can possibly find out how far one can go.”

“Whatever you are, be a good one.”

 

“The hardest job kids face today is learning good manners without seeing any.” 

//platform.twitter.com/widgets.js“The mind determines what’s possible.  The heart surpasses it.”

Going forward, I’m challenging myself to do a #quotehack of the day.  I might even be inspired to do a breakdown blog post for some of them.

In any case, I invite you to follow along… I’ll probably continue to post from my phone, which cross posts to Facebook, Twitter, and Linked In all at once, so you can catch ’em from any of those & see if you can spot the original quote.  Maybe it’ll be something you can relate to yourself .

* Joe Pace, author of a really cool sci-fi book called “Minotaur“.

Tech in the 603, The Granite State Hacker

No Kid Hungry, Resolution To Renew My Commitment

It’s New Years Day, 2013. 

My kids made a comment, this morning, about how commercials on the TV were the same today as they were yesterday.  Without thinking about it, I flatly told them that it doesn’t really work that way; that today isn’t really much different from yesterday. 

I realized right away, even without my wife’s reproving look, that I’d blundered a bit as a dad just then.  I remember being disappointed when I was a kid by how things failed to change over night between New Years Eve & New Years Day.  I had to explain to my kids that the real difference between 2012 and 2013 was not the messages in TV commercials, but what they, themselves, resolved to change…. and the work they put into making that happen.

That, of course, got me thinking about my resolutions for 2013..  I’d tweeted a couple cute ones last night, on New Years Eve…  but there’s one that I’ve been thinking about for a while now that I’ve only hinted at otherwise.

In 2012, I saw how much deeper problems seem to be running, economically….  how even some of my extended family would consider my immediate family’s lackluster financial situation to be a blessing compared to what they’re facing. 

Media news reports that the economy is improving.  That may be true on Wall Street, but it seems hollow on Main Street.  Indeed, the so-called improvements of 2012 feel like they’ve come at the expense of folks who have been on the brink of needing help.  Clearly trickle down economics have failed.  News of improvement only means that people are slower to give… because we’re not in such financial distress, anymore…  right?  Well… worse, with fiscal cliffs and inflation factors threatening to take hold in 2013, who can give?   Sadly, trickle up poverty seems to be in full effect.  

In the meantime, one thing that didn’t work out the way I’d hoped in 2012, was the results from my charity project. 

As a product, I’m very pleased with what I was able to publish in my spare time.  It’s an honest to goodness Sudoku puzzle game for Windows Phone…  no spyware, no malware, no ads, no personal information used or transmitted…   just the kind of game I wanted to play, and something I wanted to share.   I built it using tools that I wanted to work with.  I published it globally for free, and also for the U.S. for $5 with my own personal commitment to donate all proceeds to charity.  (Folks in the U.S. have a choice…  there’s no difference between the free and the paid editions of the app… it’s just if you want to donate to charity or not.)

As a tool for charity to raise funds and/or awareness…  well…  I’m hoping to change it’s past performance.  I understand that it looks bad that I can’t market the app with official cause logos & such from the charity I’ve committed to support…  I asked for permission for that, and for legitimate reasons, I couldn’t.  My hope was that the app would earn the privilege by the contributions it generated.  It’s been tempting to shoot first and apologize later, but in a world of “no good deed goes unpunished”, I didn’t want to take risks I couldn’t back up.

After an experimental social media campaign that mostly just annoyed friends & family on Facebook, I gave up.  There was too much real work that needed my attention.  I couldn’t let an effort that was getting nowhere cause me to fail at stuff like my job.  

I’ve decided to renew my efforts with the hope that it gains some traction at some point… I’m not fighting for the product; I have nothing to prove there. 

It’s the cause.  Helping hungry kids. 

I have yet to figure out exactly what this means… I don’t want to annoy friends & family… but the cause needs hands.

Even if you have no interest in my charity project as a fundraiser, please seriously consider contributing to the cause. Even if you can’t do that…  please help spread the word. 

This is their website:
No Kid Hungry

Tech in the 603, The Granite State Hacker

Windows 8 Hyper-V Advanced Tips For ESATA

Here’s a couple tips for a perhaps not so unique situation when using Hyper-V hosted in Windows 8 Pro with an ESATA spindle involved. 

1)  Moving a snapshot file to a different drive for performance reasons.

Hyper-V does not support keeping shapshot difference disks in folders separate from the base disk.  If you’re like me, and store the main VHD on an E-SATA disk, performance isn’t bad, but could be much better if you could move the AVHDx file to a different physical drive, preferably a full speed drive.  This issue is minimized with solid state drives, but if you don’t have one, the best bet is to create your snapshot, remove the disk from your guest VM, move the AVHD file to an accessible location, and then re-attach it.  (Don’t take my word for it:  back stuff up first!)  Once you re-attach, it should run your read/write activities in the avhd, and pull data from the vhd file as needed.

[Edit:  The trick to this part is figuring out where the config files are so you can modify them.  They live at C:\ProgramData\Microsoft\Windows\Hyper-V\Virtual Machines\, but the files themselves are XML files with GUID names. 

I typically find the correct one by simply looking at the modified date… it’s probably the one you most recently used. 

Before you can edit these files, you must shutdown the Hyper-V Virtual Machine Management service, and before you start it back up, you’ll have to make sure that the account this service runs with has read/write access to the .avhd, wherever you put it.]

2)  If your E-SATA drive is hardware encrypted, shut off power management.

One issue I was running into that was hosing the host and beating on the guest OS…  My ESATA disk has a keypad that you have to tap out a PIN on in order for the disk to function.  Power management was shutting down that drive at about 20 minutes by default, causing the disk to reset and disconnect, even with a VM running off of it…  this is the computer equivalent of crossing the streams… suffice it to say it’s Bad™.  So using advanced power management, I was able to tell the system to stop spinning down the drives while the power cord was plugged in.  (If I’m on battery, I typically won’t be running my VMs on it.)

Tech in the 603, The Granite State Hacker

My Windows 8 Adventure So Far

I had different reasons for doing each of the upgrades I’ve done so far… Here’s a list of the upgrades I’ve done so far, and why… maybe something I talk about will resonate:

My home PC (desktop):
I upgraded my computer initially to see what it was like. For $40, you don’t even have to go to the store to buy it.  That’s the Pro version, you can buy that to upgrade XP, Vista, and Windows 7 computers…  and it’s a way better price than the $200 upgrade from Windows Vista to Windows 7 for example.   It’s a relatively easy web-based upgrade. (I encountered some quirks with Symantec/Norton anti-virus, but Windows 8 includes security apps which make a good replacement.)  I’ve found it to be as solid as Windows 7, and once you get used to the mouse gestures and the way “Modern UI” works, navigation is easier than it was in Chicago-era UI’s (The UI we’ve basically had since Windows 95).

I also intend to explore app development with it. 

I’m also deciding my hardware upgrade path.  It’s an inexpensive way to get a grip on what devices I might want to invest in, going forward… for example, do I want to upgrade my current PC, which is great but has no touch screen support, lacking virtualization support, or do I want to bite the bullet and get something more current. 

I’m still deciding on a tablet, and it’ll either be “Surface Pro” or “Surface RT”…  I don’t want to invest in iPad or iPhone because they aren’t going to provide the level of integration I’m seeing and liking with the Windows 8 generation of devices.   Right now, I’m actually leaning toward maybe getting a Surface RT tablet, which are already available at Microsoft Stores at the mall…  the Surface Pro will be more fully featured, but cost more.  I’m thinking for what I want to do with a tablet, the RT will suffice, and if I need more horsepower from my tablet, I’ll just remote into a regular computer.
 
My wife’s PC (laptop):
I upgraded my wife’s computer because she & the kids loved the free games they saw me get from the app store… which works a lot like app stores on iPhone, Android and Windows Phone… they all mastered the “Modern UI” the first day, and found it to be an improvement, as well… so she got the “shiny new” experience on her older laptop.

That experience also enabled me to check out how Windows 8 devices (this includes computers, laptops, tablets, and phones) all communicate through the cloud…  I was easily able to transfer my profile from my desktop to my own login on my wife’s laptop.  This is something that Microsoft has been trying to make better for years, and used to only be available to Enterprise users, but now, thanks to the cloud, it’s something anyone can take advantage of.

My sister-in-law’s PC (laptop)
I upgraded my sister in law’s machine to get a less-involved, not quite so technical perspective on it. She picked up the new features right away, and is enjoying things like the free apps… Fresh Paint is one she mentioned as being a favorite, which is one my daughter is particularly fond of, as well.  She’s had an odd behavior with it that I have to fix next time I get the chance, but it’s just that startup takes longer than it should. 

My work machine (laptop)
I upgraded my work machine because I use Virtual Machines a lot, and Windows 8 has an updated version of Hyper-V in it… I was a bit nervous about this at first… my work depends on not screwing up my VMs, but after getting my first VM migrated from VirtualBox, I’m really glad I did it… Results so far are that performance seems better, and it’s just so much more flexible than VirtualBox was.  I’m hoping to see some bugs I encountered in my VirtualBox hosted machines go away too, haven’t tried that just yet…  (Stepping through code was a bit flaky in VirtualBox VMs)

To come…  My Mom’s machine (desktop)
I’m upgrading my mom’s machine for more practical reasons.   I think the UI will be easier for her to get around.  That said, it’s mostly the fact that Windows 8 has better apps included than what she’s using. (For example instant messaging, email, news… the web-based apps she’s using are limited in comparison.)  She’ll be able to toy with the apps from the app store, as well, which will be relatively a new technical freedom for her altogether.

Still…
If you want to see Windows 8 in action without risking a computer, I recommend stopping by a nearby Microsoft Store.  They have them set up so you can spend a bit of time playing with them, and plenty of people around to bounce questions off.

Tech in the 603, The Granite State Hacker

If the iPhone is “The Turn”, It’s Not “The Prestige”.

A week ago this past Saturday, I presented at SharePoint Saturday New Hampshire on the topic of integrating Windows Phone with SharePoint in custom apps  I got sidetracked for a moment or two… chatting about why I see Windows Phone as being a viable platform.   So far, it’s been rough.  As an anecdote, everyone I know who has a Windows Phone bought a copy of my charity-bound “Jimmy Sudoku” app.  Sadly, the contribution to the charity from it is… not what I hoped. 

Still, I think the cool-aid was worth sharing…   To be fair, all the people I know who have a Windows Phone are relatively outspoken fans of it… and that includes a number of folks you’d never suspect of being “Smart Phone” users.

Anyway, a few days before SPSNH, I ran across a relatively insightful article on TechCrunch (I’ll post the link at the end).  It opens by quoting the opening dialogue of Christopher Nolan’s 2006 film, “The Prestige”:

“Every great magic trick consists of three parts or acts. The first part is called “The Pledge”. The magician shows you something ordinary: a deck of cards, a bird or a man. He shows you this object. Perhaps he asks you to inspect it to see if it is indeed real, unaltered, normal. But of course…it probably isn’t. The second act is called “The Turn”. The magician takes the ordinary something and makes it do something extraordinary. Now you’re looking for the secret… but you won’t find it, because of course you’re not really looking. You don’t really want to know. You want to be fooled. But you wouldn’t clap yet. Because making something disappear isn’t enough; you have to bring it back. That’s why every magic trick has a third act, the hardest part, the part we call “The Prestige”.

The TechCrunch’s MG Siegler makes a great point.:  Apple’s iPhone magic is in “The Turn”.   Apple has taken an “ordinary” item, the smart phone, and turned it into something “magic”. 

Indeed, I agree, it is magic, and everything that goes with it.

MG’s article was a commentary of the iPhone 5, and it captured the sentiment I’ve been hearing over & over again about it.   The Apple’s iPhone is starting to run a bit shy of manna.  (Update 9 Feb 2013:  Slashdot, Woz says iPhone Features are Behind. )

It shouldn’t be a surprise though…  we’ve seen it all before, in fact…  we saw it first with the Mac.  It struck again to a lesser extent with the iMac, and dug in big for the iPhone.  There’s a lot to be said for the brand of magic that Apple has wielded over the past several decades, and many would argue that Steve Jobs was the one who brought focus to that magic.

Admiration aside…  If Apple’s past and present magic is in “The Turn”, (and we agree that the iPhone is a hard-won magic trick)  it follows that, within the market, there must have been “The Pledge” and “The Prestige” as well.  That’s when I started to get excited… it seems pretty clear to me where “The Prestige” is, but I’ll get back to that. 

So what of “The Pledge”?   MG’s article points to Samsung as a weak imitator.  Maybe it is (by it’s association with Android), maybe it isn’t…  I guess the courts, and maybe even the public, are done deciding this.   In any case, Samsung never represented the promise of “The Pledge”; it only ever wanted to join in on Apple’s magic.  It’s not “The Prestige” either.

The role of “The Pledge” has been played before, as well, in popular technology of days gone by.  In the early PC wars, this role was played by a small number of makers.  The most memorable of them were the Commodores and TRS-80’s.   This cadre of early PC makers had one thing in common…  the average hobbyist (aka geek) could make them do magic in fits and starts, causing loyalty that ran deep (just ask the Amiga fans), but they didn’t have much, if any, magic for the popular user.  

I would argue, despite the fact that Google’s Android came at about the same time, late 2007, Android represents the promise of this magic…   “The Pledge”…  a Phone, integrated with a pocket computer, that anyone could have a satisfying user experience with.  Open, available, and accessible, it would be… it was everything a “Smart Phone” should be, and it appealed to exactly the market that Smart Phones were made for in 2007.  Despite its fits and starts of magic and a fierce geek following, it, like the Amiga (in its day), is still too immature to be the enduring solution.  Any time I mention the idea that the Android might fade into the realm of the Amiga, the geeks in the room threaten to get belligerent.    I remember getting the same way over my TRS-80 CoCo.

Between issues with platform versions & compatibility, components that don’t integrate well, visually or functionally, and malware/spyware, Android is excellent if you’re a technical person who’s not intimidated by compilers and is savvy enough to avoid spyware & malware… but that’s not what the popular user will go for in the long haul.  (Update 9 Feb 2013:  Slashdot, Fragmentation Leads to Android Insecurities)

So what does it take to become “The Prestige”?  It takes that maturity… the ability to allow the average user to make magic with it, affordably, easily… commonly, and, well, normally…  on some level, it restores normalcy, ushering in commoditization of the magic that once was so amazing.

If you take into account that Microsoft was the successor of the IBM compatible legacy, it starts to become clear that Microsoft holds the title to a long history of taking Apple’s “magic”, and refining it into maturity.

In some ways, it’s a bit sad:  iPhone’s manna is indeed running out…  there’s a little less magic in the world…  
…or is there?  This magic will soon be in the hands of friends and family who are just starting to get the itch for a mobile device that can play Fruit Ninja and Angry Birds on.  All those late adopters who wanted maturity, affordability, reliability, and ease of use over “magic”, but now they get both.  When they get their Windows Phone /  Surface RT / Windows 8 device, they’ll get to see magic that geeks and power users have been using for years now…  and that’s the hardest part  “The Prestige”, putting “smartphone”/tablet power and flexibility in the hands of every cell phone user.

As promised, MG Seigler’s article on TechCrunch:
http://techcrunch.com/2012/09/13/the-iphone-5-event/


(Update 1/9/2013 clarified PoV a bit on Android)
(Update 2/9/2013, linked back to Slashdot on various posts that supporting my position)
Tech in the 603, The Granite State Hacker

Getting at Office 365 SharePoint Lists In Windows Phone 7 Silverlight Apps

[Edit 7/8/2013:  I’ve tweaked this to note that this was for WP7.  WP8 has a whole new set of SDKs for SP integration, and it’s a different, and much easier story to use them.]

As promised from my presentation at SharePoint Saturday New Hampshire, I owe a code listing on the meaty part of the chat…  the Office 365 authentication component, especially.  It allows a Windows Phone Silverlight app to access things the lists.asmx service behind the Windows Live ID authentication.  (Frankly, the technique is the same, no matter what kind of client you’re using, but the demo I was doing was using Silverlight 4 for Windows Phone 7.

I also owe slides:
[office src=”https://r.office.microsoft.com/r/rlidPowerPointEmbed?p1=1&p2=1&p3=SD90A564D76FC99F8F!274&p4=&ak=!ABO7SzieOkx6gtY&kip=1″ width=”402″ height=”327″]

Here’s the activity rundown:

1)  The client app (“Windows Phone App”) makes a SAML SOAP request to https://login.microsoftonline.com/extSTS.srf
2)  The SAML response comes back, allowing the app to parse the SAML token.
3)  Make another call, this time to  {your Office365 team site}/_forms/default.aspx?wa=wsignin1, posting the token.
4) The response that comes back need only be checked for errors, the magic is in the cookie container.  It contains an HTTPOnly token (which the development tools do a terribly good job of hiding.)
5)  Assign your cookie container from your previous result to the ListSoapClient that you’re using to make your service calls from.
6)  Profit!

I broke up the “Activation” line on the client side to point out that the calls are Async.

In any case, I have a very rough SPAuthenticationHelper class that I also promised to post.

Here’s an example of how you can use it:

    class SPTasksList

    {
 
        SPAuthenticationHelper _authenticationHelper;
        ListsSoapClient _listsClient;
        bool isBusy = false;

        TaskItem currentUpdate = null;

        string _taskListUri = “http://spsnh.sharepoint.com/TeamSite/Lists/Tasks/AllItems.aspx”;

        public SPTasksList()

        {
            _authenticationHelper = new SPAuthenticationHelper(_taskListUri);
            _listsClient = new ListsSoapClient();
            _listsClient.GetListItemsCompleted += newEventHandler<GetListItemsCompletedEventArgs>(_listsClient_GetTasksListCompleted);
            _listsClient.UpdateListItemsCompleted += newEventHandler<UpdateListItemsCompletedEventArgs>(_listsClient_UpdateListItemsCompleted);
        }
 

        public voidBeginGetTasksList()

        {
            if (!_authenticationHelper.IsAuthenticated)
            {
                _authenticationHelper.OnAuthenticated += newEventHandler<EventArgs>(_authenticationHelper_OnAuthenticated_GetTasks);
                _authenticationHelper.SigninAsync(Configuration.UserName, Configuration.Password);
            }
            else if (!isBusy)
            {
                isBusy = true;
                XElement query = XElement.Parse(“Completed”);
                string ListName = “Tasks”;
                string ViewId = “{f717e507-7c6e-4ece-abf2-8e38e0204e45}”;
                _listsClient.GetListItemsAsync(ListName, ViewId, query, null, null, null, null);
            }
        }

        void_authenticationHelper_OnAuthenticated_UpdateTask(objectsender, EventArgs e)

        {
            _listsClient.CookieContainer = _authenticationHelper.Cookies;
            BeginUpdateTask(currentUpdate);
        }

……
} 

I ported this from a few other examples I found online to Silverlight for Windows Phone.  I apologize,  I haven’t had time to polish it, and I’m having a hard time with the embedded SOAP litteral, but here’s the SPAuthenticationHelper class:





using System;

using System.Net;
using System.IO;
using System.Linq;
using System.Xml;
using System.Xml.Linq;
 
namespace SPSNH_SPConnector.Implementation
{
    public class SPAuthenticationHelper
    {
        public CookieContainerCookies { get; set; }
        public boolIsAuthenticated { get; privateset; }
        public event EventHandler<EventArgs> OnAuthenticated;
 
        private bool_isAuthenticationInProgress = false;
 
        const string_authUrl=“https://login.microsoftonline.com/extSTS.srf”;
        const string _login=“/_forms/default.aspx?wa=wsignin1.0”;
       
        //namespaces in the SAML response
        const string _nsS = “http://www.w3.org/2003/05/soap-envelope”;
        const string _nswst = “http://schemas.xmlsoap.org/ws/2005/02/trust”;
        const string _nswsse = “http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-secext-1.0.xsd”;
        const string _nswsu = “http://docs.oasis-open.org/wss/2004/01/oasis-200401-wss-wssecurity-utility-1.0.xsd”;
        const string _nswsa = “http://www.w3.org/2005/08/addressing”;
        const string _nssaml = “urn:oasis:names:tc:SAML:1.0:assertion”;
        const string _nswsp = “http://schemas.xmlsoap.org/ws/2004/09/policy”;
        const string _nspsf = “http://schemas.microsoft.com/Passport/SoapServices/SOAPFault”;
        const string _samlXml =@” http://schemas.xmlsoap.org/ws/2005/02/trust/RST/Issue http://www.w3.org/2005/08/addressing/anonymous https://login.microsoftonline.com/extSTS.srf {0} {1} {2} http://schemas.xmlsoap.org/ws/2005/05/identity/NoProofKey http://schemas.xmlsoap.org/ws/2005/02/trust/Issue urn:oasis:names:tc:SAML:1.0:assertion “;

        Uri _uri;  
        HttpWebRequest _getTokenRequest = HttpWebRequest.CreateHttp(_authUrl);
        HttpWebRequest _submitTokenRequest = null;
        string _token;
 
        public SPAuthenticationHelper(string uri)
        {
            _uri = new Uri(uri);
            Cookies = new CookieContainer();
        }
 
        public voidSigninAsync(string userName, string password)
        {
            if (!_isAuthenticationInProgress)
            {
                _isAuthenticationInProgress = true;
                getTokenAsync(userName, password);
            }
        }
 
       
        private  void getTokenAsync(stringuserName, string password)
        {
            string tokenRequestXml = string.Format(_samlXml, userName, password, _uri.Host);
 
            _getTokenRequest.Method = “POST”;
            _getTokenRequest.BeginGetRequestStream(newAsyncCallback(Get_GetToken_RequestStreamCallback), tokenRequestXml);
        }
 
        private voidGet_GetToken_RequestStreamCallback(IAsyncResultresult)
        {
            string tokenRequestXml = (string)result.AsyncState;
            var reqstream = _getTokenRequest.EndGetRequestStream(result);
            using (StreamWriterw = new StreamWriter(reqstream))
            {
                w.Write(tokenRequestXml);
                w.Flush();
            }
            _getTokenRequest.BeginGetResponse(new AsyncCallback(Get_GetToken_ResponseStreamCallback), null);
        }
 
 
 
        private voidGet_GetToken_ResponseStreamCallback(IAsyncResultresult)
        {
            _token = null;
 
            varresponse = _getTokenRequest.EndGetResponse(result);
 
            var xDoc = XDocument.Load(response.GetResponseStream());
 
            var body=xDoc.Descendants(XName.Get(“Body”, _nsS)).FirstOrDefault();
            if (body != null)
            {
                var fault = body.Descendants(XName.Get(“Fault”, _nsS)).FirstOrDefault();
                if (fault != null)
                {
                    var error=fault.Descendants(XName.Get(“text”, _nspsf)).FirstOrDefault();
                    if (error != null)
                        throw new Exception(error.Value);
                }
                else
                {
                    var token = body.Descendants(XName.Get(“BinarySecurityToken”, _nswsse)).FirstOrDefault();
                    if (token != null)
                    {
                        _token = token.Value;
                        SubmitTokenAsync();
                    }
                }
            }           
        }
 

        private  void SubmitTokenAsync()
        {
 
            UriBuilder bldr = newUriBuilder(_uri.Scheme, _uri.Host, _uri.Port);
            _submitTokenRequest = HttpWebRequest.CreateHttp(bldr.Uri + _login);
            _submitTokenRequest.CookieContainer = Cookies;
            _submitTokenRequest.Method = “POST”;
            _submitTokenRequest.BeginGetRequestStream(newAsyncCallback(Get_SubmitToken_RequestStreamCallback), null);
        }
 
        private voidGet_SubmitToken_RequestStreamCallback(IAsyncResultresult)
        {
            var requestStream = _submitTokenRequest.EndGetRequestStream(result);
            using (StreamWriterw = new StreamWriter(requestStream))
            {
                w.Write(_token);
                w.Flush();
            }
            _submitTokenRequest.BeginGetResponse(newAsyncCallback(Get_SubmitToken_ResponseCallback), null);
        }
 
        private voidGet_SubmitToken_ResponseCallback(IAsyncResultresult)
        {
            UriBuilder bldr = newUriBuilder(_uri.Scheme, _uri.Host, _uri.Port);
 
            varresponse = _submitTokenRequest.EndGetResponse(result);
            string responseString = (newStreamReader(response.GetResponseStream())).ReadToEnd();
           
            bldr.Path = null;
            Cookies = _submitTokenRequest.CookieContainer;//.GetCookies(bldr.Uri);
            _isAuthenticationInProgress = false;
            IsAuthenticated = true;
            if (OnAuthenticated != null)
            {
                EventArgs args = new EventArgs();
                OnAuthenticated(this, args);
            }
        }
    }
}
 
 

Tech in the 603, The Granite State Hacker

Reliving “Revolutionary” with Windows 8

“What do you think of Windows 8?”   I hear this question all the time… everywhere I go.   I hear people talking about it on the bus, in line at coffee shops, and even in odd places like hospital rooms.  It’s the biggest change we’ve had in the PC in well more than a decade.  Everyone knows this is as big as broadband in everyone’s home.

But… more than a decade?   Really? 

Definitely.  How old would a child be if it was born the last time there was a *true*, major version iteration of Windows?   3?  8…? 

How about…  18?   Yeah…  18… old enough to drive.  Old enough to be looking at colleges. The Daytona (Windows NT) / Chicago (Windows 95) user experience, were it a child, would now be looking at an opportunity to suffer the choice between Romney or Obama.  The experience unleashed on IT and the public introduced us to the Start menu, the Desktop, managed application installs, and several other major features that the enterprise and private user alike have now literally grown up on.

Some might argue that Windows XP was a hefty revision that almost qualifies, but I would say not so much.  Improvements abounded, but the core user experience hasn’t changed by more than revision increments in Windows 98, ME, 2000, XP, 2003, 2008, 7… really…  since Windows 95. 

But, with Windows 8, this changes.  Windows 8 brings us a whole new user experience in the “Modern UI” formerly known as “Metro UI”. 

If you recall, Windows 95 still essentially lived on top of DOS, and had enough of the Windows 3.x framework to run all the apps we’d already come to depend on (like Word 6, Excel 5, and Windows AOL 2.5).  While those programs ran in Chicago, there were compatibility issues, and the user interface really started to look crusty on legacy applications.  I was actually a relatively late adopter, waiting until Windows 98 before I finally succumbed to the dark side. (I had discovered IBM OS/2 Warp and become a fan… it actually took a 1-2 punch to Warp to get me to switch.  1:  When Warp was stable, it was unbeatable, but when it crashed it was unrecoverable, (and crash, it inevitably did).  2:   Command & Conquer / Red Alert, which had an improved video mode that was only available when installed in Windows… and it was even more awesome in that improved resolution mode. )

Just like Windows 95, Windows 8 is a transitional OS.

One of the big things I keep hearing about Windows 8 is… what a P.I.T.A. is is to figure out. “Microsoft is taking a huge risk with this… why are they breaking my Windows?”, I hear.  Or…  “I’m open-minded.  I subjected myself to it until the pain became unbearable.  (I can’t wait until Mac OS X takes over.)”

Transition, though?  Yes.  Transition.  Again, this is the first real full version increment of the Windows user experience that we’ve seen in years, and it all comes down to this Modern UI thing.  It does exactly what Windows 95 did to Windows 3.x on DOS.  It wipes the slate clean and re-imagines how we operate our computers from the ground up using modern human interface devices… (HIDs). 

Touch screen, movement, gestures, enhanced 3D graphics… these are things that started to accelerate development not long after the release of 95, but the world was still on the Windows 95 learning curve.  Hardware was too immature & expensive to develop an OS around them then… So, while you were getting comfortable with your desktop, (if you haven’t noticed) your cell phone’s user experience surpassed your desktop.

So on the surface (no pun intended) this is what Windows 8 is…  it’s a full OS-deep refresh that catches home computing back up to what people have gotten used to in their cellphones.

“Common sense” says this all implies a true P.I.T.A. for people and companies that dig in on it. 

Let’s look a little deeper, though, at what else this represents.  Again, this is a transitional OS.  It does everything the old user experience did… if you dig a bit.  It does this to support the old applications with their freshly encrusted-feeling user experience.  People can continue leveraging your old technology investments.  Indeed, you can continue making investments in the old user experience…  just know that the writing’s on the wall. 

It’s only a matter of time before people do what they inevitably did with Daytona/Chicago… adopt, extend, and embrace, or be extinguished.  

Why?  Because… when it comes down to it, the part that people really hate is not the “user experience” part.   It’s the “NEW” part that hurts.  Once the “NEW” wears off, what you’ve got left is a really genuinely cleaner, better, more efficient UI that leverages new hardware in important ways, and puts it years ahead of desktop OS competition, both in terms of capability, and even in terms of price point…  and pushes that same advantage out seamlessly to a myriad of other devices.  So getting past the sharp learning curve on one device means you’ll be rocking the new UI everywhere in no time.

Like the glory days of the Dot-Com boom, the days of Daytona & Chicago, these will be days of learning and technical renovation, even re-invention.  This is what I see coming with Windows 8 in the desktop, with an added benefit of being even more ubiquitous than it was back in the 90’s.  With the coming of Surface, Windows Phone 8, your apps will have more opportunity to run in more places, on more machines, than ever before…. using more “Star Trek” functionality than we’re yet used to. 

Those looking to remodel that kitchen… here’s your wake up call.  Windows 8’s user experience is representative of what made the Dot Com days so great… (and there were some plus sides.)  It was when leveraging any of the revolutionary new technology became a competitive advantage all by itself.  Early adopters will feel the pinch of the initial investment, but… with some planning, will reap the rewards by having that pain behind them by the time Windows 9 rolls around. 

I, for one, look forward to my new OS overlord.