Tech in the 603, The Granite State Hacker

Windows Phone Live Tiles… What’s happening right now?

The first thing you see when you see a Windows Phone is the start display.  In fact, it’s so distinct, that it becomes the most identifiable feature of a Windows Phone at a distance.  Typically, the start display is populated with a number of application icons…  only on Windows Phone (and Metro) they’re all square or rectangles and are called Tiles.  

On second glance, you start to notice that many of these tiles have some form of light animation to them, typically communicating basic information.  The Tiles that open messaging apps indicate the number of new messages, for example.

When I first started playing with my Windows Phone, the live tiles seemed like a nifty gimmick… important for messaging features, but not really useful for anything else.

As I’ve dug in on app development for Windows Phone, I’ve come to see the Live Tiles as a really under-leveraged feature, communicating with users on a level that previously couldn’t be achieved.  They’re terribly simple, but terribly engaging.  I now see that they are the addictive component of Facebook’s classic “What’s on your mind?” status updates… statuses provided by the apps on your phone. 

In some cases, this literally translates to status update from your friends, since Tiles can be put on your start display for any contact.  (Since contacts are linked via the People Hub to their Facebook, Twitter, and Linked In…  voila!  one tile gets status updates for that individual covering all the bases.)

What’s really cool is that, like I said before, getting status updates is not limited to contacts.  I’ve got apps that have live tiles that… display current weather conditions including radar maps.  …show stock quotes & notifications.  …display photos from various sources.  … even shows your XBox avatar fully animated.

I’m in the process of adding a new feature to my hobby project, Jimmy Sudoku, to make use of live tiles to show the progress of the “current” puzzle.  

A new hobby project I’m working on has to do with the Granite State (NH) SharePoint Users Group that I am a principal organizer of.   This app will eventually be a hub for group information, offering member users easy access to schedules, speaker info, weather delay notifications, registration info, and even Power Point presentation slides.   Interestingly enough, a key feature will be to provide a live tile which will poll a webservice to get updates… the live tile will then let the user know they have important information to review, thus engaging the user.  (Sure, push technology’s available, but in this case, polling will be sufficient.)

The uses for this being able to re-engage a user after they’ve “quit” the application itself are significant.   I can easily imagine a time when the marketing significance of them makes building Windows Phone apps far more attractive to companies than iPhone or Droid apps.  Even if companies aren’t trying to hock a specific product…  imagine corporate “investor information” apps, for example, that provide easily accessible information about a company… but most importantly, providing “status updates” to investors to re-engage interest.

I’ll admit, at some level, this reminds me of electronic kids toys that attempt to re-engage kids in play after the kid has put it down and walked away by flashing a few lights & making a little noise.  There’s reasons those kids toys do that, though, and anyone paying attention with a mind for marketing will get what they are.

This is another Non-App for Windows Phone… one of the many cool features built into the device in an accessible, but non-cluttering way… and another reason I keep seeing Windows Phone as the IBM Compatible of smart phones.

So the above is why you want Live Tiles…   Here’s a code snippet that illustrates how:

using Microsoft.Phone.Shell;

… 

public static void UpdateAppTile(JimmySudoku4.Puzzles.SudokuState state)

{
    ShellTile appTile = ShellTile.ActiveTiles.First();

    if (appTile != null)
    {
        StandardTileData data;
        if (state.GetElapsedTime().Ticks == 0)
        {
            data = new StandardTileData()
                {
                    BackContent = “Game Complete”,
                    BackTitle = “Try again!”, Count = 0
                };
        }
        else
        {
            int completeCellCount =
                state.MasterList.Where(c => c.Value != 0).Count();
            int percent = (int)((decimal)((decimal)completeCellCount / (decimal)81)
                * (decimal)100);
            if (percent < 100)
            {

                data = new StandardTileData()
                    {
                      BackContent =
                            string.Format(“Elapsed Time:\n{0:hh:mm:ss}”,
                                 state.GetElapsedTime()),
                        BackTitle = string.Format(“{0}% complete”, percent)
                    };
            }
            else
            {
                data = new StandardTileData()
                    {
                        BackContent = string.Format(“Completion Time:\n{0:hh:mm:ss}”,
                            state.GetElapsedTime()),
                        BackTitle = “You Won!”
                    };
            }
        }

        appTile.Update(data);
    }
}

Tech in the 603, The Granite State Hacker

Windows Authentication fails due to machine name alias issue

Another tidbit I ran into recently that I hit once long ago, and don’t want to forget it again:

I have a VM who’s name I changed.  Trying to develop a WCF webservice for an SOA initiative, I ran into a completely inexplicable authentication failure when I tried to authenticate with my own local user on the machine.

Turns out the quick & easy fix (identified in this post from MS  http://support.microsoft.com/kb/926642 ) ended up pointing me to the solution of:

 adding

REG_MULTI_SZ key “BackConnectionHostNames” to my registry at

HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Control\Lsa\MSV1_0 . 

One alias per line…

I added a couple lines for various aliases that I use for the machine, enabling me to authenticate as {alias}\{userName}, locally, on the machine.

Tech in the 603, The Granite State Hacker

Url for WSDL coming back with wrong Host name in WCF service

Here’s something I don’t want to forget…  working on a WCF Service…

Using TLS, the address of the wsdl didn’t match what was in the SSL certificate.  (the server certificate had the FQDN “friendly name” (host.domain.com), and I was just getting back the “host” name. 

Naturally, this was causing problems. 

There was lots of guidance about setting the host name using some old vbs script that turned out to be a red-herring for IIS 7, anyway.

The quick & simple solution was to add in the behavior for the service:

<system.serviceModel>

    <behaviors>
      <serviceBehaviors>
        <behavior>
          <useRequestHeadersForMetadataAddress />
          <!– To avoid disclosing metadata information,

          set the value below to false and remove the metadata

               endpoint above before deployment –>
          <serviceMetadata httpGetEnabled=false httpsGetEnabled=true  />
          <!– To receive exception details in faults for debugging purposes,

          set the value below to true.  Set to false before deployment

          to avoid disclosing exception information –>
          <serviceDebug includeExceptionDetailInFaults=True />
        behavior>
      serviceBehaviors>
    behaviors>

  system.serviceModel>
configuration>

Tech in the 603, The Granite State Hacker

My Favorite “Non-Apps” for Windows Phone 7

There’s a lot of cool stuff built in the current Windows Phone 7… stuff that competing phones need to download an App for.  These are features of the Windows Phone operating system that are built-in.  You could call it “An App for That”, but it’s not something a Windows Phone user needs to spend time to find, download, and install.   (There’s something to be said that you get your choice from dozens of them on iOS and Droid.  I wonder how much time iPhone users spend figuring out which ones work well for them and which ones don’t…?)  

People Hub is one of the best.  It’s so well integrated and natural that it’s easy to take for granted. (the fact that all your contacts from all your social media hubs and work contact lists are integrated by default, and you can group and manage communications among groups very easily… hard imagine not having that.)

Some of my favorite lesser known “Non-Apps” in Windows Phone involve the built in search functionality.  Hitting the handy magnifying glass that’s an identifying feature of every Windows Phone out there brings you to Bing Search.  While I’ve been an admittedly slow adopter for Bing, the features in Windows Phone’s Bing Search are awesome.  

Visual Search just rocks.  Tapping the icon that looks like an eye from the search page fires up the device’s camera.  Simply point the camera in the direction of nearly *any* common, standardized barcode or QR code.   As soon as the phone “sees” the code, it will highlight it and immediately try to identify it. 

At Trader Joes, and want to know a bit more about their uncrystalized candied ginger?  Scan the UPC code.  It will remind you that the small package contains about 8 servings, [so don’t eat it all at once!]  🙂   Chances are just about anything you find at any store will have a barcode, QR code, or even an MS Tag associated with it.  

My favorite use for Tags, by the way, is printing Tags associated with your virtual Card on the back of classic Business Cards…  scan the Tag, and all the info on the card can be imported into your phone!  I never give out my card unless it’s Tagged. 

Tags can get really fancy, by the way… sometimes they’re almost hidden, and, especially out of context, it might take a moment for a human to recognize (but your phone will pick it out instantly!).  There’s a very creative cottage industry popping up around the art of Tagging things.  Exemplified by this Angry Birds Tag by Extreme2D.com. (Facebook) (and visit their site for an array of other very creative Tags!)

Visual Search does a whole slew of other awesome stuff too..  visual text identification (and TRANSLATION to foreign languages!)

Another favorite Windows Phone “Non-App” is Audio Search.  Let’s just say this is how I discover most of the music I download.  Ever out & about and hear a song that you are really taken by, but have no idea who it is?   Simply hit the music note icon in search, and let the phone listen for a moment. 

I heard the 2011 remaster of Pink Floyd’s The Wall, doing cuts I’d never heard before on someone’s radio not too long ago.  It was such a fresh cut that I didn’t even believe it was actually Pink Floyd’s recording of their own song.   Upon hitting it on Audio Search, I found the tune, and the album, and immediately downloaded the whole thing!   Awesome stuff!

So this doesn’t even really scratch the surface of the stuff that you don’t need an App for with Windows Phone.   It’s like that old spaghetti sauce commercial…  “It’s in there!”

What are your favorite built in (#NonApp) Windows Phone features?

.

Tech in the 603, The Granite State Hacker

Windows Phone… who knew, right?

There is something interesting happening with Windows Phone 7… (a story outside Windows 8, Metro & Silverlight 4).  There’s a chance that the stars could align in an old, somewhat familiar pattern.

I’m thinking about the PC market back in the day (for me, that’s late 80’s early 90’s).  There were three niches in the personal computer business.  The most memorable stars were Apple, IBM, and Commodore.   Apple was the early front runner with high-end consumer technology that dazzled with an artsy focus (if you could afford it).  To try to coax the lower end of the market, they gave away machines to every school that would take them, making them the defacto for education, too.  Commodore (and a few others like them) had a developer and gaming niche…  if you were a lower budget programmer/hobbyist/gamer (as I was), you probably had one of these and half-convinced yourself it was better than an Apple machine.  

The rest of the world wanted a computer, too, but didn’t want the price point of the Apples or the technical overhead of the Commodore class of machines.   That’s where IBM came in, with an affordable machine that wasn’t necessarily the flat out best of anything on the market, but the overall value made it accessible to a broad range of people.  IBM… PC… who knew, right? 

History shows that IBM’s (or, more appropriately, Microsoft’s) strategy won out, with the social forces of the now ubiquitous Windows pc’s swallowing the hobbyist market almost whole, eating most of the Apple pie, and sharing the gaming market somewhat grudgingly with consoles. 

The social force in effect was the desire to make something that worked for the non-technical consumers who weren’t so attracted to the high-end market…  since consumers found commonality in the accessible/value platform, eventually that platform swallowed up the niches.  What hobbyist wants to write software that they can’t share with anyone (short of installing Linux on their mom’s computer)?  What technologist wants to have a separate system for gaming and another for everything else (setting consoles aside)?  In a way, the IBM / Microsoft platform became the “lowest common denominator”… but the important emphasis being on the word common.

Fast forward to the mobile phone market of about a year ago.   My wife picked up a Droid based phone on a deal.  She’s not exactly unhappy with it.  It works, but she doesn’t quite trust it after she had some technical issues she wasn’t prepared to deal with.  Droid based phones seem to appeal to a lot of the guys at work, who don’t mind tinkering with the things.  The Droid reminds me of the “Commodore” of smart phones.

Even more recently, my wife was helping her mother pick out a new phone.  Seeing that the iPhone was a popular choice, they looked at it, but it was a huge step up in cost and it seemed overwhelming to my mother-in-law.  Given that her old phone was a relatively basic mobile phone, she didn’t see the need to spend a ton of money only to buy a phone she felt was more than she needed.   My wife, thinking back to my Windows Phone, realized she really likes its clean, simple-looking style and ease of use.  Since the price point was way better than the iPhones, too, the Windows Phone won out.

(I remember posting a light-hearted lament on Facebook at the time, that maybe I should consider switching phones, because…. how can you see technology which the grandmother of your children uses as the basis of an interesting, relevant, and marketable skill set (and career)? (I really was just kidding! (I still have bruises from several grandmothers over these remarks.)) 🙂  

After a brief break-in period with her new Windows Phone, my mother in law fell in love with it.  She doesn’t have to struggle to figure her phone out, anymore.  She just uses it.   She takes advantage of features she never thought she’d use, because the features are arranged so nicely that they work together.

Interestingly, this opens up technology for me, too, because now I can share the product of my technical interests with her. She was one of the first beta testers of Jimmy Sudoku, my hobby project.

I’ve come to see that Windows Phone is the IBM PC of the modern mobile phone market.  It’s poised to become the common denominator of mobile phones.  It’s less expensive , easy to use, less overwhelming / more accessible to more people, even to those without a technical degree.  (Check out that new Nokia Lumia 900?)  Still, for us geeks, it’s got readily available (free) development tools using fun and marketable skills and a reasonably open app marketplace.  Perhaps Microsoft should review IBM’s old PC marketing strategy before they overlook the opportunity they seem to have set themselves up for.

Like the frying pan in the Disney movie “Tangled”…  Practical, available, affordable, easy to use, and good for more than the obvious stuff…  who knew, right?

Tech in the 603, The Granite State Hacker

Project to Help Feed Starved Kids – Jimmy Sudoku v4

UPDATE Feb 6, 2014:  http://granitestatehacker.kataire.com/2014/02/jimmy-sudoku-5-orange-edition.html

Click here to view in the Windows Phone App Marketplace.  (the app is ‘free’ with the $5 donation via purchase.  All proceeds go to #NoKidHungry.)

I’ve had a lot of fun learning the quirks of Silverlight for WP7 devices, and after playing with some of the other WP7 Sudoku’s out there, I’m very glad to have Sudoku done my way on my phone again. 🙂  I’m even more psyched that I can share my app with others, as it’s now Certified by Microsoft and available on the Windows Phone App Marketplace!

I have to admit… there’s a lot of competition out there for Sudoku’s on WP7 devices, and probably not a huge demand… I realize that for as much fun as I had polishing this app,  probably the best way to find its value is to “give it away”.  

Scan this Tag with your Windows Phone to find Jimmy Sudoku
Scan this Tag
with your phone to find
Jimmy Sudoku
in the
Windows Phone
App Marketplace

So my family & I considered some options and decided on a national organization that helps feed under-fed/malnourished children here in the US. I thought it was a fitting thing… building software is my strength, and this is a way I can share it.   I also can think back to some exceptionally lean times when I was a kid… memories I’d love to help avert for others if any way possible.  So, yes, all proceeds from paid downloads will be donated to that cause.

I finally had a chance to re-do the old .NET 2.5 Compact Framework-based app as a Silverlight 4 app for Windows Phone. I’ve been toying with this release for months (since November 2011, actually… I pulled down Visual Studio Express 2010 for Windows Phones around then, anyway).  

In case you’re wondering… I asked the charity if it was ok to use their name and maybe a logo or something, but out of respect for their other national-market beneficiaries who have already done this, I would have to also guarantee a sizable donation.  100% is the best I can do, but that’s not necessarily a sizable donation, so I can’t use any trademarked IP, which, as I understand it, includes their name.  (I’m glad I asked.  🙂    While I can’t do this now, I’m hoping that if I play by the rules and manage to make a decent contribution with it, that I’ll earn the privilege and kick the project up a notch.  (In the meantime, I wonder if the twitter hashtag #NoKidHungry counts…. )

You can also click here on just about any device to get to the Marketplace site.


Finally, please visit the Facebook Page, and feel free to Like and/or Share posts to help spread the word!  🙂

Anything you can do to help is appreciated!

Tech in the 603, The Granite State Hacker

Choen the counterBot

I’m pretty excited… both my kids seem interested in computers and what you can do with them. My daughter, especially, is very interested in learning bits and pieces about programming. My son is interested, but not so much in the nuts & bolts of programming. He is interested in numbers and performance, though. They’re both young, though… he’s in 1st grade, and she’s in 2nd.

She’s expressed some interest in programming before. Last time we talked about application design… she got extremely ambitious and drew about twenty pages of “designs” (hand-drawn mock-ups of screens) for games that she wanted to create. (Essentially knock-offs of games she’s played on favorite websites like PBS Kids and Pixie Hollow.)

More recently, she was using my computer, and discovered that when she’s logged into my computer on her account, she has access to Visual Studio Express. When she asked what it was, I told her it was tools to write programs, and she just lit up. Immediately, she wanted to start working on a simple UI that mimics a math program she uses at school.

I started to realize, however, that she needs to learn more of the basics before we dive into a full fledged user interface. I started to think about some of the earliest programs I learned to write.

Back when I was in 4th grade, I got my hands on an Apple II, and one of the first programs I learned to write on it was a program that accepted two numbers (start and finish) and simply scrolled out a count between them.

Nowadays, we have object oriented programming, and C#, but I wanted to try to keep it simple and understandable for her. I decided that we would create a “counter-bot” class, and we would create an instance of it named whatever she wanted it to be named (She decided on Choen (pronounced more like Cohen)).

Today, we got the basics of the counterBot class written, and wrote a short program to create an instance of it, initialize it, and start counting, sending the numbers out to the screen. A countBot has beginAt, finishAt, countBy properties, and Start, Count, GetCurrentNumber and isFinished commands.

Here’s the code:
counterBot.cs:
——————————————————–


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Choen_the_counterBot
{
class counterBot
{
public int beginAt;
public int finishAt;
public int countBy = 1;
private int currentNumber;

public void Start()
{
currentNumber = beginAt;
}

public int GetCurrentNumber()
{
return currentNumber;
}

public void Count()
{
currentNumber = currentNumber + countBy;
}

public bool isFinished()
{
bool result=false;
if (currentNumber > finishAt)
{
result = true;
}
return result;
}

}
}

——————————————————–

and here’s the console Main method in program.cs:
——————————————————–


using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Choen_the_counterBot
{
class Program
{
static void Main(string[] args)
{
counterBot Choen = new counterBot();
Choen.beginAt = 0;
Choen.finishAt = 2000000;

Choen.Start();
DateTime startTime = DateTime.Now;

while (!Choen.isFinished())
{
Console.WriteLine(Choen.GetCurrentNumber());
Choen.Count();
}

Console.WriteLine("Finished counting from "
+ Choen.beginAt.ToString()
+ " to "
+ Choen.finishAt.ToString()
+ " by "
+ Choen.countBy
+ "'s in "
+ (DateTime.Now - startTime)
.Seconds.ToString()
+ " seconds!");

Console.ReadKey();
}
}
}

——————————————————–

I got a bit fancy and added the timer code to see how long it took. Together, my son, daughter, and I watched Choen the counterBot count out various scenarios, and got as ambitious as watching it count from zero to two million. In order to get my son’s interest, I added the timer to see how long it took. We discovered that my computer can count from zero to two million, “out loud” (showing the numbers on the screen) in 52 seconds. If we hid the console writes, it could do it in less than a second.

Next time we play with it, we’ll write a graphic UI (a windows form) and hook Choen the counter bot up to it.

Tech in the 603, The Granite State Hacker

SharePoint Saturday NH

I’m psyched to be a part of the founding and building of SharePoint Saturday for New Hampshire. It’s a part of the Granite State SharePoint Users Group (follow twitter @NHSharePointUG ) or check us out on Linked-IN.

Stay tuned for more info…. lots of exciting stuff happening for the SharePoint community in NH.

Edit: May have jumped the gun on this a bit… the site may not be publicly accessible… yet. I’ll update this post when it’s made public.

Tech in the 603, The Granite State Hacker

Infrastructure Agility via Cloud Technology

I’m honored to have just been published on Edgewater’s public blog…

It’s bit about managing infrastructure agility. The basic idea is architecting your infrastructure so that you can push off parts to different clouds when you need to, for any of a multitude of reasons. The idea goes a bit beyond virtualization.

Check it out:

http://edgewatertech.wordpress.com/2009/04/24/best-practice-cloud-computing/