That’s dumb. Of course you can “have a life”, regardless of whether your hobbies include something you also get paid for. Denigrating folks as not having a “life” for this reason, even as a rhetorical device, is dumb.
The author even says, after listing activities one might do outside work, "But is it really necessary? That is for you to decide." It's about not needing to feel obligated to be into all that, not disallowing it.
But if they are really trying to get better, then they have to do 'deliberate' practice. Just grinding through things isn't the end-all-be-all. You have to really be trying.
I know that's a bit glib, but I think that there has been some good work done in this area of 'deliberate' practice recently. Cal Newport, Dan Coyle, Josh Waitzkin, Tom Sterner, and others have written a fair bit about the deliberate part.
A good intro with good sources is here: https://jamesclear.com/deliberate-practice-theory
Not only that, but the types of coding you can do at home are often much different than your work. Most hobby projects won't give you a chance to process terabytes of data or serve data to hundreds of millions of clients or send bytes across the country with microwaves. So if your job is related to any of those things, you're not going to improve much at home.
Also, much of what companies value in software developers isn't raw coding ability. You have to be able to work with other people, understand business requirements, convince people to help on your work, etc, etc. From that perspective, somebody who spends their evenings at bars talking to strangers might be building more important career skills than the person who codes all night.
Then again, most jobs won't give you that chance either.
It can be that coding hobby projects can be your only chance to learn how to write good, readable, maintainable and performant code. If your job involves churning out features for customers or closing tickets, you will not have time for anything other than "your best under time pressure". Hobby projects can give you opportunity to improve the quality of code you produce by default.
I have never had that happen at a day job.
Start fasting by skipping breakfast and work your way up to skipping lunch and then doing a full day fast if you’re going to do it and always stay hydrated. If you’re doing a long fast make sure you’re getting salt too, even if it’s not hot enough that you’re sweating much. Take it easy and go slowly like with starting a new exercise regimen.
These days I don't, as a rule, code for work outside of work hours. But I need to code in my spare time. That's when I can do things that really interest me, side projects where I can enter the 'flow', something I nearly never can do at work anymore. I have to go into flow mode now and then to keep up my ability for concentrating on problems (and yes that's necessary to keep up my work performance too). A few years back the constant interrupts at work degraded my performance so much that I spent my three week holiday in various cafeterias, with a laptop and documentation, and worked all day on my hobby project, finally re-learning to enter the flow again. As in "I looked up, and five hours had passed". Myself, laptop computer, documentation, coffee, food available. Happiness.