Thursday, December 18, 2014

Getting Display Names from User Names in a hostile SharePoint environment

I recently ran into a nasty situation where I needed a reliable way to get a list of user Full Names (or Display Names) from a list of usernames in a SharePoint process.

The short answer was easy...  The code runs server side so...

SPUser theUser = web.EnsureUser(username);
string DisplayName = theUser.Name;

//Right?

Well, under normal circumstances, sure.  

In this circumstance, I was checking a list of lists of user names, a condition where I might need to check hundreds of items, each of which could have a list of users to check.

No biggie, just add a lookup table and cache the results over multiple calls so that I only ever have to look a user up once in my process.

Now here's the real kicker.  In my target environment, EnsureUser comes back instantly if the username is a valid, active user in Active Directory.  If the user is not a valid user?   The command takes over 40 seconds per call to fail!

My solution was two-fold.  

1)  use the aforementioned cache strategy, which I have in my sample code below as _nameMap.
2)  Use a simple worker thread.  Give it two seconds to succeed.  Kill the thread if it takes longer than that for any reason.

I initially made the mistake of using SPContext.Current.Web in the thread, but that can *sometimes* produce a threading violation.   The code below creates a whole new instance of SPSite/SPWeb on every pass, but that's a lot safer and better performing than a lot of alternatives.


private Dictionary<string, string> _nameMap = new Dictionary<string, string>();  
        
private string GetUsersWithTempCacheAndTimeoutEnforcement(string rawUsers)
{
    string result = string.Empty;
    SPContext.Current.Web.AllowUnsafeUpdates = true;
    foreach (string aUser in rawUsers.Split(';'))
    {
        try
        {
            string addUser = string.Empty;
            string checkUser = aUser.Split('#')[1];
            if (checkUser.Contains("\\"))
            {
                lock (_nameMap)
                {
                    if (_nameMap.ContainsKey(checkUser))
                    {
                        addUser = _nameMap[checkUser] + "; ";
                    }
                    else
                    {
                        SPUser userResult = null;
                        SPContext context = SPContext.Current;
                        string webUrl = context.Web.Url;

                        System.Threading.ThreadStart st = new System.Threading.ThreadStart(
                            () =>
                            {
                                try
                                {
                                    using (SPSite site = new SPSite(webUrl))
                                    {
                                        using (SPWeb web = site.OpenWeb())
                                        {
                                            userResult = web.EnsureUser(checkUser);
                                        }
                                    }
                                }
                                catch (Exception)
                                { }
                            });
                        System.Threading.Thread workThread = new System.Threading.Thread(st);
                        workThread.Start();
                        workThread.Join(2000);
                        if (workThread.IsAlive)
                        {
                            workThread.Abort();

                        }
                        if (userResult == null)
                        {
                            _nameMap[checkUser] = checkUser;
                            addUser = checkUser + "; ";
                        }
                        else
                        {
                            _nameMap[checkUser] = userResult.Name;
                            addUser = userResult.Name + "; ";
                        }
                    }
                }
            }
            result += addUser;
        }
        catch (IndexOutOfRangeException)
        {
        }
        catch (Exception ex)
        {
        }
    }
    return result;
}

Friday, October 24, 2014

Looking into Continuous Delivery / Lean Enterprise


After a conversation with my boss I just downloaded Continuous Delivery to my Kindle reader (Windows 8 / Windows Phone app). 

On first brush, I can see it’s akin to the next phase of a process I'm somewhat familiar with.  I've referred to it as Software Factory in the past, and even have a label for it in this blog.  I designed and delivered a "Software Factory" solution around some of these concepts at one of the few product based companies I worked at in my career…  

"Software Factory" took Continuous Integration (CI) up a  few notches by automating not just builds, but code generation, deployment packaging, and then an early stab at what might now be called a private cloud, where we automated spinning up an instance of target test systems, deployed the fresh baked product, ran smoke tests, and (if smoke tests looked good) notified the folks in QA for more complete testing of a solid candidate.   


I’ve been a fan of Domain Specific Language (DSL) for the purpose of custom build & automation ever since. 

For that company our solution was an on-premises deployment, so it was still a matter of convincing customers to deploy the updates…  but our automation produced both full install kits as well as patches that would upgrade a running system from a known build to a target build.    

That company was preparing to take the product into the SaaS model which was very new at the time, and this would have been a part of that, as well.   

I've worked with TFS to integrate smoke testing and build automation, as well.  That could easily extend to this sort of thing. 

That company suffered from lack of customers, unfortunately, but it was a process I’ve been looking forward to getting back to, and expected we’d get back to in the consulting world some day.    It's interesting that Software Factory (as Continuous Delivery) is working it's way back to top of mind relevance through the cloud...  I'm looking forward to reading what the authors of this book have to say about it.

Wednesday, October 15, 2014

An Alternative Profile, in C#

The folks at BlueMetal keep profiles of each team member on the web site.  They asked all of the recently added teammates to draft up a profile. The hard part for me was that it felt like I needed to model and express myself in terms of... C#, of course.  :)   I wrote this with enough supporting scaffolding to get it to compile...

using System;
using System.Threading;
using System.Threading.Tasks;
using BlueMetal;
using Microsoft;
using Database.SQL;
using Web;
using Mobile;
using Services;
using Cloud;
using Experience;
namespace Profile
{
   public class Jim_Wilcox : SeniorApplicationDeveloper
   {
     private Jim_Wilcox()
       : base()
     {
       Blog = "http://granitestatehacker.kataire.com";
       CommunityLeader =
         Community.NH_SharePoint_UsersGroup |
         Community.NH_WindowsPlatformApplicationDevelopers_UsersGroup;
       EventCoOrganizer = Community.SharePointSaturday_NH;
       YearsOfExperience = Qualifications.Decades;
       Vision = Qualifications.EnterpriseLevel;
       LearningMode =
           Qualifications.Continuous | Qualifications.EarlyBinding;
       Skills =
           Skill.NET | Skill.MVC | Skill.SharePoint | Skill.TFS |
           Skill.Azure | Skill.SQL | Skill.Many_More;
       Industries =
           new System.Collections.Generic.List<Industry>() {
             Industry.Military, Industry.Telecommunications ,
             Industry.Retail, Industry.Financial ,
             Industry.Healthcare, Industry.Hospitality ,
             Industry.Concierge, Industry.Construction ,
             Industry.Many_More};
     }
     public static async Task EngageAsync(StatementOfWork context)
     {
       await BlueMetal.Project.Execute(context).UsingDeveloper(Individual);
     }

     public static Jim_Wilcox Individual{ get { _unique = _unique ?? new Jim_Wilcox(); return _unique; } }
     }
}

Friday, October 10, 2014

Winds of Change

If you hadn't heard yet, Jornata merged with BlueMetal.  As part of the merger, BlueMetal organized a session of "BlueMetal Academy" to help transition the team.  In spirit of a true merger, Jornata members participated as trainers, as well, showing that Jornata's culture is really being assimilated, not purged.  (The merger is a solid marriage, rather than simple annexing of resources, both sides bring common values but distinct strength to the partnership). 

At the end of the training, we were asked to come up with one word to reflect what we'd learned over the course of it.  Just one...  on a moment's notice.  Responses were things like "Integrity", "Consistency", "Connection", "Inspiration", "Committed", "Legit" and a few other words of similarly positive connotation.

I had the advantage of being among the last in line to respond, so I considered each of them as they were spoken.   In my head, I responded to each word as it was spoken.  "Yes", "True", "Good one"... those all fit.  "What says all of that?", I thought.  Digging deep, I could only think of one word that conveyed all those qualities... everything we learned.  there's only one word that says it all, and I didn't say it to play Captain Obvious...  "BlueMetal"  

Ok...  the cool-aid is either totally Stepford, or totally legit.

Given my experience with BlueMetal teammates in both the SharePoint AND Windows Phone Dev communities, before I ever had the opportunity to join... it's not Stepford.

That said, I think the expected answer was "Mahan", as in Mahan Khalsa, author of "Helping Clients Succeed" which plays an over-arching theme across the company.  Someone may have even said that, but I didn't catch it. I still like my original answer.

This past spring I joined Jornata, mostly to shake up my career.  Jornata was/is a fantastic team to be a part of in its own right.  My prior experience with them in the SharePoint community was also first rate. 

I might have pursued a job at BlueMetal years ago on my own were it not for the daunting commute.

The winds of change clearly had more in store.

Now, I find myself thinking that BlueMetal really looks like the company I always had in mind to work for when I was teaching myself programming as a kid.. and I mean everything..  from its respected thought leaders to its community involvement to its extremely purposeful corporate structure...  being employee-owned...  I realize this team is top to bottom, front to back, enterprise ready, industrial strength, yet premium consumer quality... and they have my back. It will be my honor to have this team's back.

I'm very much looking forward to settling into the new team, and really looking forward to digging in on a nice juicy app development project.  Duty to the customer has pulled me quite a bit toward infrastructure build outs... Being successful at those things has had the curse of being asked to do more of it. The further away from C# I get, the further I am from my true passion & real value add, and that doesn't really cut it for me or my team, longer term.

so...  the commute sucks... but if that's all I can think of to "complain" about...  I guess that's what it takes to be "The Granite State Hacker", for keeps.  (I'll secretly blame NH politicians for making it so hard to find a sufficiently legit tech offices in NH, and work at home every chance I get.)

This marks a new chapter for my career, without a doubt, and I'm sure I'll be inspired to blog deeper than what had become all too common Microsoft cheerleading posts.  (Now I can be a BlueMetal cheerleader, too!   ok...  I'll try to refrain from geeking out about my team too much.) 

Thursday, October 9, 2014

Granite State 2014 Q4 Events - SharePoint Saturday New Hampshire, and the Users Groups

SharePoint Saturday New Hampshire 2014
Better late than never.   SharePoint Saturday New Hampshire 2014 is happening just over a week from now at the Radisson Nashua Hotel in Nashua, NH on October 18th.   (We traditionally have held this event in mid September, so we're essentially a month late.)

The SharePoint Saturday New Hampshire theme for 2014 is

"Cloud First" means SharePoint developments don't wait for major releases.

It's very true, with developments implemented in SharePoint Online, including Delve and social graphing, there's lots to talk about.  Incremental changes they may be, but increments happen at a more rapid pace than they did in the Pre-SharePoint Online world, and of course that has implications for SharePoint on-prem, on premise.

http://www.spsevents.org/city/nh/2014


Granite State NH SharePoint Users Group
Regarding the NH SharePoint Users Group, our schedule remains on the 1st Thursday of the month thru the end of the year with the December meeting being held at the Microsoft Store in Salem.  Our speakers and topics remain to be determined.

#NHWPUG is dead.... long live #NHWPAD!
The Granite State Windows Phone Users Group is in the midst of some bit of reorganization.   We had long discussed the idea of broadening the focus of the group to include Universal platform app development, and the topic got some hot debate when 8.1 was announced.   With the announcement of Windows Threshold as the unified version of Windows that will run on all hardware form factors (pc's, laptops, tablets, phones, and even Xbox consoles) it's become clear that we need to redefine our group and refocus it.  

With this post, I'll announce that the group will be called the "Granite State (NH) Windows Platform Application Developers".  I'll begin re-branding the existing LinkedIn, Facebook, Eventbrite and Meetup sites, and the community app.  We'll continue to support Windows Phone 8 app developers, but our focus will move to supporting community evangelism of developers in the Windows App Store space. 

I want to thank the my new teammates at BlueMetal for putting up with my agonizing over this change somewhat openly within the team's internal discussion, and for their support.   I'm not worthy, but I can't help but think it's a huge win for the Granite State SPUG and WPAD groups, and the greater New England technology community.

Our next meeting will be in November, but we'll get that announced soon.

Regarding the SPSNH schedule change.... To make a long story short SharePoint Conference 2014 pushed off SharePoint TechCon SF, which then push SPTechCon Boston right into SharePoint Saturday New Hampshire's traditional 3rd Saturday of September space.  Our choices were to have SPSNH before or after SPTechCon, and going after seemed reasonable.

Sunday, September 21, 2014

Candy Crush Saga Would Fail on Windows Phone

Several sites including pocketgamer.fr and WMPowerUser are reporting that King has decided to not bring it's popular Candy Crush Saga game to the Windows Phone ecosystem.  (It's "on hold indefinitely".)  I suspect Disney and Mojang have much more to do with this than Windows Phone's market share.

Most sites reporting King's changed stance cite poor growth of the Windows Phone ecosystem as the reason for putting Candy Crush for Windows Phone on hold.  I don't believe them.

The news, of late, ironically, has been loudly about two things.  1)  after a lull while Nokia was absorbed by Microsoft, Windows Phone has significantly improved its market share in the past quarter or so.  2)  Microsoft bought Mojang.

The more likely reason:  (and I would love for King to prove me wrong, but...) I'm reasonably certain that if King released Candy Crush Saga for Windows Phone right now, it would fail... and I bet they know that.

I speculate that King has been holding their Candy Crush Saga app hostage from the Windows Phone ecosystem for some time, possibly hoping Microsoft would buy King in... a Mojang/Minecraft-like multi-billion dollar play. 

Clearly, Microsoft buying Mojang was a smart choice, since Minecraft has almost become a gaming platform of its own. There is a Minecraft community and ecosystem with many vendors producing products and supporting it for their own continued success.  I suspect that for those vendors, Microsoft buying Mojang will multiply Minecraft's ecosystem success;  the ecosystem will be more broadly and more consistently available to more players.

King, on the other hand, is a one-hit wonder who's core titles are fading as all titles do.

Candy Crush Saga's fading brand isn't the reason the title would fail on Windows Phone, however.  

The reason Candy Crush Saga would fail on Windows Phone is because Windows Phone has developed its own ecosystem, and King's niche in that ecosystem has been filled by an even bigger fish...  namely Disney. 

Yes, Candy Crush Saga would have to compete with the likes of titles such as Frozen Free Fall and Maleficent Free Fall, which are both magnificent implementations of switch/match games that even I have burned some measurable amounts of time and real cash in.

To me, the message is clear.  King has made its bed. How embarrassing would it be for King to release it's flagship titles to Windows Phone only to be shrugged off by the Windows Phone app market for the effort?  Especially after trying to leverage its brand to strong-arm Windows Phone.  Frankly, a failure like that could put King's position in the iPhone and Android ecosystems at risk... which would bring potential value down in the eyes of, say, Apple or Google.

I suspect there are other app publishers facing similar choices.  Perhaps they have likewise made their beds. I believe the Windows Unified platform is the platform that successful iPhone and Android publishers can't afford to fail on.  Such publishers have two choices 1) get in before a competitor fills their niche, (and succeed), or 2) watch and miss out while realizing in ever more clear hindsight over next decade that Windows Unified was the opportunity they wish they hadn't written off.

[Edit:  1/8/2015 - So King has published Candy Crush Saga to Windows Phone 8, now, and I'm very pleased to see it... it's one less reason for folks to avoid the Windows Phone platform deciding to make the switch or not.   Will the Windows Phone edition be successful?   By many measures of an app on a platform, it already is.   Will it be the success it was on other platforms in reasonable comparison?   That remains to be seen, and I still think my analysis is correct, but I think that King still held out for Microsoft to offer up some form of subsidy...  I notice that Microsoft has been shelling out for ads for Minecraft, and in those same ad spaces are lots of ads for Candy Crush, as well.]

Thursday, September 11, 2014

Trading iPhone for Windows Phone - What You Give Up

As Jornata continues to integrate with BlueMetal, lots of things internally are coming together.  One of the things I'm loving is the internal dialog with the team that I'm now a part of at BlueMetal.  Our "geek chat" messaging reminds me of the best dialogs I'd been a part of at other companies, except amped. This isn't coming from just any technology architect. These folks are well-known technology thought leaders, evangelists, and MVP's. With sincere respect, I'll try to avoid getting myself in trouble with them and BlueMetal, but I'm feeling a bit like a kid in a candy store.

Being the C#/mobile (and therefore Windows Phone) junkie that I am, I always watch what's going on in the space. 

While the Windows Phone market share at BlueMetal is significantly higher than the general population, BlueMetal's not just some extension of Microsoft.  There's a lot of the team internally that are Apple and Android fans.   Naturally, when the news of Apple Watch broke, the conversation really picked up, and it was all fantastic stuff to consider.

One bit that came up that I wanted to write this post about, however, was a number of misconceptions that Apple fans had about Apple vs. "not Apple" in the smartphone area.  I can't resist. There are good reasons to not consider Windows Phone, but some are just misunderstandings.

Here was a viewpoint:
-------------
The things I would be giving up by switching [from iPhone] to Android or Windows Phone:
  1. iMessage 
  2. Photostream
  3. Find My iPhone
  4. My apps - the ones which I’ve already bought and the free ones which all work so well.  Windows phone doesn’t have the volume of Apps and Android doesn’t have the stability and polish
  5. iCloud backup
  6. iTunes - songs  I purchase are automatically downloaded to other iPhones and Macs
  7. Apple Watch
-------------
 
The response was quick and, interestingly slanted in defense of Windows Phone... here's a synopsis, including my own viewpoint:
  1. iMessage is platform specific, locking out non Apple users.   Consider Skype, Lync, or even Facebook Messenger instead.
  2. Photostream - Windows Phone has this functionality built into the OS, uploading photos to OneDrive.  (and OneDrive has working multi-factor authentication, so you won't have to worry so much about selfies unexpectedly going viral.
  3. Find my Phone - yes, built into the Windows Phone OS... just a check box, and yes, it's saved several of my family members more than once.
  4. Apps -  I have to admit, there's no recovery for the investment made on iPhone/iPad apps, but there is this saving grace...  with Windows Unified apps, the app purchases you make on phone apps often entitle you to the same app for tablet and PC as well.   The marketplace is improving daily, so the general marketplace app gap is narrowing.  The Windows Phone app marketplace has better technical governance than Android's, but not as mature as Apple's, yet.
  5. iCloud backup - Windows Phone has OneDrive backups with much easier access to the content.
  6. iTunes - consider Xbox Music. With a low priced subscription, you can stream music to your phone, PC, tablet, and Xbox, and if you purchase or rip music, it makes it available thru the cloud to ask your devices... No need to sync your phone with a PC. Content just shows up.
  7.  Apple Watch?   Hard to say on this one... but I consciously traded my watch for a good smartphone long before iPhone came out.
Still others piped up and noted how well integrated Windows 8 & Windows Phone 8 (and I would add Xbox)...  All of them work independently, but put them together, and you have a ton of really great ways to do things like manage your home network, participate in entertainment, and even keep your kids safe while browsing the 'net.
 
In my opinion, Apple serves a few purposes...  they change folks' minds about what technology is socially acceptable.  The industry needs them for their competition and for their tech fashion sense.
 
It seems clear to me that the net result is that by trading in an iPhone for Windows Phone, you give up some investment in Apple, but you gain quite a bit of functionality and security for doing so, especially if you're also a Windows and/or Xbox user already.

Wednesday, August 27, 2014

#RandomAppOfKindness #PayItForward #WPDev Challenge

Yesterday, I happened to be at the Panera Bread café down the road with my family.  We took a table next to a sign that boasted an iPhone / iPad app for the company.   Out of curiosity, I checked to see if there was a Windows Phone app...  the search in the app store turned up four apps, none of which had much to do with Panera Bread.  

On a hunch, I redirected my phone's web browser to appstudio.windowsphone.com, and drafted a new project... a wrapper for Panera's mobile site.   In minutes, I had used my phone to generate and sideload a brand new app.  I realized I could publish the app with only a few tweaks, and from the time I sat down to eat to the time this new Panera Bread app was certified & available for download only about two hours had passed.

I've decided to issue a challenge to the Granite State (NH) Windows Phone Users Group (and anyone else who wants to join in) to a "Pay it forward" style friendly 'competition'.  

Whenever you see an app marketed for platforms other than Windows Phone, see if you can't whip up a respectful/respectable presentation of an app that provides some approximation of the functionality advertised... for the Windows Phone platform... and publish it as a free app with no advertising or in-app purchases.  It should be a "gift" of sorts in honor of the subject.

Then feel free to let the folks who might be interested that they are subject to our #RandomAppOfKindness pay-it-forward activity. 

If the subject of your app complains of copyright issues, you may be required by copyright holders to remove the app...  and you should comply.  After all, this app was created and published out of good will.

Here's my first #RandomAppOfKindness...
http://www.windowsphone.com/en-us/store/app/panera-bread/2b1e2cd1-a440-4657-910d-a0eec15ecc5e

I'd love to turn this into a real competition... Perhaps in the future we'll discuss crating a list of #RandomAppOfKindness apps and set a finish date to see who's published the most qualified apps... but I don't have a budget for that (as of yet)  :)

Have fun!

Addendum:
Three new #RandomAppOfKindness entries since the Panera Bread app:

Saturday, August 23, 2014

Doctor Who Video Hgihlights Privacy Policy

In order for my son to publish his "Doctor Who Video Highlights" app for Windows 8.1 and Windows Phone 8.1, he needs a published privacy policy.

The privacy policy is simply this:
The app itself makes no attempt to send any information back to the publisher.  The only privacy policy that applies otherwise would be Microsoft's Privacy Policy.

Tuesday, May 20, 2014

Thoughts on the Surface Pro 3: One Device To Rule Them All

I never got in on the GPS craze... or pagers...  or the portable media player craze...  or the netbook thing...  or the ebook readers...  or even the tablet thing.  My first cell phone was the only non-smartphone I ever suffered.

As a technologist, I saw the serious value in combining devices... to the point where I decided that I would only ever carry one electronic device... a sufficiently powered, hand held computer for which I would have development tools.  My current oversized smartphone even suffices as a tablet, reader, and semi-connected third display for my PC.  

I now carry all of those individual fad items (and far more) as one unit.  Watches, GPS's, pagers, portable media players, ebook readers... all fully redundant to the power of my contemporary smartphone... and I can (and do) write apps for it.   I will never waste resources buying smart watches or smart glasses... my smartphone offers just the right amount of accessibility and utility without needing yet more.

I have a similar relationship with my computer.  I have long struggled to find value in a game console.  Sure, there's a nice Xbox One in my home now, but I definitely don't log any significant time on it;  it really more or less belongs to my kids.  I have a PC...  The one and only thing it lacks for function is the ability to fold it up and take it with me... which is what I have a smartphone for.  (Yes, work provides me with a laptop, so as the some-time code warrior, I have a laptop that suffices as a desktop... but it's definitely no tablet.)

I don't feel I need the best in every technology, but a few things are very important to me in a PC.  I've long said I need visual bandwidth...  multiple displays are a must, and not just any.  The displays must have at least 1200 lines of height resolution... width only depends on aspect ration from there, and 4x3 and 16x9 describe the pair I have on my desk as I write this.   Touch would be nice for this, but I don't have touch now...  I can survive without it.  As a software developer, having a display dedicated to my development tools and another dedicated to alternate info (communications, email, technical documentation, work queues, server desktops, or debug UIs) is a must.  The more I can see on the surface of a monitor, the less time I have to waste hunting for the window that has the info I need in it...  my PC is a content creation station.  I can still take advantage of my oversized smartphone to offload communications (email, video/teleconf/chat, music playlists, etc)  I could easily make use of more displays...  I just don't physically have room for more on my desk.

My PC is more than just a PC... it's a workstation.  A laptop won't even suffice for it...  whenever I am reduced to working on my laptop alone, I feel constricted... like being forced to do detail level work while wearing a diver's mask and welders gloves.  Work goes much better when I connect a full size keyboard, mouse and displays to the laptop in one form or another.

Of course, my workstation being my own actual personal computer, I also like to play games on it, and so it's yet more than just a workstation... it's also a game console.

Needless to say, it's the things that a tablet can't do that make a normal tablet superfluous to me.  Most importantly, I can't fully replace my workstation/gamer console/PC with it...  If I can't do that, it's just another display that doesn't fit on my desk... and I already have a phablet that satisfies my  portable computing needs.... anything more than that would only leave me wanting to just take my workstation with me everywhere.

When I go into Best Buy, or Staples or shop on Dell, I'm asking for a device that bridges the gap between the portability of a tablet, the creation-centricity of a workstation, and the gamer power of a console.  Worse, I get way more bang for the buck out of a desktop system than anything that even claims to be mobile, so replacing it with a mobile system that has close to the performance will be pricey. 

With the release of the Surface Pro 3, it's very clear that Microsoft is hearing me, and fighting hard to do something about it.   I'm not sure it fully balances cost with my requirements, yet, but the Surface Pro 2 was tempting...   The 3 may get me to bite.   The ability to convert a tablet into a workstation and/or gamer console is definitely on track, plus it has some nice features that make it a better tablet than an iPad.  To match my current set of requirements, I would have to go with at least a mid-range (i5) unit.  The docking station would be a must.  If I kept my current non-touch, 2k display, using the tablet's 2k display as well, it could finally be the tablet to bite on.  If I could find a good 4k touch enabled display for a reasonable price, that may be the clincher.

Is Surface Pro 3 a breakthrough product for you, or are you already rocking a more complete range of hardware?


Tuesday, March 25, 2014

SharePoint 2013 Distributed Cache error "cachehostinfo is null"

Doing a fresh SharePoint 2013 SP1 deployment, I ran into a couple things I want to remember.

1)  SharePoint 2013 RTM won't install on Windows Server 2012 R2.  You must install using SharePoint 2013 WITH SP1.

2)  Somehow after configuring things, the distributed cache service wouldn't run on one of the hosts.  The error was "cachehostinfo is null".   Advice I got was to remove the service instance and re-add it, but even trying to run "Remove-SPDistributedCacheServiceInstance" came back with that.  The following powershell script allows you to remove the service instance on the machine you're on, which then frees you up to run add-spdistributedcacheserviceinstance.

Originally from StackExchange:
http://sharepoint.stackexchange.com/questions/58326/sharepoint-2013-distributed-cache-cachehostinfo-is-null-with-remove-spdistrib

$SPFarm = Get-SPFarm
$cacheClusterName = "SPDistributedCacheCluster_" + $SPFarm.Id.ToString() 
$cacheClusterManager = [Microsoft.SharePoint.DistributedCaching.Utilities.SPDistributedCacheClusterInfoManager]::Local 
$cacheClusterInfo = $cacheClusterManager.GetSPDistributedCacheClusterInfo($cacheClusterName); 
$instanceName ="SPDistributedCacheService Name=AppFabricCachingService"
$serviceInstance = Get-SPServiceInstance | ? {($_.Service.Tostring()) -eq $instanceName -and ($_.Server.Name) -eq $env:computername}  
$serviceInstance.Delete()   #You may have to issue the Delete command a couple of times.

Saturday, February 15, 2014

Net Neutrality and the Return of AOL

For cable TV customers, there's something oddly familiar about the idea of channel providers.  Trading off television channels by switching cable TV providers has long been commonplace in regions where there's more than one cable TV provider, and long been the envy of those who don't live in such regions.  If Time-Warner wants to cut off CBS over contract issues, and you live in a place where you only have Time-Warner, you don't get your NCIS fix.

Flashback to a couple decades ago...  America Online, GEnie, and CompuServe WERE the "Internet".  If you wanted IN on the "online craze" you had to go to one or more of these companies and buy your seat at their table.  Companies didn't advertise their web URLs.  They advertised their AOL keywords.  CompuServe had great educational content providers, but AOL was king of chat at a time when chat was king.  Most companies flocked to AOL as a result, and so AOL wasn't just an ISP, it was THE digital content channel provider.

The channel model died with the rise in popularity of the Internet.   Suddenly, all you needed to connect content to customers was the same thing that everyone needed.  A connection.  Thanks to a convention called "Net Neutrality", the channel model built by services such as AOL & CompuServe were walls that were knocked down.  Your connection was every "channel", simultaneously, all the time, with no bundling.  As a business, wanting to publish and contribute your content as a channel, you had only to invest in your own connection, and a little technical infrastructure, and you were in.

Facebook has taken serious shots at bringing the channel model back.  If you want to play certain online games or see some online content, you must join Facebook... and content/gaming providers who want to participate in that must come to agreements with Facebook, of course. 

Yet, with the breakdown of Net Neutrality, the pendulum is swinging solidly back to the channel provider model.  Your ISP now has the right to decide what traffic they carry over their networks and/or throttle performance from different content significantly...  if they want to cut back on Netflix... they can.  If they want to nix Google services, whatever.

Clearly this happened almost instantly with recent judicial rulings...  The jinni is already out of the bottle.  Verizon has decided to effectively drop the "Netflix channel" by cutting Netflix' bandwidth down to reportedly unusable levels.  This means if you're on Verizon and were using Netflix, you either have to find a new video streaming service, or you have to find a new channel service provider. 

How long will it be before this impacts every Internet service provider (and even cellular network providers, since VOIP services are reducing them to ISPs as well)?  

Here's some fictitious quotes from a not so hard to see future (roughly within the next decade):

  • "I left Verizon for Time-Warner because Verizon charges too much for the Office 365 and Facebook channels.  Comcast is tempting, though, because they have Google Hangouts and enhanced YouTube in their HD package." 
  • "I wish Verizon had the same educational channels as T-Mobile or Sprint, though, cause my kids could use that for school."  
  • "Thankfully my channel provider and my folks across the country both have enhanced Skype.  I can't Skype my sister at all, though."
  • "I had to switch banks when I switched carriers.  AT&T hasn't come to an agreement with my old bank, so I couldn't use their online services."
  • "Amazon's gone bust since they failed to become a viable channel provider, and every other channel provider decided to compete against them."
  • "Google is the new AOL.  Most folks can't even get online except thru Google Fiber. Your business does not have an online presence unless it's thru them.  It's too bad your competitors already have exclusive agreements with them."

ISPs love this, because as cable TV providers will tell you, there's a lot of pricing power in being a channel provider, but not so much is being a connection provider. 

Businesses will struggle with this, however, because getting your website on the Internet will become a much more complicated proposition.  Sure, you'll be able to get online the same, but your content won't be carried the same.   Essentially, small business content will be at the whim of "local access channels" provided by each channel provider.  They'll all have their own rules and regulations, and even more importantly, their own fees.  Is your audience growing?  You'll have to hammer out deals with each channel provider to make sure your content gets to all your customers.

Further, how long will it be before we start having a resurgence in custom network interface hardware to the point of ending Wi-Fi and Ethernet as we know it?  We've already seen netbooks and tablets that have wireless Internet service tied to specific cellular carriers.  I'd be willing to bet that as channel providers gain hold and start to flex their newfound muscles, a breakdown in connectivity standards will take hold.


Thursday, February 6, 2014

Jimmy Sudoku 5, Orange Edition


Please don't think of it as a hundred dollar app.  Think of it as a free app with the option to support an important cause.

Sometimes when things get "comfortable", it becomes necessary to shake things up.

Such is the case with my hobby/charity project, Jimmy Sudoku.  

Previously, Jimmy Sudoku had two listings in the Windows Phone app marketplace... one as a free international listing, and once as a paid, US-only listing.  Both were the same exact binaries.

I've deprecated the paid US listing, and, in its place set up the single remaining international listing as free trial with the option to buy.  

Expecting to raise more awareness for the cause than direct proceeds, I've set the price to... something that will raise eyebrows.   This will take effect as soon as the WP App Marketplace approves the change.

There is no functional difference between the free trial and the paid mode... the app does not even check to see if you bought it, at this point.

Again, 100% of the proceeds from Jimmy Sudoku 5 purchases will continue to go to #NoKidHungry...  again, the app itself is free.  If you choose to pay what I'm asking, the proceeds will be donated. 

If you decide to go directly to the charity and donate to them, I've still accomplished what I'm hoping to do with the app.

http://www.windowsphone.com/en-us/store/app/jimmy-sudoku-5/92251d32-ad5f-44e6-8f5c-43e834c5c28c

What's Hiding Behind "Low Resolution" Metrics?

100 data points
I'm a software application developer, but I get this.  Metrics are the photographs of business. 

While I'm at it, here's another classic cliché for ya...  "A picture's worth a thousand words." 

What if your picture has been reduced to a small number of data points? 

You get something like the image on the left...  there's actually 100 data points in that image:  the resolution has been reduce to a very small number of pixels, each expressed as a block of color.  (The image it was originally reduced from is about 40,000 data points.)  

Anyway, this is what metrics are to a business... data points that, when taken collectively, become the model or picture of the state of the company.

Standard GAAP accounting is supposed to provide a meaningful definition of metrics for any company, of any size, and for some purposes this may be sufficient.

Problems generally come in with the specialization of a company... the metrics it measures its own processes and performance by. 

Too many metrics, and it can't all be taken in... like getting a close up of the whisker I missed when I shaved.  (From the "be careful of what you wish for" department.)  Thankfully that doesn't happen very often;  it's hard to imagine justifying the expense of that kind of metric "resolution". 

It's far more likely there are too few metrics. 

Imagine what it would look like if we reduced the resolution of the picture further... say to one data point.

Imagine, for example, if you only considered the price of a share of common stock in trying to get an idea of how well a company is performing.   Indeed, that's definitely a "single pixel" view, and it really won't tell you anything about the stock or the company attached to it.

Now take this, again, to internal processes.  Let's imagine a bank that measures its loan officers only by their average ROI on loans. 

Ok... so that's a silly extreme, but let's just run with it for a moment...

Imagine trying to provide a bonus-impacting performance review of a loan officer when the only metric you had was the ROI on their loans. The average interest rate of the loan may be a valuable metric, but only when taken with other metrics. 

It won't be long before all the loan officers are writing a few extremely short term loans for a penny at hundreds to thousands of percent interest.  Hey, for $99.99, ROI on the penny just netted someone another $10k in bonuses, right?  Again, a goofy extreme example, but you get the point.

This is a problem that's plagued more than just a few business units... more than a few businesses, corporations, conglomerates.  Really, it's impacted more than just a region, and even the nation.  Poor metrics beget poor metrics. In the global economy, poor metrics, taken collectively, have hidden a great number of sins that contributed significantly to the global downturn referred to as "The Great Recession".   (Who wants to know where they're going when they don't like the answer, I guess, huh?)

No one, from your boss, to world governing bodies, can point the ship in the right direction without a clear picture of where we're at.



Friday, January 31, 2014

Publishing Content Separately from Presentation

Separating content from presentation is a very old "Best Practice"™. 

Publishing using web technology is not new anymore, either, but mobile puts a newish urgency in that best practice.  I'm seeing ignorance of the old best practice bite some in a potentially surprising way as the age of mobile apps become the preferred way to consume content.

Here's what I mean by publishing separate content and presentation... 

Take for example a menu from a restaurant.  I'm finding in many cases, restaurants have web sites that publish their menu.  Their menu items are content, and the web site presents it in a pleasant manner.  In many cases, the presentation and the content are published just in that web page.  (The menu items are "hard coded" as HTML into the page.)

If the restaurant's menu items are "hard coded" into the page presentation, it's very hard for anyone to re-use that information in any other presentation.  It's not impossible.  It can be "scraped", and some tools do a decent job of it.  It's just not easy enough. 

The more technically correct path is to publish the content as a web service, and then publish the web site.  The web presentation layer should consume content it gets from the service. 

Why does this matter?

There's lots of functionality that can be provided by a content service.  Users can consume portions of the content by filtering it, sorting it, or classifying it.

To expand on that, I'll pick on Microsoft's Windows Phone AppStudio a bit, since they're the star in my circles right now.  Microsoft's AppStudio is one of many ways to create apps for mobile devices.  (In this case, for Windows Phones, but that's beside the point.)  AppStudio's niche is making it easy for people to pull in content from various sources and present it in their own Windows Phone app.  LOTS of people are building apps for just about everything you can imagine...  members of the Granite State Windows Phone Users Group are producing a ton of apps based on it.  

Here's some statistics to try to paint a picture of this.  The NH Windows Phone UG community publishes a list of apps produced by its members.  In the past three months since App Studio was released, I estimate that the number of apps in that catalog has doubled, and 95% of the new apps are AppStudio apps, consuming and re-presenting, making use of content provided by 3rd parties. 

What makes it easy to build AppStudio apps is that it has a simple presentation of its own... all folks need to do is find content that's been formatted in one of a few very standard ways.

We have, for example, a grade-school aged member of the #NHWPUG community building and publishing apps with AppStudio.  His publisher name is YoungMaster, and his first app is called "Kids Zone".  The cool part about Kids Zone is that he was able to add video content from YouTube.  His app merely queries YouTube for certain kinds of videos, and YouTube responds with a list (in a standard format) of items.  Users of the app simply tap the list for more information about it, or to watch the video.

Now, back to that restaurant...  if a patron/fan developer wants to make an app for a specific restaurant, it would be very hard to add that restaurant's menu items if the menu item information is not published separate from the web site presentation.  

Another application might be to allow a person searching for a meal to browse menu items from a number of nearby restaurants.  Will your restaurant's menu items be available in the list?

Lots of folks already understand this concept of separately published content and presentation, and apps pop up around the content all the time.  Movie theaters, travel agencies, transit authorities, social media updates, news agencies... all publish their content separate from their web site presentations. 

What's rougher, for folks using a CMS (Content Management System), chances are, you have the ability to publish a Syndicated Feed or RSS Feed that would do the job... but if you're not enabling and exposing it, you're missing a chance for folks to help spread the word about your company in these new ways.

Monday, January 27, 2014

Feb 2014 Meetings for the Granite State NH Users Groups

Two things for the Granite State Users Groups for February 2014...

  1. The Granite State SharePoint Users Group will be meeting on a special night in a special place for a special speaker. Monday, Feb 10th, Daniel Webster College, Eaton Richmond Room 100, Joel Oleson will be presenting "Your Enterprise Social Journey".  Alexander Technology Group will have the pizza hot at 6 PM, the presentation will begin at about 6:30.  Please RSVP (FREE) Here:  http://granitestatesharepoint.eventbrite.com
  2. The Granite State Windows Phone Users Group will be meeting at its regular date & location (6 PM, Microsoft Store in Salem, NH on February 20th), but our format will be a bit different from the normal.  Instead of a feature presentation, we'll have an exercise in community app reviewing & rating.  This semi-dynamic RSS feed represents the list of apps known community published apps:  http://www.kataire.com/gswpug/gswpugservices.svc/getdata .  Please, bring your friends, phone(s), and RSVP for the meeting here:  http://granitestatewinphone.eventbrite.com
Hope to see you there!