DEV Community

jabo Landry
jabo Landry

Posted on

Procrastination in disguise

Table of Contents

Introduction

Recently, this month, I have started exploring TypeScript. It was very exciting at the start because I was gaining new experience and skills under my sleeves, like everyone else who is doing something for the first time. Little by little, you start feeling overwhelmed and confused, not knowing when to use a certain concept over another.

This kind of feeling of uncertainty is a good sign that you are learning, you are facing new challenges beyond what you used to, and you are stepping out of your comfort zone which is a good sign but if you continue to hold on to those feelings and not do the right thing which is practice it may later lead to procrastination.

Procrastination in disguise

Procrastinating is a thing we all programmers in our case try to avoid at all costs, so we tend to do more reading and more research on a certain concept.

I have come to realization that reading in programming is another type of procrastination beyond the saying “I will do this tomorrow”.

a typical example is when I was reading about interfaces and type aliases at first, I had two confusions:

  • the difference between type aliases and interface when creating types
  • Why do we have them doing the exact thing which is creating type

I keep on reading about interfaces and type aliases but within me deep down I felt a fear to embrace them and practice on them to decide on where we might need to use one over the other, in which case and under which circumstances.

And I ignored that feeling and kept on reading to make myself believe I am learning something, but it didn’t click, even though I read about 5 articles and maybe watched a bunch of videos on YouTube.

Stepping out of your comfort zone

To solve the confusion about the two concepts I confronted myself and I made a conclusion to build a simple Dictionary app that you input a word and fetches data from an oxford dictionary public API for the meaning and other ways we can pronounce the word you’ve searched.

In the first attempt to fetch and work with data I had that aha moment where I started knowing why we need type aliases and interface how to use them effectively for clarity. I’ve found out that interfaces are useful when you want to create a structure of the object and match your frontend with the incoming API response.

When creating those interfaces, I came across an issue of using the same type on every field of the interface I am creating I noticed that they have the same type instead of always typing the same type I can simplify it by creating a new name for a certain type that is repeating multiple times and use that name to assign type to my field and that was achieved with the help of type aliases which makes the process of extending and changing types in future fast and easy to do.

Final Thoughts

Through this process I have found that sometimes we developers we tend to learn a certain concept by reading it believing we are understanding it in detail, and we will then practice later on when we have conceptually grasped the concept.

But programming is a fascinating concept, and the more you read the more you fear practicing and with no practice there is no progress

Ending this, I would urge all of you guys on any level, whatever concept you are learning, to have an introduction and then jump into practice, and after you hit a wall, you can go back to read more about the concept. That way, you will not be procrastinating, but you will be advancing and building depth more.

Top comments (0)