Group Hug: Surface, Office, and SkyDrive

I’ve been using SkyDrive for a while but in a very casual way. My OneNote notebooks are there so I can access and sync them across multiple devices. My phone pictures are there from when I had a Windows Phone. Other than that, I haven’t used it for much.

That changed big-time when I got my Surface, though.

One of the big selling points of Surface was that it was a tablet with Office. In order for me to realize my dreams of never-ending productivity, I need the ability to share documents between my Surface and other computers easily and efficiently. I knew that Office 2013 added integrated SkyDrive support, so this was the obvious sharing solution to me. I wasn’t expecting more than an online repository for my documents that I could access from multiple machines, but Office 2013 and SkyDrive provide a cross-machine experience that am absolutely delighted with.

So what do I like so much about it?

First of all, it’s easy to use. It’s the default save option, much like “My Documents” used to be. I don’t have to install any additional software or worry about services running to synchronize the contents of a folder. I don’t need to remember where a synched directory is, and I don’t have to do any browsing. I click “Save,” and I’m there.

 

The next reason I’m sold on the Office + SkyDrive solution is that it’s seamless across computers. When I create a new document on my Surface and save it to SkyDrive, that document shows at the top of the recent documents list on my work laptop. How cool is that!? Without doing anything more than using Office and saving to SkyDrive, I can move from computer to computer and pick up exactly where I left off.

The third reason that I’m sold on this solution is that, in addition to incredible machine-to-machine experience, you can also access your documents from the web. The Office web apps are very impressive; they look and feel just like their desktop counterparts.

I know that there are ways to do all of what I’ve described using other solutions. I’ve been a fan of Google Docs for a long time, and it’s been my go-to resource for personal documents that I need to access from the web. At work, it’s a different story. I can’t get away from Office, and getting the features I’ve described above from other services requires effort and, often times, leads to a more complex process. Office and SkyDrive give you all of this out-of-the-box with no effort. Now throw Surface into the mix, and it feels the holy trinity of mobile productivity.

Advertisements

Support for Zip Archives in .NET 4.5

I was catching up on some MSDN Magazines that have been piled up and collecting dust for a few months, and I found a nice little article titled What’s New in the .NET 4.5 Base Class Library. The biggest news is the simplified asynchronous programming. This is huge, but I’ve had enough of it shoved down my throat since first hearing about it at PDC in 2010. Now, that’s not to say that I’m not excited about it; it’s just old news for “what’s new” to me.

I kept reading, though, and came across a section about new support for zip archives. I don’t do a lot with zip files, but it does come up from time to time. In the past, I’ve always been surprised that this wasn’t something natively supported in .NET. I’ve had to use open-source solutions like SharpZipLib (GPL) and DotNetZip (Ms-PL), but I always felt like I shouldn’t need a 3rd party library. It looks as though Microsoft agreed with that sentiment.

It seemed pretty cool and easy enough to use, so I wanted to check it out immediately. Here are some quick examples of how to take advantage of some of this new functionality in .NET 4.5. I created a WPF application that allows you to do each of the functions listed below. Note that the code samples reference some additional methods that aren’t included here. You can view the complete source on GitHub.

Extract an entire archive

private void OnExtractArchive(object sender, RoutedEventArgs e)
{
    var archive = PromptForOpenFile(
        string.Empty, ".zip", "Zip archives (.zip)|*.zip");
    if (string.IsNullOrEmpty(archive))
        return;

    var destination = PromptForDirectory();

    ZipFile.ExtractToDirectory(archive, destination);
}

Extract a single file

private void OnExtractFile(object sender, RoutedEventArgs e)
{
    var archive = PromptForOpenFile(
        string.Empty, ".zip", "Zip archives (.zip)|*.zip");
    if (string.IsNullOrEmpty(archive))
        return;

    using (ZipArchive zipArchive = ZipFile.Open(archive, ZipArchiveMode.Read))
    {
        var itemToExtract = PromptForArchiveEntry(zipArchive);
        if (itemToExtract == null)
            return;

        var target = PromptForSaveFile(
            itemToExtract.FullName, string.Empty, "All files (.*)|*.*");

        using (var fs = new FileStream(target, FileMode.Create))
        {
            using (var contents = itemToExtract.Open())
            {
                contents.CopyToAsync(fs);
            }
        }
    }
}

Create an archive from a directory

private void OnCreateArchive(object sender, RoutedEventArgs e)
{
    var dir = PromptForDirectory();
    var target = PromptForSaveFile(
        "Archive.zip", ".zip", "Zip archives (.zip)|*.zip");
    ZipFile.CreateFromDirectory(dir, target);
}

Add a single file to an archive

private void OnAddFileToArchive(object sender, RoutedEventArgs e)
{
    var archive = PromptForOpenFile(
        string.Empty, ".zip", "Zip archives (.zip)|*.zip");
    if (string.IsNullOrEmpty(archive))
        return;

    var file = PromptForOpenFile(
        string.Empty, ".*", "All files (.*)|*.*");
    if (string.IsNullOrEmpty(archive))
        return;

    using (ZipArchive zipArchive = ZipFile.Open(archive, ZipArchiveMode.Update))
    {
        var name = Path.GetFileName(file);
        zipArchive.CreateEntryFromFile(file, name);
    }
}

Watch CNN on Surface

I’m bizarrely addicted to watching CNN in the mornings. It’s part of my routine. I can’t function without it. Recently, in an effort to become healthier, I invested in a treadmill. My thought was that all of my CNN time in the morning could just as easily be spent on a treadmill–two birds, one stone, right?

Not so fast, my friend.

The problem I ran into was that I couldn’t hear the TV unless I cranked the volume up to 70. This is a solution, but I don’t like it. I don’t want to keep the volume maxed out on the TV. My next thought was wireless headphones. Good thought, but I don’t have any. I also wasn’t excited about potentially having to switch between audio modes on the TV, having to possibly introduce a stereo receiver, or any other audio shenanigans.

So then I had another good thought: I’ll just stream CNN through their website on my phone! I couldn’t get it to work. Okay, I’ll use my wife’s iPad to do it, then! I couldn’t get it to work. Oh, well. I guess I’ll just watch Netflix on the treadmill.

Several weeks later…

“Oh, yay! My Surface is here! Wait a minute, this thing’s got IE10 and Flash–surely it will be able to stream CNN from their website!!”

Guess what? It didn’t work. Not right away, anyway. With some tinkering, I was able to actually get it working, though! I don’t love the solution because it’s way more than a casual user would ever think to try, but I’m still happy to have it.

There are three things that I did to get it working:

  1. Run IE from Desktop Mode. I’m not sure why this is necessary, but it works in desktop mode and not in tablet mode. If you know the solution to this, I’d love to hear it. But for now, I’ll just flip to Desktop Mode and run a shortcut from the desktop. (Additionally, I wasn’t able to figure out how to access the Trusted Site list from tablet mode, which is needed for the next two items…)
  2. Add cnn.com to the list of trusted sites. This is what I thought would solve the problem. I thought that for sure the issue was just that CNN wasn’t able to save whatever authentication cookies needed to be saved. However, after adding cnn.com to the list, the page got stuck in an authentication loop where the page would just keep refreshing and asking my to choose my provider.
  3. Add adobe.com to the list of trusted sites. This was the key. It appears that the authentication is routed through adobe.com, and a cookie is expected when you get back. The cookie was being blocked, and that’s why I was then asked to authenticate again.

CNN streaming on Surface

There was a fourth thing, but it was a little different. I wasn’t able to scroll the list of available programming. I was able to fix that by zooming out with Ctrl + -. Like the rest of my solution, it wasn’t ideal, but it worked.

So, at the end of the day, I had what I wanted. I can stream CNN live from my Surface, and I can use headphones to hear what’s going on over the wirrr of the treadmill. I guess I need to find a new excuse to avoid working out in the morning.

Where the F are the F Keys?

One of the not-so-obvious-to-solve things that I’ve run into while using my Surface over the past few weeks is that neither the Touch Cover keyboard nor the on-screen keyboard have any F keys. This isn’t something that I use a ton, but there are a few things that I do use them for. I really missed them when I needed to do those things.

As an example, I wanted to spell check a Word document. F7? Nope. I had to hunt around in the ribbon until I found it. Later, I wanted to rename a file on the desktop. F2? Bah! Guess I’ll just right-click and rename like the old days.

“Maybe they built it into the Fn key… Fn+1 = F1, right?” I thought. No dice. “What about the Windows key?” Nothing.

Today, I finally broke down and did some Googling. I found this article that revealed the secret. The F keys are Fn options on the top row of keys: mute, volume down, volume up, etc. I tried it out by going to Desktop Mode, selecting an icon, and pressing Fn + Volume Down (F2). Sure enough, it worked. It’s annoying to count out the keys since I don’t them memorized (and I’m not smart enough to read the number keys just below them…), but I’m happy to have them back.

Now I just need to relearn spell check as Fn + Devices. *shrug*

Code-a-thon

Some co-workers and I were out to lunch with my manager a few months ago, and the concept of 20% time came up. In case you aren’t familiar, the idea is that 20% of employees’ time is allocated for them to work on whatever projects they’d like. The thought behind this is that it will energize the team, promote personal growth, and unleash innovation. In fact, “free time” like this has been responsible for several staples of modern life like Facebook chat and the Post-It Note.

Doing 20, 15, 10, or even 5 percent time would be difficult to implement, but there are alternative methods to accomplish the same thing. And while this was a radical idea for our organization, we decided to move forward and host a team event loosely modeled after Facebook’s hackathons. We called it the code-a-thon.

The Rules

In an effort to make the event sellable to the rest of the organization, we needed to put some structure around the event. This would allow us to give freedom to developers to work on projects that they chose and that they were passionate about and, at the same time, demonstrate the direct business value to the company. Here are the rules that we came up with:

  • Projects must be submitted for manager approval prior to the event. I’ll be honest—I wasn’t a fan of this, but I realize its necessity. In order to really capitalize on this and communicate the value of innovation to the rest of the organization, the projects needed to be something related to the business. I hope to eventually remove this restriction in future events.
  • Employees can work alone or in teams. We had several meetings leading up to the event to help organize employees into teams. We ended up with 6 teams, each with 2 to 5 team members.
  • Teams will be given 48 hours to implement their projects and create presentations.
  • Teams will present their projects to a panel of judges.
  • Presentations will be strictly limited to 15 minutes.

The Event

We began the event by having all teams meet for a short kickoff with breakfast provided. This gave us a chance to review the rules and parameters of the event and allowed an opportunity for any last-minute questions. After the meeting, the teams separated and were left to their own devices. From that point on, I can only speak about my team’s experience.

My team began by coming up with prioritized milestones for our project. We were using a new 3rd party tool that none of us were very familiar with, so reaching our first milestone was achieved through group R&D and prototyping. By midday, we had something that was functional and ready to be re-implemented into our project. And, by the end of the day, we had reached our second milestone, which was essentially getting our prototyped enhancement functional within the application we were enhancing and having it operational with actual data. All the teams came back together for an end-of-day dinner of Chinese food and pizza—yum!

Day 2 began with our team getting back together and reviewing some additional work that was done after separating for the night. We then got to work on our next milestone, and, once that was reached, we shifted focus to our presentation. As part of the presentation, we made a (crappy) video to help illustrate the motivation behind our project and add some comic relief. The second day ended with us having reached all of our pre-project milestones and having implemented some “2.0” ideas that we didn’t think we’d have time to get to. There was another all-teams dinner, and I was excited to see how many teams showed up late because they were feverishly working their projects to completion. I was also happy to see a number of very-late-night source control promotes.

The third day had just 2 hours reserved for demos. Each team presented for 15 minutes to our panel of judges. I think it’s safe to say that all expectations for the event were exceeded, across the board. The judges were managers from other parts of the organizations, and all of the demos were followed with questions like, “When can we get this?” and “How soon before we can get this to customers?”

The event was a tremendous success, and there’s been a lot of buzz as word has begun to travel to other parts of the company. We’re already planning on having our next code-a-thon in Q1 2013.

What I’d Do Differently

While the event was definitely a huge success, there are some things I wished I’d done differently—mostly from an implementation perspective.

First, I wish I’d done more research upfront. My thought going in was that I shouldn’t do work, because the spirit of the event is to see what I can accomplish from scratch in the allocated time. However, this lead to feeling unprepared, and I didn’t feel like the team had a clear direction or vision for what we were trying to accomplish.

The other thing I’d change is to limit the time to just 24 hours. At the end of day 1, it seemed like most people just sort of called it a day. It was anti-climactic, and I wasn’t feeling the passion. Day 2 was an entirely different story because of the deadline. People were scrambling, working late, and trying to get it all together. That part was great—I loved it. I think having a second day just causes the first day to be a bit lackadaisical.

That’s really all I can come up with for changes I’d make to what went down. It was a productive two days that did a good job of demonstrating that our people are passionate about what they do and have good ideas. Given time and freedom, we can do great things. I’m definitely excited about this new step that we’ve taken, and I’m looking forward to the next one!

1DevDay Detroit Recap

On Saturday, I attended the 1DevDay conference in downtown Detroit. This was my first year attending, and I didn’t have much in terms of expectations. That’s not to say that I had low expectations; I just didn’t know what to expect. I definitely got more than I was hoping for, and I’m already looking forward to next year’s conference.

So what did I get out of it?

My biggest takeaway came from keynote speaker Ted Neward, who gave a presentation titled “Iconoclasm.” He talked about several historical man versus machine moments, making the point that eventually the machines always seem to win in the end. Automation will eventually kill the status quo. He’s speaking about it in terms of developers and programmers but points out that this is not unique to our industry. Doctors are competing with web sites like WebMD and lawyers with LegalZoom. “Automation threatens programmers more than all other outsourcing sources ever could,” he says.

“How do we stop it?” Neward asks. Well, we can’t. If we continue to do the same job today in the same way it’s always been done, it’s likely that automation will be able to eventually make that job obsolete. However, he goes on, the human brain has the ability to do something can’t be automated. People can think outside the box and invent new ways of doing old things to make progress.

And that’s how programming will survive, according to Neward. He talks about iconoclasts, “destroyers of icons.” He uses historical examples of figures that have had great success by being outside-the-box thinkers, and also some that have failed. In order to be successful, you must combine ideas with execution, and that must be combined with social intelligence. If you aren’t able to convince others that your idea is great, you might as well have not had the idea at all.

Following the keynote, I went to a session by Jessica Kerr: “Functional Principles for OO Development.” I haven’t done much in terms of functional programming, and I think this actually worked for me in the opposite direction. I already do a lot of the recommended practices in my OO programming. This session gave me a way to articulate some of these things that I was doing and gave me some insight into how I can apply them as principles in functional programming.

That was followed by a session by John Hauck where he demonstrated how the GPU can be used to do insanely fast computations. While impressive, this probably isn’t something that I’ll be able to take advantage of immediately, and so I was less interested. (Sorry, but it’s true.) Still, I plan on sticking this in my back pocket until a need arises.

Then came lunch, and a session about asynchronous programming. This session expanded on the async/await keywords, showing how they can be used to solve several different problems and caveats of each.

The second session of the afternoon was a good one. Chris Marinos spoke about F# and why it may or may not be relevant to you. He did a good job of getting me—someone who has been exposed to F# several times before, but has never been intrigued enough to actually try it—excited to actually try it. He tried to present the language in terms of what business value it provides, and he went through tips and “gotchas” for adopting the language. I’m particularly interested in checking out the type providers.

I ended up skipping out on the last session of the day to fraternize with co-workers.

The day ended with a second keynote speaker, Chad Fowler. I’m a big fan of Fowler’s, having read his book The Passionate Programmer. The focus of his presentation was really how to take a lot of what we do as engineers and apply it to your personal life. I enjoyed seeing him speak and was grateful to have him there, but I felt like he never really got to where I thought he was taking us. He’d talk about what we do in the world of software development and relate it to something that he tried that didn’t work. I’d expect him to tell us how he refactored it to work, but instead he’d say something like, “But maybe it’ll work for you,” and move on to the next point. With that said, I did enjoy the content and was excited to have someone that I admire greatly speaking at my local development conference.

That was my 1DevDay experience. It was a long day, and I feel like I got a lot out of it. There’s really not much more that you can ask for from a one day, local development conference!

First Impressions: Surface RT

I broke down and ordered a Surface RT last weekend. After what felt like the longest week ever, I finally got it today. The thing that I was most looking forward to was the Touch Cover keyboard, so I figured what better way to try it out than by writing a quick blog post!

The honeymoon is just beginning, so you won’t catch me saying anything negative here. I’m not sure what I expected from the Touch Cover, but it’s definitely cool. The buttons have a fabric-y texture to them. There’s definitely a learning curve, but my ability seems to be improving by the sentence. The trick seems to be in figuring out how hard to “punch” the buttons so they register. Touch too lightly, and it won’t go. But, the more I use it, the faster I’m able to go and the more I like it.

The keyboard/kickstand combo works surprisingly well for lap-computing, too. I’d read mixed reviews about that. Some said it was completely inadequate. Others said that it was sturdy enough but not idea. I’m finding that it’s perfectly acceptable. I’m currently typing with the kickstand balancing on my thighs, and, aside from the screen bouncing a bit as I type, it seems perfectly fine. I’ve also used the keyboard with no kickstand, propping the screen up on my crossed leg. That worked fine, too.

I haven’t gotten into the software much, yet. It’s mostly been installing apps that I already know like Netflix. I checked out Office, and that was really cool. It definitely gives a desktop experience, even switching into “desktop mode” and displaying the taskbar.

I’m looking forward to getting more familiar with my new friend over the coming days and weeks. I’ll be giving it a conference trial tomorrow at 1DevDay Detroit, too.

A Gripe About Skype

I haven’t really ever been interested in Skype. I can’t explain why, because that’s usually the kind of thing that I’m into, but I just wasn’t. With out-of-town parents and a baby on the way, things have changed, though. Skype seems like the perfect solution for helping grandma and grandpa maintain a visible presence long distance.

So my dad was visiting, and he brought his laptop and wanted me help him get it set up. “No problem,” I thought to myself, “Tons of people use Skype, and it’s gotta be super easy.”

I headed over to Skype.com, clicked their “join” link, and was presented with some options: create a new Skype account or join with Facebook or a Microsoft Account. Well, Microsoft recently acquired Skype, so I figured I’d use my trusty Live ID. I signed in and signed up. I had my dad do the same with his Hotmail account. (Hotmail? C’mon, Dad.) We did a test call and everything worked great.

Until…

I wanted to install Skype on my phone. I popped open the Play Store, downloaded, and installed the app. I opened it and was presented with a login prompt that wanted my Skype Name and password.

Skype Name? I signed up with my Microsoft Account, so it’s probably my email address, right? Nope.

It probably created a Skype Name for me when I signed up. I thought that, surely, I could log in to Skype.com to find it. Yep, there it was: “live:prescott.adam.” That’s my Skype Name. Let me log… in… with… that–didn’t work. “Unrecognized Skype Name,” it says.

But wait! They have a Skype Name recovery tool; I’ll give that a shot. Clicked the link, entered my email address, got an email. Super. Let me just click… the… link… and–didn’t work. “Unrecognized token.” But there’s a prompt, and the email had a token. I copied/pasted the token: same result.

Blurg. I figured I’d check the forums to see if others had run into this. I found nothing. “I guess I’ll email support.” But, guess what? I couldn’t submit my question, presumably because of my “invalid” Skype Name. I finally decided to email contactus@skype.com, and I got a response. They gave me directions on how to change the password on my Microsoft Account. “Thanks, guys.”

That was this morning. I still don’t know what to do about this, and I’m really annoyed by it. If the right path is to sign up with Skype and then merge accounts, then don’t give me an option to join with another account. As of now, I feel like I have a handicapped account because of how I signed up. That just seems wrong.

Has anybody else run into this? Does anybody have a solution?

11/21/2012 Update:

An updated version of the app was released yesterday, and it now provides an option for logging on using a Microsoft account. I’m happy for the solution, but I’m disappointed that support couldn’t have told me that this was a known issue to be resolved in a soon-to-be-released update.

Why I Ordered a Surface RT

After much deliberation and several flip-flops on whether or not I wanted an RT, Pro, or any Surface at all, I finally decided to go for the RT. I’m super excited about it. Like most developers that I’ve talked to about it, my initial reaction to the RT and lack-of-Pro availability was disappointment. “I need Pro so I can install Visual Studio and do EVERYTHING,” I told myself. The more I thought about it, though, the more I realized that I don’t want to do everything on my tablet, though.

My work-provided laptop is my primary development environment, and that’s not changing any time soon. What do I really want/need in a tablet? I’ve got a short list:

  1. Couch companion. I need fast coffee-to-internet times from an “off” state. My netbook currently fills this role, but it can be slow to boot/wake up.
  2. Keyboard. If I’m typing an email or document, an on-screen keyboard is simply not sufficient. Again, this is where I turn to my netbook. I also want the ability to take notes quickly in a meeting. I don’t take my netbook with me to work, so I tote around my behemoth laptop for this.
  3. Big screen. I was excited for the Kindle Fire to be my poor-man’s iPad, but I found that the internet experience was more similar to a phone than a laptop. The small screen requires way too much zooming in and panning around.
  4. Compact. If I’m reading on the couch, in bed, or at the doctor’s office, I don’t want something bulky.

Surface hits on all of these, plus it gives me the ability to connect to a projector or TV with the VGA and HD adapters. This could put an end to my days of camera-phoning whiteboards!

Jeff Atwood did a good job of getting me more excited in one of his recent articles, too:

Surface is just like the first iPad in that it has all the flaws and rough edges you’d expect in a version one device. But it is also like the first iPad in that there is undeniably the core of something revelatory and transformative here – a vision of the future of computing that doesn’t sacrifice either keyboard or touch.

Reviewers think Surface is intended to be a tablet killer, but it isn’t. It’s a laptop killer. After living with the Surface RT for a few days now, I’m convinced that this form factor is the replacement and way forward for the stagnant laptop. I can’t even remember the last time I was this excited about a computer. The more I use it, the more I think that touch plus keyboard is the future of all laptops.

How wonderful it is to flip open the Surface and quickly type a 4 paragraph email response when I need to. How wonderful it is to browse the web and touch whatever I want to. And switching between the two modes of interaction – sometimes typing, sometimes touching – is completely natural. Remember when I talked about two-fisted computing, referring to the mouse and keyboard working in harmony? With Surface, I found that also applies to touch. In spades.

My Surface should be arriving this week, and I’m certain that I’ll be writing about it again. I’m very excited.

Traditional vs. Agile Development

I was poking around the Microsoft Patterns & Practices site on MSDN, and I found a terrific comic that illustrates traditional versus agile development.

Just today, I was doing project planning with co-worker where we were discussing “just doing all the data access at once” versus “building basic (but testable!) end-to-end functionality and enhancing as we progress.” This comic happens to do a great job of comparing these two approaches and highlighting the risks associating with building individual components separately without an appropriate test framework. If only Dr. Frankenstein had been more agile…