How I stay productive (Part 2)

Tim Mouskhelichvili
Tim Mouskhelichvili
• 2 minutes to read

I hope you're doing well.

In this email, I want to continue my thread 🧵 on productivity I stated in last week's email.

As programmers, we spend most of our time sitting and coding.

Unfortunately, while we code, we often overlook one important thing.

Exercising.

Indeed, exercising is essential for our overall well-being and long-term SUCCESS.

Exercising offers several benefits that directly affect our productivity.

Let's explore some of those benefits:

  1. Sharper thinking -  Exercise boosts blood flow and oxygen supply to our brain. This helps us solve complex programming problems more effectively.
  2. Creative solutions - Physical activity releases endorphins. Taking breaks for exercise can lead to fresh ideas and innovative thinking.
  3. Increased energy and productivity - Exercise boosts energy levels, reduces fatigue, and helps us stay focused longer.
  4. Stress relief and mental well-being - Programming can be stressful. Exercise acts as a stress reliever and gives us time to relax and recharge.
  5. Long-term health benefits -  Sitting for long periods can lead to health issues. Exercise strengthens our immune system, improves cardiovascular health, and lowers the risk of chronic diseases.

That is all great. 💪

But how do you incorporate exercise into your daily life?

Here are some practical tips that you can implement RIGHT NOW:

  1. Make time for exercise - Dedicate at least 3 sessions per week of 30 minutes to exercise. Choose activities you enjoy, like walking, jogging, cycling, or joining fitness classes.
  2. Take short breaks - During work hours, take quick breaks to stretch, walk around, or do simple exercises.
  3. Drink water - This is always important to stay hydrated.
  4. Stay positive - Remember your mindset is everything.

Have a good and productive week!

Tip of the week

Let's say that you have an object with properties and values.

How do you extract the values of that object in a union type?

Is there a valueof operator similar to the keyof operator?

Unfortunately, there is no operator like that in TypeScript. 

However, you can recreate the desired behavior by combining generics and the indexed access types TypeScript feature.

Here is an example:

productivity

As you can see, we extract all the values of the Article object to a union type.

Cool right?

Articles

I added one new article on React:

Thank you for reading.

See you next week!

Tim M.

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