The skill here is to flow in waves -start with socializing completely for  days&#x2F;weeks where you get to warmup, practice, improve your skills etc then get back to coding- again warmup,get fully into coding - while also simultaneously reflecting on the socializing you did, internalizing what you learnt, measuring your performance etc.. repeat the cycle by cutting down the time you spend in this cycle..this way you will reach a day where you can find a healthy balance and ability to switch on&#x2F;off whenever you want.