Project K, dnvm, dnx, & dnu and Entity Framework 7 (for bonus points)

Things, they are a-changing!

imageIf you’ve played with different versions of ASP.NET 5 and MVC 6 along the way and have recently updated to the RC build of Visual Studio 2015 you’ll likely have noticed a few changes.  Just a couple.

I found that I’ve been mostly able to survive the transition with a few questions around runtimes and where things have moved, but not all the bits are obvious. Here’s a list of some things that you’ll likely want to know as you navigate the M-V-Seas.  (See what I did there? Smile with tongue out )

A big thanks goes out to fellow Canadian Simon Timms and beach bum Dave Paquette for stumbling through these bits with and for me. #experts

Renaming and Reorganization

There used to be two separate commands for language services and running/booting up a site or application. These commands (k and klr) have both been merged with the runtime environment and are all now part of dnx, a.k.a. the .Net Execution environment.

The version manager, which was previously the kvm script (ps1 or sh, depending on environment), is now a command line utility called dnvm, or .Net Version Manager.

Finally, a new utility has been added that replaces the previous dependencies manager with a few enhancements (such as command hoisting from your project.json). The new name is dnu (the .Net Development Utility) and you use it to restore or manage packages, create NuGet packages or publish your project.

So, in summary:

k, klr, kre  => dnx
kvm          => dnvm
kpm          => dnu

So You Want to Run a Migration?

We used to use the package manager console in Visual Studio to do our migrations work, however, this is not currently the case in VS2015. I imagine that this will continue to improve, but there is still a delta in the way that we used to do things. Today, we’re going to do things a little differently: in a properly prepared console, you’ll type the following in your project directory (not your solution directory):

dnx . ef [options] [command]

This command tells the .Net execution environment to use the current directory and to run the ef command. From there you could type migration or whatever else you’re looking for. Leaving the options and command out, for instance, gives you the magic unicorn of awesome.

Wait, That Didn’t Work?

First of all, you’ll need to make sure that you have the tooling for the dn* utilities on your PATH. There needs to be environment variables setup to point you to the correct runtimes, or rather, the runtimes you’re currently targeting. You can see all the runtime versions you have installed by typing:

dnvm list

Typically, you’ll see two different runtimes (clr and coreclr) for each architecture (x64, x86), and you’ll see each of those for each version you have installed.

The “correct” version for your purposes may be a moving target, so make sure you have a runtime and version that works with the version of EF you have. If you’re not sure (or you thought you were sure but things aren’t working) take to Jabbr and ask for a hand (they are great there).

Next, your solution and/or project will have to have the correct references to EF. Edit your project.json to have the following dependencies and commands (you can do this in VS or Notepad or whatever tool you like, just save the file when you’re done):

  "dependencies": {
    "EntityFramework.SqlServer": "7.0.0-beta4",
    "EntityFramework.Commands": "7.0.0-beta4",
    ...
  },

  "commands": {
    "ef":  "EntityFramework.Commands",
    ...
  },

Almost there. Now we need to restore those packages locally so that you can use the EF tooling. To do that, we’re going to use the following command from the solution directory:

dnu restore

Voila! You should be good to go! Navigate to your project directory and hack away at your migrations.

Keeping Up to Date

So, go grab Visual Studio 2015! If you run into trouble there is a wealth of information out there (albeit, much of it is quickly becoming outdated or conflicting). As I already mentioned, Jabbr is a great place to ask questions, as are Twitter and Stack Overflow. Brice Lambson periodically posts updates on his blog. I have found that the documentation for Asp.Net 5 has also been kept fairly up-to-date, which you can read here.

Happy coding! Smile

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

IoT For Humans (and Developers) – Getting Started with my Microsoft Band

Making the “Internet of Things” make sense to observers outside the industry is going to take a lot of work. While we might grow frustrated with the overuse and below-required understanding of the term, I would argue that in the industry we have a long way to go to fully understand the implications of security, health, privacy, etiquette, social dynamics, productivity and individualism.

But while the term may seem obscure, especially hiding being other abstractions like “connected devices” and mixed in with other buzzwords like “big data”, the reality is that…it’s here.

The auto industry embraced the “of Things” part really well quite some time ago, well before mainstream internet in fact, and has been increasingly good and getting the “Internet” part as well.

As a consumer, it would appear that my van sends me an email when it needs an oil change; in reality there is a query or a push occurring at some set interval or cued off of some trigger when I’ve reached a certain amount of mileage. That push or pull stores a flag in a database, which is later picked up by some service, likely processed through some kind of templating engine and mixed with my past service records and ultimately delivered to my inbox. But, dang, my van sends me emails, Mom!

Bringing IoT Home For .NET Developers

Even to me as a developer, while I’ve sensed these “Things” emerging around me it’s still been hard to find a way to explore them. You can’t get application development guidance or a NuGet package for your Chevy Uplander.

In many ways our phones have really become these interconnected devices as well, becoming more and more sensor-laden in a world where LTE and Wi-Fi signals have broader reach. Android watches and even the Pebble watch spaces have SDKs if you’re familiar with those development ecosystems or cross-plat tools to target specific devices.

But last week, my Microsoft Band showed up. And there is both an SDK and guidance freely available. As a developer on the .NET stack and solid knowledge of Azure, I can’t help but feel that my playground just got a lot bigger.

What I Get as a Tinkerer

So, for about $200, and leveraging my Azure benefits, I am like a kid in a candy shop. Here’s what I have:

  • A crazy amount of sensors (GPS, UV, heartrate, accelerometer, gyrometer, ambient light, microphone)
  • “Free” pairing with any major phone platform via the SDK
  • More sensors available via the phone
  • A myriad of connectivity options (Wi-Fi, Bluetooth, NFC)
  • Local and cloud-based storage
  • User accounts, identity services
  • Haptic and audio feedback mechanisms
  • Multiple interaction surfaces
  • Other cloud services (SMS, email, batch processing)
  • A human attached to all of the above
  • The ability to create applications on my laptop/PC/tablet that ties these things together

You can sign up for Azure for a free trial here, or look into your benefits through the MSDN program, as you may already have monthly credits to burn up.

I haven’t quite figured out what I want to build yet, but there seems to be a lot of interesting paths.:

  • A “Safe and Alive” monitoring application for high-risk occupations (I’m already exploring this)
  • A immersive game with haptic, visual, audio, SMS and touch interactions
  • A reminder app to keep active, with an accountability partner using similar kit
  • An application that leverages the Band for build server (or other service) failures

Remember that some of these become quite interesting when you consider the fact that you don’t have to have your phone out or even in your pocket for these to work, just as long as the Band can maintain it’s Bluetooth connection. You can leave your phone when it gets the best signal (in the vehicle, at the entrance to a storage facility) and still have your app running, collecting, pushing, pulling and processing data.

So What Now?

These are exciting times, and I’m having fun exploring practical and completely impractical uses and applications. My kids, 13, 11 and 5, are infinite sources of hilarity in discussing what we can do with it. My wife, too, and I’ve found all of a sudden that without talking about “consumer applications”, “big data” and “interconnected devices” I have completely engaged the entire family in the “Internet of Things”. Oh, and I had to order my wife a Band as well. Smile

I’m going to start sharing my experiences while developing an application in the weeks ahead, delving into the use of the sensors on the Band, exploring interactions and trying to test it in real-world scenarios. Stay tuned to follow my path. My next post will be a “Hello World” app that introduces you to the tooling and SDK.

Have you got a Band? What applications are you thinking about developing? Do you have any successes or failures to share in regards to the “Internet of Things”?

Working from Home and Walking to Work: Surviving Remote Work

There’s a commercial that I’ve seen in the last few months on TV where the announcer is singing the praises of a lady who rides her bike to work, “…which is impressive, because she works from home.” While it’s true that it seems a little nuts to leave your house to go to your house, there’s actually some incredible wisdom in this simple practice. Working from home is a privilege and an expression of trust from our employers, even if we’re self-employed, and you need to be equipped to find a good cadence to your day.

Awake, Alert and Ready to Go

The first month that I started working from home I thought I had it made. I was sliding out of bed pretty much straight into my chair and starting my work day with the sludge still on my teeth, sipping on coffee and trying to make sense of the emails I was catching up on through my half-closed eyes. I’d usually wait until lunch to shower and I rarely did my hair.

Now, this was all kinds of bad for many reasons, especially because I wasn’t able to get any of my schtuff done, but it also meant that days were always a real slow build up. Rather than hitting the keyboard running with trumpets and sirens and “Hells, ya!”, it was more like a pitiful crawl being cheered on by a fourth-grader playing a sad kazoo.

So, I started walking to work. And I love it. I say goodbye to my kids and give my wife a smootch. I leave via the front or side door, head North and do a loop through my neighbourhood. I will usually read a few emails, catch up some news and listen to music as I walk, but often I stop to talk to folks who live in my community too. As I finish my walk, I enter the house through the back door, and I’m officially at work.

I am engaged, trumpets blaring, as I start hacking.

When I finish my work day, I leave through the back door, and head South, doing another loop, but usually on a different route. If it’s a busy evening, it can be as short as a block or two. I come in through the front or side door that I exited through in the AM and I’m back home.

Separation of Work Space and Home Space

This practice really helps me to keep the work stuff at work and the home stuff at home. There are a few other physical boundaries that I keep in place, but really, the walk at the start of the day and the end of the day are just a great way to get energized, tune in my focus on the way to my office and leave work behind when I’ve signed out for the evening.

Those other physical boundaries? I work in my office, I have a space set aside in my home where work stays. It is a very rare occasion when I bring my laptop out of my office to work elsewhere in my home.  I don’t keep a house phone in my office, and I don’t take my VOIP gear out into my home.  My wife and I don’t talk much through the day, if at all, except occasionally via Skype chat. In my new office (we’re in the process of renovating right now) I’m installing extra sound-proofing so that the noises of the home enter my work space even less than they do today.

Of course, there are some exceptions. At lunchtime, I just walk upstairs to have lunch with my bride, I don’t do the walk from-and-to work again. And if she is otherwise predisposed throughout the day, I’ll take the home phone with me as I head down to the office (our son has Type 1 Diabetes, and our house phone is the emergency contact number). And with kids missing school busses and meetings starting promptly in the AM or running late at the end of the day, I don’t always get my walk in. But I covet the days I do.

Find Your Own Survival Technique

The walking works for me, but it may not for you and I understand it’s not for everybody.  It really doesn’t have to be a walk, but as a remote worker I have found success in having a way to start my work cleanly and to be able to literally walk away from my job at the end of the day.

This is really a matter of figuring out how to not only survive the opportunity you have to work from home, but to find success in it. So figure it out! What is it for you that helps you train in on your work day? What is it that helps you disconnect as the evening begins?

Wake Up and Get S#!t Done – A Practice of Awesome

People, we need to get more stuff done. Insert whatever word is appropriate for you. We’re a culture consumed by consumption and I think it’s going to suck a lot of life out of our kids. Seriously, it’s going to suck.

As we seek to fill our time with things that are pre-fabricated, manufactured and less original, we lose out on the participation in creation, which is how we got to be awesome as a species in the first place. So, let’s be all commit to being more awesome.

  • Learn every day; just…be more learned.
  • Wake up early and give yourself an hour for your future self.
  • Teach someone, especially kids.

Sleep is awesome. I’m speaking from personal experience as I’ve done it a few times, in fact I’m quickly approaching 13,800 attempts at a night’s rest, many of them successful. I even take a nap most days. But we’re suckers for using sleep on the wrong end of our night. Staying up late is just way more appealing.

Bust Out of Your Funk

But what do we do in those last hours, when we’re the least rested and least focused? We watch House of Cards. Play games. Do the Facebook. Drown in Twitter or Instagram. Lame.

As far as New Years resolutions go, I’m not much of a fan. And since I try to do this every day already, it’s not really much of a commitment for me to make, but I think it’s a great life hack. So, here’s one thing that you can do to make your life better:

Wake up early.

That’s it. No secret sauce, no programs or diets or fads. Just get your arse out of bed.

I’ve been doing this, fairly faithfully for the last couple of years, and it’s something that I’ve started sharing with folks because it works. I can’t possibly make money off of you getting up earlier, so there’s nothing but a good honest recommendation in this.

Why do it? Because you can start to take control of your life, that’s why. You get up early, and things happen. There’s likely less distraction in your house and you’re going to be able to tune in to the task at hand. There are a ton of things you can do in just 45min-1hr:

  • Read something you’re interested in
  • Gain at least some awareness of world events
  • Learn, learn, learn
  • Go for a run/walk/bike, take out the trash, do some Yoga, shovel some snow (I do advise against snow blowers and lawn mowers in the wee hours, for the sake of the neighbours. Especially if I’m your neighbour)
  • Write, even if you aren’t sharing it
  • Solve a problem outside of your normal domain

I’m a software developer (in case you couldn’t tell from my blog) so for me, my goal is to stay caught up on the changes in the industry (cloud, patterns, vNext type stuff), things that influence my industry (electronics, politics, economic trends, job markets) and things that are disruptive to my career (wearables, IoT, startup culture, young kids with big ideas). I write code almost every morning. I try to work out 4 times a week.

If you don’t think that an hour of effort can make a difference, here’s what I did yesterday AM in 64 minutes:

  • Created a new Azure Web Site
  • Setup DNS for the site
  • Created a certificate request for the site
  • Applied for SSL with GoDaddy
  • Completed the certificate request
  • Exported the cert (with cert chain) and uploaded to azure
  • Added the site to a GitHub private repo
  • Published the site to Azure
  • Added two settings to turn “test” and “paypal sandbox” mode to my web.config
  • Added those app settings to the Azure website
  • Enabled SSL bindings and redirects

TL;DR: I got schtuff done. And yes, I track my time and keep a log. When I look back on my week, I can honestly reflect and say, “Good week, Chambers” or “Pick up the slack, home slice”. It’s not a tool to condemn myself, it’s a way to score wins and keep motivated. Last year I put over 150 hours into “my career” and this year my career is better than last year.

Ch-Ch-Ch-Ch-Ch-Changes

If you’re not a morning person, so what? All you’re saying is that you’re not great at waking up. So wake up earlier, and get over your “not a morning person” time, then get to work.

If you get up early and start doing something meaningful, there’s going to be a few things that happen:

  • You’ll start slipping away to bed earlier, because you’ll be tired earlier in the evening. Embrace it.
  • You’ll start to lose interest in gossippy, trendy fads.
  • Things you have wanted to learn will start to get learned.
  • Projects you have wanted to work on will get some attention.
  • It will be easier to walk away from your work during the day/evening and spend time with your family because you’re constantly achieving.
  • You will see less value in lower forms of entertainment (reality shows) and greater value in the investment in yourself and time with your loved ones.
  • You will be happier because you will feel like you’re accomplishing something nearly every single day.
  • You will appreciate your rest much more

Oh, yes, rest is important. And I don’t just mean sleep. No athlete worth her salt trains every day of the week, nor should you. Take a day off every week (I try to practice a digital Sabbath) and let yourself recharge. And balance your efforts (I take a walk before and after work). I will write on this soon, as it’s especially important for me as I am a remote worker.

    But, But, But…I Like my TV Shows! And I don’t Like to Get up Early!

“Can’t I just do this before I go to bed?” Sure, if that’s what you prefer. But why wait until your last hours of the day – as your concentration and willpower fade – to invest in yourself?

My morning ritual is easy: I get up, put the coffee on, do a quick workout (sometimes as short as 10 minutes), shower, grab my cup of joe and get to work. This takes less than 20 minutes, so I get up about an hour before the rest of the household. Want to know something crazy? I don’t even set an alarm. But, more on that in a future post.

legocreative

My 11 year old son loves Lego and Dr. Who. He wakes up a couple of times a week and spends 10-15 minutes or so looking at online projects that other Lego-Whovians have built, and then tries to re-create them, or just builds his own, even recently getting into painting his own characters. He gets it: if he wants to learn how to do something, he’s got to put some time into it. He’s got school during the day, homework and music lessons during the evenings, and his parents make him get a reasonable sleep in each night. When else can he do this?

So, wake up early, close down your unnecessary browser tabs (Twitter, Facebook, email) and get some real s#@t done. Spend your early mornings on yourself, your daytime on your job, your evenings with the people you care about most and get a good night’s sleep. It will change your life for the better, guaranteed, or I’ll double your money back.

And happy coding. Smile