Scott Hanselman

Hanselman's Newsletter of Wonderful Things: January 7th, 2013

February 4, '13 Comments [7] Posted in Newsletter
Sponsored By

I have a "whenever I get around to doing it" Newsletter of Wonderful Things. Why a newsletter? I dunno. It seems more personal somehow. Fight me.

Still, it's one more site to check and it's a hassle for some of you  Dear Readers. Therefore, I will still do the newsletter, but I'll post each newsletter to the blog some weeks later.

You can view all the previous newsletters here. You can sign up here Newsletter of Wonderful Things or just wait and get them later on the blog, which hopefully you have subscribed to.


Hi Interfriends,

Thanks again for signing up for this experiment. Here's some interesting things I've come upon this week. If you forwarded this (or if it was forwarded to you) a reminder: You can sign up or sign down at http://www.tinyletter.com/hanselman and the archive of all previous Newsletters is here.

Scott Hanselman

(BTW, since you *love* email you can subscribe to my blog via email here: http://feeds.hanselman.com/ScottHanselman DO IT!)

P.P.S. You know you can forward this to your friends, right?

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

This Developer's Life 3.0.1 - Cancer

February 1, '13 Comments [35] Posted in Podcast
Sponsored By

thebigcBig thanks from both my wife and myself for the outpouring of support after our Cancer announcement. Last year was a long year and the Cancer part of the year was particularly long.

We were very private about the whole thing and waited to tell anyone until we knew we were mostly OK. However, to my surprise, the day of the diagnosis my wife, who has never shown much interested in podcasting announced "I want to record an audio Cancer Diary. Can you do that?"

So we did.

We honestly didn't know if we were going to publish this when we started but after a month of editing late into the night, we are.

This episode of This Developer's Life takes a half year of our lives and many, many hours of audio and turns it into a single hour show that Mo and I are happy to share it with you today.

This Developer's Life 3.0.1 - Cancer

I hope you enjoy the show and that you and yours are, and remain, healthy.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Cross Browser Debugging integrated into Visual Studio with BrowserStack

January 31, '13 Comments [18] Posted in ASP.NET | VS2012
Sponsored By

imageTL;DR - Too Long Didn't Read Version

  • BrowserStack Integrated into Visual Studio
    • From a debug session inside Visual Studio 2012 today with ASP.NET 2012.2 RC installed. Click the dropdown next to your Debug Button, the click on "More Emulators" to go to http://asp.net/browsers and get the BrowserStack Visual Studio extension and three months free service. There's other browsers to download as well, like the Electric Plum iPhone/iPad simulator.
      • SIDE NOTE: When the VS2012.2 Update is finalized, you'll need to install just it and you'll get the ASP.NET Web Tools as well.
  • New Online Tools for Modern Sites
    • Head over to http://modern.ie for a bunch of tools for making cross browser sites easier, including on online site analyzer and downloadable Virtual Machines for any Virtual Platform.

I do a lot of cross-browser testing and I've been on a personal mission to make "Browse With..." and multiple browser debugging suck less in Visual Studio. This has been going on for years.

But still, it's too hard. There's been some Virtual Machines up on the Microsoft Download Center but it's tedious to dig around and get the one you need.

BrowserStack

Today the IE team announced new site at http://modern.ie to make cross-browser testing easier. Even cooler, they launched a partnership with BrowserStack.com to give us all a three month free trial to their hosted browser virtualization service.

BrowserStack has a cloud of virtual machines with every browser imaginable. You can pick your OS, browser version and screen resolution, then effectively VNC (Remote) into them with their Flash plugin. It's totally seamless and really cool to see.

Here you can see how hideous my site is in IE6 on Windows XP running within BrowserStack. Keep reading, it gets better. Well, IE6 doesn't get better, but this story does.

My site looks like crap on IE6. As it should.

Integrating BrowserStack with Visual Studio 2012

Even better, I noticed that BrowserStack has nice hackable URLs like this:

http://www.browserstack.com/start#os=Windows&os_version=XP&browser=IE&browser_version=6.0&zoom_to_fit=true&url=hanselman.com&resolution=1024x768&speed=1

When I saw how clear it was, I immediately started writing a Visual Studio plugin - like within 5 minutes - then stopped after a half hour.

I said, this is too obvious. Someone has already done written this, right? I google. Yes, they beat me to it, 5 days ago.

BrowserStack already has a lovely Visual Studio Extension up and ready to go.  It adds BrowserStack as a new browser choice within your Visual Studio 2012 debug dropdown.

image

Start Debugging, pick my OS and Browser, in this case, Safari on a Mac running Mountain Lion.

image

After you sign into BrowserStack with an account, you can setup a tunnel (using Java, but you can do it from the command line if you don't want to use an applet) between your local web server and BrowserStack and even debug in the cloud. Fabulous.

image

After I've setup this tunnel, here I am debugging a website running local via a remote Mountain Lion Mac running Safari 6. Or whatever. You get the idea.

Remoting into a Mac and DEBUGGING with Visual Studio

Here am I at a breakpoint. Ya, it's freaking me out also.

Remoting into a Mac and DEBUGGING with Visual Studio

Again, if you've got VS2012, can you get this now any number of ways. You can go to http://asp.net/browsers, you can go to http://modern.ie or you can just click "More Emulators" within Visual Studio itself.

image

Have fun!

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Git support for Visual Studio - Git, TFS, and VS put into Context

January 30, '13 Comments [76] Posted in Open Source | VS2012
Sponsored By

VS loves GitDogs and cats, living together...mass hysteria. This classic Ghostbusters quote is used by many geek-types (myself included) whenever something crazy or unexplained happens.

Today Brian Harry from Microsoft announced Visual Studio 2012 Update 2 (or VS2012.2) the latest quarterly update. That's interesting, but it's the announcement of Git integration with Visual Studio and TFS that is really significant, in my opinion.

TFS in the Past

For me personally, the term "TFS" has historically meant "big scary corporate centralized source control" while Git has meant "small scrappy lightweight distributed source control." TFS meant connected (ZOMG, I can't code on a plane!) and Git meant occasionally connected (ZOMG, I don't know what rebase means!).

However, I learned that Team Foundation Server (TFS) isn't just source control, it's a whole bug tracking, change management, application lifecycle management (ALM) suite. Source control is one pluggable piece.

On the other hand, Git isn't just source control either. Git has become effectively FTP for code. I use Git to deploy most of my sites as mentioned in this blog post where have a site automatically deploy as I publish to GitHub. Git is also used as an interchange tool to move code between different SCMs, and it's supported everywhere, although Git tooling support on Windows has historically lagged behind.

Things start getting interesting if one could have Git as their source control with Team Foundation on the backend for ALM tools. Now Visual Studio 2012 supports both centralized version control and distributed version control in a cleanly integrated way.

Open Source - Working WITH Git

So Visual Studio is integrating Git. Suspicious? This might sound like the "embrace and extinguish" Microsoft from the 90's. Arguments can always be made, but I'm a coder, so I look at the code.

If you dig into the GitHub repo, you can see at least five Microsoft employees (phkelley, ethomson, jamill, martinwoodward, congyiwu) submitting pull requests to the libgit2 GPLv2 library (GPL'ed with a linking exception), including direct commits from phkelley who has earned that access. They work with all the libgit2 committers including Vicent Marti from GitHub. The team has been doing this for months and months. In fact, if anyone was paying attention to commits and pull requests they would have seen this whole convergence coming down Main Street.

 Libgit2 is a great library with a lot of attractive features (from their site):

  • written in portable and standards compilant C
  • completely multi-platform: Windows, Linux, Mac OS X, xBSD and more
  • compiled natively under all platforms (yes, even MSVC on Windows)
  • re-entrant, with sane error handling
  • designed with a solid and consistent API
  • available as bindings for all major scripting language

You can see below that this new Visual Studio Git support actually ships git2 and libgit2sharp and integrates it via a VSIX (Visual Studio Extension).

git2 and libgit2sharp

Visual Studio and Git

This Git support will require VS2012.2 (currently in preview) so you'll need to install that first, then get the VSIX. You'll be able to update both when VS2012.2 is released, and the Git VSIX will continue to update automatically via the VS Gallery. It's a full source code provider for VS so you can use it to do most anything without leaving VS, or you can hang out at the command line and use it for a visual reminder as to the state of your repository.

One file added, one file modified

You can see what will be included in a commit and what's excluded:

Commits to git, both included and excluded

You can make new branches, check them out, as well as see what branches are published or unpublished.

branching in Git in VS

In this screenshot you can can see Keith and I going back and forth on a Pull Request. Note that I've allowed VS in Git Settings to go to Gravatar and get a picture of Keith.

Git History and Gravatars in VS

Here's a screenshot of me managing a recent merge conflict with the VS diff editor then committing the change and pushing it to GitHub. All the diffing is integrated as you'd expect it to be, and available via a Right-Click.

Diff/Merge Conflict within Visual Studio with Git Support.

What's next?

I'm told that while this Git integration is currently in preview. The team work on a three week sprint cadence so expect to see frequent updates.  The plan is that in a future release Git will come baked in to all editions of Visual Studio - including Express. Perhaps we'll see PoshGit command line integration/support and maybe better support for the Git command line within the NuGet Package Manager Console inside VS.

Git within the NuGet Package Manager Console

Hosted Team Foundatation Services - Git or TF Version Control

You can use VS Git support with all your Git projects by just opening projects. It's just Git. I am pushing branches to CodePlex, to GitHub and other Git repos. I'm also continuing to use my other Git tools interchangeably, as I like.

Some teams I work on use Git, others  use TFS. It depends on the team, the company and the goals. Some teams have servers they run themselves, some use hosted Git services at BitBucket or GitHub. There's also hosted Team Foundation Services.

For teams, you can go up to http://tfs.visualstudio.com and sign up for a account and get 5 users for free. You can choose either Git or Team Foundation Version Control (TFVC) as the source provider and use all the Team Foundation agile, scrum or other templates for your ALM tools. I've actually got https://hanselman.visualstudio.com now for my "team." There's issue tracking, backlogs, scrum templates, a Kanban board, burndown charts and more. You can use the web app or use the Visual Studio integration to manage your bugs and backlog. There's even cloud build servers in preview.

TFS online kanban

I've said this before, but I'll say it again. This kind of open source collaboration stuff is why I went to work for The Man. Playing well with others, competing well while using and promoting open source. I don't think every group at Microsoft "gets" it yet, but it's cool to see the open movement spreading. I'm looking forward to using these Git tools for Visual Studio, as well as GitHub for Windows and PoshGit.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Plex is the media center software ecosystem I've been waiting for

January 30, '13 Comments [51] Posted in Musings
Sponsored By

Example Plex UI showing a MovieI've blogged about my Synology 1511+ NAS before and how I have added a few things to it like CrashPlan Cloud Backup and even discussed it on my podcast. When you have a headless server in your home, you're always looking for ways to utilize it.

I've long had shares like \\server\movies and \\server\photos for accessing family files from laptops around the house, as well as streaming home videos to the Xbox or PS3 via DLNA. I talk about how I streamed things in 2008 in this "Geek Developer Cribs" video.

More recently, I've tried using a Raspberry Pi as an ersatz media player along with AirPlay to throw videos from my iPhone/iPad up on the big screen.

Fast forward to 2013 and I've found Plex. It's amazing.

*pause for gravitas*

Plex is a whole ecosystem that is extremely polished, easy to setup and available on every device you'd ever want.

There are two main heavyweights in the media server space. Plex and XBMC. I've used both extensively. Plex is starting to monetize their platform while XBMC has more of a hacker/enthusiast vibe. You can accomplish most all you'd ever want with both, but at this point in my life, I'm OK with throwing a little money at the problem and I have happily given Plex my $30 for their UI polish and their new PlexPass feature that unlocks some goodies. I'm totally happy to pay a company for value and Plex provides extreme value. I'm choosing Plex.

What's Plex and Why?

So what is it? Plex is media server software that you have running all the time at home. Then, Plex is client (or clients) on your device (or devices) that you run to access your stored media. Most importantly, the killer feature is that Plex will transcode your videos depending on your device and network. That means that Plex will use the power of your server at home to dynamically squish videos so that they still play smoothly on your smart phone over 3G or your tablet over hotel Wi-Fi.

You install the Plex server on any system you have. You can run it on Windows, Mac, Linux, but that's not all. You can also put Plex on your Network Attached Storage appliance (NAS) like I have with my Synology. (For Synology systems, I strongly recommend a faster Intel machine, not the little ARM ones.)

Plex will also get art, descriptions, and generate thumbnails for your media. You might think this is a little thing but it really makes your whole setup feel more pro. It's also very clever. All you need to do is name something "title (year).ext" for movies and "show name/whatever SxEy.ext" (where x and y are season and episode) and Plex does the rest.

Plex Clients

There are Plex clients for iOS, Android, Windows Phone 7 phones, as well as for Windows 8 and Surface. On other Macs or PCs you can use Plex Media Center, and there's also Plex for Roku, LG TVs, Samsung TVs, and Google TV. It's magical.

Here's an example screenshot of the Plex Windows 8 client:

Plex example on a Microsoft Surface RT with Windows 8

Here's the VERY competent and recently updated web client. You can see my home movies in there with a Year filter. Here's a fishing trip from 2010.

Plex for Home Movies

Plex keeps track of the devices that have accessed your library. You can see some of my devices below.

Plex has a list of devices atached

Here's my home movies via the Plex iPhone app on the left, and an example screenshot showing movies on the right. You can add other "channels" for web video like CNN, Funny or Die, and more. There's even a bookmarklet you can put in your browser toolbar to add video to your queue for later. Great for those long Vimeo documentaries you'll never watch.

Plex Libraries on iPhone Plex movies on iPhone

The PlexPass I bought adds a feature called PlexSync that squishes content on the server then transfers the custom-transcoded result to your device for offline viewing. Super useful for airplanes and offline viewing.

Accessing Media Remotely with Plex

Plex really shines when you can access all your media from a hotel on your tablet. Forward a port, publish your server with your Plex username and you're set, in theory.

Port Forwarding is a hassle, but it's part of life if you want to really exploit your home internet connection. If you can successfully forward a port (or if Plex and use UPnP to ask your router to forward it for you) then you may be able to access your home movies from afar!

Once you've logged into the MyPlex service with your username, it will keep track of your servers and devices and let you access them when you're not on your home network (not on the same subnet.)

Plex with a port forwarded

I have an Actiontec Router, so be aware that every router is different, but the general idea is that you've got a Plex server running INSIDE your house and listening (always) on port 32400. That port - inside the house - never changes. What you want to do is to "forward" that port to some other port on the outside.

Here's what my Port Forwarding rule looks like in the list of rules. Note that this is a little confusing because I thought the arrow would point the other way, but the you would read this as "port 32400 on 192.168.1.18 is available outside at port 11366."

image

If you have trouble with high numbered ports, as I've heard some folks had, try mixing it up and be patient. None of the ports over 30000 worked for me but a lower number (not too low!) did work. Here's the form I filled out on my Router's admin page. Your mileage may vary, again.

Your settings are generally:

  • Source Ports, ANY.
  • Destination Ports, *the number you picked or that Plex picked for you*
  • Forward to Port, always 32400

A common mistake is putting your custom port number in source or destination. Remember that "Source Port" is their port, not yours.

image

Again, for lucky folks with new routers, Plex will handle all this hole punching for you. It not, open two browsers, one for Plex and one for your router and try different values. Plex will let you know when it's "published" your server. The MyPlex service will then associate your user name with your home's IP address and port, allowing you to access your home movies when elsewhere.

Conclusion

I really think Plex is something special and I encourage you to think about how Plex could become a part of your media server solution. I am not affliated with Plex in any way. I just think they are the cat's pajamas.

About Scott

Scott Hanselman is a former professor, former Chief Architect in finance, now speaker, consultant, father, diabetic, and Microsoft employee. He is a failed stand-up comic, a cornrower, and a book author.

facebook twitter subscribe
About   Newsletter
Sponsored By
Hosting By
Dedicated Windows Server Hosting by SherWeb

Disclaimer: The opinions expressed herein are my own personal opinions and do not represent my employer's view in any way.