It's the only way. Unfortunately, I like a strong stout or porter, so the quality of my work is very directly and rapidly disproportional to the time I spend doing it.
Funny story - I was in a sort of professional band for a while - bass player - and we enjoyed a period of relative popularity in the community we were part of. We'd always play the first set, have a few beers, then play the second set with a beer or two on the amps. We always thought our late sets were the best....until someone videoed a gig and stuck it on youtube. Oh my goodness, we <really> sucked after the beer interval.
So, kids, don't drink and play. Or code. Definitely don't drink and solder.