Go to sleep!

Tim Mouskhelichvili
Tim Mouskhelichvili
2 minutes to read

I hope you're doing well.

This email is about productivity again (I know, shocker).

In our previous emails, we already talked about the morning routine, exercising, having a healthy diet, and tips to become more productive.

But one crucial thing was missing from it all: Sleep.

Even if you follow the perfect diet and exercise regularly but lack the necessary sleep, you will be tired.

An adult requires between 7-9 hours of sleep per day.

Many factors can influence how much sleep you need:

  • The sleep quality
  • Previous sleep deprivation
  • Pregnancy
  • Aging
  • Etc.

For software engineers, sleep is essential:

  • To be more focused and concentrated
  • To improve our decision-making capabilities
  • To increase our productivity and creativity
  • To improve our problem-solving skills

Nothing can replace sleep. Coffee and Redbulls cannot compensate for a deficiency of sleep. A lack of sleep will affect your overall health and well-being in the long run.

So go to sleep!

Recuperate your forces and with the newfound energy accomplish the goals you always wanted.

See you next week!

Tip of the week

Let's say you have two different types. 

One type is called Dog, and another one is called Cat

You also have one type called Animal that contains both types.

How do you differentiate between a dog and a cat when you receive an argument of type Animal, and get the correct type (without type assertion)?

By using type predicate!

Here is an example:

typescript predicate

As you can see, using type predicate is much more elegant that using type assertion!

Cool right?

Thank you for reading.

See you next week!

Tim M.

Comments (0)
Reply to:
Page content
  1. Tip of the week