It wrecks the next day though, and can easily turn into an evil cycle - even more so now when having a family and there's no opportunity to sleep in to catch up.
The last thing you want to do is commit code at 02:00. Better to leave it to when you have a fresher head to review what you did beforehand, both for quality and perception reasons.
2nd EDIT: Having to be always online on Slack with all the @mentions pinging off constantly and/or just working in a busy and loud open office with meetings every few hours can be detrimental to being able to build up that mental model needed to see things clearly when tackling something new / that I'd like to get done in a better way. I'm probably not a fantastic dev, and showing my age, but I try to make up with persistence and enthusiasm for my work / field..
I think its not a reasonable expectation for productive programmers to be always available for random questions and conversation. Make the messages and notifications wait until you have downtime.
On the same note, I don't do mobile email either. Colleagues can call me if the shit really hits the fan. Nobody ever does though, which I think speaks for itself.
One problem with system wide muting is since we're a fully remote team if something is breaking I have to be available. Maybe it's possible, but I'd love a way to enable do not disturb except for a single app.
I am terrified of how I am going to manage this when I have kids. It's just me and my fiance right now. We both work at the same company and we're both very career driven. It's not a problem yet.
Always, always, go home for dinner and put the kids to bed, then go back to work.
As a personal anecdote, I used to commute to work by bicycle. So I would cycle home for dinner with the family. Then I would drive back to work, which was relatively short (~10mi, 15km). Sometimes, if I worked right through the night, I would drive home at dawn, change clothes, and jump on the bike to go back to work (single car family). Yes, tiring, but I was young at the time - couldn't do that now.
Luckily I hate commuting so I will do everything to avoid long commutes. Currently takes me <15minutes to get to the office.
You don't happen to live in the Netherlands? It's not often that I see people calling 15km "short".
It was short when driving :)
One route was Natick-Weston-Waltham, MA, so quite tough fighting with the snow (and snowplows) in the winter.
Another was MillValley-Sausalito-SF, including the time the Golden Gate was closed to bikes after 9/11. So all Marin cyclists had to cross the bridge on a free shuttle bus, which towed a bike rack trailer.
Not so young any more, but recently changed job, and started a 15 km bike commute again ...
I regularly leave the office a bit earlier to pick up my kids from school and spend some time with my family, then I work again 1 or 2 hours in the evening.
I would not do that on a daily basis though, it's also nice to spend time with your partner once the kids are asleep.
Pairing at first can lead to high anxiety in an introvert, but like exercise for someone out of shape, I've found built up confidence in my abilities (and also kills overconfidence which is another affliction). A unique kind of flow can be achieved with your pair, one that isn't quite as productive as 2 a.m. "in the zone" flow, but is also much easier to slip into with regularity.
Nowadays I find in general my solo work just requires freedom from distraction (shutting Slack notifications off), the anxiety builds more slowly.
If that seems impossible then you have a different problem to solve first - which is "why can't I work optimally?"
Physical exercise and mindfulness can be great helpers, and making time for them even when there doesn't seem to be any is paramount.
But I do it rarely, don't want to ever be dependent on alcohol.
They treat young workers like oranges, squeeze out all the juice and pitch the rinds. The math says not everyone can make partner so don't worry about keeping people happy, just load the funnel with new grads.
Thought we had labor laws for that...
I find I probably get an order of magnitude more work done from 8-10 pm compared to 8-10 am, all other things being equal.
Other folks have different drums they march to.
One book I recommend is "the war of art".
The small one-page section called "what I do" is illustrative. He's a writer and describes his daily routine. He starts typing away in earnest about 10:30, and probably 4 hours later he starts making typos, which he realizes is the point of diminishing returns and calls it a day.
The ability and flexibility to work like this is very much a Silicon-Valley-only thing, and you can’t have a meaningful conversation assuming everyone can do that.
We know a lot more about sleep than we used to, and we now know how harmful lack of sleep is to the brain and body.
I highly recommend the book, "Why We Sleep" by Matthew Walker (who is a professor of neuroscience and psychology and the director of the Center for Human Sleep Science at the University of California, Berkeley), which goes into the myriad reasons why we require plentiful sleep.
The book discusses numerous studies conducted over the years that highlight how lack of sleep (in both quantity and quality) affect our mental faculties, our behaviour, and the increased health risks, such as the greater risk of heart disease and dementia, from lack of sleep.
Surprisingly, I encounter a lot of other developers and engineers that don't really concern themselves too much with sleep, and some that, as the article states, still do wear their poor sleep patterns as 'badge of pride.' I wonder if it's because engineers generally fall more into the 'night owl' chronotype category? Is there any kind of study that looks into chronotype by occupation to see how our genetics align with our job preferences?
As a 'night owl' myself, I know how punishing it can be if you're used to working late, and then having to wake up early to commute and get into an office at the same time as everyone else, and it was one of the reasons I moved away from agency work and started working remotely.
I wonder if one day we'll go so far as to stagger start times for people with different chronotypes (night owls and morning larks)? Or if we'll make adjustments to school start times for students in their teenage years, which is when longer sleep associated with a shift in circadian rhythm kicks in.
This is very American and overall "hustler" filter bubble. A lot of my acquaintances in Europe giggled when discussing Americans and various try-hard CEOs they know and mocked them for accelerating their own deaths by killing their most important body recover mechanism and filling the extra hours with busy work that didn't contribute to any bottom line.
I don't mean to be demeaning. I am just pointing out that in the circles I frequented my entire programming life (~18 years) it's a very common wisdom not to screw with your sleep.
Hustling is a useful philosophy if (a) you are that kind of person -- namely living under the motto of "I want to progress, even if by a little bit, every day" and (b) if you are motivated by real gains and not just by nebulous promises that you might see a 5% salary increase if you stay 5-10 years with your employer.
Let's face it. Most workers hustle because they have been successfully guilt-tripped into it.
Truth is, we can derive a lot of wisdom from the ancient hunter-gatherers: they worked a lot during certain periods but were mostly just enjoying life 60% to 80% of their waking time.
There were various studies published in the last year on the typical "work" schedule of the hunter-gatherers but sadly now I can't find them. If you are curious, look for them. The bottom line was: the ancient people worked on average ~15h a week.
Bonus points if you do it for some tiger strike super important big project that gets cancelled three months later when the C-suite finds a new partner du jour.
At the end, it was "done" but so bugridden that we couldn't deploy. I had to go sleep for a whole day to get back to normal, and then it took me another two days to fix everything.
It would have been so much better if I'd just worked about 10 hours, gone home to get some relaxation and sleep, and then come in and worked another 10 hours. By hour 12 I was damaging the code base, and by hour 30 I was just making more work for everyone.
In subsequent roles managing devs, I learned from this and sent my devs home after they'd done 10 hours. And defended them against sales/senior managers who tried insisting that they stay and get it done. I learned that if you absolutely insist that crunch time can't happen, and the rest of the company knows it, then miraculously it stops being a thing. Deadlines become more realistic if everyone knows that pulling an all-nighter to get it done is not going to happen.
We need more people like you in management: namely to be willing to take bullets but not budge when they know they would otherwise damage their staff.
Please, never change.
Anyway, in all that time I've done (...counts...) four all-nighters. I did plenty of nights until 2 or 3 in the morning, but I've only seen a sunrise at work four times. This includes stints at Atari, Apple, a number of Silly Valley startups, Microsoft, and my current gig.
Each one of those all-nighters pretty much killed me for a day or two. In retrospect I do not regret them, they were necessary to the team and for me to keep my word about completing a critical component on time. I'd probably do the same again.
> "I remember doing my first 'all-nighter'," she says. "I came back into the office the next day with a swagger."
Correct. They are perceived as sweat shops, selling the dream of making partner. Earning double what any other graduate program is paying (at least when I looked years ago) helps, although the hourly rate is probably the same.
Sure there're tight deadlines, and now-or-never cases, but when this becomes a feature, let alone a badge, in that move up or move out culture, it's a sign that the company became obsessed with an image it projects out over the quality of what it offers to the client.
Do they proudly stamp over such a report 'Red-eye: Compiled in the wee hours by our tireless professionals'? Better be, so a client could double check any findings, perhaps discount it just like the airlines do.
To be clear, I never did this, since the partners I worked for didn't value burning the candle at both ends.
Working all night once is a badge of honor but doing it repeatly is a badge of early death.
I wish there was a way to educate the young without greedy bosses taking 5 years of their total life expectancy by forcing them into all-nighters. :(
Sad but true.
You can't save them all but you can atleast give the message that their situation is seen and recognized.