TypeScript: To Be or Not To Be

TypeScript

I’ve been having an ongoing convo with some of my colleagues (e.g.) at Infragistics about TypeScript as of late. Now by way of preface, I started my professional programming career in ASP, have done more than my fair share of ASP.NET, was an ASP/ASP.NET MVP for years, and an ASPInsider for even longer, so let’s just say I’ve had a ringside seat, as it were, to Microsoft DevDiv’s relationship with the Web over the years. That said, for the last few years, I’ve been more focused on UX and the broader Web community at large, and I’ve spent a lot more time coming at Web dev from the non-MS perspective. So my angle in the discussion is something of a friendly Devil’s advocate.

Let me start by saying that Microsoft wins the overall dev productivity competition hands down. Visual Studio is an absolutely top-notch, amazing IDE, and there really is nothing that can compete with it in the overall category. On top of that, Microsoft has produced some top shelf Web dev tooling over the years. There really is no doubt about that, but there is always room for improvement.

The Web, in particular, presents a very challenging, wild-west environment for tooling. The technologies in themselves don’t lend themselves well to that, and there are all sorts of hacks and workarounds to address the problem, including some produced by Microsoft. To be a guru in Web dev requires mastery of so many different moving pieces and nuances, multiple, not-very-well-defined languages, innumerable libraries and frameworks, and a vast number of potential runtime environments. It’s a hard egg to crack when it comes to productivity tools, not to mention just general dev productivity, defined as time spent actively producing value-adding software assets.

The Problems for TypeScript

Unfortunately, TypeScript comes across as a sort of “here, let me fix that for you” in the broader JavaScript world.

The problem is exacerbated because some advocates of TypeScript position it as “better” than what everyone else is doing. They say things like, “it’s for ‘large scale’, ‘complex'” apps. Heck, even the homepage says it in big bold letters: “TypeScript is a language for application-scale JavaScript development.” In other words, Rest of World, all those apps you’ve been making with JavaScript for years without TypeScript are puny, simplistic, toy apps.

I am Locutus of BorgThere’s also an undercurrent of fear of assimilation–oh great, the Borg have discovered JavaScript. Microsoft has at least partially earned that sentiment over the years, even if it is exaggerated by most critics, and even if all the great folks producing the technology themselves are not to blame. Trust me; I’ve known many of them, and they really aren’t agents of evil any more than you or I. I promise!

In any case, these perceptions are compounded due to various other biases and prejudices against Microsoft, however well or ill founded those may be for any given individual. All that stacks up to a lot working against TypeScript, certainly more than basically any other individual or organization creating a similar solution would face. And then you have folks who:

  • are just against any sort of preprocessor (WTF!?)
  • really prefer dynamic over static (for whatever reasons)
  • feel like this is just one more thing to learn
  • are fans of one of the existing quasi-competing solutions
  • are well invested in an alternative solution
  • are worried about adopting a niche technology, when the whole point of the Web is openness and interoperability

Adoption

Measuring adoption and market share is always challenging, especially with the Web. However, here are some indicators around TypeScript.

First off, looking at job listings is always interesting in this area. It can tell you what people currently are doing as well as what is in the immediate plans. Numbers were accurate when I wrote this down. 🙂

That’s 0.08% of JavaScript jobs that are asking for TypeScript! I listed some other major JS solutions for dealing with complexity and increasing productivity in JS app dev, for comparison. Angular and Ember have been around roughly as long.

Followers/Starrers

Oh, and that’s another thing–CodePlex? Really? 😉

Language Popularity (GitHub)

I just ran across this today, TOP GITHUB LANGUAGES FOR 2013 (SO FAR). You have to scroll down to the Top 100 lists to see TypeScript. It’s pretty puny. Whether or not this is a “fair” comparison is debatable, but it is just one data point/indicator of current popularity.

The Buzz

This is impossible to reasonably quantify, but I do keep a good eye on Web dev stuff in general, and except for asking “is anyone using TypeScript,” pretty much the only time you see people talking about TypeScript is if they are Microsoft devs or Microsoft employees. Granted, it’s still very young/early, but it is a data point nonetheless.

Even though the solutions compared above are different (language vs framework vs library), the core problems of productivity, maintenance, large scale, and so on are the target for all. The fact is that real, large-scale Web apps have been built and are being built using these technologies as tools to enhance productivity and overall effectiveness. And this is the space that TypeScript competes in.

All this doesn’t paint a pretty picture for TypeScript, so…

What Does TypeScript Need to Be Widely Adopted?

Ken and Dennis

A really great beard! Come on, Anders! It’s a miracle that C# ever went anywhere! 🙂 I kid…

Let’s face it, there are a percentage of Web devs out there who are more or less lost to Microsoft, those who are deeply and irrationally against any and everything that Microsoft does. In a word, haterz. There’s no point in focusing on them, but I honestly don’t think that’s the vast majority. Most devs at heart value technical merit, and most, however altruistic they may be, do have to answer for their productivity and/or simply want to be productive for their own satisfaction.

So that’s the key thing:

TypeScript needs to demonstrate that it makes you significantly more productive.

Forget making claims about it being for apps that are supposedly more complex or larger scale. Forget about inane, academic, ideological arguments about the value of static typing. They smack of arrogance. They inevitably lead to rabbit holes, and they stir up all sorts of irrational passions in otherwise intelligent people.  Just stay focused on productivity.

And the thing is, I think the team behind it gets how valuable this is. I mean, Microsoft DevDiv is all about dev productivity. Consider this from Anders shortly after the launch:

Specifically, [Microsoft] wanted to make it possible to create world-class developer tools that would make building large web applications easier, without breaking compatibility with existing browsers and standards. (Source)

Okay then. Let’s see more of the world-class dev tooling built on top of TypeScript!

Oh and ideally, let’s see the great tooling on all of the major desktop OSes. This latter would help a lot to dispel the notion of borgishness and is, IMO, essential to the widespread adoption of Web technologies in general. From a Microsoft business perspective, it makes sense in numerous ways, not the least of which would be as a way to make Azure even more attractive to a broader audience. Of course, you can’t be pushy about that, either, but I’m talking about things like increasing awareness, increasing positive associations (through enhanced productivity), making using Azure that much easier, and so on.

Advertisements

8 thoughts on “TypeScript: To Be or Not To Be

  1. TypeScript is not the only solution. We have CoffeeScript, Dart, JSX too. How is TypeScript better?
    The same with VS. There is Netbeans and Webstorm too.

      1. Not a fair answer though. I’m concerned 🙂

        I’d propose you a pseudo-philosophical just to give you a fresh perspective on the issue.

        Let me touch on some parallels though, to use as premises:

        > Visual Studio is an absolutely top-notch, amazing IDE, and there really is nothing that can compete with it in the overall category

        – For me the IDE category is this: VS, Ubuntu, Chrome (Browser or OS if you like) etc.
        – The editor category is: Webstorm, Netbeans, Aptana etc.

        Personally I use Ubuntu as IDE, and Webstorm/Aptana as editors (all I need of them, editing code).

        Lets consider for a moment that working on Ubuntu I have all the “tooling” as you might say available from the start, or through an easy apt-get install. Sure VS is more click friendly, but nothing beats running shell scripts once you set ’em up so you can fully automate the process.

        > Most devs at heart value technical merit, and most, however altruistic they may be, do have to answer for their productivity and/or simply want to be productive for their own satisfaction.

        – I’d say most devs at heart value lazyness, because we’d be doing math if we didin’t think we’d make the computer do all that boring-but-needed stuff for us. YAY! More time for tinkering while computer automates our “productivity” for us.

        > TypeScript is not the only solution. We have CoffeeScript, Dart, JSX too. How is TypeScript better?

        It is only better for VS to automate that code churring machine called “devs”, considering that as productive.
        BUT, once you realize VS is inferior to a complete operating system…. it all goes to basically subjective, ideological bikeshedding.

        The Ubuntu OS IS an integrated development environment (i wouldn’t go so far to say my desk and chair are also integrated :)) as much as VS is trying to make Windows into it. I consider VS as an expansion pack for Windows. So… you will not see it on other OS’s because it will just duplicate what is already there.

        Finally, using those premises, we can separate the verticals:

        1. TypeScript + VS + WIndows
        2. Any other combo: JavaScript/CoffeScript/Dart + Webstorm/Aptana/Chrome + Ubuntu/Mac OSX/Chrome OS

        Vertical #1 is by far better for making “devs” more productive.

        Those “devs” which can come fresh out of college and don’t quite know what’s going on and few MVP _programmers_ who actually know a lot more but can’t do it all by themselves need the static nature of TypeScript combined with the VS as a tool to help the programmers limit how much those “devs” mess up the software. This gives you:

        Large number low skilled “devs” + low number high skilled programmers = More production
        of the kind of software that can be readilly created out of the already provided MS (or third party) components.

        Basically a chinesse production factory workers (“devs”) puting together prefabricated components supervised by programmers.

        # 2. Is far better for making “prorammers” be more productive

        As you can see the distinction is there:

        – devs are experienced in developing (expanging, recombinbing) what is already created by programmers
        – programmers are experienced in creating solutions to current problems in the fields they specialize and package it for devs (and rarely directly for customers)

        Using TypeScript to create jQuery, CoffeScript, Grunt, Yeoman etc. is what I’d say **not happening**.

        The programmers who know how to handle JS, will like more power in their hands, and less to a tool which limits them. They do use tools that exist for JS directly (JSHint, Grunt, and anything accessible from shell). They might also use TypeScript to the extent to their own judgement (or bias) as much as any other tool combo: language + ide (editor + os).

        Programmers using this approach will be far more productive by having more freedom to create, fail, learn, iterate, etc.

        Maybe I can now answer you the question of why TypeScript is seen as:
        > “here, let me fix that for you”
        – it is trying to fix(ate) people to tools instead of fixing tools for/to people.

        And it is part of that eternal MS philosophy:
        fixing/fixating/chaining people to tools and/or their ecosystem,
        and I think this is the point that will make TypeScript: To Be or Not To Be.

      2. azder, a few thoughts.

        1 – My earlier reply to Jan was essentially a “I don’t want to get into that in a comment here.” In fact, I’ve already considered and debated that question with others. It is worth exploring, but I just am not interested in doing it more, here in comments.
        2 – I assume you consider yourself in the much-hailed ‘programmers’ class. I see this all the time in the dev community–devs trying to create classes of devs/programmers so that they can put themselves in the ‘better’ class and subsequently bemoan, criticize, deride those in the other class. It’s nothing more than an exercise in pride and arrogance. Color me not interested.
        3 – VS is absolutely huge. It deals with a very large percentage of software built in the last, say, 20 years or so. The VS folks are the best in the business at holistically tackling general software development. Of course, you could carve out some arbitrary niche of all development and say that this or that tool or set of tools is better for that. Maybe it is. Certainly I have had my gripes with VS over the years, but there really is nothing to compare to it in terms of integration, which is part of the definition of IDE.
        4 – You seem to imply that Microsoft’s purpose with MS is purely to tie people to Windows. Certainly from a strategic business POV, I agree that is a factor. It is a business, not a charity. That said, most of the people working on the details of the tooling are truly and really focused on making things better for devs. The fact that there is a business motivation at the top does not negate that it can drive positive, altruistic wins for devs.

        Thanks for sharing your perspective.

      3. Thanks for the reply, just to clear up on the points:

        1. good that you’ve debated it before, still “I’m just not interested doing it in my comments” does justify the notion of “not fair answer”. Your right still, not complaining myself. Just a jest.

        2. TO hell if I’m going to put myself (or someone else) in any class. On the contrary, I’m all for multiclass society, multi to the point there is no meaning of class to individuals, because I regard putting people in one or another is just depersonalizing.

        Still, you can admit this though: as we study and work we’re trained and train ourselves to efficiently classify things. I only put you the “devs” vs “programmers” because it is one of the first MS lessons I had back in the day of the Visual Basic 6 how to be a Developer tutorial, back in 1999, paraphrased:

        **We at MS are programmers, YOU are developer and you develop what we created as per Customers’ wishes**.

        You’d might want to rethink who wants to “subsequently bemoan, criticize, deride those in the other class”.

        3. VS? Sure it is huge, I will not deny it. On the contrary, you see me comparing it to a Windows Expansion Pack. Making the OS full at last.

        And, we can continue to debate ad infinitum if it is more or less integrated than a Linux OS, but no good will come out of it.

        It is probably one of the most finely tuned and efficient tools in what its purpose is. I will just not agree it’s main purpose is helping developers, it is probably a means to an end, or maybe worse, just a side effect.

        4. I don’t imply it’s purpose is purely to tie people to Windows. I will flat out say it’s purpose is to make money, as we both agree. It IS a business after all, and in the core not different than any other platform provider (yep Google too). It’s that, not **just** Windows, but the entire MS platform, the entire ecosystem.

        5. After this last thing, since you don’t want discussions in comments, I’d like to stop bothering you and nudge you to reconsider taking less biased stance. No need to respond anymore, I know I will not.

        So please, do recheck if I’m really someone who puts ego, circlejerking or anyhting as a motive to write you. We’ll never meet, or talk or even get to know eachother after this comment. I don’t even bother thinking if you will (dis)agree wit my stance.

        I just simply provided you a different view: one which is only my reconstruction of what is the motive for TypeScript as one of the many tools that serve the same business (master).

      4. I’m glad I was mistaken about your position re: dev classes. What you wrote certainly comes off that way. I agree that there is little point in further debating the issue here.

  2. “There’s also an undercurrent of fear of assimilation–oh great, the Borg have discovered JavaScript. ”
    This type of reasoning more applies to google these days IMHO

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s