Scott Hanselman

Using Crowdsourcing for Expanding Localization of Products

November 13, '08 Comments [33] Posted in ASP.NET | Internationalization | MSDN | Programming | Tools | Windows Client
Sponsored By

UPDATE: I wanted to add that these translation APIs are all part of Microsoft Translator services and are available for developers to use and build their own localized communities. The documentation is up on MSDN for AJAX/JSON, SOAP or POX (Plain old XML) APIs you can put in your apps today. Also, be sure to check out the Microsoft Translator Blog for more technical details on the V2 APIs and translator widget.

Not everyone in the world speaks English. Such a silly thing to say, but if you live in an English-speaking country it's easy to forget that many (most?) people in the world would prefer to do their work in the language of their choice.

Microsoft ships documentation in Visual Studio that is human-translated (a huge effort) into 9 major world languages. That's millions and millions of words * 9 languages. How can we cover more languages? How can we make documentation easier for folks who are trying to learn about our products and don't speak English fluently? How can we make English interfaces easier to use for non-English speakers who want to learn English?

Last month, I spoke to members of the internationalization/globalization team in DevDiv (Developer Division) about some of the little-known stuff they are doing. I think deserves more attention as there's some pretty innovative things being done. Some are experimental, but there's hope to expand them if they succeed.

MSDN uses Machine Translation and Crowdsourcing for Documentation

Doing a lot of work with a few people is hard. Doing a lot of work with a lot of people is confusing and expensive. However, doing a little bit of work with a LOT of interested people can be useful, cheap and fun if you "crowd-source" rather than outsource. Check out the screenshot below or visit the Brazilian MSDN site and check out the Translation Wiki v2.


You'll see there's the English MSDN documentation on the left, and Brazilian Portuguese on the right.


Make sure to select "side-by-side" or "Lado a Lado." If you hover over a sentence on the Portuguese side, a small Edit button will appear.


Click Edit, and you can suggest a better translation, and they'll go into a queue for community moderators to approve. Notice also that under "Other Suggestions" you'll see existing suggested translations that are in the queue for moderation.


The initial Portuguese text comes from the Machine Translation team. For some reason, Portuguese is the best language that the Machine Translation team understands.

The text on the site is roughly 80% MT (Machine Translated) and 20% humans via these technique, and growing. There's a goal to include more languages for the next version of Visual Studio, including possibly Arabic, Czech, Polish and Turkish, although things are still a little up in the air.

If you know a Brazilian developer, spread the word about this project and encourage them to make edits to the Brazilian MSDN site and check out the Translation Wiki v2.

Big thanks to our community partners: a group of 30 CS students, partly from the team of Prof. Hirata and Prof. Forster of Instituto Tecnologico de Aeronautica and the team of Prof. Simone Barbosa from Pontifícia Universidade Católica who post-edited 1.8 million words of MT'ed content; the Brazilian Terminologist who managed the glossary project with our MVPs; and finally the Academic Evangelist Team in DPE in Brazil who gave us their support throughout the project.

It'll be interesting to see how far this project goes and what other languages can benefit from it.

Captions Language Interface Pack (CLIP) - includes 9 more partial language translations for Visual Studio

Here's a description of the CLIP from a launching page:

"The Microsoft Captions Language Interface Pack (CLIP) is a simple language translation solution that uses tooltip captions to display results. Use CLIP as a language aid, to see translations in your own dialect, update results in your own native tongue or use it as a learning tool."

This is pretty clever. It's a background application that will show balloon tooltip help in your language while you work in the English version of Visual Studio. For example, in the screenshot below, I'm hovering my mouse over Start Debugging, and the Arabic CLIP pops up with a human translation of that menu item.


It'll even help with other applications within Windows if it thinks it's got a decent translation, but for now, it is focused on correct translation for common Visual Studio options.

Even better, you can add translations of your own. In future versions, there's talk about setting up sharing (I figure you can hack it today, though, unsupported, by sharing the language database.


Visual Studio CLIP is available in these languages so far, all created with community and student help!

In addition to the CLIP, there's also the ability to do a Language Pack for the Visual Studio interface itself, as exemplified by the Brazilian Visual Studio Express Language Pack for SP1 that does about a 70% translation of VS into Portuguese. There's talk to do more of these also. That should make Carlos Quintero happy!

There's a lot of cool possibilities for all this technology, expanding MSDN and VS to as many languages as possible!

If you think this kind of thinking is pretty cool, leave a comment or blog about it and maybe we'll be heard by *ahem* the boss when he next (soon) reviews plans for this kind of community involvement. ;)

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

Fixed: "Windows Process Activation Service (WAS) is stopping because it encountered an error."

November 12, '08 Comments [21] Posted in IIS | Tools
Sponsored By

I'm not yet clear what I did, but I'm blogging it so it can be found if someone else has this issue.

For whatever reason, last week both of my Vista 64-bit machines suddenly stopped being able to start IIS (Internet Information Server). The service just wouldn't start. I started getting this error instead "Cannot start service W3SVC on Computer '.'" which wasn't too helpful.


A visit to the System Event Log via the Event Viewer in Computer Management told me these four errors:

"The World Wide Web Publishing Service service depends on the Windows Process Activation Service service which failed to start because of the following error: The system cannot find the file specified."


"The Windows Process Activation Service service terminated with the following error:
The system cannot find the file specified."


"Windows Process Activation Service (WAS) is stopping because it encountered an error. The data field contains the error number."


"The directory specified for the temporary application pool config files is either missing or is not accessible by the Windows Process Activation Service. Please specify an existing directory and/or ensure that it has proper access flags. The data field contains the error number."

imageUnfortunately there's little information to go on in any of these error messages. However, it's clear (as mud) from the last error that there's a directory missing or not accessible. I'll add "anymore" to that because it worked before. That means that something changed.

If IIS won't start because Windows Process Activation Service won't start, then I need to get WAS started up first. However, I don't know what directory it doesn't have access to.

I can see from the Services application that WAS isn't its own executable, but rather lives inside of an instance of svchost.exe, where a lot of services live.

So I'll fire up Process Monitor and set the filters (filters are VERY important if you want to avoid being overwhelmed quickly in procmon) to show only svchost.exe processes.

Even still, there's a lot of svchost.exe processes out there and they will quickly fill the monitor up. I'll need to setup some strategic (read: guessed) highlighting as well.

The hotkey to stop capturing in procmon.exe is Ctrl-E. Basically I'll clear the screen, hit Ctrl-E to capture, try to start WAS (pronounced WAAZ), watch it fail, the stop capture with Ctrl-E.

Based on the vague message about application pools temporary files and a directory I'll make a guess and configure highlighting to find paths that contain "temp," "log," "config" or "app" in Process Monitor as seen in the screenshot below.


After I run the capture, I scroll around looking for suspicious stuff. One of the nice things about Process Monitor is that you can EXCLUDE things in a given capture after that fact. For example, I saw a pile of Audio and Media related stuff that was visually confusing and cluttering the point, so I excluded it.

The result is here:


It looks like there SHOULD be a folder call c:\inetpub\temp\apppools and on my Vista 64 machines, in the last two weeks to a month, it just disappeared. No idea why. I just noticed recently when I tried to move from a local web development service to IIS itself.

I created the folder, started WAS, then IIS and I was back up and running.

I'll pass the feedback on to the WAS team about the obscure error messages, but I thought I'd share this little ten minute debugging session to point out a few things that I think are important and possibly helpful, Dear Reader:

  • Know What Your Processes Are Doing (or at least, know how to find out)
    • Knowing how to look INSIDE the Windows "Black Box" using tools like ProcMon makes you realize that no OS is a Black Box at all. It's very empowering to know that you CAN see inside.
    • TASK: Learn Process Monitor and Process Explorer.
  • Enable Your Intuition
    • Debugging is 95% tools and 5% intuition. Know what tools can get you that next bit of information you need to take the next step in your analysis.
    • If you feel you've hit a wall in your analysis, knock that wall down. Your process is doing IO to a file/registry/device/network/etc. Watch it. Look for failures.

My next mission is to find out WHY and HOW this directory disappeared on both my machines. What did I install or run recently? Enjoy!c

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

Viewing a LOT of Images Effectively (plus 700 Obama Newspaper Covers in Silverlight Deep Zoom )

November 7, '08 Comments [24] Posted in Silverlight
Sponsored By

I don't talk politics as a rule on this blog. However, regardless of your political affiliation, the last week has generated a lot of news. When I saw these 730 Newspaper images from 66 countries at the Newseum, Scott Stanfield and I immediately said Silverlight Deep Zoom!

There's a number of good ways to view LOTS of images at a time. I'll share the ones I use. First, here's our Silverlight DeepZoom Obama News page.






Cool. I had to manage these files and check them out before we made the Silverlight DeepZoom version, so I tried these programs:

Windows Explorer

So, the story is, the Newseum assembled 730 newspaper front pages from all over. I downloaded them with DownThemAll and put them in a folder in Explorer. I run 64-bit Windows Vista and didn't have to much trouble with Windows Explorer with only ~700 images. I could use the View Thumbnails feature and zoom in and out and it worked pretty good.

Windows Photo Gallery (the Default Preview)

If you double click on an image in Windows, you'll get the Windows Photo Gallery by default, which just shows the image. You can then navigate around the folder with the left and right keys. It works pretty well, although the previewer fills the screen completely and starts up maximized which I find kind of irritating. Also, there's no way to see previews of the images that are coming up next. The thumbnail view is gone.

Windows Live Photo Gallery

This is a big improvement on the default one. It's a much more polished version of the default one. The most dramatic feature addition is face recognition. If you click on an image, it'll find people:


If you click on "people found," the system will highlight the face that you can then identify, and more importantly, search on.


Picasa 3 from Google

Picasa 3 is pretty much on par with Windows Live Photo Gallery. They are both fast, they both have some face recognition, although WLPG is much more granular while Picass just has a "show me photos with faces" option.

Where Picas really shines is with its replacement of the default image previewer. If you let it take over as your default image viewer, when you double click on a file you'll get a nice animation, a gray curtain that falls over your desktop, but more importantly a "FilmStrip" of all the files. This little touch lets you much more easily navigate while still previewing files.

Fullscreen capture 1172008 20555 PM

Expression Media 2

A commenter suggested I add Expression Media 2 as the whole point of Expression Media is to catalog butt-loads of media assets. It shouldn't blink at 700 images…and it didn't.

Catalog1 - Microsoft Expression Media 2

It's very bare bones from a Consumer point of view, as it's not meant for organizing the family photos. However, it's power is hidden in its keyboard shortcuts. It's obscenely fast. Truly. Everything moves at the speed of thought, and you can batch rename, tag, change, your photos.

It also notably has a ridiculous number of sorting options, like dozens. You can sort by height, width, author or whatever metadata you like. Definitely something I'd return to if I had several thousands images.

Silverlight DeepZoom

First I tried using DeepZoom Composer, which is a free tool for making DeepZoom collections really easily. We figured we'd drag these 700+ files into DeepZoom and bam! We're done. Well, DeepZoom Composer currently can't handle single collections with THAT many images. This isn't a limitation of DeepZoom, it appears, but the editor which hit 2 gigs of RAM and died. Additionally, with that many files, it's easier to just position the images programmatically. I talked to the PM for the product and they're already on it. However, I can still use the DeepZoom tools programmatically. It's not DeepZoom Composer that does ALL the work, in fact. There's a "SparseImageTool.exe" that we can call programmatically.

Giorgio Sardo has a blog post about this (latest version here), and I was able to use his code directly to make a local DeepZoom collection. Here's a snippet of his code with my changes. It's rough, but it's a one off, so be forgiving:

static void Main(string[] args)
// Collection name
string collectionName = "ObamaZoom";
// Folder containing images to be processed
string sourceImagesFolder = @"C:\\Users\\Scott\\Desktop\\Obama\\";
// Destination folder of the batch process
string outputFolder = "D:\\DeepZoomObamaNews\\";

// Eventually create the output directory
if (!Directory.Exists(outputFolder))

CreateCollection(collectionName, sourceImagesFolder, outputFolder);

/// <summary>
/// Create a Test collection using automation
/// </summary>
static void CreateCollection(string collectionName, string sourceImagesFolder, string outputFolder)
// Create a collection converter
CollectionConverter collectionConverter = new CollectionConverter();
// Required parameters
collectionConverter.SparseImageToolPath = GetSparseImageToolPath();
collectionConverter.ImagesCollection = GetImages(sourceImagesFolder); // IEnumerable<string> containing the path of the images
collectionConverter.ImagesDestinationFolder = outputFolder;
// Optional parameters
collectionConverter.CollectionName = collectionName;
collectionConverter.CollectionFormat = CollectionConverter.CollectionFormats.XML;

//collectionConverter.ConvertedOverlapPixels = ...
//collectionConverter.ConvertedTileSize = ...
//TODO: You can customize the exporting experience here, by setting the according parameters such as:
// Tile Size, File Format, Collection Format, Compression, Quality, ...

// Attach to completion handler
collectionConverter.BatchCompleted += delegate
Console.WriteLine("Conversion completed\nPRESS <ENTER> TO EXIT");

catch (Exception e)

Console.WriteLine("Conversion started...");

This code takes the input folder and creates an output folder with the DeepZoom processed files you need. ScottS then said he thought the result would look better if it looks more like the HardRock Cafe Memorabilia site, so we used Vertigo Software's "BigPicture" application (it's internal for now, but he's looking into what to do with it. Contact him if you want more details.) which easily handles all the dynamic positioning of the images in their collections.

The result is pretty cool. Even cooler if you press the Full Screen button (fourth from the left):


I think it'd be interesting if this technology wasn't just used as an occasional showcase when an event happens, but as a regular everyday thing. I wonder if it would be hard/cool/interesting/compelling to read a regular newspaper like this? Or of PDF files supported this kind of view? For me, the fun is just the buttery smoothness of the zooming. The frame-rate is crazy fast. Enjoy.

Thank Scott Stanfield and Vertigo Software for hosting it!

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

ASP.NET and jQuery

November 6, '08 Comments [8] Posted in ASP.NET | ASP.NET Dynamic Data | ASP.NET MVC | Javascript
Sponsored By

image It looks like many of you have already noticed that there's an official Visual Studio autocomplete file for jQuery posted up at the jQuery site. It's significant that it's hosted by the jQuery team in that it's a contribution by the Visual Studio team but it's not up at CodePlex, because it really belongs to jQuery so there's where you'll find it.

This isn't a new jQuery file and nothing's been "forked" so don't freak out. It's just a documentation file, as you can see if you go to the Download jQuery page.

Now, the Visual Studio-specific aspect of this is a temporary thing, as it's planned for Visual Studio to support a more standard syntax at some future date, but until then, there's this file and we'll make sure it's kept updated.

Jeff King has details on how to use this file in your projects. In the VERY near future there will be a hotfix that will cause Visual Studio to look for files that end in "-vsdoc.js" for intellisense which will make including it in your project automatic.

UPDATE: The very near future is NOW. You can now download a small hotfix that causes Visual Studio to automatically look for intellisense files named *-vsdoc.js" next to the runtime file. From Jeff King's blog:

Last week I mentioned we would be releasing a Hotfix to accompany our new jQuery VSDoc file.  This Hotfix is now available at the MSDN Code Gallery.  Here's a direct download link for this small (2MB) patch:

I want to emphasize that this patch is intended for all JavaScript files, not just those related to jQuery.  Generally, we will opportunistically look for documentation files related to the script file.  For example, given "mylibrary.js", we will search in the same directory for:

  • mylibrary-vsdoc.js, then if we don't find it we will search for...
  • mylibrary.debug.js, then if we don't find it we will search for...
  • mylibrary.js

There's a few things that are nice about this jQuery file is that it supports and understands jQuery plug-ins. If you're into jQuery and ASP.NET, go check it out.

Related Links

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

The Weekly Source Code 36 - PDC, BabySmash and Silverlight Charting

November 6, '08 Comments [6] Posted in ASP.NET | ASP.NET MVC | BabySmash | Open Source | PDC | Silverlight | Source Code
Sponsored By

Scott Hanselman presenting at PDC 2008First, let me remind you that in my new ongoing quest to read source code to be a better developer, Dear Reader, I present to you thirty-fifth in a infinite number of posts of "The Weekly Source Code."

At the end of my crazy babies talk at PDC (Tips on how I prepared here) I had a big demo where I gave a URL to a Silverlight version of BabySmash that Grant and I built for the show. You can watch the presentation online if you like and fast forward to the end (around 60 minutes in) and see the big demo. Basically we had the Silverlight BabySmash talk via ADO.NET Data Services (I'll post in detail in the near future) to a SQL backend. Then I had an MVC reporting site that had some charts that would update as folks smashed. There were over 90,000 smashes during the talk.

imageThe chart was updating as folks were smashing and we even had a Baby vs. Baby fight break out where the "A" people and the "J" people were going at it. Jeff Atwood started the bloodbath with this tweet as he urged on the overflow room along with Phil Haack. That man's trouble, I tell you.

In the talk, I started out with a old .NET 1.1 chart from 2003 and showed it working, unchanged, in ASP.NET 3.5 SP1. It's just a nice reminder that things usually work just as they should. Then I upgraded it to a new .NET 4.0 ASP.NET Chart that I'll blog about in detail soon. Then, I showed the final site with the new Silverlight Charts. Tim Heuer has a great post on how to databind with these new charts.

What's really cool about these Silverlight Charts is that they are Ms-PL (Microsoft Public License) which is a REALLY relaxed license. They're released as part of the larger Silverlight Toolkit up at There's a bunch of controls in there. It is a preview release though, so things will change, and hopefully only get better:

You can check out the Toolkit Chart samples and run them yourself here. It's nice that the chart sampler actually includes the source code within the Silverlight sample app. You can browse dozens of charts, then switch tabs and see the XAML and code-behind. This all lives in Microsoft.Windows.Controls.DataVisualization, the namespace (so far) for these controls.


My reporting page included a Silverlight Chart and a Virtual Earth control to show where people were smashing from. The data is coming from the Astoria ADO.NET Data Service, which is easy to get to via either JavaScript or from Silverlight.

You add the charts to your Silverlight application by adding a reference to the assembly then assigning a namespace to them:


Them, lay them out. I've got two charts here, one column and one pie. I also did some stuff like the linear gradient for the background, etc. Still, pretty simple.

<charting:Chart Grid.Column="0" Height="300"  StylePalette="{StaticResource PaletteColors}" Style="{StaticResource ChartStyle1}" >
<LinearGradientBrush EndPoint="1.332,1.361" StartPoint="-0.107,-0.129">
<GradientStop Color="#FF6CA9D5"/>
<GradientStop Color="#FFFFFFFF" Offset="1"/>
<charting:Axis x:Name="colAxis" Orientation="Vertical" AxisType="Linear" Minimum="0" Maximum="1"></charting:Axis>
<charting:ColumnSeries x:Name="colSeries" ItemsSource="{StaticResource BasicValues}" DependentValueBinding="{Binding Count}" IndependentValueBinding="{Binding Character}" Title="Character">
<charting:Chart Style="{StaticResource ChartStyle1}" Grid.Column="1" Height="300" StylePalette="{StaticResource PaletteColors}" >
<charting:Axis Orientation="Vertical" AxisType="Linear" Maximum="100000"></charting:Axis>
<charting:PieSeries x:Name="pieSeries" ItemsSource="{StaticResource BasicValues}" DependentValueBinding="{Binding Count}" IndependentValueBinding="{Binding Character}" Title="Character">

We had a generic list of "CharacterSmash" data, as in List<CharacterSmash> that we'd be binding to the chart.

private readonly List<CharacterSmash> characterData = new List<CharacterSmash>();

For the purposes of the presentation, I just polled for the data by making an asynchronous call to the service, then updating the bar and pie chart when it returned:

private void RequestSmashCountData()
var container = new SmashMetricsContainer(new Uri("/BabySmashPDC/SmashService.svc", UriKind.Relative));

// Setup data query
var query = container.SmashCount;

// Start the async query
query.BeginExecute((asyncResult =>
// Get the matching results from the service call
var matches = query.EndExecute(asyncResult);
}), null);

See how the BeginExecute includes the "do this when you return" as a lambda? It's a tidy syntax.

UPDATE: Tim Heuer emailed me to say that we're re-databinding the results. Instead, he wisely points out:

"On the code where you are getting the smash metrics for the silverlight charts…I see that you are re-binding the data?

If you bind to an observablecollection and just change that the chart should change with the data…including the Y-axis growth."

Excellent point! Tim's right. The way I'm doing it works, but it's old school. If I just updated a ObservableCollection the chart would notice the changes and update itself.

The updates are also clean, just databinding the results:

private void UpdateBarChart()
var axis = (Axis)FindName("colAxis");
if (axis != null)
axis.Maximum = GetMaximumCount() + 50;

var colSeriesControl = (ColumnSeries)FindName("colSeries");
if (colSeriesControl != null)
colSeriesControl.ItemsSource = characterData;

All we had to do that was interesting at all was to make sure the Y-axis grew as the data grew.

Who do we have to thank for this charting control? David Anson is who. Basically he was the Primary Dev and only Tester on the whole thing, and you should check out his blog for lots of inside information on charting in Silverlight.

UPDATE: David had development help from Jafar Husain, Jeremy Sheldon, Delian Tchoparinov, Alex Gorev and Sean Boon and designer Mehdi Slaoui Andaloussi.

If making a complex chart seems daunting, David has ChartBuilder that you run now in your browser. It'll generate and show you the XAML you need for your chart.


There was so much announced at PDC, I wanted to make sure that folks heard about this important release that might have been lost in the shuffle. Even better, the source is open so if you don't like it, change it.

Related Links

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.