Tuesday, 23 June 2015

TypeScript MOOC at

TypeScript is a strict superset of Javascript and I started to like the idea to have a stricter Javascript because a lot of bugs in javascript are introduced because you don't pay enough attention. The typescript compiler only transcompiles to javascript if your typescript code is valid. Your IDE will yell at you for the simplest bug. The idea is great and typescript is as well.

So I encountered a mooc at that offered to teach me "TypeScript". I was really interested in this course because it was advertised with Anders Hejlsberg, the guy that made me start programming with Turbo Pascal, but now I have the feeling other users lost interest in this course because there is no Anders.

For this course you have to submit "homeworks"; you get a task and submit it. Simple. But the reviews for these homeworks are done by other users. You yourself have to review 3 other "homeworks". But this leads to a problem:

I now have two "homeworks" that aren't reviewed yet. And I can understand why: the text formatting gets lost and it's not even highlighted. Plus you have to review 3 other "homeworks".

Also the videos contains a lot "blabla". I mean, you get 15 minutes blabla about interfaces but not a single time you get to see an interface in code :). In the next video you see an interface but that could be improved. I had the feeling they wanted to fill a specific time. I'd understand the need for the details and depth if the course is for the absolute beginner but it's advertised with this:
We make an assumption that you have a general understanding of either JavaScript or another programming language.
So, yea, one can assume a developer heard about interfaces and/or contracts :). Just show how it's formally written and go on. Then again you wonder why certain features are used in a way you never seen it :). Just to show a feature. For me the examples are good ways to show how development doesn't have to look like.

The other thing is Visual Studio. I understand that Microsoft wants to advertise Visual Studio but then again you download Visual Studio 2013 CE to find out you are using an extremely old version of typescript which isn't suitable for this course :). The course is offered by Microsoft. Ouch! :)

Then I got it working somehow, opened the files for the first homework, just to find out they forgot a tag in the html. That alone isn't a problem but Visual Studio gently fucks up formatting because it probably has a simple parser and formatter (intellj shows all red if you fuck up your tags) :). I'm a sorry intellij user. Then visual studio yelled some crap about wrong version etc...couldn't resolve that. I just fired up a new project in intellij, opened one of the *.ts files. Intellij asked me if I want to use the ts compiler. Yes! Intellij ships with typescript 1.4 :P. And it just works ootb! :). And it doesn't create empty bin folders for a web app...

Ok, so far so good. The course failed for me :(. I was extremely interested in typescript before I started the course. I'm less interested now. But I believe typescript is very useful. Though ECMAScript 2015 or ECMAScript 6 is on its way you still might to consider TypeScript because ECMAScript 2015 is still ugly :). TypeScript also fits perfectly in current code bases as any javascript code is valid typescript code. It's totally fine if you just use 10% of typescript for your codebase. That will work. It transcompiles to readable javascript. It also provides sourcemaps so you can even debug your typescript code (but you are free to debug the transcompiled javascript of course). As a developer it's possible to introduce typescript in the company without anyone noticing, I believe :P (don't do that!). TypeScript is opensource and hosted on github.

I'll finish the course now and will never look back. Dan Wahlin and his companion targetted the wrong people here. The course was advertised for developers but in fact they were talking to kids :/. "What is a contract? Huh?" ehehehe...:).