I will occasionally drink while working on personal coding projects. I experience a kind of "Ballmer Peak" [1] at a certain point - I think what happens is my inhibition is lowered enough that I stop double-guessing myself too much. Eventually though I begin to lose track of what I am doing, but it can still be fun to look over my work and maybe make a few notes. I wouldn't drink and work if it was something professional or important, though, because it's too likely I'll make a mistake somewhere.