Subscribe: Marquee de Sells: Chris's insight outlet
Added By: Feedage Forager Feedage Grade B rated
Language: English
app  apps  azure  it’s  i’m  net  new  site  studio  thinsp  time  visual studio  visual  web  windows  you’re 
Rate this Feed
Rate this feedRate this feedRate this feedRate this feedRate this feed
Rate this feed 1 starRate this feed 2 starRate this feed 3 starRate this feed 4 starRate this feed 5 star

Comments (0)

Feed Details and Statistics Feed Statistics
Preview: Marquee de Sells: Chris's insight outlet

Marquee de Sells: Chris's insight outlet

The feed of updates to 's blog.

Updated: Mon, 21 Nov 2016 08:00:00 GMT


Viking Me

Mon, 21 Nov 2016 00:00:00 -0800


Today, I was asked about the story behind my viking avatar: The avatar is years and years old. Peter Stern, a graphic designer friend of mine, put together a set of avatars for me for something (I forget what) and the viking is the one that resonated with me the most because of my Norwegian heritage, my physical stature and my general demeanor (those of you who know me have never asked why I choose a Viking avatar : ).

However, it was my mention of a real-life picture of me in a viking helmet that lead to the challenge — post that picture! So here you go. Enjoy. : )

Backgammon and Using Your Own Products

Sat, 05 Nov 2016 00:00:00 -0700

Have you ever used a product of any kind — an app, a device, a plunger — and thought to yourself “Do these people even use their own product?” As a Product Manager at Google and a long-time software product guy, I think this all the time. Sure, Donald Norman, Steve Krug and countless others have written well on the topic of product design, but that’s not enough. You actually have to use your own products to solve the same problems your target customers are trying to solve. If you don’t, you’re much less likely to produce something that anyone will want to use. Method Acting and Product Design Of course, using your own products comes with it’s own set of problems and there’s the very real possibility that you’re just not your target customer — in those cases, you just have to fake it. Consider this the “method acting” form of product design: Put yourself in a situation where you need to use your product the way your customers will use it. Got a map app? Use it to find something you really care about finding. Got a device for kids that cooks pizza at the press of a button? Ask your children to make dinner and eat the results. Got a solar-powered plunger? Plug your toilet in the middle of the night and see what happens. In my case, the products I design are for use by software developers. That means that to test my own products, I have to set myself up in a situation where I’ll need the product I’m building. As an example, a couple of years ago I was writing an online course about building cross-platform apps using Xamarin. I could’ve showed off the various topics with throw-away samples, but then I would have no confidence that I’d covered the topics my developer customers cared about. Instead, I chose to start from scratch and build an app I actually wanted for use on Windows, iOS and Android phones and tablets. In that way, my course became the thing I wished I’d had to get up to speed on building apps with Xamarin. Caring about the results of using your product is key. Without caring about the results, you can’t properly judge whether your product is useful or not. If you don’t care whether you get a vegetarian pizza or a meat-lover’s, you’re not going to be able to notice important issues in your EZ-Bake Pizza Oven, let alone fix them. In my case with the online course, if I hadn’t have chosen to build something I wanted to use on my own phone and to share with friends and family using a variety of other phones, then I wouldn’t have had the module on deployment for each of the three mobile OSes I was asking my customers to target. Without that module, my customers would’ve been stuck figuring that out for themselves, making my online course a lot less useful. First Internet Backgammon Server A few days ago, I celebrated my two-year Googleversary; I’m the Lead Product Manager for the Google Cloud Plaform developer tools. In that time, I’ve built a few small apps to wrap my head around the products we’re building for our developer customers, some of them are real-world (like for resolving the URLs in my books), but most are throw-away demos. Even the real-world apps are small enough that I haven’t needed to really embrace a large surface of our platform. For this to qualify as a real product test, it needs to be cloud-based, it needs to be big enough to exercise a reasonable subset of our platform and most importantly, it needs to be something I care about. I care about Backgammon. As a kid growing up in the Midwest, my family was big into card games, board games and strategy games of all kinds. It started at a young age with Double Dirty Crazy 8s, Monopoly, Risk and Speed and eventually graduated to Gin, Cribbage, Poker and, of course, Backgammon. My family wasn’t one of those “let the kids win to build their self esteem” families — we played to win and then we’d gloat afterwards. To this day, I still play a lot of these same games on my p[...]

Google Cloud Storage Hierarchy in .NET

Sun, 07 Aug 2016 00:00:00 -0700

Google’s Cloud Storage Browser perpetrates a fiction of files and folders that doesn’t exist. The Google Cloud Storage (GCS) API only has two concepts: buckets and objects. A bucket is a container of objects and needs a globally unique name. An object has a name, a content type and content. The name can be simple, e.g. “foo.txt” or it can have slashes in it, e.g. “foo/bar.txt” or even just “quux/”. However, from the GCS API point of view, there’s no difference — the only container is a bucket. For example, I can write a program using the .NET GCS client lib from NuGet that looks like this: void ListBucketsAndObjects(string projectId) { var client = StorageClient.Create(); foreach (var bucket in client.ListBuckets(projectId)) { Console.WriteLine($"{bucket.Name}/"); foreach (var obj in client.ListObjects(bucket.Name, null)) { Console.WriteLine($" {obj.Name}"); } } } Given objects with names as described above, this would be the output: csells-bucket-1/ foo.txt foo/bar.txt quux/ However, if you surf to the Storage Browser to see the project with these three objects, you’ll see something that looks like a normal file/folder browser: Implicit and Explicit Folders The Storage Browser has interpreted one of the objects as a file and two of them as folders, one implicit and one explicit. The implicit object folder comes from the slash in “foo/bar.txt”; the slash is used as a delimiter that means “folder” as far as the Storage Browser is concerned. The explicit folder comes from an object with a name that ends in a slash. You can create one by pressing the Create Folder button in the Storage Explorer or with the following lines of code: var client = StorageClient.Create(); client.UploadObject(bucketName, "quux/", "", Stream.Null); Working with Folders When you’re working with buckets and objects, the ListBuckets and ListObjects methods work just fine. However, if you’d like to navigate the fictional hierarchy of files and folders the way that the Storage Browser does, you can use the BrowserHelper (a piece of .NET helper code I put together for just this purpose): void ListBucketsFilesAndFolders(string projectId) { var client = StorageClient.Create(); foreach (var bucket in client.ListBuckets(projectId)) { ListFilesAndFolders(client, bucket.Name); } } void ListFilesAndFolders(StorageClient client, string bucket, string parentFolder = "", string indent = "") { string shortName = parentFolder == "" ? bucket : BucketHelper.ShortName(parentFolder); Console.WriteLine($"{indent}{shortName}/"); indent += " "; foreach (var file in client.ListFiles(bucket, parentFolder)) { Console.WriteLine($"{indent}{file.ShortName()}"); } foreach (var folder in client.ListFolders(bucket, parentFolder)) { ListFilesAndFolders(client, bucket, folder, indent); } } The BucketHelper extension class provides the ShortName, ListFiles and ListFolders functions in the sample above. ListFiles and ListFolders are provided on the existing .NET client library types instead of providing a whole new set of wrapped types, which largely just get in the way. The output for the same list of objects looks like this: csells-bucket-1/ foo.txt foo/ bar.txt quux/ The implicit and explicit folders are folded together into a list of strings at each level, so your code doesn’t have to care which is which. However, if you do care, a call to StorageClient.GetObject returns an object or throws an exception depending on whether it’s explicit or implicit. When creating your objects, your code doesn’t have to explicitly create folders, since implicit folders are first class citizens as far as the BrowserHelper and the Storage Browser are concerned. However, if you’d like to create a folder explicitly, BrowserHelper provides a helper for that, too: var client = StorageClient.Cre[...]

Breaking Into the Industry

Fri, 29 Jul 2016 00:00:00 -0700

I got an email the other day from an old friend that said he’d met a young developer named Ben and that he was impressed with his “acumen, initiative and hunger to learn,” which made me want to help him if I could. He also said that “his Dad followed your blogs for years,” which made me want to eat right and exercise. In the meantime, Roger introduced me to Ben via email and Ben had some excellent questions, which I thought I’d share here along with my answers, if only to avoid other people sending me emails that make me feel old… From: Benaiah Mischenko [ben] I was hoping to pick your brain for any advice you’d have for a young developer trying to break into the industry. I’ve been coding for some time, but most of my work has been small one-off contracts (I currently work at a radio company building websites for the stations they own). Ben, you are about to “break into” an industry with near 0% unemployment. Practically everyone able to string together working code/markup can get a job of some sort. All you really have to do is to keep coding, be prepared to show off your work (GitHub is great for this) and you’ll find a job. Right now there’s no other industry I know of that has this luxury and it’s not going to last forever, so enjoy it. [ben] What do you see as the biggest growth opportunities in the field — areas of study that will be big in the coming years (for instance, I’ve heard people say DevOps is poised to become as fundamental a practice as source control as time goes on)? Identifying the biggest growth opportunity is easy: containers are the way we’ll be packaging and deploying out software for the foreseeable future, the cloud will be the target of said deployments and Machine Learning is going to be part of practically every system we build from now on. I’d also look at Augmented Reality as the next computing platform beyond web and mobile. Forgive me for making all of those links Google-related (Pokemon Go runs on the Google Cloud), but Google has it’s hands in lots of cool stuff. [ben] What do you look for when determining the ability and potential to grow of a junior developer? I look for two things when evaluating any engineer: How deeply do you know the things you know? Can they answer why questions in addition to how questions? How quickly and how often do they learn new things? The tech landscape is always changing, so whatever skills you have, however deep they may be, will quickly fade in importance. You can’t be useful for very long without the ability to learn new things. [ben] More generally, where do you see our industry moving, and do you have any concerns that you think I should watch out for when navigating the field? I see our industry spending a lot of it’s time throwing away existing processes and methods, sometimes to replace them with something new (which may or may not work better than the old ways) or to reinvent what we just threw away. I think that what we’re seeing evolve out of this process of continuously trying new things is our attempt to turn “software engineering” into an actual engineering discipline on the order of electrical or civil engineering. We’ve still got decades of work to do here, but we’re slowly hammering out best practices, e.g. Continuous Integration/Continuous Delivery is emerging as the best way to do sustainable DevOps. What that means for you is that you need to be skeptical about the processes that any software team uses to produce software, since we’re still finding the right way forward here. Don’t be afraid to take a proscribed process with a grain of salt or to try new things to make your team happier and more effective. In general, if something looks like meaningless bookkeeping, it probably is and should be treated accordingly. [ben] Thanks in advance for your help. I appreciate every chance I get to learn from more experienced developers. Good luck, Ben! Feel free to reach out again. I’m alway[...]

Access Google Cloud Source Repositories from Visual Studio

Sat, 02 Jul 2016 00:00:00 -0700

Cloud Source Repositories (CSR) provides support for multiple Git repositories for each project. To log into your CSR repos from within Visual Studio, you’ll need credentials that Visual Studio expects, i.e. a username and password pair. CSR calls these “manually generated credentials” (as opposed to the Google Cloud SDK generated credentials which are the default). Manually Generated Credentials To get manually-generated credentials, do the following: Go to the “Development” section in the Google Cloud Console. Select the Source Code section and choose the repo that you’d like to access locally from the drop-down. Then, open the drop-down again and select “Clone repository”. Change the preferred authentication method to “Manually generated credentials”. Copy the URL starting with into your clipboard and save it for later. One easy way to do this is to use the Copy button to put the entire git clone command into your clipboard and then trim it to just the URL portion. Click “Generate and store your Git credentials” (and not the OK button). From the browse window that pops up, gather the Git password (which goes along with the email you used to authenticate). You can ignore the instructions about putting a command into your .netrc file, since Visual Studio will ask you for your username/password pair directly. Logging Into CSR from Visual Studio Now that you have your CSR Git URL, username and password, you have what you need to use your CSR repo from Visual Studio. To start, choose View | Team Explorer in Visual Studio. In the Local Git Repositories section, choose the Clone option and add the Git URL for your CSR repo, choose a local directory and press the Clone button. Visual Studio will prompt you for the username and password. The username is the email address you used to generate the Git password previously. The password is the one you generated when you asked for manually generated credentials. At this point, you can edit your files into Visual Studio normally and use the Team Explorer to see the files that have changed, look at diffs, commit the changes, etc.[...]

Solitaire Redux

Fri, 06 May 2016 00:00:00 -0700


I’ve done a bunch of stuff related to Solitaire on my blog for some reason. I guess I’m a fan, although mostly these days I focusing my listening in boring meetings with 2048 or Border Siege (the real reason I have an Android phone).

Still, the interest must still be there, because when I saw 10 SOLITAIRE Facts You Probably Didn’t Know scroll by on my Flipboard feed, I was curious. I didn’t find anything that surprised me (I am a bit of a Solitaire buff after all), but I certainly was surprised to see this image come up when I got to Solitaire Fact #1:


Apparently Solitaire is the #1 most popular app that runs on Windows and I was the source of that information. To be clear, this is something I heard when I worked at Microsoft and probably was happy to say (never let a good story be ruined by the facts), but I never seen stats to that effect. Caveat emptor, your mileage my vary, some assembly required and all that jazz.

BTW, for the curious, this is Matt Pietreks office from back in the day. The only computer in that shot that’s mine is the laptop. Since it doesn’t seem to be running Solitaire, I’m not sure why gameranx chose it, but I do remember liking that shirt…

Moved to Blot

Sun, 13 Sep 2015 16:35:30 -0700

You’re reading this on the 5th version of my blog. Some History The first was a set of static text files I managed in FrontPage. The editing was nice (once it get the HTML-on-the-disk problems right), but I dropped everything into the same file, using anchor tags to separate posts in one giant file, which didn’t scale. The second version was ASP.NET code to pull in my static content (I did not want to give up my FrontPage) and arrange it into a nice layout. The third version has been lost in the mists of time. The fourth version was a complete rewrite in ASP.NET using SQL Server as the backing store. The bulk of the content was in SQL Server as either HTML fragments or image blobs, requiring me to implement a blogging API (I was way into AtomPub at the time, so that’s the one I implemented). Along the way, I moved this version of the site to Azure. The good news is that Windows Live Writer worked very well with this site (even better than FrontPage!). The bad news is that it was the only editor that did, it requires Windows and we no longer live in a single OS world. I want to write my blog in Markdown from OSX or even my phone. So, the fifth version my site, the one you’re looking at now, is running on Blot. It was the video of the workflow on the home page that really did it for me. I saw that, paid my $20 and have been spending weekends exporting the data from my old blog ever since. The Beauty of Blot Here’s what I get by moving to Blot: A Dropbox-based file management system with complete flexibility to arrange things how I like. Blot just takes what I give it and uses it to produce my blog. And I don’t need to maintain certs to protect my writeable AtomPub endpoint anymore, either. Blot and Dropbox use OAuth2 for such things and leave me out of it. A mix of HTML and Markdown content, which let me dump all of my old HTML fragment-based content into Dropbox but still letting me write new content in Markdown with whatever editor I feel like, including one hosted on Windows, two hosted on the Mac and one that runs on my phone. A live preview that’s updated every time I save. I get a preview by prefixing the post filename with “[draft]”, which produces a cooresponding “[preview]” file that matches the styles on my site. When I’m ready to publish, I remove the “[draft]” prefix and it’s live with a date that matches the first time that Blot saw this post. Or if I want to provide my own date in the future, I can easily do so with a bit of metadata in the file. Easy peasy. Integration with Disqus, where I keep my comments. Not only do new posts get Disqus comments, but I was able to drop in a bit of metadata to point to the existing comments for my existing posts. Direct integration with my existing Google Analytics account by simply providing my ID. Forwarding of old URL patterns to their new spot on my new site, so I’m not contribuing to the “dead web.” Several Blot templates provide mobile-friendliness out of the box (as defined by Google mobile friendliness test tool), which is handy so that mobile searches continue to find things on without bias. This saved me from having to figure out the issues with the old site. Fabulous support from David, the proprietor of Blot. I don’t think he’s had anyone drop 20 years of blog content into Blot all at once before, but he was super responsive, fixed all of my issues and even added some features just to support my scenarios. Blot is worth it just for David. I get the piece of mind knowing that all of my content is in Dropbox, so if Blot goes away in another 20 years, then I have confidence that I’ll be able to take my content and drop it somewhere else or even build my own host. Also, while I’m not quite 100% confident in Dropbox’s ability to keep all of my files for all time, I’m got the whole thing checked into GitHub, too, which Blot has no issues [...]

Choose HTML for UI Development

Sat, 12 Sep 2015 11:54:56 -0700

On Sept. 10, 2015, Winston Kodogo writes: Hey Chris, if you’re feeling happy enough to blog, how about a post giving us your current thoughts on UI development. A friend of mine has asked me for advice on moving an in-house app from VB6 to something he can find people to modify if he needs to, and I can’t for the life of me think of what to tell him. I have your most excellent books on Windows Forms and WPF, but what would the modern (!) equivalent be. Not WebJS, surely. Thanks for the softball question, Winston. I do love to pontificate extemporaneously (although I have already given away the ending). Pre-Windows I started my Windows career as a Petzoldian Windows developer, but before that, I developed UIs in curses, Flavors Lisp and even voice-based UIs in a proprietary AT&T scripting language for which I no longer remember the name. Windows As a Windows developer, I programmed against 16 and 32-bit GDI and User, GDI+, MFC, WTL, Windows Forms, WPF, WinJS, Silverlight and Xamarin Forms. I’ve even written books, articles and presentations about many of these toolkits. And even now, as I type this, I’m using a different framework, Markdown, to produce the UI you’re using now. Transcend Windows It’s this last fact that leads me to my pretty much universal recommendation for UI development: The UI framework with the most reach, the best tools, the most community support and the best staying power is, of course, HTML, with it’s kissing cousins, JavaScript and CSS. There are good reasons to choose others, of course: Are you building a desktop game? Use OpenGL or DirectX. Are you building a mobile game? Use the iOS or Android APIs or, even better, Unity. Do you love C# and .NET? Then some implementation of XAML may suit your needs. Are you targeting developers with automation or specific integration needs? Then a command line interface is probably what you want. But other than that, my default UI development advice is always always HTML. HTML How The beauty of an HTML-based UI framework is that it has grown steadily in capability, usage and ubiquity since it was introduced in 1993. It’s hard to find an environment where HTML doesn’t run: Desktop Browser: This is where HTML was first shown and it arguably shows best here. There’s little you can’t do in this environment, including near native games using WebGL, Enscripten and asm (soon to become WebAssembly). This is probably your best bet for any kind of internal app, e.g. the kind of thing that VB6 and WinForms are usually used for. Toolkits like Angular and React are popular for desktop browser apps because they provide the end-to-end developer story while still having rich extension libraries. That said, if I were going to tackle a new web site or web app today, I’d probably use WebComponents (and Polymer) for the excellent reasons that Joe Gregorio lays out in his OSCON 2015 talk. Mobile Browser: Today’s smartphone-based browsers are very capable and adapt to desktop-based web sites fairly well. However, I do recommend making sure your desktop web sites work well on mobile as well, if for no other reason than you want to make sure you don’t lose your ranking on Google, which now prefers mobile-friendly sites for mobile search results (and provides a tool to help you get your site ready). With the modern enterprise moving towards mobile as fast now as they have been moving towards the web-based intranet over the last decade, I’d recommend making sure that your internal web sites/apps work well on mobile if you want to avoid the CTO stopping by your desk in the near future. Desktop Stand-alone App: The new trend (with companies like GitHub and Microsoft on board) for building cross-platform, stand-alone desktop apps is to use HTML, but package it into an app, specifically using something like Electron. This is the new hotness, but this is wh[...]

Blog Past and Future

Sat, 05 Sep 2015 22:29:08 -0700

This blog started as a single static page in 1995 as a set of links to provide to my students while I was teaching at DevelopMentor. I would like to show you a screenshot of that initial page, but as it turns out, the site predates the internet archive, so I can only show you what it looked like in 1998: I guess I was doing some independent contracting at the time, because I was billing myself as a “Windows Object Architect,” whatever that is. BTW, I wouldn’t call that phone number if I were you — I don’t know who it will ring, but it won’t be me. The rest still works, however. Posts Over the years, I’ve done more or less blogging based on my current gig: This post will be my 2,650th, with the peak in 2003. Tweets Now, I’m far more active on Twitter: My first tweet was in October of 2009. I’d had an account for a while before that, but I just didn’t get it at first. Now I love it and have produced 3,053 tweets in 7 years. I find that while I like long-form writing a great deal, it’s much easier to find the time to turn a single thought into 140 characters then into 1400 words. Blot This is all coming up now because I’m busy moving to Blot, which gives me a chance to take a look back at all of this content I’ve generated. I love Blot because I can dump all of my old content into Dropbox in HTML fragment format (along with some per-file metadata) and Blot will produce a reasonable static site for me. By moving to the file system from a blogging API (AtomPub in my case), I can remove the need to use blogging tools (like Live Writer) and instead switch to any reasonable editor I want. Further, since Blot supports all kinds of formats, I can move to Markdown for new content but not have to try to translate all of my HTML content, which is a lifesaver. Unfortunately, the port to Blot is taking longer than I’d like for two reasons. The first is simply that David Merfield just didn’t anticipate some old guy dumping 20 years worth of blog content into his system, so there have been some problems. The good news is that David is extremely responsive. Every system has issues, but the measure of quality is how long it takes to go from issue reported to issue fixed and in the case of Blot, that time is sometimes days but often hours, which includes adding features specifically for my use case that he just hasn’t needed before. Highly recommended. The Dead Web The other reason that this translation is taking some time is that I’ve got a few link formats in my content and relied on IIS URL rewriting to keep them working. As I move to Blot, it’s easier to just fix the URLs as I extract the data from SQL Server (and I still use and love RegexD to figure out how to translate those URLs). As I do that, I’m testing for 404 links on my new site to make sure that I haven’t screwed anything up (I like Xenu’s Link Sleuth for that work). What I’m finding is that I’m fixing my own URLs but finding hundreds of links into the larger web that are broken. That’s just depressing. I work hard to keep my site running for anyone that wants the old data and I’ll be working with David on a URL forwarding scheme and 404 logging to keep external links working as I move to Blot. However, that doesn’t seem like an important goal for other folks. Where Are We? Still, I get to move to Blot and use whatever editor I want from whatever OS I want, so I’m a happy guy. Hopefully that happiness will translate into more blog posts, but if it doesn’t, I imagine I’ll still be spouting off on Twitter at the very least. Everyone needs a place to spout off sometimes.[...]

Handling Orientation Changes in Xamarin.Forms Apps

Sun, 04 Jan 2015 04:39:09 -0800

By default, Xamarin.Forms handles orientation changes for you automatically, e.g.



Xamarin.Forms handles orientation changes automatically

In this example, the labels are above the text entries in both the portrait and the landscape orientation, which Xamarin.Forms can do without any help from me. However, what if I want to put the labels to the left of the text entries in landscape mode to take better advantage of the space? Further, in the general case, you may want to have different layouts for each orientation. To be able to do that, you need to be able to detect the device’s current orientation and get a notification when it changes. Unfortunately, Xamarin.Forms provides neither, but luckily it’s not hard for you to do it yourself.

Finding the Current Orientation

To determine whether you’re in portrait or landscape mode is pretty easy:

static bool IsPortrait(Page p) { return p.Width < p.Height; }

This function makes the assumption that portrait mode has a smaller width. This doesn’t work for all future imaginable devices, of course, but in the case of a square device, you’ll just have to take your changes I guess.

Orientation Change Notifications

Likewise, Xamarin.Forms doesn’t have any kind of a OrientationChanged event, but I find that handling SizeChanged does the trick just as well:

SizeChanged += (sender, e) => Content = IsPortrait(this) ? portraitView : landscapeView;

The SizeChanged event seems to get called exactly once as the user goes from portrait to landscape mode (at least in my debugging, that was true). The different layouts can be whatever you want them to be. I was able to use this technique and get myself a little extra vertical space in my landscape layout:


Using a custom layout to put the labels on the left of the text entries instead of on top 

Of course, I could use this technique to do something completely differently in each orientation, but I was hoping that the two layouts made sense to the user and didn’t even register as special, which Xamarin.Forms allowed me to do.

Launching the Native Map App from Xamarin.Forms

Fri, 02 Jan 2015 19:36:45 -0800

My goal was to take the name and address of a place and show it on the native map app regardless of what mobile platform on which my app was running. While Xamarin.Forms provides a cross-platform API to launch the URL that starts the map app, the URL format is different depending on whether you’re using the Windows Phone 8 URI scheme for Bing maps, the Android Data URI scheme for the map intent or the Apple URL scheme for maps. This is what I came up with: public class Place { public string Name { get; set; } public string Vicinity { get; set; } public Geocode Location { get; set; } public Uri Icon { get; set; } } public void LaunchMapApp(Place place) { // Windows Phone doesn't like ampersands in the names and the normal URI escaping doesn't help var name = place.Name.Replace("&", "and"); // var name = Uri.EscapeUriString(place.Name); var loc = string.Format("{0},{1}", place.Location.Latitude, place.Location.Longitude); var addr = Uri.EscapeUriString(place.Vicinity); var request = Device.OnPlatform( // iOS doesn't like %s or spaces in their URLs, so manually replace spaces with +s string.Format("{0}&sll={1}", name.Replace(' ', '+'), loc), // pass the address to Android if we have it string.Format("geo:0,0?q={0}({1})", string.IsNullOrWhiteSpace(addr) ? loc : addr, name), // WinPhone string.Format("bingmaps:?cp={0}&q={1}", loc, name) ); Device.OpenUri(new Uri(request)); } This code was testing on several phone and tablet emulators and on 5 actual devices: an iPad running iOS 8, an iPad Touch running iOS 8, a Nokia Lumia 920 running Windows Phone 8.1, an LG G3 running Android 4.4 and an XO tablet running Android 4.1. As you can tell, each platform has not only it’s own URI format for launching the map app, but quirks as well. However, this code works well across platforms. Enjoy.[...]

App and User Settings in Xamarin.Forms Apps

Thu, 01 Jan 2015 18:09:39 -0800

Settings allow you to separate the parameters that configure the behavior of your app separate from the code, which allows you to change that behavior without rebuilding the app. This is handle at the app level for things like server addresses and API keys and at the user level for things like restoring the last user input and theme preferences. Xamarin.Forms provides direct support for neither, but that doesn’t mean you can’t easily add it yourself. App Settings Xamarin.Forms doesn’t have any concept of the .NET standard app.config. However, it’s easy enough to add the equivalent using embedded resources and the XML parser. For example, I built a Xamarin.Forms app for finding spots for coffee, food and drinks between where I am and where my friend is (MiddleMeeter, on GitHub). I’m using the Google APIs to do a bunch of geolocation-related stuff, so I need a Google API key, which I don’t want to publish on GitHub. The easy way to make that happen is to drop the API key into a separate file that’s loaded at run-time but to not check that file into GitHub by adding it to .gitignore. To make it easy to read, I added this file as an Embedded Resource in XML format: Adding an XML file as an embedded resource makes it easy to read at run-time for app settings I could’ve gone all the way and re-implemented the entire .NET configuration API, but that seemed like overkill, so I kept the file format simple: YourGoogleApiKeyHere Loading the file at run-time uses the normal .NET resources API: string GetGoogleApiKey() { var type = this.GetType(); var resource = type.Namespace + "." + Device.OnPlatform("iOS", "Droid", "WinPhone") + ".config.xml"; using (var stream = type.Assembly.GetManifestResourceStream(resource)) using (var reader = new StreamReader(stream)) { var doc = XDocument.Parse(reader.ReadToEnd()); return doc.Element("config").Element("google-api-key").Value; } } I used XML as the file format not because I’m in love with XML (although it does the job well enough for things like this), but because LINQ to XML is baked right into Xamarin. I could’ve used JSON, too, of course, but that requires an extra NuGet package. Also, I could’ve abstracting things a bit to make an easy API for more than one config entry, but I’ll leave that for enterprising readers. User Settings While app settings are read-only, user settings are read-write and each of the supported Xamarin platforms has their own place to store settings, e.g. .NET developers will likely have heard of Isolated Storage. Unfortunately, Xamarin provides no built-in support for abstracting away the platform specifics of user settings. Luckily, James Montemagno has. In his Settings Plugin NuGet package, he makes it super easy to read and write user settings. For example, in my app, I pull in the previously stored user settings when I’m creating the data model for the view on my app’s first page: class SearchModel : INotifyPropertyChanged { string yourLocation; // reading values saved during the last session (or setting defaults) string theirLocation = CrossSettings.Current.GetValueOrDefault("theirLocation", ""); SearchMode mode = CrossSettings.Current.GetValueOrDefault("mode",; ... } The beauty of James’s API is that it’s concise (only one function to call to get a value or set a default if the value is missing) and type-safe, e.g. notice the use of a string and an enum here. He handles the specifics of reading from the [...]

Microsoft Fan Boy Goes To Google

Sat, 01 Nov 2014 17:43:21 -0700

In 1992, I was a Unix programmer in Minneapolis. I’d graduated with a BS in Computer Science from the University of MN a year earlier and had written my programming assignments in C and C++ via first a VT100 terminal and then a VT100 terminal emulator on my Mac (running System 7, if you’re curious). My day job was at an AT&T VAR building multi-user voice response systems on Unix System V. My favorite editor was vi (not vim) and, like all good vi programmers, I hated emacs with a white hot passion. Being bored with my current job, I posted my resume on the internet, which meant uploading it in ASCII text to an FTP site where tech companies knew to look for it. The tech company that found it was Intel. To prepare for my interview in Portland, OR, I went to play with a Windows 3.1 machine that someone had set up in the office, but nobody used. I had a Mac at home and Unix at work and for the 10 minutes that I could stand to use it, Windows 3.1 seemed like the worst of both. In spite of my distaste, Intel made an offer I couldn’t refuse and I found myself moving with my new wife to a new city for a new job and a new technology stack. The move to Intel started my love affair with Windows (starting with Windows 95, of course, let’s be reasonable). Over the years, I grew to love Word, Excel, Visio, PowerPoint, Outlook, Live Writer, Skype, Windows XP, Windows 7, COM, ATL, .NET, C# and of course the Big Daddy for Windows developers: Visual Studio. Not only did I become a Windows fan boy (I can’t tell you how lonely it is to own a Windows Phone after the iPhone was released), but I became I contributing member of the Windows community, accounting for nearly 100% of the content on this web site, first published in 1995 solely to provide links to my DevelopMentor students, but growly steadily since (over 2600 posts in 20 years). Add to that to more than a dozen books and countless public speaking engagements, magazine articles and internet appearances and you’ve got a large investment in the Windows technology stack. Of course, as I take on roles beyond consultant, speaker, author and community PM, I contribute less and less (although I do love spouting off into my twitter feed). Even so, I’ve been a regular attendee to Windows-related events and 90% of my friends are also Windows developers, so the idea of leaving not just a technology ecosystem but an entire community behind is a pretty daunting one. And then, about 45 days ago, Google came knocking with an offer I couldn’t refuse. A few days after that, before I’ve even officially accepted the offer, I find myself in a bidding war for a house in Kirkland, WA that the wife and I both love (which almost never happens). So, for the first time since 1992, with my three boys graduated from high school, I find myself moving with my new wife to a new city for a new job and a new technology stack. As I write this, it’s the Friday before my Noogler orientation week (New Googler — get it?). I’ll be working on tools for Google cloud developers, which matches my Windows experience helping developers build distributed systems, although there’s going to be a huge learning curve swapping in the details. After 20 years with Visual Studio, I don’t know if my fingers still know vi, but I can’t wait to find out. If I get a beer or two in me, I might even give emacs another try…[...]

Future Proof Your Technical Interviewing Process: Hiring or Not

Fri, 01 Aug 2014 15:09:51 -0700

This is the last in a 4-part series on how to interview well. Parts 1-3 covered the phone screen, the technical interview and the fit interviews. In his part, we’ll wrap up by talking about how to make the hiring decision. Make Time For Questions As important as what questions you ask the candidate are leaving time for them to ask their questions. Remember that they’re interviewing you, too. Be open and honest about the answers; technical people have a sensitive bullshit detector, so don’t try to pretend that everything is perfect; they’ll know if you’re not being sincere. However, it’s a fine line. If you find yourself dwelling on the negative, you have to wonder if you’ve found a good fit for yourself. Also, don’t forget to factor their questions into your own thinking about the candidate. The questions they ask about a job and a team they’re going to be spending 40+ hours/week with is as good an indicator of how they think as anything else. Making the Call As you pass the interview candidate from person to person, make sure that you spend a few minutes in private with the next interviewer talking about what you heard that you liked as well as things you’d like them to circle back on. You want to give them an opportunity to try again, either to convince you it’s not an issue or to confirm that it is. Every interviewer should share their thoughts about the candidate soon while they’re fresh. You can send an email around to the team as you finish or get together in the same room after the candidate has headed home, but it should be the same day; those first impressions matter. Ultimately each interviewer will provide three pieces of information: a thumbs up/down (whether you use actual thumbs for this process is up to you : ), a confidence level (do you really love this person? are you on the fence?) and an explanation (“I loved how they think about the customer!” or “They never figured out how to efficiently search an infinite space of possible solutions.”) The set of interview results will come out in three ways: Everyone loved that candidate. Hire them. Everyone hated the candidate. Don’t hire them. Be polite! There’s a mix. Discuss. Potentially get more info. Of course, options #1 and #2 are easy to deal with. Unfortunately, option #3 is where most candidates fall. The question is, what do you do with a candidate with mixed results? If you’re following the principle that it’s better to send a good candidate away then to hire a bad candidate, then you’ll pass on them. However, you’ll want to spend some extra time on candidates like these. Discuss it amongst the team. See how adamant the thumbs up voters are and why. See how adamant the thumbs down voters are and why. If the candidate is on the fence but leaning towards “hire,” pick someone else to talk to them and/or get them into a different environment, e.g. the bar down the street or the bowling alley at the company Xmas party, and see how they do. Ultimately, it boils down to one thing: does the team as a whole want to bring the candidate into the team? If so, great. If not, let them go. Certainly a senior member of the company or department can override the team and hire a candidate above their objections, but I wouldn’t recommend it. You’re much more likely to hurt a good team in those situations then to help it. Where Are We? Whether you agree with the specifics of this process or not, I encourage you to spend the time to really examine your process. You want the team you build to be more than the sum of the parts, but that kind of magic requires first that you have great parts.[...]

Future Proof Your Technical Interviewing Process: The Fit Interviews

Tue, 29 Jul 2014 16:19:01 -0700

If you just found yourself here, you’ve stumbled onto a multi-part series on the technical interviewing process. Part 1 covered the phone screen and part 2 covered the technical interview. Today we’re going to discuss the “fit” interviews, that is, team and cultural fit. The Team Fit Interview Modern software development is done in teams. You want to be able to judge any candidate as a productive, positive member of your team. They don’t necessarily have to have experience doing things the way you do them, but they should show the ability to adapt when issues arise. Your job in the team fit interview is to break the important things that happen in your team into situations that you can ask your candidate about. The following are pretty standard examples: What’s the right process for gathering requirements? How do you convince someone that you’ve got a good idea? What do you do when you can’t convince them? How do you deal with vague requirements? What happens if you’re asked to do something you don’t agree with? etc. However, you have to be careful here. Pretty much anyone can give you the “right” answers to these questions, but you don’t want the “right” answers — you want the real answers. How does a candidate actually behave in the face of these situations? The best way I know of to get the real answers out of someone is something called Behavioral Interviewing. The idea is simple: instead of asking someone how they would act if faced with a certain situation, ask them to describe an example in their past when they’ve had to deal with that situation. Discuss it with them. How did their strategy work for them? What did they learn? What would they do differently? Just this one shift from “how would you deal with this situation” to “how did you deal with this situation” will get you a much deeper look into how a candidate actually behaves, which allows you to decide if they’re a good fit for your team. The Cultural Fit Interview This goal of the cultural fit interview is to figure out if the candidate will like their new working environment and whether the team will be glad to have them. It’s enormously important and very difficult to access. One typical way to approach this type of interview is to ask the following kinds of questions, also in a Behavioral Interviewing style: (You’re a startup) How do you like the idea of quick decisions, hard work on short deadlines, light process and tight purse strings? (You’re an established company) How do you like the idea of getting buy-in with a set of stakeholders, making sure we don’t ship anything until it’s done, following an established process and sticking to a budget? What’s more important: the customers or the business? What kinds of activities are most important to you? Do you like to be focused on your set of tasks or do you like to do a lot of different things? What makes you as productive as you can be? Where do you see your career path taking you? etc. These questions are much more vague and really meant to start a conversation, but they’re also very hit-and-miss. If you happen to hit the right path, you can really crack a candidate open like a ripe nut. Also, you want to be careful how you interpret the answers. If you don’t filter out people that aren’t a good fit for the culture of the company, they’ll be unhappy and you’ll be unhappy. On the other hand, if you filter too much, you’ll lose out on the benefits of diversity. It’s a hard line to walk. Another way to approach a culture fit interview is to get creative. Maybe invite the pers[...]

Future Proof Your Technical Interviewing Process: The Technical Interview

Thu, 24 Jul 2014 00:46:21 -0700

It’s incredibly important to interview well as you’re building your technical team. Further, interviewing well is hard to do and, like anything, you only get out of it what you put into it. In part 1 of this series, we discussed the phone screen. In this part, we’ll discuss the technical interview. The Technical Interview The only way to really know if someone can deliver technically is to give them a problem to solve and watch them solve it. You can do this with simple data structure problems on the whiteboard, test questions on paper, algorithm problems in notepad, real-world problems with some pair programming or puzzle problems with them waving their hands wildly in the air. In a technical interview, you should encourage the candidate to think out loud, because you care more about how they go about solving the problem then actually getting to an answer. You will look for the following things: Are they asking questions to solidify vague requirements? Are they approaching the problem from a logical angle (even if it’s different from what you had in mind)? Does problem solving come naturally to them? Are they making the right use of the features available in whatever sandbox you gave them in which to solve the problem, e.g. making good use of list comprehensions in Python? Are they writing good code and pointing out the shortcuts they’re taking due to the medium they’re using, e.g. the whiteboard? Does the coding come naturally to them or are they struggling? Do they come up with a reasonable answer? Are they on the right path even if they run out of time? Do they understand the “why” behind their answer as well as the “how?” This last one is the one I tend to focus on the most. Even more important than a candidate having knowledge of the technologies you’re going to ask them to use is their ability to understand new technologies over time. My father always says that while teenage drivers hopped up on testosterone may get into the most accidents, they’re the ones that push the cars to see what they will do. You want to hire engineers that have pushed technologies past their limits for the pure joy of it. Those are going to be the ones that build the deep knowledge and can adapt in the future to whatever comes their way. I filter for deep understanding by not just digging into not only the “how” of whatever they claim to know best, but also the “why.” They may know how to build a factory in Angular, but do they understand what a factory is and why Angular does it that way? They may know how to manage their resources in the face of the JVM’s garbage collector, but do they know why we use garbage collection and what the downsides are? Do they understand what canvas is good for, what SVG is good for and when to choose which? The key here is that past behavior indicates future behavior — if they’re developed deep understanding of the technologies they’ve learned before, chances are pretty good that they’re going to be able to do that for the new technologies your team adopts in the future. There is no better way to understand how well they’re going to do on future technical challenges than hearing how they’ve handled such challenges in the past and seeing how they do it right in front of you. What’s Next in This Series However, the technical fit is not the only thing you need to look for — you also want to make sure that they will fit in well on your team and the company culture overall. We’ll talk about these in the next piece in this series.[...]

Future Proof Your Technical Interviewing Process: The Phone Screen

Mon, 21 Jul 2014 21:08:54 -0700

In 30 years, I’ve done a lot of interviewing from both sides of the table. Because of my chosen profession, my interviewing has been for technical positions, e.g. designers, QA, support, docs, etc., but mostly for developers and program managers, both of which need to understand a system at the code level (actually, I think VPs and CTOs need to understand a system at the code level, too, but the interview process for those kinds of people is a superset of what I’ll be discussing in this series). In this discussion, I’m going to assume you’ve got a team doing the interview, not just a person. Technical people need to work well in teams and you should have 3-4 people in the interview cycle when you’re picking someone to join the team. The Most Important Thing! Let me state another assumption: you care about building your team as much as you care about building your products. Apps come and go, but a functional team is something you want to cherish forever (if you can). If you just want to hire someone to fill a chair, then what I’m about to describe is not for you. The principle I pull from this assumption is this: it’s better to let a good candidate go then to hire a bad one. A bad hire can do more harm than a good hire can repair. Turning down a “pretty good” candidate is the hardest part of any good interview process, but this one principle is going to save you more heartache than any other. The Phone Screen So, with these assumptions in mind, the first thing you always want to do when you’ve got a candidate is to have someone you trust do a quick phone screen, e.g. 30 minutes. This can be an HR person or someone that knows the culture of the company and the kind of people you’re looking for. A phone screen has only one goal: to avoid wasting the team’s time. If there’s anything that’s an obvious mismatch, e.g. you require real web development experience, but the phone screen reveals that the candidate really doesn’t, then you say “thanks very much” and move on to the next person. If it’s hard to get a person to come into your office — maybe they’re in a different city — you’ll also want to add another 30 minutes to do a technical phone screen, too, e.g. Describe the last app they built with Angular. Tell me how JVM garbage collection works. What’s the right data structure to hold the possible solutions to tic-tac-toe? Whatever it is, you want to make reasonably sure that they’re going to be able to keep up with their duties technically before you bring them on site, or you’re just wasting the team’s time. At this point, if you’re hiring a contractor, you may be done. Contractors are generally easy to fire, so you can bring them on and let them go easily. Some companies start all of their technical hires as contractors first for a period of 30-90 days and only hire them if that works out. If you’re interviewing for an FTE position, once they’ve passed the phone screen, you’re going to bring them into the office. You should take a candidate visit seriously; you’re looking for a new family member. Even before they show up, you make sure you have a representative sample of the team in the candidate’s interview schedule. At the very least, you need to make sure that you have someone to drill into their technical abilities, someone to deal with their ability to deliver as part of a team and someone to make sure that they’re going to be a cultural fit with the company as a whole. Each of these interview types is different and deserves it’s own description. Future Posts[...]

Head of Google interviewing says “results matter, riddles don’t”

Fri, 18 Jul 2014 21:49:45 -0700

(image) Google, like Microsoft, is famous for asking brain-teaser style questions during their interviews. However, in a June, 2013 interview with the New York Times, Laszlo Bock, the Sr. VP of HR for Google, said that

[B]ainteasers are a complete waste of time. How many golf balls can you fit into an airplane? How many gas stations in Manhattan? A complete waste of time. They don’t predict anything. They serve primarily to make the interviewer feel smart.”

In another interview, Bock said that when putting together a resume, focus on what you did in relation to the expectations:

The key is to frame your strengths as: I accomplished X, relative to Y, by doing Z.’ Most people would write a résumé like this: Wrote editorials for The New York Times.’ Better would be to say: Had 50 op-eds published compared to average of 6 by most op-ed [writers] as a result of providing deep insight into the following area for three years.’ Most people don’t put the right content on their résumés.”


Moving My ASP.NET Web Site to Disqus

Thu, 17 Jul 2014 00:05:47 -0700

I’m surprised how well that my commentRss proposal has been accepted in the world. As often as not, if I’m digging through an RSS feed for a site that supports comments, that site also provides a commentRss element for each item. When I proposed this element, my thinking was that I could make a comment on an item of interest, then check a box and I’d see async replies in my RSS client, thereby fostering discussion. Unfortunately, RSS clients never took the step of allowing me to subscribe to comments for a particular item and a standard protocol for adding a comment never emerged, which made it even less likely for RSS clients to add that check box. All in all, commentRss is a failed experiment. Fostering Discussion in Blog Post Comments However, the idea of posting comments to a blog post and subscribing to replies took off in another way. For example, Facebook does a very good job in fostering discussion on content posted to their site: The Facebook supports comments and discussions nicely   Not only does Facebook provide a nice UI for comments, but as I reply to comments that others have made, they’re notified. In fact, as I was taking the screenshot above, I replied to Craig’s comment and within a minute he’d pressed the Like button, all because of the support Facebook has for reply notification. However, Facebook commenting only works for Facebook content. I want the same kind of experience with my own site’s content. For a long time, I had my own custom commenting system, but the bulk of the functionality was around keeping spam down, which was a huge problem. I recently dumped my comments to an XML format and of the 60MB of output, less than 8MB were actual comments — more than 80% was comment spam. I tried added reCAPTCHA and eventually email approval of all comments, but none of that fostered the back-and-forth discussions over time because I didn’t have notifications. Of course, to implement notifications, you need user accounts with email verification, which was a whole other set of features that I just never got around to implementing. And even if I did, I would have taken me a lot more effort to get to the level of quality that Disqus provides. Integrating Disqus Into Your Web Site Disqus provides a service that lets me import, export and manage comments for my site’s blog posts, the UI for my web site to collect and display comments and the notification system that fosters discussions. And they watch for spam, too. Here’s what it looks like on a recent post on my site: The Disqus services provides a discussion UI for your web site   Not only does Disqus provide the UI for comments, but it also provides the account management so that commenters can have icons and get notifications. With the settings to allow for guest posting, the barrier to entry for the reader that wants to leave a comment is zero. Adding the code to enable it on your site isn’t zero, but it’s pretty close. Once you’ve established a free account on, you can simply create a forum for your site and drop in some boilerplate code. Here’s what I added to my MVC view for a post’s detail page to get the discussion section above: <%-- Details.aspx –%> ...

Moving My Site to Azure: DNS & SSL

Fri, 11 Jul 2014 22:45:54 -0700

This part 3 of a multi-part series on taking a real-world web site (mine) written to be hosted on an ISP ( and moving it to the cloud (Azure). The first two parts talked about moving my SQL Server instance to SQL Azure and getting my legacy ASP.NET MVC 2 code running inside of Visual Studio 2013 and published to Azure. In this installment, we’ll discuss how I configured DNS and SSL to work with my shiny new Azure web site. Configuring DNS Now that I have my site hosted on, I’d like to change my DNS entries for and to point to it. For some reason I don’t remember, I have my domain’s name servers pointed at and I used Office365 to manage them (it has something to do with my Office365 email account, but I’m not sure why that matters…). Anyway, in the Manage DNS section of the Office365 admin pages, there’s a place to enter various DNS record types. To start, I needed to add two CNAME records: The CNAME records needed to be awarded an IP address by Azure   A CNAME record is an alias to some other name. In this case, we’re aliasing the FQDN (the Host name field is really just the part to the left of the domain name to which you’re adding records, in this case). This awverify string is just a string that Azure needs to see before it will tell you the IP address that it’s assigned to you as a way to guarantee that you do, in fact, own the domain. The www host name maps to the Azure web site name, i.e. mapping to The other DNS record I need is an A record, which maps the main domain, i.e., to the Azure IP address, which I’ll have to add later once Azure tells me what it is. After adding the awverify and www host names and waiting for the DNS changes to propagate (an hour or less in most cases), I fired up the configuration screen for my web site and chose the Manage Custom Domains dialog: Finding the IP address to use in configuring your DNS name server from Azure   Azure provided the IP address after entering the domain name. With this in hand, I needed to add the A record: Adding the Azure IP address to my DNS name servers   An A record is the way to map a host name to an IP address. The use of the @ means the undecorated domain, so I’m mapping to the IP address for Now, this works, but it’s not quite what I wanted. What I really want to do, and what the Azure docs hint at, is to simply have a set of CNAME records, including one that maps the base domain name, i.e., to directly and let DNS figure out what the IP address is. This would allow me to tear down my web server and set it up again, letting Azure assign whatever IP address it wanted and without me being required to update my DNS A record if I ever need to do that. However, while I should be able to enter a CNAME record with a @ host name, mapping it to the Azure web site domain name, Office365 the DNS management UI won’t let me do it and Office365 support wasn’t able to help. However, even if my DNS records weren’t future-proofed the way I’d like them to be, they certainly worked and now both and mapped to my new Azure web site, which is where those names are pointing as I write this. However, there wa[...]

Moving My Site to Azure: ASP.NET MVC 2

Tue, 08 Jul 2014 19:36:57 -0700

In our last episode, I talked about the joy and wonder that is moving my site’s ISP-hosted SQL Server instance to SQL Azure. Once I had the data moved over and the site flipped to using the new database, I needed to move the site itself over, which brought joy and wonder all it’s own. Moving to Visual Studio 2013 I haven’t had to do any major updates to my site since 2010 using Visual Studio 2010. At that time, the state of the art was ASP.NET MVC 2 and Entity Framework 4, which is what I used. And the combination was a pleasant experience, letting me rebuild my site from scratch quickly and producing a site that ran like the wind. In fact, it still runs like the wind. Unfortunately, Visual Studio 2012 stopped supporting MVC 2 (and no surprise, Visual Studio 2013 didn’t add MVC 2 support back). When I tried to load my web site project into Visual Studio 2013, it complained: This version of Visual Studio is unable to open the following projects   This error message lets me know that there’s a problem and the migration report provides a handy link to upgrade from MVC 2 to MVC 3. The steps aren’t too bad and there’s even a tool to help, but had I followed them, loading the new MVC 3 version of my project into Visual Studio 2013 would’ve given me another error with another migration report and a link to another web page, this time helping me move from MVC 3 to MVC 4 because VS2013 doesn’t support MVC 3, either. And so now I’m thinking, halfway up to my elbows in the move to MVC 3 that Visual Studio 2013 doesn’t like, that maybe there’s another way. It’s not that there aren’t benefits to move to MVC 4, but that’s not even the latest version. In fact, Microsoft is currently working on two versions of ASP.NET, ASP.NET MVC 5 and ASP.NET v.Next. Even if I do move my site forward two version of MVC, I’ll still be two versions behind. Of course, the new versions have new tools and new features and can walk my dog for me, but by dropping old versions on the floor, I’d left with the choices of running old versions of Visual Studio side-by-side with new ones, upgrading to new versions of MVC just to run the latest version of VS (even if I don’t need any of the new MVC features) or saying “screw it” and just re-writing my web site from scratch. This last option might seem like what Microsoft wants me to do so that they can stop supporting the old versions of MVC, but what’s to stop me from moving to AWS, Linux and Node instead of to ASP.NET v.Next? The real danger of dropping the old versions on the floor; not that I’ll move over to another platform, because I’m an Microsoft fanboy and my MSDN Subscription gives me the OS and the tools for free, but that large paying customers say “screw it” and move their web sites to something that their tools are going to support for more than a few years. Luckily for me, there is another way: I can cheat. It turns out that if I want to load my MVC 2 project inside of Visual Studio 2013, all I have to do is remove a GUID from the csproj file inside the ProjectTypeGuids element. The GUID in question is listed on step 9 of Microsoft’s guide for upgrading from MVC 2 to MVC 3: Removing {F85E285D-A4E0-4152-9332-AB1D724D3325} from your MVC 2 project so it will load in Visual Studio 2013   By removing this GUID, I give up some of the productivity tools inside Visual Studio, like easily adding a new controller. However, I’m familiar enough with MVC 2 that I no longer need those tools and being[...]

Moving My Site to Azure: The Database

Mon, 07 Jul 2014 02:45:05 -0700

In a world where the cloud is not longer the wave of the future, but the reality of the present, it seems pretty clear that it’s time to move from my free ISP hosting (thanks!) to the cloud, specially Microsoft’s Azure. Of course, I’ve had an Azure account since its inception, but there has been lots of work to streamline the Azure development process in the last two years, so now should be the ideal time to jump in and see how blue the waters really are. As with any modern web property, I’ve got three tiers: presentation, service and database. Since the presentation tier uses server-side generated UI and it’s implementation is bundled together with the service tier, there are two big pieces to move — the ASP.NET site implementation and the SQL Server database instance. I decided to move the database first with the idea that once I got it hosted on Azure, I can simply flip the connection string to point the existing site to the new instance while I was doing the work to move the site separately. Deploy Database To Windows Azure SQL Database from SSMS The database for my site does what you’d expect — it keeps track of the posts I make (like this one), the images that go along with each post, the comments that people make on each post, the writing and talks I give (shown on the writing page), book errata, some details about the navigation of the site, etc. In SQL Server Management Studio (SSMS), it looks pretty much like you’d expect: loaded into SQL Server Management Studio   However, before moving to Azure SQL Server, I needed a SQL Azure instance to move the data to, so I fired up the Azure portal and created one: Creating a new SQL Azure database   In this case, I chose to create a new SQL Azure instance on a new machine, which Azure will spin up for us in a minute of two (and hence the wonder and beauty that is the cloud). I choose the Quick Create option instead of the Import option because the Import option required me to provide a .bacpac file, which was something I wasn’t familiar with. After creating the SQL Server instance and the corresponding server, clicking on the new server name (di5fa5p2lg in this case) gave me the properties of that server, including the Manage URL: SQL Azure database properties   If you click on the Manage URL, you will have a web interface for interacting with your SQL Azure server, but more importantly for this exercise, the FQDN is what I needed to plug into SSMS so that I can connect to that server. I’ll need that in a minute, because in the meantime, I’d discovered what looked like the killer feature for my needs in the 2014 edition of SSMS: Deploy Database to Windows Azure Database in SSMS 2014   By right-clicking on the database on my ISP in SSMS and choosing Tasks, I had the Deploy Database To Windows Azure SQL Database option. I was so happy to choose this option and see the Deployment Settings screen of the Deploy Database dialog: SSMS Deploy Database dialog   Notice the Server connection is filled in with the name of my new SQL Server instance on Azure. It started blank and I filled it in by pushing the Connect button: SSMS Connect to Server dialog   The Server name field of the Connect to Server dialog is where the FQDN we pulled from the Manage URL field of Azure database server properties screen earlier and the credentials are the sam[...]

Bringing The Popular Tech Meetups to Portland

Mon, 23 Dec 2013 16:20:30 -0800

(image) I’ve been watching the Portland startup scene for years. However, in the last 12 months, it’s really started to take off, so when I had an opportunity to mentor at the recent Portland Startup Weekend, I was all over it. I got to do and see all kinds of wonderful things at PDXSW, but one of the best was meeting Thubten Comerford and Tyler Phillipi. Between the three of us, we’re bringing the very popular Tech Meetup conference format to Portland.

The idea of a Tech Meetup is meant to be focused on pure tech. In fact, at the largest of the Tech Meetups in New York (33,000 members strong!), they have a rule where it’s actually rude to ask about the business model. The Tech Meetups are tech for tech’s sake. If you’re in a company big or small or if you’re just playing, cool tech always has a place at the Portland Tech Meetup.

The format is simple and if you’re familiar with the way they do things in Boulder or Seattle, you’re already familiar with it. Starting on January 20th, 2014, every 3rd Monday at 6pm, we’ll open the doors for some networking time, providing free food and drink to grease the skids. At 7pm, we’ll start the tech presentation portion of the evening, which should be at least five tiny talks from tech presenters of all kinds. After the talks, we’ll wrap up around 8pm and then head to the local water hold for the debrief.

If this sounds interesting to you, sign up right now!

If you’d like to present, drop me a line!

If you’d like to sponsor, let Thubten know.

We’re very excited about bringing this successful event to Portland, so don’t be shy about jumping in; the water is fine…

The Party Is Just Getting Started At Snapflow!

Fri, 20 Dec 2013 13:02:19 -0800

(image) This has been my first week at Snapflow and what a week it’s been! I’ve already spend a good part of two days with actual customers that are excited about using Snapflow to build their web and mobile applications, started on a technical spike for one of those apps to be delivered on our platform in February and found the local Hawaiian teriyaki place.

As Chief Technical Officer at Snapflow, I’ll have influence over internal technology direction and external outreach, help to build our suite of products as well as growing the engineering team and work to understand our customers and make sure that they’re happy.

Snapflow’s customers are enterprise verticals building web sites and mobile apps. They want to build apps with global reach and cloud scale, but they don’t want to manage VMs for their databases, custom logic and REST APIs. With Snapflow, they get to configure their data model, design their custom logic with workflow and the REST API falls naturally from that. Further, because Snapflow provides enterprise-grade services, customers get top notch tools, security at the granularity they need, multi-tenancy to deal with app variations across groups or geographies, and guaranteed uptime. Our customers can then build their client apps however we want, but so far it’s been overwhelmingly HTML-based, so you’ll soon see tools from us to support that even more.

Technology-wise, we’ve got an amazing mix of AWS-based cloud hosting, Mongo DB and .NET on the server-side with HTML5-based tools and apps using Angular, Bootstrap and Kendo UI on the client-side.

And we’re hiring! Snapflow has more work than we can do right now and we’d love your help. I had other choices when it came to my next adventure, but Snapflow is that rare combination of people, technology and opportunity that I just couldn’t pass up. It’s the hot enterprise startup in Portland. Come join the party!

TypeScript Templates for Windows 8

Sat, 29 Dec 2012 16:11:13 -0800

As soon as I saw Anders’ talk on TypeScript, I fell in love. If you’re not familiar with it, TypeScript adds a lot of necessary features to JavaScript to make it suitable for building real apps, while still “compiling down” to JavaScript to maintain JS’s single biggest advantage: ubiquity. Further, TypeScript has tooling inside Visual Studio so that it works nicely with a wide variety of Windows projects, including Win8/JS projects. However, while Microsoft has made a nice Win8/TS sample available, there are currently no Visual Studio project templates for building my own apps. Luckily, it was easy enough to build some: You’ll notice three new templates: TypeScript versions of Blank App, Fixed Layout App and Navigation App. All three projects generate code that acts the same, except the code is in TypeScript instead of JavaScript (although the JavaScript is generated and very visible to your inspection). I didn’t build the Grid App or Split App templates yet, since there is a lot of code there. I also haven’t ported any of the item templates. Now that I have the Navigation App template done (which includes an empty Page Control), the Grid and Split and other item templates will all flow from there (eventually : ). JavaScript Patterns to TypeScript Constructs Moving JavaScript to TypeScript involves two major pieces: porting the code from JS patterns to TS language constructs and bringing in references to the types that are used. The first step, moving from JS patterns to TS language constructs, largely involved modules, classes and functions. For example, the navigator file defines the PageControlNavigator class in the Application namespace using JS patterns: // navigator (function () { "use strict"; var appView = Windows.UI.ViewManagement.ApplicationView; var nav = WinJS.Navigation; WinJS.Namespace.define("Application", { PageControlNavigator: WinJS.Class.define( // Define the constructor function for the PageControlNavigator. function PageControlNavigator(element, options) { ... Application.navigator = this; }, { home: "", /// _element: null, _lastNavigationPromise:, _lastViewstate: 0, // This is the currently loaded Page object. pageControl: { get: function () { ... } }, ... } ) }); })(); The common pattern for a module that contains private and public parts is to use a self-executing anonymous function (which wraps all the code in navigator) to make everything private and then to use helpers to expose public parts explicitly (like the use of WinJS.Namespace.define). Further, to define a class is a matter of gathering up a constructor function with a set of member properties and functions, which is what the WinJS.Class.define helper does. Finally, right in the middle of that is the exposing of a namespace-wide property called Application.navigator, which makes it available to anyone using the Application namespace. TypeScript provides actual language constructs for these patterns: /// // navigator.ts module Application { "use strict"; var appView = Windows.UI.ViewManagement.ApplicationView; var nav = WinJS.Navigation; ex[...]

Windows 8 and Visual Studio 2012 and Data Visualization, Oh My!

Mon, 22 Oct 2012 10:52:04 -0700

This month is a big one for Microsoft developers. Windows 8 will be generally available in stores on a variety of form factors starting on 10/26, with the BUILD conference following closely in the last week of October. This on top of the Visual Studio 2012 RTM earlier this summer and a Windows Phone 8 release coming soon, and there’s a lot going on if you’re a Windows developer. If you’ve read my previous editor’s notes this year, you already know that Telerik takes Windows 8 and Visual Studio 2012 very seriously. As of 10/17, we’ve officially released our set of XAML and HTML controls for building Windows Store apps on Windows 8, including data visualization controls like charts, gauges and bullet graphs. These controls aren’t just ports from old platforms, but controls that have been re-imagined for the touch-centric mobile devices that Windows 8 will be shipping on. In addition, we’ve updated JustCode to support Windows Store project types, JustDecompile to decompile Windows Store and C# 5.0 apps and our JustTrace profiler to target Windows Store apps. If you’d like to see what our amazing customers have already done with all of this great Windows Store support, check out our Showcase Gallery. Further, as the modern UI style becomes more popular, we’re continuing to push touch and metro UI themes into almost all of our suites, including ASP.NET AJAX, WPF and Silverlight. Also, these platforms including WinForms get a huge new control this Q: the PivotGrid, providing you with cutting edge data visualization for your custom apps. In this Q, we’ve focused on Windows Store apps, Visual Studio 2012 and data visualization for desktop, web and mobile app development across the board, but that’s not all! We’ve added Coded UI support to WinForms and WPF controls, full SharePoint compliance to our ASP.NET AJAX controls and complete storage of all of your Visual Studio settings in the cloud to JustCode! Check out our webinars the week of 10/22 so you can see just exactly what’s new in your favorite Telerik products. Chris Sells VP, Developer Tools @csells P.S. And while the Developer Tools division has been hard at work, so has the rest of Telerik. For example, we’ve recently welcomed Eric Lawrence into our family with his excellent Fiddler tool, and the folks in our agile project management division TeamPulse have introduced Kanban boards and integration with TFS 2012 in their latest version.[...]

Telerik’s evolving platform guidance for .NET developers

Mon, 08 Oct 2012 07:00:17 -0700

Telerik often gets questions from its customers about which of the multitude of app frameworks that Microsoft provides for .NET developers that they should pick. WinForms? WPF? Silverlight? ASP.NET? What’s the right solution for their problem? The answer is always the same: it depends. Unfortunately, that’s not very helpful, so last year a set of the best and brightest that Telerik has to offer sat down and figured out just what it depends on and whether we could offer clear, concise guidance for our customers. The answer was “yes we could,” so we did that in 2011. However, it’s been a busy year that’s included two major events in the life of a .NET developer: Silverlight desktop and web have been shelved and Windows 8 has been born. So, with that in mind, we’ve updated the platform guidance to take those two important changes to the .NET developer landscape into account; you can read all about it in the Telerik’s 2012 platform guidance for .NET developers. Or, if you’re already familiar with the 2011 guidance, the rest of this post will be about what’s changed in 2012. Desktop Application Desktop applications represent the range of applications from those supporting internal information workers to those delighting consumers. These applications typically involve richly interactive interfaces, either for heavy-duty data management or entertainment. They key characteristic of desktop apps is the need to take advantage of the full range of native capabilities of the platform. Ideal .NET Platform: WPF WPF provides the ideal platform for building desktop apps. With mature, rich tooling provided in Visual Studio and Expression Blend, readily available components that address the full range of app styles, a large developer community and ClickOnce deployment, WPF gives the .NET developer all of the power of building “native” Windows software with a simple deployment model. Key Advantages of WPF: Mature platform with 1st class support for rich media and data visualization Excellent tooling and active developer community Rich, deep access to the native Windows platform Simple deployment and updates with ClickOnce Good availability of complete 3rd party toolsets [Special Silverlight Guidance Note: Silverlight is also a good candidate for building desktop apps, sharing many of the same characteristics of WPF. While it seems clear that Microsoft will not release a major version beyond the recently released Silverlight 5, their commitment to 10 more years of support as well as continued 3rd party vendor support means that it’s a viable alternative for WPF development for new or existing Silverlight projects.] Tablet Application The use of tablets and touch-centric apps within companies is on the rise, and tablet sales are expected to double in 2012 (Gartner). Unlike their mobile smartphone counterparts, which frequently complement existing desktop apps, analysts see the potential for tablets to be more disruptive, replacing certain types of desktop apps in the enterprise. For .NET developers, it is important to address this trend and pick a Microsoft platform that will deliver the best tablet experience. Many platforms available from Microsoft can be used to build touch-enabled apps, even WinForms, but Microsoft is providing clear guidance for moder[...]

Telerik Loves Windows 8 and Visual Studio 2012 RTMs!

Thu, 16 Aug 2012 10:53:24 -0700

Yesterday’s release of Visual Studio 2012 and Blend for Visual Studio 2012 marks the beginning of a new era. In some ways, VS2012 and Blend are incremental releases, adding even better support for building enterprise and consumer apps and services for the desktop and the web. However, in one very important way, the release of VS2012 and Blend, together with the release of Windows 8 earlier this month, signals a whole new focus for the platform — that of touch-centric tablets — and with it, a whole new way to package and distribute apps for the Windows operating system — the Windows Store. If Windows 8 sells even half of what Windows 7 has sold (which seems low, considering the support for a great number of new form factors), then that will represent 300 million customers all looking for new Windows 8 apps in the Store. Currently, that Store holds about 500 apps and even if Microsoft increases that number to 5,000 by general availability in October, that’s far short of the 500,000 apps that similar app stores have. In short, Windows 8 is going to have lots of users and those users are going to want to buy lots of apps. This is, of course, why Visual Studio 2012 and Blend are so important — they’re the tools you can use to design, develop and package your app for the Store and tap into those hundreds of millions of customers. Make no mistake — Windows 8 represents nothing short of a reboot of the Windows developer ecosystem and Visual Studio 2012 and Blend are the keys to that ecosystem. Windows 8, Visual Studio 2012 and Blend are important to Windows developers, which makes it important to Telerik customers. Because of that, we’ve been on the cutting edge here since the BUILD conference in September, releasing metro themes that first week and supporting the Beta and RCs in our tools and controls. And now I’m happy to announce that we fully support Windows 8, Visual Studio 2012 and Blend across nearly all of our Windows developer products. And not only do we support them, but we take special advantage of their unique features in our products, as you can read in the following posts: RadControls for Metro; Ready To Rock & Roll With Windows 8 RTM Just Like a Second Birthday - Telerik’s Controls for ASP.NET AJAX and Visual Studio 2012 RTM The RadControls for WPF Control Suite is ready for VS 2012 RTM! Are you? JustCode, JustTrace, JustMock and JustDecompile: They Just Work in Visual Studio 2012 Telerik’s WinForms Controls are now Visual Studio 2012 RTM Ready! Play with Metro Themes and Touch Gestures on Windows 8! Simplify Data Access in VS 2012 RTM with OpenAccess ORM Rocking Kendo UI in Visual Studio 2012 and Windows 8 Test Studio’s Love for Visual Studio 2012 RTM Sitefinity Thunder supports Visual Studio 2012 and helps developers avoid ALT + TAB Of course, this is just the beginning of the tablet and mobile era for Windows developers, so count on Telerik to continue to push into Windows 8 and Windows Phone 8 for building touch-centric apps for both the Windows Store and the Windows Phone Store, as well as continuing to push our products to meet your needs on the desktop and on the web. Telerik’s been right there through the last decade o[...]

June, 2012, Florida: Best TechEd Ever!

Thu, 07 Jun 2012 14:04:22 -0700

(image) This month in Florida is going to be my 2nd TechEd ever and I’m sure the best by far. The number of things I get to do is staggering:

  • I get to work the Telerik booth for my first big show. We’ll be launching not one but two completely new Telerik products. Fun!
  • Since the Telerik Ultimate Collection has been nominated for the Best of TechEd, I get to give a dead-run 15-minute demo to the judges with fellow Teleriker Michael Crump.
  • Also with Michael, I’ll be giving the 30-minute Telerik + Blend: Better Together” talk in the Microsoft Visual Studio booth showing off how 3rd party controls work inside the newest Blend for building Metro style apps on Windows 8.
  • The first chapter of the Metro/JS book I’m writing with another fellow Teleriker Brandon Statrom is being printed and bound in a limited quantity for the show. Stop by and get your signed copy!
  • I get to be one of the Speaker Idol judges every day at lunch.
  • I’m sure there’s at least one podcast recording in there, too, somewhere…

I honestly can’t remember when I’ve looked forward to a conference more. I’ll see you there!

Microsoft + ASP.NET + Open Source: This Time for Sure!

Mon, 09 Apr 2012 19:05:36 -0700

Bullwinkle: “Hey Rocky! Watch me pull a rabbit out of a hat!” Rocky: “Again? That trick never works!” Bullwinkle: “This time for sure!” In the last week or so, I’ve heard mixed reactions to Scott Hanselman’s eye-popping announcement that, in addition to ASP.NET MVC that is already open source, that Microsoft is releasing ASP.NET Web API and Razor as open source as well. Further, and this is the big deal: Microsoft is going to take contributions on their open source ASP.NET components and ship those contributions in the box for future major releases. Of course, this is big news on the face of it, but some folks aren’t convinced. Some more jaded members of the community look at the open sourcing of a Microsoft component as the beginning of the end for that component. “Look at IronPython!” they say. “That project was open sourced right before the team imploded.” Another jaded point of voice is that Microsoft is open sourcing MVC so that they have a story when it’s killed: “You can add features to it all you want,” they claim Microsoft will say. The funny thing about all of those points of view is that I hear people complain all the time when Microsoft cancels something, “I don’t care if they cancel my favorite project; just release the source to the community!” I find it ironic that when Microsoft does release the source for a dying project, people complain about that, too. However, in this case, I don’t think that ASP.NET is going to be side-lined. In the previous cases, it was easy to see that Microsoft was moving on and to what, e.g. the C# dynamic keyword in the case of IronPython. ASP.NET, on the other hand, is a huge part of the server-side story for Microsoft and MVC is clearly the thing they’re focusing on. It’s the common thread for custom servers for both UI and API on both Windows Server and the Cloud and a big focus in the tooling for VS11. Further, Scott has a track record with making OSS work from Microsoft, including NuGet and the user contributions that it takes. And finally, both Scott Hanselman and Phil Haack, respected, active community members, not only drove these projects but have endorsed them. Those three things add up to Microsoft pulling the rabbit out of the hat for me.[...]

Building Windows 8 Apps with JavaScript

Tue, 20 Mar 2012 11:59:54 -0700

Brandon Satrom and I are writing a book on Metro/JS apps for Win8, with Don Box. All of the content on this page is subject to change.


Read Online


Table of Contents

  • Foreword: Chris Anderson
  • Foreword: Rey Bango
  • Preface
  • Chapter 1. Hello, Windows 8
  • Chapter 2. Binding and Controls
  • Chapter 3. Layout
  • Chapter 4. Typography
  • Chapter 5. Media
  • Chapter 6. Drawing and Animation
  • Chapter 7. App State
  • Chapter 8. Networking
  • Chapter 9. Shell Contracts
  • Chapter 10. Shell Integration
  • Chapter 11. Device Interaction
  • Chapter 12. Extending With C++
  • Chapter 13. Making Money
  • Appendix A: JavaScript for C-family Programmers
  • Appendix B: Styling & Presentation at a Glance


Most of the chapters have several source code samples that accompany them, which you can download and use how you see fit. Enjoy!