Skip to content
Jun 6 13

WinJS helper: Bind a ToggleSwitch to an AppData settings value (AppSettingToggle)

by Brandon

I expect that one of the most common usages of the WinJS.UI.ToggleSwitch control in a WinJS app is to toggle a setting stored in the handy Windows.Storage.ApplicationData key/value pair stores. Namely, the LocalSettings or RoamingSettings stores. Unfortunately, the ToggleSwitch control doesn’t support data binding to an AppData settings value. But we can make one pretty easily:


Include this file in your project, and you can use the new control (derived from ToggleSwitch) like this:

<div data-win-control="BrandonUtils.Controls.AppSettingToggle" data-win-options="{ title: 'Show thingy', settingName: 'ShowThingy'}"></div>

Now you have a ToggleSwitch which initializes itself to the value of the ShowThingy setting from the LocalSettings store. When changed, it updates the corresponding LocalSettings value. You can also use roaming settings by adding the enableRoaming option:

<div data-win-control="BrandonUtils.Controls.AppSettingToggle" data-win-options="{ title: 'Show thingy', settingName: 'ShowThingy', enableRoaming: true}"></div>

Or specify your own lookup function to retrieve a specific settings container:

<div data-win-control="BrandonUtils.Controls.AppSettingToggle" data-win-options="{ title: 'Show thingy', settingName: 'ShowThingy', getSettingContainer: MyAppSettings.getTheRightSettingsContainer}"></div>
May 31 13

Introducing Newseen

by Brandon

Last week my new company launched it’s very first product, Newseen. What is Newseen? It’s a news reading app designed to as quickly as possible get you what’s new and make it be seen =)

The focus of the app is on news that’s being talked about right now. You choose a set of categories you’re interested in (or let Newseen choose based on whom you follow on Twitter), and it will show you the most talked about stories right now and over the last couple days or so. The idea is that once you’ve seen something, it should get out of the way unless something new about it makes it relevant again. To accomplish this, stories you’ve read move off to the Recently Seen list at the left side of the app. If a story changes, it jumps to the top and tells you why. It could be a new or updated article, or a tweet from one of your friends about that story.

For example, if you read a story about the Nexus 4 now being available in white, you might see articles from The Verge and The Next Web.

Screenshot of news tile for Nexus 4 available in white

Now let’s imagine you saw this story before Engadget and SlashGear had written about it (so it would have a big 4 instead of a big 6). If you mark that story as read, and then Engadget and Slashgear write about it later, the Recently Seen list will bring this to your attention, like so:

Screenshot of updated Recently Seen tile for Nexus 4 in white story

If instead, there were no new articles, but you followed me on Twitter and I tweeted about it, you’d see this:


You’d only see that if I tweeted about it after you marked the story as read. If I had tweeted before that, it would’ve shown up when you read the story. In fact, even before that, the full size tile (from the first screenshot) would’ve done a “peek” showing you that tweet.


Right now the Twitter integration is limited to showing you relevant tweets on news stories. I find this pretty handy. But when you’re looking at the list of Tweets, right now you just see Twitter’s fallback embedded tweet UI. This lets you open the tweet on Twitter in the browser (by tapping or clicking on the date), but doesn’t let you take any actions right away. However, that will change very soon! Version 1.1 of the app is already in the works, and one of the new features you’ll find is an overhauled tweet view which lets you reply, favorite, or retweet directly from in the app. There’s a lot more coming, but that’s for another day =)

If you want to check out Newseen, click here to view the app’s product page for the Windows app store:
Newseen in the Windows Store

You can also check out the (currently very limited) Newseen website at There you’ll find this fun little promotional video I threw together one night last week:

Don’t forget to follow Newseen on Twitter or like it on Facebook!

May 1 13


by Brandon

As promised in my last post, I’m here to write a bit about my plan for life after Microsoft. Naturally, my experience at Microsoft informs my decisions and sets the initial direction I will take. This post itself is an example of the former. If you’re a past or present “Microsoftie” (or have worked at any number of similarly managed companies) you are familiar with the annual practice of setting commitments. I didn’t set out to do this, but as I was summarizing my plan to post here, I realized what I was really doing was setting my commitments for the rest of 2013. The format is obviously different from the MSFT template, but the spirit is the same.

First, I list off my high-level commitments for the rest of the year. I then list off specific deliverables. These are broken down into three buckets based on how far out they are, starting with the largest timespan, then zooming into nearer and shorter periods with more specificity.

So without further ado, here are my 2013 commitments:


  • Work.
    • Work a full (but flexible) work week on solo app (and/or web) development projects.
  • Learn.
    • Become familiar and proficient with mobile app platforms other than Windows 8/RT.
    • This includes looking at “native” platforms (Objective C + Cocoa Touch, Java on Android, XAML/C# for Windows Phone), and possibly Xamarin (despite a rather unpleasant recent interaction with their founder).
    • Attend startup-focused events.
    • Read. Topics include business, development, and design.
    • Learn by shipping, and iterating quickly.
  • Travel.
    • Check off some places on my long (and under-used) to-visit list.
    • Figure out if there’s someplace other than Seattle I’d rather live.
  • Improve my fitness routine.
    • I’ve been hitting the gym 2-3 times a week, but would like to up that and need to run more.
  • Enjoy the Seattle summer.
    • This one should be easy 🙂


Next 6-8 months
(roughly end of the year)

  • At least one app available on Windows, iOS, Android, and Windows Phone.
  • Visit England (my mother lives there most of the year now, and I have yet to visit her).
  • Decision about whether to stay in or leave Seattle.

Next 3-4 months

  • Port an app from Windows 8 to iOS.
    • I’ll be trying multiple approaches (HTML/JS, native, hybrid, Xamarin) to see what’s effective.
  • Iterate on first app or pivot based on response to my Windows 8 app release.

Next 0-2 months

  • Completed: Start an LLC (including all paper work, licenses, bank account, etc).
  • Ship my first app in the Windows Store on 5/20.
  • Ship the first update to that app, incorporating initial user feedback.
  • Begin prototyping a web and/or iOS version.

Every couple of months, I will do a “check-in” against these commitments here. I’ll assess my progress, and update/refine the farther out sets as they become nearer. Publishing the initial set and my check-ins here will, I hope, help keep my honest 🙂

As you can see, I’ve already completed one of my first steps. That was creating an official business entity under which I’ll operate. I’ve chosen to begin with an LLC formed here in Washington. After a good deal of research, I decided this made the most sense and kept my costs low for the time being. I handled all the paperwork myself, and it was easier than I’d first feared. Of course, you’re welcome to ask me if I feel differently when it comes time to report taxes.

My company is called B-side Software, and our first product is called Newseen. From their respective websites, you can follow either or both on Twitter or Facebook, or sign up for e-mail announcements (I promise this channel will be used sparingly, mainly to announce product availability). I’ll also be posting regularly about them here, though this blog focus more on my personal experiences in building both a startup and actual products (i.e. apps).

In the end, success against these commitments may not result in a self-sustaining business. That’s okay. Obviously, that would be a fantastic outcome, and one I will strive to achieve. There are just too many other factors (not the least of which is my own inexperience with all the non-engineering aspects of the business) at play to reasonably commit to it happening this year. Instead, I see achievement of these commitments resulting in one of three possibilities:

  1. I find myself with a self-sustaining business ready to grow in 2014.
  2. I have a business which won’t pay the bills but which I believe in fully enough to seek external investment, or make, ahem, “lifestyle adjustments” in order to push forward on my own.
  3. I decide I’m just not very good at and/or passionate about this whole business thing, and find a cool place to go work for someone else once again.

That’s not to say something else won’t come out of the blue, but those the outcomes I see as most likely, and I’m comfortable with any of them. Whatever comes to pass, it should be a fun ride!

Apr 26 13

How I came to my farewell

by Brandon

Last week I posted my farewell message to Microsoft. This post will talk a bit about how I got to that. The next will talk about where I think I’m going from here.

If you know me, you know that I’ve always been incredibly passionate about my work at Microsoft. More than that, I always loved the company (and still do!). A rare confession: I actually teared up at last fall’s Company Meeting. A few things built it up, but what pushed me over the edge was seeing first Surface ad previewed on the giant Key Arena screen. It was a magnificent moment, and in it I felt an overwhelming sense of pride. I know I’m not the only one who felt it. Thousands of us were witnessing the culmination of years of incredibly hard work, seeing all the pieces come together in a way we previously had to imagine (which sometimes took some effort!). After years of working on individual pieces and prototypes, we were finally seeing it the way it was about to be delivered to the entire real world.

At the completion of Windows 8, much of the team understandably took a moment to step back and catch our breathes. I dabbled a bit in hobby app development, and for the first time in a while found myself with enough free time to actually invest myself in a romantic relationship (maybe too invested, in retrospect, but that’s another story). On the work front, I took an opportunity to follow a couple of awesome managers to work on a new team in a different area of the product, and was pretty excited about the work we were signing up for. I had worked primarily on Search in different capacities for my entire tenure at Microsoft, so felt that I was ready to dive into something new.

Something else commonly happens as you transition from one product cycle to the next: You consider all your options. I felt it was prudent to give some thought to what they were and whether any of them seemed more interesting than the last time I’d done this exercise. I fear this will sound like gloating, but one of the great things about being an experienced software developer these days is that options are plentiful. I sorted the ones I found reasonable into four rough “buckets.”

  1. Stay where I was and continue driving forward along the path I was on. This was my default, and almost assumed, really.
  2. Try out another “big” company (Amazon, Facebook, etc) either in Seattle or someplace I wanted to move.
  3. Find a small startup to join or co-found.
  4. Start my own.

On a Monday evening in the middle of November I left work a little earlier than usual. I went to one of my favorite cafes in the Lower Queen Anne neighborhood of Seattle, and started reading several blogs and articles about experiences others have had with similar decisions. I found some interesting reads (a couple of which I wish I could remember how to find!), but actually found myself being more interested in adding a couple of user-requested features to 4th at Square. However, that process was soon interrupted when I saw what appeared to be an odd sort of joke appear in my twitter feed. “Steven Sinofsky to leave Microsoft.” Right, and a pig learned to levitate. But then more came, and soon I received an e-mail confirming that this was, in fact, happening.

I still know nothing about how or why that came to be. I think I’m within my liberties to say that from my perspective, absolutely nothing about the Windows team’s plans or directives seemed to change from the course he’d had us on. But in retrospect I think in some strange way it had an effect on me. In particular, it led me to revisit certain things I’d thought of as fairly set in stone. Or if not set in stone, at least highly predictable given my own insight and that of others made available to me.

And yet, my main focus was on work, and continuing to ramp up on my new areas of ownership and help my team figure out what needed to be done. Between that, the rather difficult end to aforementioned relationship, some family issues, and a minor surgery I undertook that month, I had enough on my mind that making a major life change wasn’t really something I had the bandwidth to even ponder. Certainly not with due clarity. What I did find was that I was looking forward to Christmas vacation a lot more than usual. Most years I’d have to essentially be pried away from my work. Looking back, I think I expected that the holidays would finally give me the chance to reflect and give some actual thought to those options.

And yet, that’s not what I did. What actually happened was that I spent my holiday break relaxing in St. Maarten and then North Carolina with family. I did zero work of any kind, and I gave pretty much no thought at all to big life changes. It really was a vacation, and one I hadn’t realized I was long overdue for.

Upon my return home and to work, though, all those stresses immediately came flooding back. It was as if something had momentarily blocked a fire hose pointed at me, and grateful as I was for that respite, it just made me all the more uncomfortable when it began dousing me again. There were a lot of things in my life I felt I couldn’t control at that time, but one of the few things I could control was my career. I thought it over for a few days, and then one morning before going into my office at work, I called my father. I walked around the periphery of my building’s parking area talking to him, freezing just a bit. I told him I’d decided to leave Microsoft, but that I didn’t know what I’d do next. My only plan was to take some more time to decompress, try to get some non-work things in order, catch up on some traveling I’d been putting off, and figure out where I wanted to be and what I wanted to be doing. I wanted to spend some time on the east coast and seriously think about moving back there. One reason among many to consider was to be nearer to family. I think he was surprised, but didn’t really try to talk me out of it, and I’m grateful for that support.

I’ll avoid going into much detail about what followed. I will say I am immensely grateful for the understanding my management chain showed, and for the options availed to me. In particular, time to work things out so that I could make a decision with clarity instead of to release pressure from the flood. As you now know, in the end I decided to leave after all, but with clarity of purpose: To build something of my own.

For now I remain in Seattle. One advantage of a solo project is that I have unparalleled flexibility to relocate. Seeing as I paid my dues through the dreadful Seattle winter, I am keen to make the most of the glorious summer days (which we’re already getting a taste of). Following that, I’m undecided. I’ve reeled in my anchors, whether the wind takes me away remains to be seen.

Apr 19 13

Farewell to Microsoft

by Brandon

Here’s the farewell message I sent this afternoon to colleagues past and present:

Dear friends,

I’ve been called a Microsoft “fanboy” more times than I can count. Because of each of you, I’ve worn that name proudly for eight years. Microsoft really was my dream job, and the anxious/terrified 20-year-old who came across the country in 2005 had no idea what an awesome ride it had in store for him.

By now you’ve probably figured out where this is going. Today is my last day as an employee at Microsoft. When I came to Microsoft I left behind a small business I’d (barely) started. Lately it seems that entrepreneurial itch has returned. Put another way: I’ve decided it’s time for me to be anxious and terrified once again 🙂

I cannot express how grateful I am for everything I’ve learned from you all. It’s only because of those lessons, along with the confidence and trust you’ve shown in me, that I’m able to take this step. Know that I look forward with great anticipation to the future of Windows (and the company!). As far as I’m concerned, I will always be your biggest fan.

I will still be in Seattle (at least for a while), so stay in touch!

Once more, thank you. Also, feel free to forward this along if I’ve forgotten anyone (I didn’t mean to!).


Apr 17 13

Binding helpers for WinJS

by Brandon

While writing my first JS app for the Windows Store, I found several features of WinJS to be very useful. One feature I used in several places is its data binding and templating support. Along the way, I discovered that custom initializers could be used to great effect.

You can download the set of helpers I created by right-clicking here and choosing “Save As…” from the menu.

What’s included? Here’s a quick summary (replicated in the comments at the top of the file:


Marks the element as display:none if the value is null or undefined.


<div class=”userName” data-win-bind=”style.display: BindingHelpers.displayNoneIfNull”>
Name: <div class=”userNameValue” data-win-bind=”textContent:”></div>


Inverse of displayNonIfNull


Uses the original (markup) value if the bound value is null or undefined.

<div class=”userName” data-win-bind=”textContent: BindingHelpers.originalIfNull>No user name available.</div>


Treat the default (markup) value as a template, where the placeholder {value} is replaced with the bound value.

<div class=”userName” data-win-bind=”textContent: BindingHelpers.fillStringTemplate”>Name: {value}</div>


Same as fillStringTemplate, but url encodes the value.

<a href=”{value}” data-win-bind=”href: BindingHelpers.fillLinkTemplate”>Account</a>


Strips HTML tags from the value (by inserting the value into a DIV and then extracting the innerText value).


Pre-processes the value using toStaticHTML.


Allows you to bind the value as a class name to the classes property.

If you have questions, founds bugs or opportunities for improvement, or any other feedback – please share in the comment section!

Nov 12 12

My first Win8 app: 4th at Square

by Brandon

If you’ve got a shiny new Windows 8 or Windows RT device (like a Microsoft Surface), and you use the foursquare service (or have been meaning to try it out), you should head on over the Windows Store and check out my first app: 4th at Square.

In addition to the above Store link, I’ve set up a website devoted to the app, at If you have suggestions or other feedback, you can leave them on that site or right here in the comments.


Soon I’ll be doing some posts about my experience actually developing the app, and sharing some tips and reusable code snippets I came up with along the way.

Oct 31 12

How I ended up building my first Windows 8 app, and sparking a minor controversy

by Brandon

Throughout the development of Windows 8, I occasionally dabbled in the new WinRT app platform, at various stages building things like a simple “twitter fall” app for watching trending or chosen topics stream by. In most cases all I did was dabble over vacations to see how the platform was progressing. However, back in February or thereabouts, I was sitting at Café Fiore on Queen Anne hill and decided to see how I might build something using the location and background task APIs that would make my Windows 8 laptop feel alive and aware of where I was. As a longtime on-again-off-again foursquare user, building something against that service seemed like a great place to start. So I fired up VS 2012 (a preview version at the time) and created a new WinJS project.

On a whim I named the project “4th & Square” – the name came about at least partly because I’d lived at 4th & Mercer, but looking back it’s also likely that I’d internalized the name of the excellent Windows Phone app, “4th & Mayor.” At the time, I gave the name little thought, as I was just dabbling and not planning to write anything that would ever be seen by anyone other than me and maybe some friends. I put a weekend or two of work into it, originally creating something that did little more than pop toast notifications as you moved around to new locations. Then I got too busy with other things like finishing Windows 8 itself, and the proto-app got stashed aside.

Fast-forward to Win8 RTM, and suddenly it seemed like all of my friends were building apps. I received some encouragement to break out my foursquare project and turn it into something real. Over a weekend I ported my existing work into the final version of the WinJS template and library, and then over a vacation to North Carolina in August, I spent a few afternoons at Starbucks completing most of the feature work for 1.0 version, learning quite a bit about JavaScript and the WinJS library along the way. A couple more weekends of polish and I felt like I had something worth sharing. I also spent some time one afternoon ensuring there wasn’t already an app with this name, and that it fit with foursquare’s naming and branding guidance. As far as I could tell, it was unique and within their rules. So when the Store opened in September, I immediately wanted to submit what I had.

In order to do so, I had to throw a privacy policy up on the web. I based this on foursquare’s guidance and included some boilerplate bits copy-and-pasted from their developer page. In my haste and fear of missing something, I Bing’d “foursquare app privacy policy” and used some of the results as a reference to make sure I had my bases covered. I also used MSDN’s documentation for location privacy (including both Win8 and Phone), and assembled the pieces I needed in a OneNote notebook I use for tracking everything related to my app. I then pasted that into WordPress and threw it up on this site as a temporary solution until I found time to build a proper site dedicated to the app. I also bought the domain name and pointed it at the appropriate sub-site here. All the boxes checked, I submitted the app. And then the fun began!

The app got through certification on its first attempt, and rather quickly. Within a day I started getting bug reports and feature requests from friends and others who had early access to the Windows Store. I put a couple more weekends into fixing things up, and released a couple of updates to the app to address all the reported issues.

Now, if you follow me on twitter you may know the next part of the story. At some point a few weeks after publishing the app, I received an e-mail from Jeff Wilcox, author of 4th & Mayor. He expressed some concerns about the similarity of my app’s name to his, and perhaps more importantly, a couple of paragraphs in my privacy policy which appeared to have been lifted from his. At first I didn’t believe this (I figured maybe he was confused because we both had the boilerplate stuff provided by foursquare). However, taking a look at both, I saw that the last couple paragraphs (out of many) were indeed virtually identical. In my haste to assemble the privacy policy I had apparently copied from the wrong window (one of the app policies I was using as a reference, namely his) into WordPress instead of the OneNote web app where I’d drafted my policy. I don’t remember doing this, but it is my best guess about how I ended up with something copy-and-pasted from his policy into mine. I absolutely did not intentionally do a single copy-and-paste from anywhere except the blurbs required by the docs on Of course, for that you have nothing but my word, and if you don’t know me I fully understand why that might not be enough.

Feeling pretty awful about this, I replied to Jeff telling him I had fixed the privacy policy issue and suggested we meet up. Several days later we did just that (ironically, in a coffee shop at 4th & Wall). Jeff’s a friendly and likable guy, and we chatted for a while about the background of how his app came to be and some challenges he’s faced along the way. I apologized to Jeff for the privacy policy issue, which simply never should have happened. I was completely embarrassed and ashamed over it. I did my best to assure him that nothing about my app was based on his (he had looked at it and seemed to agree that other than being a foursquare client, the app’s look and feel was clearly nothing like his). Jeff informed me that he’d been working on a Windows 8 version of his app. I gave him a couple of tips like how I used Unicode emoticons as glyphs in my app to avoid loading or scaling images, and some tips for how to best make use of the background task infrastructure. Then to help avoid any potential confusion, and as a gesture of goodwill, I said I would absolutely make a change to my app’s name to further differentiate it from his. Jeff suggested “4th + Square” as a simple alternative. I told him I’d think on it and figure out what to call it.

A week or so later, after racking my brain more than you’d probably think necessary, I settled on “4th at Square.” One reason for this choice, versus something even more different, was that it let me continue to use the rest of my existing branding. Another was that it was sure to be a less jarring change for my existing customers. It took a couple more weeks to get the fully renamed package into the Store, but it appeared well before Windows 8’s general public availability date.

That controversy was easily the most stressful and regrettable part of building my first Windows 8 app. I am thankful to have moved past it though, and very happy that I can return any time or energy I direct at the app to improving it and implementing feedback I get from users around the world. I’m also looking forward to sharing some of the things I learned about WinJS development, as well as some handy utilities I wrote along the way. It’s my hope that they’ll prove useful to others building WinRT apps using JavaScript. Look for those posts to arrive soon!

Oh, and this entire post was written on my personal Surface and Touch Cover 🙂

Oct 1 11

Post-Build notes and links

by Brandon

It’s been a few weeks and I feel like I’m still catching up from my week at the //Build conference.  As it turns out, conferences are very busy places, and sometimes things you planned to do that week (such as, for instance, blogging) can easily fall through the cracks.

In the unlikely event that anyone was looking for me specifically, I hope you were successful.  I spent most of my time at or near the Metro Style Apps booth, which was fairly front-and-center in the Expo hall.  As I didn’t have a session of my own to present, my main purpose was to answer questions and demo different pieces of the Windows 8 user experience upon request.  Because of this, I took to identifying myself as a “booth babe” when asked about my role at the conference.

Of course, my other primary purpose was to support my colleagues who were presenting.  Most relevant in this regard would be the talk given by Priya Vaidyanathan, the main PM for the Windows 8 Search experience.  As the main dev for this feature I was very excited to attend Priya’s excellent presentation (“Search: Integrating into the Windows 8 search experience”) and to help her address attendees’ questions afterward.  If you’re at all interested in how the search experience works in Windows 8, or would like to know how your app can add value to it, I highly recommend watching the video.

Other great session videos:

Misc //Build Links

  • Fellow “Metro Style Apps” booth babe Raymond Chen shared some notes about his experience at the conference, including documentation of a few of our booth antics.
  • Cori Drew’s blog series “My week at //Build/” – unfortunately I didn’t get to meet Cori but her write-up is a great read!
Sep 10 11

//BUILD/ Windows event is just a few days away

by Brandon

If my Twitter stream is any indication, then I’m not the only one immensely excited for the events of the coming week.  While I enjoy what’s likely one of the last solid summer days in Seattle, some of my colleagues have already begun making their way to Anaheim, CA for this week’s BUILD event.

I’m (seriously) overjoyed to say that I will there representing my team along with a few of our Program Managers.  If you will be attending, feel free to track me down and say hi.  I’ll post some updates about my schedule here when I’m at liberty to do so, and will also post (and tweet) some links which I expect many of you following along from home will want to check out.

In the meantime, the event website and Twitter account are probably the best places to watch for official details and updates about the event.

It’s going to be an exciting week!