There was zero impact to my work focus, positive or negative, from cutting nearly all carbohydrates out for several months.
I am curious were you heard or learned that "sugar is really important for focus". Just a vibe, perhaps?
remember your brain can run on ketones which provides a more stable energy than glucose spikes. the brain is metabolically flexible, can run on glucose, ketones or lactate
Cutting off sugar will help you have more focus, not just during coding but the whole day. However, if you were on high amount of sugar before, at initial stage, your body will scream.
For me, it takes a few weeks to get settled in. After that, I don't miss sugar at all. Can focus just fine.
Why neglect one aspect of our bodies digestive energy systems for just gluconeogenesis. Wouldn't you be better off eating a balanced meal of complex carbohydrates and unsaturated fats. Our bodies have multiple pathways to producing energy, focusing on using only one is silly and not the right approach because it wasn't designed to be that way.
Just because our bodies can survive doing a particular thing in the absence of another, doesn't mean that thing we're absent of isn't required.