Drink responsibly.
Drink responsibly.
Caffeine-code is much easier to follow later.
I also sometimes find solutions to hard problems in my head when stoned, though I usually just write down the solution rather than coding it, as large-scale implementations are better done sober.
They were working in C, which makes it a lot easier to introduce subtle bugs than most languages, but I certainly think twice about coding while under the influence since I heard that story!
I can make plenty of those.. and I've never had beer.
But enough to reach the Ballmer Peak? https://xkcd.com/323/
Which at 18ml ethanol each equates to 9 UK 'units', which is about 3 and half pints or ~90% of a bottle of wine.
Of course 'trashed' or 'drunkenness' both depend on the person, and are subjective anyway, and the time taken to consume them has a big impact too - necking 4 pints is very different to a bottle over the course of a full evening, for example.
But personally no, I don't think I'd program very well in either case.