I've been coding since we considered 8 bits a luxury and I'm still at it (I'm 47 now). I do it because I enjoy it and because I'm pretty good at it, plus it affords a decent lifestyle.
There are a couple of important points I've learned along the way that might help you:
1) Some people can code productively 24/7, but those are very few and far between. For starters, they have the skill to concentrate hard for a long time and work in an environment where that is feasible. It's not feasible if the next cubicle over has a sales person in it who spends ten hours a day on the phone. Second, most of them tend to do it in bursts as it's extremely hard and draining to sustain that level of concentration and effort for hours and days on end. What you see is often the output from the bursts, but you don't see that they're then spending a fair amount of time doing different things so they can recharge their brains.
2) It's easier to do this when you're young and pull a couple of all nighters a week. This makes you a hero, especially in places that thrive on hero-based development, but you have to realize you're burning the candle at both ends. As you age and build up experience, you tend to be more productive simply because of your experience, but you're also not necessarily that willing and suited to pulling 16 hour days for extended periods of time.
3) Most importantly, your brain is a muscle. Exercising it improves its function much like exercising your body improves its function, but it also needs rest. If you look at the way top athletes train, they push themselves hard but they also allow for sufficient rest periods. It's the combination of exercise and rest that leads to the improvement. Take one or the other away and you either overextend yourself (and injure yourself) or you don't grow as much.
Yes, I read about programming and play with languages during my off time, but I try to satisfy my need to build things (which is what initially drew me into software) by working on physical things instead. Things like building/restoring a car or motorcycle, gardening, working on the honey-do list etc. Oddly enough they're not too dissimilar from programming as you still end up solving problems.
TL;DR - find a way to switch off, be it through meditation or whatever else works for you. Get enough rest and exercise the other parts of your body. Learn to recognize the signs of burning out and stop the journey before you get there.
Comments
I've been coding since we considered 8 bits a luxury and I'm still at it (I'm 47 now). I do it because I enjoy it and because I'm pretty good at it, plus it affords a decent lifestyle.
There are a couple of important points I've learned along the way that might help you:
1) Some people can code productively 24/7, but those are very few and far between. For starters, they have the skill to concentrate hard for a long time and work in an environment where that is feasible. It's not feasible if the next cubicle over has a sales person in it who spends ten hours a day on the phone. Second, most of them tend to do it in bursts as it's extremely hard and draining to sustain that level of concentration and effort for hours and days on end. What you see is often the output from the bursts, but you don't see that they're then spending a fair amount of time doing different things so they can recharge their brains.
2) It's easier to do this when you're young and pull a couple of all nighters a week. This makes you a hero, especially in places that thrive on hero-based development, but you have to realize you're burning the candle at both ends. As you age and build up experience, you tend to be more productive simply because of your experience, but you're also not necessarily that willing and suited to pulling 16 hour days for extended periods of time.
3) Most importantly, your brain is a muscle. Exercising it improves its function much like exercising your body improves its function, but it also needs rest. If you look at the way top athletes train, they push themselves hard but they also allow for sufficient rest periods. It's the combination of exercise and rest that leads to the improvement. Take one or the other away and you either overextend yourself (and injure yourself) or you don't grow as much.
Yes, I read about programming and play with languages during my off time, but I try to satisfy my need to build things (which is what initially drew me into software) by working on physical things instead. Things like building/restoring a car or motorcycle, gardening, working on the honey-do list etc. Oddly enough they're not too dissimilar from programming as you still end up solving problems.
TL;DR - find a way to switch off, be it through meditation or whatever else works for you. Get enough rest and exercise the other parts of your body. Learn to recognize the signs of burning out and stop the journey before you get there.