---
title: 'Struggling with TypeScript: why not?'
date: 2024-07-09
excerpt: 'One of your biggest skills as a person-on-the-internet is your ability to research and learn new things.'
tags: [dev, startup, typescript]
canonical: https://mikebifulco.com/newsletter/typescript-and-learning-hard-things
---
# Struggling with TypeScript: why not?

When we started [Craftwork](https://craftwork.com), I had never used TypeScript before. I spent years building with good old fashioned JavaScript, and really loved it.

I could build prototypes quickly, change my strategy on the fly, and make new features fly together without much thought.

But... it was also a bit of a mess. Because JavaScript has *many* weird quirks and "features", writing robust javascript code requires lots of discipline and experience. I certainly had some of both, but I knew from the onset that Craftwork would be a big project, and I wanted to make sure that I could build it in a way that would be maintainable and scalable.

I would be building an engineering team, and I wanted to make sure that they could hit the ground running. Using TypeScript as the de facto language for Craftwork was a no-brainer.

## JavaScript is weird.

When I say "JavaScript has many weird quirks and features", this is what I mean:

```javascript
'b' + 'a' + +'a' + 'a'; // 'baNaNa'
```

If you're not a developer, you might be thinking "what the hell is that?"

Me too, friend.

There's [plenty more adorable
gotchas](https://github.com/denysdovhan/wtfjs?tab=readme-ov-file#table-of-contents),
and they're all fun and games until you're debugging a production issue at
3am.

Building a product is hard enough without having to worry about whether `NaN === NaN` (it doesn't) or why `[] + []` is an empty string.

![Duck Hunt Dog laughing](https://res.cloudinary.com/mikebifulco-com/image/upload/q_auto:eco,f_auto/v1/newsletters/typescript-and-learning-hard-things/duckhunt-dog)

*Math? Check.*

## Time to TypeScript

So, it was time to dive in to TypeScript. TypeScript is a superset of JavaScript that adds static types to the language. This means that you can catch *many* bugs before they happen, and you can write more robust code.

Even still, when I started learning TypeScript, I did not have a great time.

There's a real learning curve to TypeScript - it is notoriously picky, and it can be hard to get started. I spent hours trying to figure out how to make TypeScript happy, and I spent even more hours trying to figure out why TypeScript was unhappy.

The truth is, I spent a *ton* of time fighting the type system. I spent hours trying to figure out how to make TypeScript happy, and I spent even more hours trying to figure out why TypeScript was unhappy.

Eventually (after a few months, in my case), everything started to click. I got used to the error messages, and I was making my way through features more and more quickly.

## Learning to learn is the whole thing

I won't bore you with how-good-I-am-at-TypeScript - that's not important. What *is* important is that I learned how to learn TypeScript. I learned how to research, how to ask questions, and how to find the answers I needed.

In my case, it was a mix of things: YouTube tutorials, blog posts, TypeScript documentation, and a network of mega-smart dev pals who I could ask for help when I was really stuck.

The best thing about being a person-on-the-internet is the ability to research and learn new things. If you can do that, you can do anything.

...which is a damn good thing, because like 3 weeks after I got comfortable with TypeScript, we started building Craftwork's core operating system with Ruby On Rails. 😅

## Keep learning

One of my biggest fears is becoming out of touch and irrelevant. I feel pretty strongly that when you *stop* learning things, *everything* starts to decline.

Keep learning, my friends. Keep pushing yourself to learn new things, and keep pushing yourself to learn *hard* things.

---

## Great resources for learning TypeScript

It's Matt Pocock. He is *the* educator for TypeScript. His [YouTube Channel @mattpocockuk](https://www.youtube.com/@mattpocockuk) is absolutely loaded with TypeScript tutorials, and he's a great teacher.

This dispatch of Tiny Improvements is inspired by (and *not* sponsored by) Matt's work - I owe a lot of my TypeScript knowledge to him, and if you're looking to learn TypeScript, I can't recommend his channel enough.

This week, Matt Launched:

- A *huge* new course called [TypeScript Pro Essentials](https://www.totaltypescript.com/workshops/typescript-pro-essentials)
- A massive, free, interactive book called [Total TypeScript Essentials](https://www.totaltypescript.com/books/total-typescript-essentials)

There's a [video on his channel describing the whole launch](https://www.youtube.com/watch?v=wgcfq51twe0), and it's worth a watch.

I love Matt's work - it's world-class stuff, and they the extra mile to offer Purchasing Power Parity - the price of his paid content scales to your local currency, which is a really nice touch.

---

## What are you learning?

I'd love to hear what you're learning these days, whether it's technical, non-technical, or somewhere in between. Hit reply and drop me a line via email, or shout at me on Threads [@irreverentmike](https://threads.net/@irreverentmike).

## More from mikebifulco.com

- [Take my money! Some of my favorite tools... and why I pay for them](https://mikebifulco.com/newsletter/take-my-money-tools-i-pay-for)
- [The Strangler Fig Pattern: Rebuild Everything, without losing your mind](https://mikebifulco.com/newsletter/stangler-fig-pattern)
- [Cognitive Debt and the Cost of Staying Wrong](https://mikebifulco.com/newsletter/cognitive-debt-and-the-cost-of-staying-wrong)

---

Written by Mike Bifulco. Originally published at https://mikebifulco.com/newsletter/typescript-and-learning-hard-things
