Inbox:0 - A Practice of Awesome

Uhg. That feeling when you glance at your mail client and see hundreds of messages, most of which are unread. They trail on over weeks or months and create an instant stress-booster when you sit down at your desk. It’s the feeling that someone is always waiting on you to do something, and you can’t quite put your finger on who, or what, or when you had that message saying that you needed to do it, but you’re always suspicious of the messages that are just out of view on-screen.

Stop the madness! You don’t have to live like that, and I’m telling you it’s way better to achieve “Inbox:0” on a daily basis. It’s better to spend a small, regulated portion of your day (or a few of those windows) dedicated to cleaning your inbox and to never have the weight of email on your shoulders again.

I was first inspired to do this through a talk at WebStock by Scott Hanselman, which you can view here. I have to admit, I struggled for the first little while, getting on track and trying to maintain the practice. But, I’m going to do something that I couldn’t have done two years ago, and that is to share an image of my inbox. Here it is:

image

Beauty, eh? This isn’t here as bragging rights, I’m just trying to illustrate that this is achievable and can be a reality for you. The only really hard day was the first one, when I had to make the decision to nuke everything in there. From there it was just about a little discipline and establishing some good habits.

How to Get There

Okay, I’m a pack rat. I didn’t really nuke everything in my inbox, but here’s the process I went through to whittle that baby down to a reasonable amount of mail.

The first step was to just admit to myself that anything older than a couple of weeks in age likely wasn’t going to be dealt with in a timely fashion. In other words…it meant that if someone had sent an email hoping to get my attention, they would have to write again. It honestly felt like I was letting people down by removing their messages. But the messages had already been reduced to clutter by virtue of my care to-date, so the damage had already been done. So, let it go. That was the biggest hurdle.

Next, I created a folder called Archive. I just wanted to be able to be able to find the messages should something come up (for example, needed a response from a manager or client). I moved everything in there that was 2 weeks old or older. I was starting from over 10,000 messages in my inbox with 2,000+ unread. This one step took me down to under 1,400 messages.

The final piece was just automating a couple of tasks. I don’t need all my build server notifications, Azure alerts or application log notices. I unsubscribed from the vendor bits I was no longer interested in (sorry, IBM and Salesforce), then deleted the messages. I created rules for these to mark the “everything is okay” messages as read and to move them to a folder. I applied these rules and got to under 250 messages.

20 minutes in, and I was within striking distance.

From that point it took me about 2 hours, but I was able to weed through the ones that weren’t really addressed to me, respond to some that needed attention and finally send a few meeting invites to folks who were requesting my time.

How to Stay There

The next bits aren’t nearly as hard, you just need to keep a little organized. I create top-level folders like “Projects” and “General”, then sub-folders to put client- or project-specific communication. But I don’t go overboard either - I just make small enough buckets that I can find what I’m looking for when I need it. I make sure that any new email list messages that come in get the “unsubscribe” treatment.

I also gave myself a few rules, namely:

  • I don’t check my email as it arrives, I try to only check once an hour or so. There are exceptions, like when I know we’re in a crunch, or when I’m waiting for a message from someone in particular.
  • I will scan my inbox and decide if it’s time for email before I dive in and address the messages that are waiting. This means that, yes, sometimes it will be several hours, or even a couple of days before I clear out my inbox, but this is a priority thing. If my voice isn’t needed on a thread I try to stay out and keep focused on my work. But when I _do_ dive in and start reading…
  • I don’t leave messages in my inbox, also known as the “one touch” rule. There are really only a few things you can do with a message: respond to it, forward it to someone who can respond to it, or take an action on it. I’ll come back to that in a second.
  • I create rules to keep me sane and avoid clutter in the first place. If new alerts are created, or there are things I must be subscribed to, I create a rule to deal with those.

Taking Action on Your Email

As I mentioned, I will often respond to an email right away, or perhaps forward it on to someone who can help resolve the issue at hand. But other times it requires taking action. These should be done in a timely manner and none of them take much time to do, only a minute or two:

  • If there is work for me to do, I put it on my calendar. I will block out a piece of time to address it, and if it’s for the benefit of someone else, I let them know that I’ve done so. This way, I’ve set an expectation I can manage and they know when they are going to get the answer or result they need, and the message is out of my inbox.
  • If there is work that involves others, I schedule a meeting or work session. This can be a Skype call, a pair-programming gig or even just an online chat. Sometimes this can be an immediate action depending on those involved, other times it will be a day or two or several before we can get to it. But it’s on my calendar at that point, so it can get out of my inbox.
    There are things that don’t belong in your inbox. That’s it. So get them out and where they belong, be it in someone else’s hands or on your calendar.

Fly Away, Stanley, be Free!

image

So, there’s really no secret sauce here. If you’re still reading this, you’re likely willing to give this a try, so carve out two and a half hours in your schedule and give it a go. Make rules that work for you, and don’t sweat it if it takes you one or two attempts to make it work, or a couple of weeks to find your groove on getting things cleared out. In no time, you’ll be rocking Inbox:0 and enjoying the stress-free benefits of seeing absolutely nothing when you check your email. Just like Stanley.

Happy coding! Smile

Tools of the Trade: Getting Setup to Code for Microsoft Band

There is a very competent and capable app for your Microsoft Band in your App Store called Microsoft Health, which is available for iOS, Android and, of course, Windows Phone. But Microsoft Health is just one way you can expose and relay information from the myriad of sensors you’ve got on your wrist, and you’ve likely got ideas on where you’d like to take it.

In my first article I wrote briefly about IoT in general, and how a device like Microsoft’s Band really opens the door for .NET developers looking to take part in the wearables game. In this article, I’m going to lay out the tools and frameworks that you’ll need in order to develop for the Band. We’ll also start up a project and install the components we need to get our app ready to talk to the device. If you’re a fairly experience developer and want to dive right in, jump down to the end for the summary and have at’er.

Setting up Your Cloud Account

As we collect data from the sensors, we’re going to want to feed it up to the cloud so that as we develop the backend of the app, we have access to all the data.

It only takes about 3 minutes and 17 seconds to give yourself a free shot at using cloud services. Seriously. So pop over to Azure and get yourself signed up for the free trial.

Signup for Azure Here
Also, check out this link for information on MSDN as you may also qualify for free monthly Azure benefits as well.

Readying Your Development Environment

Next, we need a bit of tooling. This isn’t a complicated list and you likely have everything you need already, however, I speak to, meet with and mentor many developers who are locked into older versions of tooling, so here’s a list to follow along with so that we’re all on the same page:

  • Microsoft Visual Studio 2013 (MSDN or Community Edition)
  • USB cable for your Windows Phone
  • USB charging/sync cable for your Band (included in the box)

I have a plethora of USB cables from a variety of sources. I have noticed that the Nokia cable that came in the box with the charger is a better quality cable and have had less problems with it than others (from cheap chargers, other phones and cameras).

Creating the Project

This part’s pretty easy, just pop open Visual Studio, select File –> New Project, and then switch to the Store Apps/Windows Phone Apps category. From there, Pick the Blank App template and name your project AliveAndSafe.

image

We’ll talk more about the application we’re creating next time, but if you’ve read my previous post you know where I’m going with this. Winking smile

Adding the Band SDK

Next up is getting the components in our project that we’ll use to interact with the Band and trap information relayed to us from the device itself.

Open up the Package Manager Console (View –> Other Windows –> Package Manager Console) and type the following command:

install-package microsoft.band -pre

As expected, this pulls down the DLLs needed for our app and adds references to:

  • Microsoft.Band
  • Microsoft.Band.Phone
  • Microsoft.Band.Store
    Having a peek inside, we can see a number of interesting objects that we can create, collections to iterate over, sensors to subscribe to and states that we can inspect.

image

We’re going to dive into these in more detail as we build out our app.

Designing for Microsoft Band

An important thing to note is that the Band has a really strong and capable design language. After wearing it for only a couple of hours I felt like I had a good sense of what it was trying to do and where I needed to go, which is amazing given the number of sensors and the limited UI that the device presents!

As such, we should likely be good citizens here and respect the design intent that the device put forth. You can find more information on what the designers were thinking by downloading the Microsoft Band Visual Guidelines document.

Next Steps

Okay…easy lifting today, here’s what we did:

  • Prepared our development environment by grabbing Visual Studio, signing up for Microsoft Azure, and getting our cables.
  • Created a Windows Phone application using the Blank App template.
  • Added the Microsoft.Band pre-release package from Nuget to pull in our dependencies.
    In the next article we’re going to talk a little bit more about our application that we’re building and get a tile onto the Band to represent our application.

Happy Coding! Smile

The MVP Virtual Conference

There is a great conference coming up that is open to everyone with a keyboard and a monitor. This is a free event that Microsoft and my fellow MVPs are putting on, May 14th & 15th.  Friends, presenters and fellow Microsoft MVPs from the Americas’ region will be live-streaming for two days to share their knowledge and real-world expertise during a free event, the MVP Virtual Conference.

The MVP Virtual Conference will showcase 95 sessions of content for IT Pros, Developers and Consumer experts designed to help you navigate life in a mobile-first, cloud-first world. Microsoft’s Corporate Vice President of Developer Platform, Steve Guggenheimer, will be on hand to deliver the opening Key Note Address.

Hey…if you want to play along during the conference, be sure to get yourself a copy of Visual Studio or an IDE of your choice, and sign up for your free Azure trial.

I was part of the group that had the privilege of picking the sessions. I have to be honest, it wasn’t easy…there were about a billion great topics from the MVPs put forth, and right from the start it was hard to omit any single entry.

The are going to be 5 tracks in the conference, so there is something for everyone who works in IT, regardless of platform:

  • IT Pro English
  • Dev English
  • Consumer English
  • Portuguese mixed sessions
  • Spanish mixed sessions

There are some excellent, industry-leading names on the list. Learn from the best and brightest MVPs in the tech world today and develop some great skills.

Be sure to register quickly (or slowly, if you don’t type too fast) to hold your spot and tell your friends & colleagues. Be sure to register even if you can’t attend to get post-conference resources, links to VoD and other relevant information. There is going to be metric butt-load of information here!

The conference will be widely covered on social media, you can join the conversation by following @MVPAward and using the hashtag #MVPvConf.

Pushing Data to an Azure Service Bus Queue

This is a simple example of what you need to get data into a queue in Azure Service Bus from a console application. This uses the WindowsAzure.ServiceBus NuGet package, so you can actually use it anywhere you can store a connection string and write some .Net.

Go here to get started, or log into your Azure portal.

Setting up the Queue

First, we’re going to create a new Service Bus Queue through the portal. This is pretty easy, just select New –> App Services –> Queue and pick Custom Create.

image

Punch in a name, create a new namespace then click next. You can use the default settings, just hit confirm. Note that if you use Quick Create, it assumes you have a namespace already setup, if that’s the case, you can use that as well.

Navigate to the Namespace dashboard and go to the configure tab. You’ll need to note the shared access key name and the key value itself.

Building the App

Next, create a new Console App in Visual Studio. Add this configuration line to your App.config (just make sure to remove the whitespace, it wrecks your config):

    <add name=”AzureWebJobsServiceBus”
connectionString=
“Endpoint=sb://NAMESPACE.servicebus.windows.net/;
SharedAccessKeyName=RootManageSharedAccessKey;SharedAccessKey=KEY”
/>

This gives the framework the connection string you need via the conventionally named key/value pair. Punch in those details you grabbed from the portal so that the connection string is valid for your environment.

Next, add a simple person class to your project as such:

public class Person
{
public string Name { get; set; }
public string EmailAddress { get; set; }
}

Get The Bits You Need

Now, get ready to send the message. You want to add the following package to your program via the Package Manager Console (or the Manage Packages menu item by right-clicking on your project in Solution Explorer).

install-package WindowsAzure.ServiceBus

Put in the Code that Does the Heavy Lifting

Finally, update your program code to grab the connection string and publish the message to the queue.

static void Main(string[] args)
{
var connectionString = ConfigurationManager.ConnectionStrings[“AzureWebJobsServiceBus”].ConnectionString;
var client = QueueClient.CreateFromConnectionString(connectionString, “NAME-OF-QUEUE”);
var person = new Person {Name = “James Chambers”, EmailAddress = james@foo.com};
client.Send(new BrokeredMessage(person));
}

That’s it. Four lines of code and you have a way to push out a message and get back to work. Heck, if you can await (as in, in an aysnc method) you can even use SendAsync instead of Send so you don’t tie up your thread.

Next Steps

In the next post I’ll show you how to pop stuff off the queue and do something with it, then we’ll have a look at how to debug all of this.

Make sure you pop into Azure and give this a try! There is an amount of free credits that you get during your trial period. If you want to extend that, consider getting into MSDN (or getting your boss to) for other cool things as well, like VS Online and access to over a terabyte of development assets & software.

Happy Coding! Smile

Getting Microsoft Band Running Outside of the United States

If you are lucky enough to get your hands on a Microsoft Band before they’re readily available here in Canada or elsewhere worldwide in unsupported markets, you’ll likely run into a couple problems trying to get started.

When we tried to get my wife’s Band up and running we ran into a few small but totally surpassable hurdles. Our roadblocks stemmed from being both out-of-market and using a Windows Phone.

For the short version of the checklist to get thing running, skip to the end. For the walkthrough, keep reading.

Lighting up the Band on Your Phone

wp_ss_20150406_0001To start using the Band, you need an app on your phone, but it won’t appear in the Store. To get around this, you’ll need to change your Country/Region to “United States”, or another supported market (the app is available now in GB).

With the region set, you’ll be able to install and run the app, just reboot your phone and look for Microsoft Health in the Store. Unfortunately, you’ll hit another snag right away after you install it. Namely, you’re going to hit this error message when you try to launch Microsoft Health (the Band Sync app): Network Error. Something went wrong. Please check your network connection and try again.

image

Now, you can start troubleshooting, there are three reasons why you’ll get this error message than I have learned:

  1. You actually don’t have network connectivity. Make sure you’re connected to WiFi or have a good data connection with your cell provider.
  2. wp_ss_20150406_0002Your username has a special character in it. Likely due to a primarily English release in a limited market, it seems as though the app wasn’t thoroughly tested with letters outside of the English language. Go to the Microsoft Account site, sign in, navigate to “Basic Info”, then check your display name and remove any special characters.
  3. Your phone has a primary language other than English (United States). To change this, head back into settings and ensure that you have English (United States) in the list, and make sure that it is the first one in the list. I have it configured as such (see the image to the right) along with English (Canada) and it works just fine.

So, these are the solutions for Windows Phone, but I don’t have any iDevices or Adroid phones to test this out with. I wouldn’t be surprised if there were similar issues there as well, so hopefully these tips might be able to help you out.

The Short List

So, in summary, here’s what you’ll need to get going outside of a supported market with Microsoft Band:

  • A phone with the Country/Region set to “United States” (or another supported market)
  • A working and active WiFi or data connection
  • A display name in your Microsoft Account that doesn’t have special characters
  • A primary language of “English (United States)” (or another supported language)

A Quick Disclaimer

Changing the country, region and language settings on your phone may have other unintended side affects. Though it’s easy to change back, you should be aware of this in case other apps start behaving irrationally.

Hope this helps someone out there. A quick thanks to the gentleman on Microsoft Support chat who was completely willing to help troubleshoot, even though we weren’t in the US (he was the one who tipped us off about special characters).

Do you have a Band outside of the US? Do you have an iPhone or Adroid, and have you had any difficulties in getting it sync’d?

Off to keep building my Band app…happy coding everyone! Smile

Change in Windows Azure API - Websites.Services.WebEntities.ConnStringInfo

Automation is the bomb. I don’t like having to do something that can be automated more than once, so usually if I’m asked a second time (and I have a strong suspicion that I’ll be asked to do it again) I try to script it. This is very true of Windows Azure Web Apps and thankfully, it’s also easily facilitated.

I just fired up some old Azure PowerShell scripts I had (from mid-2013, I believe) that had a call that looked a little like the following:

# create and configure the connection string information 
$appConnString = New-Object Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities.ConnStringInfo;
$appConnString.Name=“PersonContext”;
$appConnString.ConnectionString=$appDBConnStr;
$appConnString.Type=“SQLAzure”;

Essentially, it’s just creating an instance of the ConnStringInfo object so I can associate it with my site. However, when I tried running it I started getting the following error:

New-Object : Cannot find type [Microsoft.WindowsAzure.Management.Utilities.Websites.Services.WebEntities.ConnStringInfo]:
verify that the assembly containing this type is loaded.

Then, because the object couldn’t be created, I got errors trying to set each of the properties, like, “The property ‘ConnectionString’ cannot be found on this object. Verify that the property exists and can be set.”

Then I noticed that the script really mustn’t have been run in some time, as this is the current namespace for the class:

Microsoft.WindowsAzure.Commands.Utilities.Websites.Services.WebEntities.ConnStringInfo

Websites was moved in late 2013 to the Commands namespace. You won’t likely run into it unless you dig up an old script that hasn’t run in a while, but the difference is subtle and might be tricky to spot.

Hope this helps, and happy coding! Smile