I do watch Netflix too. But it’s time boxed during the day, the same way working on projects is. And in a day, I don’t work more than 6 hours. I’m always done by 6pm and can do anything in the evening. The key is to manage your time during the day and stick to a plan.
As a matter of fact, OP’s rules feel more like the army to me: having a different user or even laptop for a project, going to a different location, blocking websites like reddit… These are harder restrictions. If I really want to quit a project, I always can. I just need to close my code editor and my terminal. But in my mindset I don’t want to. Because the project is not a burden like the army: it’s 2-hour slots where I’m focused, not overwhelmed, and I know there’s an end to it.
The door to leave is always open but I don’t want to take it. It’s different.
Perhaps if I get electroshock therapy and/or go to an ashram and meditate I might get more internal self-control, but I'm 32, and can't be bothered with it. Thats partly because I'm also not convinced it's that important that I become disciplined: sometimes being lazy feels good and maybe it's a part of what makes me who I am. I'm not self-sabotagingly lazy (except in exercise which I need to work on), so as long as I and others find a system why not?
I guess that's a very good way of setting your focus straight, to obey your commands, instead of the other way around.
In every hobby there is always a sense of discipline, it's just usually implicit. For myself: composing orchestral scores started off as a fun little "oh this melody would sound neat". Ever since then, there have been times when I need to sit down and do some "real work" to turn that idea into an enjoyable, fulfilling result. Could I have just wrote things when I want to? Of course. But now, after years of composing, I have the skill to make things that sound great when I really just threw it together.
In software engineering, a beginner or even intermediate programmer is going to lose a lot of their initial motivation to build their idea (game, app, website) -- because in finding the skill to execute on their initial side project idea, they realize they need to develop that skill from scratch, which takes work.
I think there's a good balance between investing skills between "basic knowledge" and "career capital". What that balance is varies from person to person, but I also believe that no matter what, even if it's implied, there is always a certain amount of work that needs to be put in.