What is a habit?
A habit is a routine, something you find yourself doing without too much thought. For example, one of my habits is turning on my computer after brushing my teeth and eating breakfast. Our habits shape our days. You may not realize it, but lots of the things you do throughout the day are habits. Brushing your teeth, taking a shower when you arrive from work, eating lunch, playing with your friends every night; all of these are habits.
Bad habits vs good ones
It is crucial to differentiate between good habits and bad ones. Good habits can boost your productivity, improve your wellbeing, and get you closer to your goals. On the other hand, bad ones can be detrimental to your health, and push you further from your goals. The problem is that identifying to which category habits belong is not an easy task. You may think that working a lot is a good habit, but not necessarily. Overworking can lead to poor health and burndown. Playing video games is often seen as a waste of time, but again, not necessarily.
The first step to categorizing your habits is to identify your goals. You can't recognize what habits are good for you if you don't know what you are trying to achieve. Once you know what you want to achieve, think of what is necessary to achieve it. If your goal is to become a professional gamer, your habits would be different from someone that wants to become an entrepreneur. Someone who wants to become a professional gamer needs to consume more time playing games than other people. Habits aren't a one size fit all, what may be beneficial to someone, does not necessarily apply to you.
Maintaining good habits
Good habits can quickly become bad ones. More important than creating good habits is to maintain them. To maintain good habits, you'll need good goals. We often have a moment where we reflect on our lives and have an urge to change things. We want to go to the gym, we want to start eating healthier, we want to read more, etc. More often than not, we fail and become overwhelmed by our own goals. We focus on what we want to achieve instead of what we should do to achieve it. Make a plan, a realistic and detailed plan. Let say that you want to lose weight, plan your routines, and set smaller goals. It is way harder to lose 40 pounds than it is to lose 5, and it is easier to go to the gym knowing what to do than not.
You also need to have realistic expectations. One of the reasons most people fail is because they want to achieve their goals in an unrealistic amount of time. Instead of learning these languages for 4 hours a day, start with an hour or 30 minutes. If you practice an hour every day for a year, you'll have practiced 365 hours in total. Those 365 hours take 4 months with 4 hours a day. But you are at risk of burning down and quitting. Taking the slower path often looks like a waste of time, 1 hour a day doesn't sound like much. But it is, and it's better than doing "a lot" and burning down halfway. This example can be applied to anything, not just programing.
Maintaining good habits isn't easy, but it is essential for your mental and physical health. Once you have good goals, developing habits become natural; and those habits are less likely to become bad ones.