Scott Hanselman

Social Networking for Developers - Conference Talk Video

April 22, 2009 Comment on this post [13] Posted in Back to Basics | Programming | Speaking
Sponsored By

UPDATE: Better quality videos from another conference were found and are up here.

First, a disclaimer. This is some really seriously guerilla video. Paul Mooney was kind enough to bust out his video camera and film my keynote at Devscovery in NYC this last Monday. (This was the same trip where I hung out at the Fog Creek offices and did a "Hanselminutes on Channel 9" video.)

Paul edited the video and put it up on Blip.tv. Here's a link to the WMV file if you want to download it. You can also watch it embedded at Neuronspark. He put a lot of work into the editing, so thank you Paul for your community efforts!

I was a little silly so it was a lot more informal then most of my talks. I ran it like a classroom/university lecture with a lot of interactivity. Basically, the talk was loose, so be aware.

One of the things that I liked about this talk was that the talk was largely influenced by a StackOverflow question. The idea was to make a talk about Social Networking using a Social Networking site. I also think, that while the question isn't a programming-specific question, it's a good example of all things community (crowd-sourced)-related.

People voted on the best answer, some voted to shut down the question completely (!), comments broke out in the question and some answers, and the question was eventually turned into a "community wiki" question with collective ownership.

Here's a snapshot of the StackOverflow question (in case it's edited). Forgive the self-quoting:

How can social networking sites make you a better developer?

I am giving a keynote at Devscovery tomorrow at 9am. The title is "Social Networking for Developers." It's 90 minutes long and I don't want to waste anyone's time.

Everyone I talk to who uses Twitter, Blogs, StackOverflow, etc, says that these sites make them "better developers." However, few are able to qualify HOW and fewer will are able to quantify HOW MUCH better.

Is it just about getting answers to questions? Is it about the developer's third place?

Help me, O Stack Overflow, O great social network of developers, with my Keynote on Social Networking. ;)

What makes developers, usually an anti-social bunch, strive to use the internet for social purposes?

How do Social Networking sites help you better do your job?

And here's the answer with the most votes, from Rob P.:

  • Social Networks are loaded with people who will remind you not to wait until the night before a talk to ask such questions :)

But seriously, I think the biggest thing it does is remind people what a good developer can be. If you are someone who enjoys to go for a jog 2-3 times a week, you could very easily be the best runner you know. You might think that what you do is at or near the limit of what anyone could expect to do.

Until you go to a 5k filled with other serious runners. Then you realize where you stand.

As a younger/not so great developer - I used to think I was a great developer. I was the best developer in my family, the best developer of all my friends and when I finally got into programming classes at school, I was the best then. Even in college. And, honestly, even in a lot of the jobs I've had.

The reminder that there are other people out there who really are leaps and bounds ahead of me and the exposure to things I didn't know existed or were possible - gives me something to strive for.

The answers and resulting discussion, along with some tips I've developed on blogging added up to a fun talk where I eventually ran out of time. I hope to give this talk again in a more organized and formal setting in the future.

Enjoy!

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 bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Low Bandwidth View and other Hidden (and Future) Features of MSDN

April 18, 2009 Comment on this post [37] Posted in ASP.NET | Microsoft | MSDN
Sponsored By

Ok, so I'm only 8 months late. ;) Last year MSDN quietly implemented a "low bandwidth" view.

Low Bandwidth MSDN

Basically, instead of visiting:

http://msdn.microsoft.com/en-us/library/system.xml.xmlnode.aspx 

you could add "(loband)" to the URL, like:

http://msdn.microsoft.com/en-us/library/system.xml.xmlnode(loband).aspx

Instead of the standard MSDN page:

XmlNode Class (System.Xml) - Windows Internet Explorer

You'd get a nice streamlined version. This is great for not only low-bandwidth situations, but also phones, pdas, screenreaders, etc. More on that in a second.

XmlNode Class (System.Xml) - Windows Internet Explorer (2)

Jon Galloway noticed this last August and even made a nice bookmarklet to make it easier to get into this view. Fast forward until last week when I noticed that this existed. I started digging around, because not only was it cool, but my spider-sense was telling me there was more underneath the story.

I called Kim, the Development Manager for the project and I asked as many leading questions as I could, in order to find out what they were planning to do with this, how it was done, and if there were any hidden features. Sometimes folks kind of give MSDN a hard time for having fat HTML, lots of scripts, etc, and generally being slow. Turns out there's a whole ongoing project to make MSDN way faster and it's already seen some really significant improvements. I've got some internal slides she smuggled my way that I'm going to share with you here, so don't tell. I figure show first, ask question later, right? This is great stuff.

MSDN Performance

They use a number of tests at MSDN to see how fast the site is running, including Gomez and Keynote. Keynote and other tools not only do testing like YSlow and the like, but they do location testing to make sure the site is fast all over the world. That means testing it on a modem in China and DSL in Australia, etc. For example, you'll see Guangzhou, China appear in the slide deck a lot because it happened to be where MSDN loaded the slowest. The roll-up slides (for bosses) show Seattle, Paris and Beijing. In some places there was missing data.

Here's a slide from last Feb before the big performance push started. Notice the page sides is between 200-250k and the response time in China is 10 seconds. Good, I suppose, but not fast.

image

They'd test MSDN on first load, then second (cached) load. They called that PLT1 and PLT2 respectively. The first load of MSDN was like 1.3 megs. Insane. Adobe's site was 800k+, Java's was 800k+, but library sites like Ruby and Eclipses around 200-300k. A meg is not cool. They broke it down by JavaScript, HTML/CSS, Images, etc.

image

Over the next few months, they started moving CSS and scripts to separate DNS for HTTP Pipelining, reduced the number of redirects, were smarter about JS caching, lazy-loaded the Table of Contents. They started caching scripts at CDNs like Akamai and ChinaCache, reduced or removed ViewState.

Then the idea of flipping the whole thing on its ear happened. Rather than removing this and that, why not remove EVERYTHING, and only add back what was needed. Hence, the loband version was created.

Here's some performance tests between the loband MSDN on an unnamed technologies very-fast library site (you'll have to click the image to see the numbers):

image

The loband MSDN site can get sub-second times in the states and very close to one-second times outside the states, including Guangzhou, our previously slowest location.

Early versions of loband were 25k, but some changes brought the average down to just over 15k. Caching changes and other optimizations brought the performance by region down to under 2 seconds basically world-wide.

image

Here's an interesting graph showing the size of JavaScript, HTML and images on MSDN and a bunch of other sites, including http://www.asp.net. In this chart, regular full MSDN in Feb of 2008 is the FAR left bar, and MSDN in July is the second from the left. The loband size is the second from the right.

image

image

You can click "persist low bandwidth view" if you want to make it your default. Also, they are paying close attention to the Feedback forum, so click that if you have more ideas. The next version of the loband site will be coming out in the next month and looks like this (sneak-preview):

XmlNode Class (System.Xml) - Windows Internet Explorer

They've removed the black bars, some markup changes, and the layout stretches horizontally better.

Additional MSDN "Switches"

I figured there can't just be the (loband) "switch" and I mentioned I thought that having to hack the URL was kind of wonky. Turns out that the whole MSDN system isn't a bunch of files on disk, but files in a database with an ASP.NET Virtual Path Provider. Tim Ewald wrote about how they did this WAY back in February of 2005. This was, at the time, kind of a poor-man's ASP.NET Routing:

The normalized path points to a file that does not exist on disk. Rather, the page data is stored in the content cache. The system uses a VirtualPathProvider (VPP) to bridge the gap between the two. In essence, a VPP intercepts all of the ASP.NET plumbing's requests for file streams and gives you a chance to load them from wherever you like. Every ASP.NET app uses a default VPP that simply maps to the file system. An MTPS-based site registers a custom VirtualPathProvider, which sits in front of the default VPP, forming a chain. The custom VPP uses the DocumentInfo and ContentSet objects that the HTTP module's OnPreResolveRequestCache event handler stored in HTTP context to load a topic from the content cache and return it as an .aspx file stream.

All of this is abstracted away, and what I'm calling a "switch" in the URL is what MSDN calls a "device" internally. The URL is just one way to indicate to their routing system that you are a certain device. The other way is via a User-Agent string, as you'd expect.

The content in MSDN is stored as XHTML, but then other controls are injected around it, similar to master pages. The whole page doesn't yet validate. If you think that's important, put it in the comments. If we get hundreds of comments here I'll pass them on to the team as "evidence," heh, heh.

There are in fact many "devices" for various reasons in MSDN. Most are turned on my User-Agent differences or for things like the Printer-Friendly view. However, you can force the device by inserting the device name in to the URL like:

http://msdn.microsoft.com/en-us/library/system.xml.xmlnode(device).aspx

There are also things called iRoots. For example, the word "Library" in the URL above is an iRoot. I could swap in the word "Magazine" and get a site that's skinned for MSDN Magazine.

Here's the devices I've figured out so far:

Low-Bandwidth - (loband)

This is the one we've been talking about. It's a minimal view, focused on one thing, speed.

http://msdn.microsoft.com/en-us/library/system.xml.xmlnode(loband).aspx

PDA - (pda)

The best view for phones or PDAs. Turns off the left side navigation and makes the page 100% width and flexible.

http://msdn.microsoft.com/en-us/library/system.xml.xmlnode(pda).aspx

Robots - (robot)

Optimized for search engines. Lots of meta data, no stylesheets, bare-bones. The Table of Contents is at the bottom of the page.

http://msdn.microsoft.com/en-us/library/system.xml.xmlnode(robot).aspx

Printer-friendly - (printer)

Optimized for printing and includes a call to window.print().

http://msdn.microsoft.com/en-us/library/system.xml.xmlnode(printer).aspx

Now, here's where it gets interesting...

MSDN Inside the (IDE)

When MSDN library content is viewed inside the Visual Studio IDE, a few things are added. First, the ability to Add Content via the MSDN Wiki is promoted to the top, as well as a "send" and "give feedback" feature. This is the view you get when you're inside the "Document Explorer" - the Visual Studio MSDN help browser.

http://msdn.microsoft.com/en-us/library/system.xml.xmlnode(ide).aspx

MSDN for Visual Studio 2010

This is still up in the air, but you can see some ideas with the (dev10ide) switch:

http://msdn.microsoft.com/en-us/library/system.xml.xmlnode(dev10ide).aspx

XmlNode Class (System.Xml) - Windows Internet Explorer (3)

Here's a zoom in to a nice detail. Currently on MSDN online there's a filter dropdown to choose what language you want to see code samples in.

image

This live prototype has the languages for code samples appearing as tabs (as see above) including the option to "View Plain" or "View Colorized." There's also links to Copy to Clipboard or Print just the sample directly.

Future MSDN Plans

From what I hear from Kim, there's plans in process now for the loband site to become the default site this fall. They'll call it something like lobandlight and it'll have some small additions like a search box, selectable codeblocks, but the focus will be on being fast and clean. If you have opinions either way, leave them in the comments here or in the loband forums and they WILL be read by the MSDN team. Also, right now loband only works on the library, so while you can try these "devices" on other parts of MSDN, it's only currently designed to work with the MSDN Library itself. If you feel strongly that other parts of MSDN need loband lovin', let me know here and I'll pass your comments on directly to my boss.

Thoughts?

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 bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Hanselminutes Podcast 158 - Secrets of Fog Creek with Joel Spolsky

April 18, 2009 Comment on this post [7] Posted in Channel9 | Podcast
Sponsored By

imageMy one-hundred-and-fifty-eighth podcast is up. I was in New York on Monday and I stopped by Fog Creek Software and visited with Joel Spolsky (co-creator of StackOverflow amongst other things.) He gave me a tour, we talked about their VBScript "Wesabe" Compiler and the history of FogBugz.

This podcast also includes a bit of video as a sidecar. I've started occasionally doing what I'm calling Hanselminutes on 9. Basically it's guerilla unedited video of various things when I happen to turn my camera on. The Fog Creek offices are legendary for their attention to detail, so I was sure to get Joel to give me a through tour. Note you can watch the video online, or click "Formats" and then Right-click Save As in any number of formats, including those for portable devices.

Subscribe: Subscribe to Hanselminutes Subscribe to my Podcast in iTunes

Do also remember the complete archives are always up and they have PDF Transcripts, a little known feature that show up a few weeks after each show.

Telerik is a sponsor for this show!

Building quality software is never easy. It requires skills and imagination. We cannot promise to improve your skills, but when it comes to User Interface, we can provide the building blocks to take your application a step closer to your imagination. Explore the leading UI suites for ASP.NET and Windows Forms. Enjoy the versatility of our new-generation Reporting Tool. Dive into our online community. Visit www.telerik.com.

As I've said before this show comes to you with the audio expertise and stewardship of Carl Franklin. The name comes from Travis Illig, but the goal of the show is simple. Avoid wasting the listener's time. (and make the commute less boring)

Enjoy. Who knows what'll happen in the next show?

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 bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

How to upgrade two out of four of your hard drives in Windows Home Server

April 17, 2009 Comment on this post [26] Posted in Home Server | Tools
Sponsored By

I love my Windows Home Server, it's saved my *ss and my marriage. ;) I bought an HP MediaSmart Home Server from Amazon. You can get various sizes, from 500gig up to 1.5 TB.

I think the best deal is to get the smallest one you can afford, and upgrade it when you start running out of space. That's what I did. You really can't go wrong because it's like butter (yes, rich, creamy butter) to upgrade.

When I first started, I had the two 500gig drives it came with. The HP supports up to FOUR drives at a time internally. Because I can't stand the empty slots, I threw in whatever drives I had lying around. I ended up with a 70gig (I have no idea why I put that) and a 300gig as drives 2 and 4. This gave me a total of about 1.25TB. This was fine when i started, as I only used up like 50% of the capacity.

image

Fast forward a year or so later, and I'd only had less than 20% left. A lot of space was taken up by backing up 6 different Home PCs, and a lot of was taken up by Family Photos and Videos from my new HD Camcorder. It was time to upgrade.

The system is always duplicating your files on as many disks as possible. It's not RAID, but it effectively gives you the same level of assurance that your data won't go missing. What's nice is that it supports drives of different sizes, rather than using either insisting on the same size driver, or using only the smallest drive size for all drives.

Here's how I upgraded my two smallest drives to new 1TB SATA Seagates.

Make as Much Room as Possible

This isn't 100% necessary, but I noticed that a LOT of my space was taken up by backups going back as far as 3 months. I really only needed the most recent ones, so I went into the Home Server Console and clicked "Backup" then "Backup Cleanup." This happens on Sundays automatically, but it's a good way to make a little space before a hardware upgrade like mine.

image

This operation, as with most "large scale" operations, will take a while. Maybe 10 minutes, maybe an hour, it depends on how large your stuff is.

Warn the Home Server you're Removing a Drive

Now you need to warn the Home Server that you're removing a drive. This is important so the Home Server can make sure ALL your files are sufficiently duplicated on more than just 1 drive. You are removing one, and it needs to make sure each file is on at least 2 other driver, as I understand it. This can also take a while, although it didn't for me.

I right-clicked the drive, clicked Remove. It tells me not to turn the machine off, etc.

3

When the drive is "remove" from the software, but not yet physically yanked out of the machine, it'll show up in the list as a "Non-Storage Hard Drive."

4

Notice that my free space went from 1.2TB to 1.02TB, so I lost about 200gig in this removal process. Also, at this point, the lights on the front of my server are 1 pink (the removed drive) and 3 blue (the remaining healthy drives.)

CIMG8787

You can technically pull these drives out and put them in with the machine is running, but I'm still paranoid and I figure it never hurts to shutdown first (which I didn't do in this particular picture.)

Swap the Drive Enclosures

I like the enclosures on the HP because they are tool-less. They require no screwdriver, you just pull aside one edge and these little rivets (not screws) pop themselves via a tension spring into the screw-holes on the sides of the drives.

CIMG8785

I put the new 1TB drive in the old drive's enclosure, and slide it into the HP. Push it into the machine, turn it on (again, I've done this hot-swap before, but still) and run the Home Server Console:

5

The drive shows up as a Non-Storage drive, but I just click Add and I'm given the choice to add the drive to server storage OR to use it to Backup the Home Server and my files. (I use an external drive for Server Backup.)

6

It'll run for a bit. After it's done, I tell the system to Remove the last small drive, and let it duplicate onto the larger one. Then I yanked the second small drive and repeat the process. Now Home Server reports I have 2.73TB total space, with 1.74TB free.

8

I like having the confidence that I can do this again at some point in the future with more cheap 1TB drives or larger. The whole operation took about an hour.

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 bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

Hanselminutes Podcast 157 - Hanselminutae-five with Richard Campbell

April 13, 2009 Comment on this post [8] Posted in Musings | Podcast
Sponsored By

My one-hundred-and-fifty-seventh podcast is up. Be warned! We may just waste your time with this show. It's Hanselminutae #5 with Richard Campbell. We talk books, Windows, Economics, being a Millionaire, Multiple Monitors, TweetDeck, and much much less!

Subscribe: Subscribe to Hanselminutes Subscribe to my Podcast in iTunes

Do also remember the complete archives are always up and they have PDF Transcripts, a little known feature that show up a few weeks after each show.

Telerik is a sponsor for this show!

Building quality software is never easy. It requires skills and imagination. We cannot promise to improve your skills, but when it comes to User Interface, we can provide the building blocks to take your application a step closer to your imagination. Explore the leading UI suites for ASP.NET and Windows Forms. Enjoy the versatility of our new-generation Reporting Tool. Dive into our online community. Visit www.telerik.com.

As I've said before this show comes to you with the audio expertise and stewardship of Carl Franklin. The name comes from Travis Illig, but the goal of the show is simple. Avoid wasting the listener's time. (and make the commute less boring)

Enjoy. Who knows what'll happen in the next show?

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 bluesky subscribe
About   Newsletter
Hosting By
Hosted on Linux using .NET in an Azure App Service

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