How to stay productive (Part 3)
I hope you're doing well.
This email will be the last part of my thread 🧵 on productivity (if you missed any of my previous newsletters you can read them here).
This email will be about:
Our diet.
This one hits hard for me.
I often work long hours and forget to eat. I also order junk food too much. I don't particularly watch what I eat.
And this is not good.
Our diet directly affects our well-being.
It can also affect our success at our software development job.
Here are some benefits of a healthy diet:
- Thinking Clearly: What we eat can make a big difference in how well our brains work. By eating good food with lots of vitamins and healthy fats, we can think better, remember things easier, stay focused, and come up with new ideas.
- Having Energy and Getting Things Done: Do you ever feel tired and find it hard to concentrate in the afternoon? The food we eat gives us energy throughout the day.
- Feeling Less Stressed: Eating healthy foods like fruits, vegetables, and whole grains can help us feel less stressed.
- Staying Healthy: Sitting at a desk for a long time can be tough on our bodies. But eating well can help us stay healthy.
- Having a Successful Career for a Long Time: Eating well isn't just for now, it's for the future too.
And that's not all. There are many other benefits.
But following a good diet is hard, especially in the world we live in today.
We see ads everywhere for DELICIOUS junk food. Pizzas, burgers, fries.
To be honest, I haven't found the method to fix my diet yet. Or the motivation.
But, I will keep trying.
We must take care of our bodies and minds to become the best software engineer!
Tip of the week
Let's say you want to define a function in TypeScript, and you don't know exactly how many parameters it will receive.
What feature do you need to use?
That's right! You can use the rest parameter (defined by the ... operator).
Here is an example:
A rest parameter acts like an array.
You can pass zero or more arguments to a rest parameter.
Cool right?
Thank you for reading.
See you next week!
Tim M.