Archive for Microsoft

Why Alice Runs JavaScript

Over at The Mad Botter I’ve been working my tail off trying to get a new version of our AI Slack bot Alice out before the end of the new year. As the code has become more complex, I turned to Typescript, Microsoft’s programming language that’s intended to bring static typing and a number of other quality of life improvements to JavaScript. After writing a few classes and a module in Typescript, I switched to pure ES6 JavaScript. Here are my reasons and please do keep in mind that I am writing a large scale bot, so I have some pretty high-end architecture needs.

Classes: As much as I’ve railed against previous efforts to impose classical inheritance and object oriented patterns on JavaScript by efforts such as, Class.js, they’re useful. Alice’s code-base is getting large enough that managing the overall architecture is a problem. For things like data models an object oriented class structure makes a lot of sense as longs as you avoid coupling. So, I went ahead and started writing some Typescript classes such as this simple example:

class Contact {
    fullName: string;
    emailAddress: string;
    profileImageUrl: string;

    constructor(fullName: string, emailAddress: string, profileImageUrl: string) {
        this.fullName = name;
        this.emailAddress = emailAddress;
        this.profileImageUrl = profileImageUrl;

Nothing too fancy here. Out of curiosity I took a look at the generated JavaScript for this and was a little surprised:

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
class Contact {
    constructor(fullName, emailAddress, profileImageUrl) {
        this.fullName = name;
        this.emailAddress = emailAddress;
        this.profileImageUrl = profileImageUrl;
exports.Contact = Contact;

WOW! That looks basically the same? Couldn’t I just write that and not have to deal with the complexity of having an dist folder full of generated code? Yes, I can, so it seems ES6’s classes have done a pretty good job of mitigating that need from Typescript.

Static Typing: I can feel some of already drafting your tweets pointing out that in the vanilla JavaScript version of the code, I lost all the types. That’s true, but I’m not really sure I care. Sure, static typing has benefits, such as empowering the compiler to catch a number of common programming errors. There are ways around this issue; you could always do what Ruby developers by replacing the compiler type checking with a bunch of unit tests that do little more than check types; sorry, couldn’t help myself there. If you really want the type of static typing protection that Typescript offers, then that might be a reason to stick with Typescript, but I’d urge you read this great post by Eric Elliot before you fully throw down your gauntlet in favor of static typing as a must have.

Debugging: Debugging Typescript just doesn’t work the way I want it to in Node. When an exception is thrown, the line referenced in the exception is not the Typescript code the developer wrote but rather the generated JavaScript code. That’s pretty terrible. The workflow seems to be something like this: you look at the exception in the JavaScript code and have to extrapolate back to the Typescript you wrote and figure out what exactly is causing that behavior. In small code-bases that might not be too hard, but at scale this doesn’t make a lot of sense.

For me, the primary benefit of Typescript ended up being classical OO and the debugging issue became too much of a nuisance to tolerate. I am sure that there is some awesome project out there that I could have integrated into my work-space that would have at least mitigated the debugging issue, but that would again add more complexity to my tool-chain and possibly to my staging and production environment. Let me know what you think in the comments or on Twitter.


Brutal Bots

Bots are the new hotness that Microsoft, Facebook, and others hope will be the next tech phenomenon, supplanting the maturing app market. It makes sense that Facebook and Microsoft would be looking for the next big thing, since they largely missed out on the app gold rush and were relegated to the role of software provider on Apple and Google’s platforms. At their most basic level, bots are cloud-based text-driven software that have some modicum of natural language processing and AI capabilities and are designed to complete / automate tasks. In particular, they’re well suited for tasks that involve tying one web service to another — for example integrating Skype with Slack or Facebook Messanger with 1-800 Flowers’ ordering service. Granted your desire to order Dominos may not be nearly as keen as Microsoft would have had us believe during their recent Build conference in which they featured a bit for just that purpose, it shows the real impact of bots — automating low level clerical task. Put more bluntly, white color job elimination.

It may seem overblown to say bots are coming for your white collar and that’s likely because right now their coming for your assistant’s. If you had a bot that could manage your calendar do automated customer outreach and some basic bookkeeping / reporting why have an assistant at all?

Not only do bots have the potential to do your assistant’s job but a bot doesn’t come with all that pesky liability. Think about it. Bots can’t be on payroll, so you avoid the wage and all payroll taxes. Bots don’t get sick. They won’t ever need parental leave or berievment time. They will never look elsewhere for better paying employment or try to renegotiate their wage after you’ve invested in them. They can’t file a complaint if they feel they are being treated unfairly. And for all the Silicon Valley bros, you can sexually harass a bot all day long and be totally safe from a lawsuit as well as the corresponding bad press.

This may all seem a bit brutal but as someone who employs people in one of the most employer hostile states in the country, I often have to look at a candidate and weigh the various risks holistically before making a hiring decision and the reality is for low value clerical work, I’d do well to avoid the expense and liability with a bot. Now, if only I could pick a bot framework….

Microsoft Tay Lasts < 1 Day

Microsoft Tay

Microsoft briefly released an AI chat bot on Twitter that was intended to be a test of sorts for their machine learning technologies. This bot was called Tay and was meant to have the personality and likeness of a teenage girl and much like a real teenage girl, she quickly found that the internet can be a less than savory place.

Unfortunately, Tay didn’t back away in horror. She ended up joining some of the worst of Twitter conversations; yes, she even mentioned Hitler. Things got so rough that Microsoft felt compelled to delete all but a few of her Tweets:

Tay Tweets

Commentators are having a good time mocking Tay’s behavior and by extension Microsoft’s apparent failure. To be sure, the boys in Redmond are a bit embarrassed about some of things their “little girl” was saying on the figurative school yard, but it’s not exactly accurate to call this a technical failure. In fact, Tay did an impressive job of learning and assimilating the sentiment of Twitter.

Of course, there’s also some cause for concern. If machine learning technologies can adapt the negative behavior of hate speech, then what other negative behaviors might other AI systems that can do more than just tweet pick up? It might sound crazy, but think about the systems being built by the likes of Boston Dynamics.

Let me know what you think on Twitter or in the comments. Is Tay the mischievous little sister of the Terminator? Either way, I’m sure she’ll be back.


Playing Hockey in MS Stadium

Hockey now plays in Microsoft's rink!Before Apple acquired Testflight last year, we were heavy users of the service for both iOS and Android deployments. This fit well with our strategy at the time of providing affordable prototyping for entrepreneurs that could be tested on both major mobile platforms. Apple decided that they’d cut off support for Android once they completed the Testflight acquisition and this left us (and many other developers) in a lurch; the hassle of getting non-technical people (i.e. our average customer) to switch over to another beta / app deployment service was pretty steep and for a bout a month our customer service costs nearly doubled. To make matters worse, we didn’t immediately jump to Hockey. Instead, we tried a few other alternatives that made large promises but on the average failed to deliver. It was a good day when we finally made the Hockey switch and we haven’t looked back.

Now, things are once again in question. Whenever a small / medium company whose services you rely on gets acquired by a giant, there is a huge opportunity for disruption – again, see how Apple handled the Testflight acquisition.

However, it is unlikely that Microsoft will take any similar action, as they are in a very different situation – Apple had a dominant (at least in terms of developer mind-share) platform but lackluster developer tools, where Microsoft is quickly becoming a tools powerhouse but it would be had to say that Windows RT is anything but a total failure and Windows Phone just isn’t making any real impact in the markets that FTT focuses on. This difference in market position seems to have lead to Microsoft focusing on developers as their customers (at least in the narrow space of mobile), rather than end users. This is an interesting strategy and one that Microsoft alone is uniquely positioned to succeed with.

In the last few months, I’ve found myself increasingly working in Microsoft tools, such as Visual Studio and various Azure offerings. This hasn’t been the effect of some conscience “let’s go Microsoft” campaign but rather a natural outcome of looking for tools that more appropriately fit my current needs at the right price. Your mileage may vary, but so far my experience has been pretty positive; the largest issue I had was some confusion with company MSDN account and our installs of Windows and Visual Studio; the latter issue has pretty much been eliminated by Visual Studio Community Edition.

Does this mean the we should all drop our current tool-chains in favor of the Microsoft equivelants? Of course not. In fact, that’s not what we’ve done at FTT – almost all of our back-ends are still based on Ruby on Rails, not ASP.NET MVC. As always, you have to pick the right tool for the right job and the right team but it is good to see that Microsoft is getting into the mobile game and is taking mobile developers and our needs seriously.

Questions? Comments? Boiling Linux-powered hatred? Get in touch on Twitter and please follow FTT on Twitter.

2014 Predictions

I hope that you have all had an awesome New Year’s Eve! I’ve decided that I’ll start off 2014 by making a fool of myself by trying to make some predictions for the tech industry for the new year. This is not a what you will see list, but nor is it a what you won’t see one; in reality, I am trying to focus more on trends than anything else. Overall, 2014 is looking to be a transition year rather than a real game-changer. This is in no way a bad thing and makes sense for where we are in what is usually a twenty year tech cycle; it is important to remember that the mobile revolution is not even half way done and there are still a lot of incremental advancements that need to be made in that area before it can be considered complete. Still, this article will not focus on mobile exclusively but will rather jump around with no other aim than what I find interesting.

Docker: Docker is the darling of the developer community right now and for good reason — it solves a problem that (outside of the BSD community) hasn’t really been properly addressed. There is however a risk of certain segments of the community drinking a little too much of the Koop-Aide and using Docker in ways that it wasn’t intended to be used; just think about what we saw with Rails a few years ago and the hype surrounding that and you will have a good idea of what I am concerned with. Still, at the end of the day Dockery is going to be a major tool in a lot developers’ (including this one’s) toolboxes for 2014 and probably beyond.

Windows 8: In the consumer market, Windows 8’s RT offering is in a lot of trouble — that is undeniable at this point. Windows Phone suffers much the same fate as Windows RT, though Windows Phone does enjoy a good holding in South America and some other parts of the world. Microsoft has already hinted strongly that they plan to merge WinRT and Windows Phone into one mobile operating system alla iOS. This is a great Idea but is several years too late. It also undermines the “one Windows” pitch that Microsoft has been making for Windows 8 over the last few years. In 2014, Microsoft will still be dealing with the fallout of their bumbling launch and marketing of Windows 8.

Azure: Azure has grown far beyond Windows in the cloud and at the close of 2013 is a rival to Amazon Web Services and pretty much every other cloud offering. I’ve used Azure several times myself over the year and am pretty impressed on the whole; there were some bumps in the beginning and middle of the year, but these have largely been addressed and it looks like Microsoft has some ambitious plans for Azure in 2014. Over the last month or so something called Midori has been leaking out of Microsoft and, though the pundits seem to think it is something to do with Windows on the client-side, my bet is that this is some sort of evolution of Microsoft’s cloud offerings. Either way, 2014 is going to be a good year for Microsoft in the cloud and for Azure.

Mac OS X: Twelve months ago it looked like OS X was veering dangerously toward an iOSification that would have proven intolerable for professional users. With Mavericks however Apple has found a good balance between their desire for control and the reality that the pro-market has been driven to OS X due to its being a UNIX system that has a late vendor for support and an attractive user interface. Despite the apparent back peddling, it is important to note that Apple has gotten one major change in the OS and managed to implement it in a way that is both useful to the average consumer and acceptable to the pro users — this feature is called Gatekeeper. In Mavericks, Gatekeeper does not allowed unsigned applications (to sign an application one needs to be an approved Apple developer) to be installed on the system by default. The key is that this is a default that any sophisticated user can change. However, I must admit that I have kept this default. Going forward, Apple’s belief in signed applications (or perhaps some slightly watered-down version of it) makes a lot for sense for the future of computing and I actively support refusing to install unsigned applications from untrusted sources. If the current path holds, Apple will be balancing making OS X simpler for average users and new users who came over due to the halo effect of iOS while balancing the needs of the professional user market.

Ubuntu / Linux: Canonical has done an amazing job of sullying the Ubuntu name over the 2013 and has done little more than make a fool of themselves with their naïve attempt at breaking into the mobile space. Ubuntu will still be a very popular desktop Linux operating system among new Linux users and will continue to be a major player on the server-side. Canonical the company however will fail to monetize their offerings in any significant way. The only ray of hope would be some sort of re-focusing of the company to be an enterprise focused organization much like Red Hat. Even in that case, Canonical will not be able to be a true challenger to Red Hat in 2014 and it is unlikely that they will even decide to try. The continued flailing of Canonical will contribute to a “brain drain” of passionate and talented Linux enthusiasts out of the Ubuntu community and into other Linux communities. Another side of effect this is that desktop Linux will continue to be the proverbial tempest in a teapot that it has always been. This internal discord will guarantee that 2014 will not be the year of the Linux desktop in any significant way.

That’s it! Those are my foolish predictions for 2014 — foolish as they may be, I am pretty confident that most of them will be, if not correct, then on the right track. I know they are not earth shattering and basically boil down to 2014 will more or less maintain the status quo. In a way, that’s a good thing. If we are constantly reinventing new technologies and never refining the technologies we are already have, then we will always be using unstable and half baked first generation technology. Have a happy new year and feel free to comment on Twitter.

Programming Pitfalls: Windows 8 & VS 13

PitfallIt will come as no surprise to anyone who has been following this site for a while that I’ve been doing a bit of Windows 8 development. Like many developers moving over from another platform, I have some concerns about XAML and the development philosophy that it seems to promote, but that’s not the pitfall I hit this time. No, the trap I fell into is far more sinister….

You see I had opened Visual Studio 12 and got a notification that there was a new version of Visual Studio coming out and if I wanted to take advantage of all of the new goodness in Windows 8.1, I’d need to download it via MSDN. Like a good little code monkey, I did just that and made a fussy coffee while I waited for download and install to finish.

Once the install had finished I opened Visual Studio 13 and created a C# / XAML metro app. So far so good. No errors or warnings of any kind where displayed. On the whole, I am pretty happy with the workflow in 13 and got the app done in just about a week — it was just a proof of concept.

Now comes the tricky part: deployment. After going through the ridiculous proces of explaining to a non-tech person that they have to run a PowerShell script to run the archive Visual Studio produces, all seemed to go well — the first stakeholder was happy and passed it on to someone else. Then came the issues. For some reason the app would run on some devices and not others.

After a few frantic hours of search-fu, Stack Overflow browsing, and digging through the chaos that is the MSDN developer forums, I had a theory. Was it possible that all the devices that the app ran on had been updated to 8.1 and the ones it didn’t work on were still on 8? If so, there surely would be a menu or XML attribute in the App Manifest that I could change the minimum version to 8.

I was right on the first point and kind of right on the second. It turns out that the app could not be run on 8.0 devices as built and there is an option in the manifest to change the version. Unfortunately, in VS 13, you can’t change the version number. My suspicion was confirmed — Visual Studio 13 did not support building for Windows 8.0. Well, that’s not exactly right either. It turns out that Visual Studio 13 will build a Windows 8.0 app but will not create one — that means that you’d need to create the project in VS 12 but could move over to VS 13 later. I ended up having to create a new project in VS 12 and copying the code over into that new project. The bottom line is that this feels like a ham-fisted attempt on Microsoft’s part to force adoption of the 8.1 APIs and left me with a bad taste in my mouth. At this point, I am sticking with VS 12 until all of my projects no longer require 8.0 support but, frankly, this problem just shouldn’t exist.

Questions? Comments? Find me on Twitter.

Xbox One Review

xbox one leadAlthough, I have never waited until midnight for a console lunch before, I waited at the Freehold, NJ Microsoft Store for the launch of the Xbox One. Like most of the people in the line, I had previously pre-ordered my system and was promised a “Day One Edition” that I was happy to receive as promised. One might wonder why I am waiting to post a review of the system now, so many weeks after the launch of the system, especially when so many others had posted their reviews on our around launch night. The answer is simple — I did not get the console early and wanted to make sure that I had ample time to use the system before writing my review.

The Good: In a lot of ways, the Xbox One is a console designed with me in mind. I like gaming but I don’t have the time that I used to have to game all the time. In fact, like the majority of Xbox 360 owners, my 360 was mostly used for watching Netflix and other multimedia experiences rather than gaming. So far the gaming experience delivers and the Kinect-powered voice recognition seems to work at least seventy-five percent of the time — a figure that I would like to see higher but is better than anything else of its ilk on the market currently including Apple’s Siri. In terms of gaming, the system delivers and, as was the case with the 360, Xbox Live is clearly the killer gaming feature of the system. Being able to suspend a game, do something else like take a Skype call, and still have my game’s state saved is a killer feature and probably my favorite feature of the system.

The Bad: Still not all is well in the state (err city) of Redmond. The indie game story is currently non-existent. In fact, the AA and AAA game story is not much better and there is not killer title that represents “Xbox” on the market right now — this is something that the PS4 lacks as well and I feel that this is a mistake of the generation — that is the platform vendors are relying on third-party publishers far too much when they ought to be supporting smaller studios in exchange for exclusives.

The Ugly: The 1980’s called and would like their VCR back. Yes, the system itself looks pretty ugly from a hardware perspective and this is not a shocker when you consider that Microsoft is a software company and does not have a pedigree of industrial design. I’ve also noticed that I can occasionally hear the fan running while playing games; it should be noted that I often mute games in order to listen to podcasts. The sound isn’t too bad, but on the verge of 2014, these systems should be silent; for instance, if the One ran an SSD rather that a spinning drive, there would be a reduction in heat generated.

Conclusion: All in all, I like the One and it is a great 1.0 product. Despite Microsoft’s bumbling PR, the system itself has a great story to tell and I recommend it to all but the most “hardcore” (read immature) gamer — that of course is not to say that all PS4 owners are immature, but, sadly, there is a pretty vocal minority of “hardcore gamers” that behave worse than your average five year old after having his lolly stolen.

Questions? Comments? Please feel free to reach out to me Google+ or Twitter.

Review: Surface Pro 2

surfaceproBeing in the market for a Windows based laptop and having some potential WinRT projects in the pipeline, purchasing a Surface Pro 2 seemed like a great way to kill two birds with one stone and I happy to report that it was. Like just about any device on the market there are of course flaws but overall the experience of using the Pro 2 is pretty good. Before we begin, the model we are talking about here is the 256GB SSD / 8GB RAM one. Please do keep that in mind when reading the rest of this review, as your mileage could easily vary if you are use lower specced model.

The Good: Right of the bat the screen is beautiful. In fact, it is probably one of the best screens (in terms of resolution and color representation) that I have seen on a touch-enabled Windows device. I tend to not be a huge fan of using a stylus with my touch devices, but the one packaged in with the Pro 2 is a joy to use and more useful than I thought it would be. One of the main uses I have for the Pro 2 is of course to run Visual Studio, which it does flawlessly; the sad truth is that it has better specs than my normal development machine, my Macbook Air. Typing on the Type Keyboard feels as natural as typing on a full desktop keyboard or a good laptop keyboard. All in all, the Pro 2 is definitely the tablet to buy if you don’t mind spending a little more money and want to be productive.

The Bad: Thought the battery life is sufficient for most users, I’d like to see a little more than what I am currently getting in my day to day usage. On average, I am getting about five hours to a charge. Of course the Achille’s Heel of Windows 8 is that the app selection in the Windows Store leaves a lot to be desired. One would hope that this problem would be solved by time, but it really hasn’t. Thankfully, this issue is somewhat mitigated by the Pro 2 to being able to run traditional Windows software

The Ugly: To me, the value proposition of the Surface Pro 2 is that it is a production device rather than just another consumption device. However, this falls down pretty quickly when you realize that the tablet does not come with either keyboard option. Additionally, the Touch Cover is pretty much worthless for me and in my very unscientific study it seems to be problematic for a lot of people. The Type Cover is a must have for the Pro and frankly should be in the box.

Conclusion: The Pro 2 is the device Microsoft should have made as their first tablet. In a lot of ways, this reminds me of the original iMac’s release — Apple was down on their luck and industry pundits were predicting their imminent demise, but they pulled something special off with the iMac. Is that what we are talking about with the Pro 2? Maybe. Maybe not. The ball is in their court. Questions? Comments? Please feel free to reach out to me Google+ or Twitter.

Better Dead than Public

imagesDell has a big problem and it’s not the one you might think. Although it is true that the PC market has weakened or perhaps more accurately evolved into the tablet market, that is not the primary cause of Dell’s current situation. Dell’s troubles began in 1988 well before Apple’s iPad. In 1988, Dell changed the driving force of its company from innovation and customer-centricness to predictable and stable profits by IPOing.

As you may know, most companies, including private ones, have stock, but private companies do not have to publish the same level of figures regarding short-term finances and are therefore less susceptible to shareholder panic brought on by “professional” analysis of these short-term figures.  Michael Dell is trying to take Dell private again in an effort to remove this element from the equation, since he understands what many of Dell’s investors seem not to — that Dell needs to spend a good deal of money to develop more compelling products that differentiate it from its competitors. Put another way, Dell is going to need to take some risks and short term expenditures that are very difficult for a public company, since the press and market tends to be extremely risk averse; of course, finance journalists are quick to blame a lack of innovation yet are even quicker to burry a company that loses money (even for a short time) in an attempt to innovate a new product.

Maybe there is a need for reform of the public corporation system, but that’s just not going to happen; though the recent hoopla with Carl Icahn and Michael Dell makes me wish we could outlaw “activist investors” — in truth, these “activists” are little more than entitled nouveau riche predators who care little for the long-term success of the companies they invest in, let alone the well-being of those companies’ staff.

Needless to say what is possible, however, is to create a generation of CEOs and Presidents that are not beholden to the rat-race of the public market — of course, this can only be achieved if our most promising startups stay out of the IPO game which often means spurning the vast majority of venture capitalists. This path is hard but is necessary if we want to create products and services that are actually worth something, rather than just the next buzzword bingo app.

In the case of Microsoft, little will change either for good or ill as long as the current board remains and keeps active oversight over whatever executive replaces Ballmer. Does this mean that Microsoft is doomed? Hardly, but it does mean that the next world-changing  product is unlikely to come from Redmond.

Truth be told, I hope I am wrong and the Microsoft can come back full steam and that Michael Dell will be able to rescue Dell from the vulture that preys on it. Returning to reality, however, it seems that Dell will whither and Microsoft will have no choice but to retreat to the profitable and less risky enterprise market, as its old rival IBM has already done.

Pallet Town: Intro to the Repository Pattern MVC4 pt 2

Pallet TownWelcome to Pallet Town! Pallet town is going to be an ongoing bi-weekly look at various development technologies and techniques from the perspective of someone new to that technology. For those who might know or (God forbid) are too young to get the reference, Pallet Town is the first town in the original Pokemon games for the Nintendo Gameboy.

This week we are carrying on with our introduction to the repository pattern in ASP.Net MVC4. We’ve done well so far if I can be allowed to say so myself, but we left one glaring issue in our application: we forgot to persist our data.

Let’s start by adding a database context to our existing Pokemon class:

namespace PokeSample.Models
  public class Pokemon
     public int Id { get; set; }
     public String Name { get; set; }

  public class PokemonContext
     public DbSet PocketMonsters { get; set; }


Now let’s actually use out PokeContext in our repository:

namespace PokeSample.Models
  public class PokeRepository : IPokeRepository
    private PokemonContext db = new PokemonContext()
    private List pokemon = new List();
    private int nextId = 0;

    public PokeRepository()
       this.pokemon = db.PocketMonsters.ToList();

    public Pokemon Add(Pokemon somePokemon)
        if (somePokemon == null)
           throw new ArgumentNullException("somePokemon is null");

        somePokemon.Id = nextId++;

        return somePokemon;

    public Pokemon Get(int id)
       return pokemon.Find(p =&gt; p.Id == id);

That’s it! If you are running on localhost with Visual Studio 2012, the data will be saved to a .mdf file on your App_Data directory. If you are running on Azure and publishing with a publisher profile, then it should all be set up for you, assuming you have properly set up a Azure site with a corresponding SQL database on the Azure web portal.