My weed code is usually really creative but riddled with bugs
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.