Learning TypeScript Deeply – Weeks 3-50

I didn’t spend the 47 weeks since my last post deeply learning TypeScript. At least not all of them. So, here is what happened on the TypeScript front in the last year.

Execute Program

I finished the TypeScript course and while I found it a little basic, I loved when it made me review my recollection and understanding of what I have learned so far. Revisiting ideas from months ago was precious and I feel it helped me solidify my rarely-used TypeScript knowledge.

Another great thing about ExecuteProgram is that the author is adding more content over time and now I have few more lessons to go through 🙂

Gutenberg Pull Request

There’s nothing like applying your knowledge in practice, especially in public. After I had learned a little bit more about the language, I started a pull-request in Gutenberg to add types to an innocuous module – wordcount.

Few months and several revisions later, the pull request was merged. What did I learn from this experience:

  • The pull-request review experience confirmed how much learning in public can accelerate learning. Having to reply to feedback from real people gave me the motivation to dig deeper in the documentation to defend my claims.
  • The difference of adding types to an existing codebase versus designing code with types in minds became super obvious. I spent most of my time figuring out the balance between adding types that make some semantics sense and matching the current functionality. Another battle was deciding how much of the existing runtime checks to leave.
  • I learned a lot from the dedicated reviewers: Andrew Duthie and Jon Surrell. There were quite few links in their responses. It’s not easy to tear down somebody’s code and I am super lucky they did 🙂

Programming TypeScript

I love a good programming language book. It adds the extra breadth that one may not reach in the early days of using a new language. It’s hard to get a glimpse of all language features or to get a feeling about what are some idiomatic solutions of common problems through a tutorial or an online course.

Programming TypeScript was a solid into to the language. If you already have a good understanding of JavaScript and its ecosystem and would like to learn TypeScript more than superficial level without getting deep into the internals, Programming TypeScript is a great choice. It offered:

  • in-depth explanations of how the language works and how is it different from JS without being overwhelming to a novice TypeScripter;
  • the right amount of reference materials – enough that I reread a couple of chapters, but not too much to make book bulkier and outdated quickly
  • reasonable amount of examples, especially those of advanced type scenarios – without them this part would be quite abstract.

If it were me, I would lose most of the jokes, they were cliched at best. But you may like them, who knows…

Oh, and the book did not assume much prior experience with type systems, which also made it friendly to the typical JavaScript developer.

What’s Next?

I hope my next update will be in less than a year from now 🙂 Armed with the knowledge from Programming TypeScript and Execute Program, I will try to find (initially small) ways to contribute to the growingly typed codebases in Gutenberg (new WordPress editor and JS framework), Calypso (WordPress.com JavaScript and TypeScript UI), and maybe Redpop (Tumblr’s new TypeScript UI that’s not open-source yet). Knowing I will get quality constructive feedback from my colleagues is a big motivator even if I often get things wrong the first time 🙂

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 )

Google photo

You are commenting using your Google 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 )

Connecting to %s