Typed Ember extends Confidence Part 3: The Real Benefits of TypeScript
This article is the third and final part of a series on converting your Ember app to TypeScript to foster confidence in your engineering team, based on my talk for EmberConf 2021.
We started with some basics: "What even is a type? What is TypeScript?" Then, we looked at what TypeScript looks like in an Ember app. Now, we're circling back to the benefits of TypeScript in the context of developer confidence.
Sus? How do we become "imposters"?
The prizewinning author Maya Angelou once said, after publishing her 11th book, that every time she wrote another one she’d think to herself: “Uh-oh, they’re going to find out now. I’ve run a game on everybody, and they're going to find me out.”
Imposter syndrome is "the experience of feeling incompetent and of having deceived others about one's abilities". You will find "imposters" in all facets of society, regardless of culture, gender, age, or occupation. In fact, psychologists estimate that 70% of people will experience this feeling at least once in their lives.
To call it a syndrome is to downplay how universal it is. -What is imposter syndrome and how can you combat it?
To that end, the psychologists who first described this experience didn't call it "imposter syndrome," they called it imposter phenomenon.
There are all sorts of reasons why you might experience imposter phenomenon. Studies show that the more competent someone is in a subject area, the more likely they are to underestimate their own ability compared to their peers. So, it's not an issue of competence, it's an issue of confidence.
It me!
I am one of these imposters.
I am a programmer from a non-traditional background. I didn't realize I was interested in computers until I was 30. Instead, I became a designer. I spent most of my architectural career designing buildings and urban landscapes for tech companies in silicon valley. You might even recognize my work. 💁♀️
My exposure to tech companies led to curiosity about programming. Drawn by the lure of an equally interesting but less stressful career, I left architecture and attended a code school here in Portland, where I learned Ember among other things. It was awesome! I was so stoked to get my new career started. One evening, I recruited some code school colleagues to join me at the local JavaScript Meetup. The Meetup turned out to be a bit of a dud, but by a stroke of good fortune, in walked a giant crowd of people, all clad in Ember gear. It turned out that an impromptu EmberConf Happy Hour had arrived!
Despite being super nervous, I did the best I could networking and met a crowd of very nice folks. But one conversation stuck with me the most. A man, after bragging about having graduating with his computer science degree the year I was born, tried to convince me that code school was a bad idea because the market was oversaturated with junior developers. He then proceeded to give my male code school colleagues sage career advice.
🤔 I started to think "Maybe I don't belong here?"
Nevertheless she persisted
I finished code school and started a hobby app. At our school's showcase demo day, I presented my hobby app to potential employer after potential employer, but one interaction in particular stuck out.
I recognized Yehuda Katz from across the room and got a little nervous. He's like...the guy that wrote thing thing, right?
I stumbled through my presentation, then Yehuda and his team had great questions and suggestions. Less than an hour later, I had a very flattering email in my inbox, and I've been working at Tilde ever since.
And yet...I still felt like an imposter. Mr. CS Degree was still in my head.
And then...2020 happened
Three years into my journey at Tilde, 2020 happened. Our company moved to fully-remote overnight. Rather than try to push through our big projects while still reeling from this massive change, we decided to focus instead on small, relaxing projects as we adapted to these new norms.
Just a few months prior, the Ember team had released Ember Octane. We decided that if we are going to convert our app to Octane anyway, we might as well convert it to TypeScript at the same time. Godfrey gave us a TypeScript demo, and we were off.
At first, I felt a little overwhelmed, but eventually, as we worked our way through the app, I started to really see the benefits of TypeScript. I found myself drawn to working in the more complex—sometimes crufty—areas of our codebase, code that had intimidated me before. Beyond transforming our codebase, I myself was starting to feel transformed... from a competent but hesitant mid-level engineer into a competent and confident senior engineer. I was starting to feel less like an imposter.
Can we fix it? Yes we can!
Imposter phenomenon is talked about quite a bit in the programming community, and there is lots of wonderful advice to be found:
- Surround yourself with supportive people.
- Own your accomplishments.
- Learn to take your mistakes in stride.
- See yourself as a work in progress.
- Train yourself not to need external validation.
- Realize there's no shame in asking for help.
- Use positive affirmations.
- Say "yes" to opportunities.
- Visualize success.
- Go to therapy.
- Do some yoga.
- Embrace feeling like an imposter.
- Decide to be confident.
- Etc, etc, etc.
It can be a long and overwhelming TODO list, and rarely are technical and tooling solutions offered. Based on my experience, I propose adding one more item here:
The real benefits of TypeScript
If you google "Why use TypeScript", you can find all sorts of blogs about TypeScript's technical benefits, and sure, there are many. But to me, where TypeScript really shines is not its technical, but its "personal" benefits.
Confidence to refactor the crufty stuff
Many legacy code bases have code that people are scared to work on. I've found that refactoring to TypeScript makes understanding these crufty spots so much easier, and sometimes even fun.
Confidence that your code will Just Work
Once you've added types to a significant chunk of your project, you really start to see the benefits. Type annotations, coupled with JSDoc, are a place to pool the knowledge of every engineer that ever worked on that code. Eventually, you start to notice that you don't have to refresh your development app so many times to experiment because your code Just Works the first time around.
Confidence to open PRs on open source projects
I used to be scared to open pull requests on open source projects because it felt too public and unsafe. Opening PRs on the Ember Types on Definitely Typed was a great way to get started in open source, and I've since moved on to opening PRs on other projects too.
Confidence to try other Strictly Typed languages
I've been to RustConf like four times, and each time I take the beginner and intermediate trainings and still feel totally overwhelmed. After using TypeScript for only a few months, I was able to transition to writing Rust, and it made so much more sense. I will forever refer to TypeScript as "Baby's First Type System."
Confidence to make you read this series of articles
TypeScript's answer key gives me confidence. So much so that I signed up to do an EmberConf talk after years of saying "Maybe one day..." and now you've read these articles about it. And for that, I thank you.