This is definitely the #1 thing to focus on as a junior dev. Start to understand your limits. Listen to your body, become conscientious of your emotional state. One of the best junior developers I had the opportunity to mentor was a 35-40 hour per week developer who consistently day in and day out delivered code. He was dependably consistent and eagerly took advice without ego.
(Totally agree with the advice who have money and relationships though. But none of us start there.)
That said, having balance is usually a good idea. If you have interests indepedent of your work, you will be able to lean on those interests when work isn't going well. This may not seem important now, but some day you may find yourself tired and lonely working late at night without seeing the fruits of those labors and suddenly your stuck with nothing else going on in your life.
I mean, sometimes we give young people advice and they are super eager to do everything right and use all the lessons the older people learned. I figure, there may be value in learning that particular lesson on one's own and on one's own time.
The recent Tesla news are a good warning bell against never learning it, though. As was in a different way the recession.
I smart man learns from his mistakes. A wise man learns from the mistakes of others. I mean sure I also went through similar unbalanced years as you and I learned from them, but if I could go back and change something I would instill some more wisdom in myself earlier. I don't live regretting that time of my life, but if I had the chance I'd certainly do it differently.
That's why I think we should at least try to warn our younger friends that all that eagerness to 'make it there' might actually hurt them in the process. Consistency is key and will take you far, because you'll keep on delivering.
Your boss most surely won't remember of your "weekend hero/superstar" phase when you're having a one or two month downtime period because your head isn't right, and your body isn't working okay from all those jolts you've given yourself from your caffeine micro-poisonings. He'll ask "are you gonna keep me those deadlines?" :-)
So yeah, we should leave the young people be young but the more information, the better.
In my personal experience, the way to prevent burnout for me is to have other hobbies, to stay physically healthy (especially to get enough sleep, but exercise and diet are super important too), to take plenty of holiday time, and to work on passion projects that are meaningful to you. Working on stuff to make someone else rich isn’t meaningful to me (especially when you see people getting burned by employers again and again — it’s rare that companies will return the favour)
Also, go easy on the coffee. Caffeine is a bad substitute for sleep.
My overall productivity was extremely bursty then–herculean efforts followed by barely anything at all. Now, years later, I'm much more defensive of my time, it's far easier to maintain a consistent flow of good work, and I no longer wake up in the middle of the night having had a bad dream about my code crashing.
I know that taking a vacation is important too, but it's hard to take enough time off when you only get 10 days' a year. And I have a crap immune system so I end up using half of that to cover for when I run out of sick days every winter. (At my last job they started "hemorrhaging" developers because a local startup put out a standing offer to higher people for 20% less pay, but 20 days starting vacation. So many people took them up on it that our branch office dwindled from 12 to 2-3 people and retention of new hires went to the basement as well. The impression we got from management was they'd let the company burn to the ground before making "more vacation" a negotiable, probably because they had a vesting scheme and existing senior employees had worked there 10+ years to earn comparable amounts.) At my now-job I have the option to work 9 hour days and get a day off every other week, which helps make my "real" vacation hours stretch longer but the downside is that 9 hour days are not easy, either.
Working all-nighters to the point your health starts to suffer is not being young. It's exploitation the likes of which the chapters on the industrial revolution warn us about.
More importantly, we as a society should actively discourage this sort of abuse. It makes no sense to let our health waste away just because a manager wants to boast about a target or a deadline.
> "coding all day and all night on relatively minor problems to make somebody else five figures a week"
which makes no sense. Of course if one ever codes outside of the day job one should code for their own project, but that's not what the OP was suggesting.
Also, not sure if Counter Strike should be regarded as bad as alcohol, though indeed both might become addictive if careful.
It's certainly possible to go too far but certainly the path to mastery is paved with many hours of practice, often to the sacrifice of other things. It may not make one feel great to consider you can't become Mozart without deep sacrifices and it doesn't make for advice one feels like giving others. I think the best version of this is probably "work really hard but be aware you have limits, and that sometimes it's important to sacrifice performance and skills development in the name of a balanced life and good health." I don't like framings that could be interpreted to mean if you hustle or don't hustle you'll get the same result, since "there is only so much you can do in a day." Knowing there is a real tradeoff and "know thyself" is a better pov imho.
It's just like in japan when someone falls over a heap of work on premises at late hours, instead of lazy they think the guy is a 'trooper' for staying in for such a long time ("must be a strong person").
This has to stop.
And on top of that he was severely dyslectic. I don't know, I feel like he would have made a better fire fighter.
Long story short, it took me two years to run into the wall like a freight train. This was 20 years ago, to this day I have serious issues with phone signals and stress in general. First sign of trouble and I simply shut down, can't do it any more.
Second that!
Try to be consistent and avoid plateauing for long stretches. Consistency will take you far. Maybe you make some sacrifices of other hobbies and uses of time to get some early traction with your skills, but be intentional about doing this and don't put the other things that nourish you on hold forever.
Embrace the beginner's mind that comes easy to you now, remember it so you can cultivate it again more easily when things inevitably feel a little dull or tedious down the road.
Basically this means that crunch is fine to get out of a pinch, as long as it’s very infrequent and the cost is allowed for. Eg if there is an important deadline due this week, by all means, crunch to meet it, but next week is going to be unproductive and these tight deadlines cannot he a regular thing.
Second, while I appreciate that you are going through hardship, I don't think thats fair to discount a 16 month stint working an average of 74 hours a week. Including a 45 day in a row, and 31 day in a row period. I burned myself to a crisp for a very real goal, and am happy I hit that goal. Of course, The months following were a disaster, and I don't think I actually snapped out of it till 1-2 years later. But I did snap out of it. (Note: I wasn't working in software either...)
Third, you can get through it. Burnout is physical AND mental... the problem is that people think that its primarily mental. If you are able to get past this incident, you will be stronger because you will know what your limits are. I'm not saying its easy... but if you ended up in this situation by working on something that you are truly proud of, or that you accomplished something that you wanted your entire life- then for me, its worth it.
Lastly, if you need help, or are having a tough time hit me up. I don't know what help I can be, but I can try to help you get through it :)
I know you are young and you feel like you're invincible. I know you can pull an all-nighter and work the next day just fine. We have all been in that situation and believe me, it is gonna take a toll at your performance ... and it could even trigger or help you develop some health issues in your life that can sabotage you down the line.
Realize there's only so much progress one can do in the day. Stop before you are absolutely exhausted and passing out, I know it's sounds tempting but please please do not fall into the trap management or more senior people (that were forced to do this too but didn't learn or are "paying it back" now negatively) to wrest that one last drop of energy. After your X allotted time, even if you are still feeling energized, go spend that energy jogging or something! Work a craft, learn to play an instrument.
Risking to toot my own horn, this might be the single best non-technical advice in this thread.