DEV Community

Dor Moshe
Dor Moshe

Posted on • Originally published at dormoshe.io

I’m a Fan of TypeScript, but Please Be Careful!

I’m a Fan of TypeScript, but Please Be Careful!

This article originally appeared on dormoshe.io

There is a phenomenon among front-end developers. It’s a new phenomenon. I diagnose more and more developers who are infected. There is no research yet about the consequences. There are no exact numbers or statistics. And I’m not a doctor, but I think that there is no danger of death.

At least, not yet.

Probably, it’s an epidemic. There is a danger of infection of each other. The epidemic has been spreading out. Everyone experiences that in different ways, depending on the progress and time of one’s career. If you have a weak heart, please stop reading.


DABDA

Let’s start with the diagnose. Try to be honest. We are here to help you. Among those who are infected, we found there are five different stages which developers go through. Those stages are popularly known by the acronym DABDA.

The first stage is Denial

No No No shut up! It’s not happening to me. I’m not like them. I have the knowledge!

The second is Anger

Why me? It’s not fair! Who developed this language? Who introduced me to it?

The third is Bargaining

I wasn’t ok, but give me a chance! I will learn what the differences are between… and how to… I will be a better developer. I am ok with earning less money…

The fourth is depression

I’m broken! There are no reasons to program. Leave me alone!

The fifth is Acceptance

I know, I can’t fight it. I may as well prepare for it.

Credit to ted.com


Don’t panic! There are survivors.

It can be ended without a tragedy. There is a serum which can heal you, but it will take time. First of all, let’s understand how we got to that situation.

The seeds were sown a few years ago. Exactly 217 years after France conquered Belgium, 50 years after Nigeria became independent and 31 years after Disneyworld opened for the first time. On October 1st, 2012 it was published for the first time.

TypeScript was born

Why?

Predictability. Type-Safty. Working with other developers. Documentation. Auto-complete. Polyfills. Refactoring. Protection. Angular*. Coding time’s error catching. Just because JavaScript sucks.

And I can continue. I’m really a fan of TypeScript. TypeScript is awesome. But in order to heal, we have to know that you know why you use TypeScript. TypeScript’s success is partly due to Google betting on it, making it Angular’s main language for developing applications. A little bit later, React developers started to use it also. But no, Angular isn’t a valid answer for the “why?”.


Three Types of Developers

During the last year, I met a lot of candidates who work with Angular or using React with TypeScript. When I asked them JavaScript questions they had to answer.

🙄 Part of them was wrong.

😍 Part of them answered right. Fantastico!

🤷‍♂️ Part of them guessed. Ohh merde!

😷 And part of them said “I’m not a JavaScript developer. I’m a TypeScript developer

Big mistake, huge!

Credit to tomhiddles.tumblr.com

Are you a front-end developer? Does the browser understand TypeScript?!

If you want to be a “TypeScript developer”, it’s ok. In order to be a good developer, I expect from myself to know the basics. Know why TypeScript was born. What TypeScript came to solve. Why people use it.

I expect from myself to know JavaScript. Know what was before TypeScript. What the browser understands. How JavaScript works. What the obstacles and “pains” we have. As a good developer, I want to understand the “behind the scene” stuff. Why TypeScript chooses to implement those features. Why we need polyfills.


There is no vaccine.

Don’t deny! No one promises that TypeScript will stay here forever. Although, you may wish it. As time passes, more and more features were accepted into ECMAScript, the JavaScript specification. A lot of features and capabilities which were missing in the browser were implemented. As time pass, more and more browsers support new features and have more capabilities.

JavaScript is here to stay

So, please don’t do it to yourself. Please, don’t deny.

Think about the day after

It’s awesome to learn new technologies. It’s fun to use libraries. It’s comfortable to use a language which helps you achieve your goals, helps you to improve your time to production, reduces bugs and makes refactoring and teamwork easier. But, you have to know the basics.

Learn new technologies, but don’t take it as the default

Think about the day after. You would like to find a new job. You don’t want to limit yourself to a specific technology. JavaScript is our common denominator. We talk a lot about Angular, React and VueJS and the needless competition. JavaScript is the link between us, we are front-end developers.

Credit to socant.su.se


Conclusion

I like hot trends. I like new technologies. I like innovations. I like efficiency. I like comfortable coding experience. It’s easy to like all of that. But don’t delude yourself. If you are a front-end developer, you have to understand what the browser understands. Also if you work on a TypeScript project for a while or mean to do it, practice your basics from time to time and understand the whole picture — the big picture.

TypeScript isn’t an illness, but it can make you ill. Don’t deny. Don’t follow the herd. And don’t give this article’s insights to fade away.

Follow me

You can follow me on dormoshe.io or Twitter to read more about JavaScript, web development and personal growth.

Top comments (2)

Collapse
 
tracker1 profile image
Michael J. Ryan

I prefer straight JS... while I do often appreciate the extra context that TS provides in my editor, I don't like the extra time it takes to actually write code. I tend to separate my concerns (modules) fairly well and consistently and rarely gain more than I lose in terms of time due to the types of bugs the TS helps to prevent.

Collapse
 
blindfish3 profile image
Ben Calder

I've just posted a couple of comments elsewhere correcting one apparently common misunderstanding of Typescript that really bugs me. TypeScript's compile time type checking is giving people a false sense of security: they start forgetting to do proper type-checking and validation of incoming data and... Well; let's just say it's not my problem :shrug: