Five in Five Week One: TypeScript Review

Dec 7, 2017

Wow, that went quick! From my brief time spent with TypeScript over the last week, I can say that it is a great programming language. I feel like I could be productive using it on projects right now. Picking TypeScript as the first language in my Five Languages in Five Weeks journey was the best possible choice. TypeScript allowed me to ease into the challenge. The language was comfortable to use from the first LOC, leading to a good first week of the challenge.

All in all, I’d estimate that I spent 10 to 15 hours learning about and writing TypeScript code over the last week. I didn’t develop any major projects, but I did get familiar with the syntax and many of the language’s features. A week of spending one to two hours a day is a great way to get up to speed in a language, but not so much to learn it deeply. My time spent with TypeScript displayed the value of adding well-defined types to a programming language.

Similarity to C# and JavaScript = Overall Plus

Comfort made the language easier to pick up. To me, TypeScript feels like a merger between JavaScript and C#. The syntax lifts heavily upon those two languages. I would say that TypeScript is the perfect bridge from JavaScript to C# and vice versa. If a developer already knew one of JavaScript or C#, learning TypeScript would get them most of the way to the other language. As a developer who already knew both JavaScript and C# using TypeScript felt very natural.

The level of comfort was great for getting up to speed quickly, but it also led to me checking out a little bit after the first couple of days. Since the code is so familiar to languages I already know, my attention would sometimes wander when going over syntax. Another downside of being so similar is that subtle syntax differences would occur. For the most part though, writing TypeScript is very similar to writing JavaScript.

Further Learning Plans

I would really like to keep learning more about TypeScript and using it in 2018. Since it can be used anywhere that JavaScript can be used since it just compiles down to JavaScript once it’s built, there’s no excuses for not using it. Ideally I would use to build something big. I’m pretty sure that React and React Native both support the use of TypeScript. That’s probably an area where I will focus on putting my new found TypeScript skills to use. It’s also a perfect way to truly learn the language.

I think another interesting learning experience with TypeScript would be to implement a famous JavaScript library using it. Implementing something redux would be a great way to level up both a developer’s TypeScript skills and their knowledge of the tool they’re implementing.

Resources

I used several resources to pick up the basics of TypeScript this week. The three main resources were Brice Wilson’s excellent TypeScript courses on Pluralsight. I recommend checking them out.

Getting Started with TypeScript by Brice Wilson on Pluralsight. This course is a soft introduction to the language syntax and lays out why TypeScript is worth investing in.TypeScript In-depth by Brice Wilson on Pluralsight. A more robust version of Getting Started with TypeScript. I skipped around in this one but it appears a deepr version of the first course.Advanced TypeScript by Brice Wilson on Pluralsight. This is a more advanced course. I specifically used this course to learn about async/await in TypeScript. I’m looking forward to coming back to this course once I’ve written more TypeScript.TypeScript Deep Dive by [Basarat Ali Syed][bas]. I only read a couple of sections from this book. I will definitely use it as a reference in the future. Basarat has a ton of TypeScript repositories that worth reading through.

Quick Final Thoughts

I think that I will be using TypeScript in the future. Since the language was created by Anders Hejlsberg, a creator of C#, Turbo Pascal, and Delphi, I had high hopes going in. I was not at all disappointed. TypeScript, though more verbose than JavaScript, is a clear improvement in a lot of cases. By letting the compiler enforce boundaries on the objects, functions, and classes we create, TypeScript protects us from making difficult to find errors. TypeScript can also help to make code that would’ve been written in JavaScript more maintainable. I may not always choose to use TypeScript over JavaScript in the future, but it’s been great to see frontend code through this lens.

Dev-eryday

Dev-every is a personal project created by Joshua Niederer to aid in becoming a better software developer. The concept is to develop myself and my skills every day. This site serves to log my efforts and to share knowledge, creations, insights, and whatever else I discover along the way.