I worked on cleaning up a project after the main developer imploded. He had serious pot and cocaine habits, but what was interesting was that you could tell which he was on when he wrote various sections.
Basically, his coke fueled code generally worked and was relentlessly documented, but he'd brute-force problems that could have been solved by an hour of reflection. His pot programming was creative and filled with half-completed ideas and zero documentation.
Kind of a sad story, the guy went from a guitar-playing family man with a long list of happy clients to a divorced druggie constantly padding out his hours and ripping off clients. Visiting his sleazy apartment to go over some code and getting just shamelessly hit on by his 15 yo daughter is probably one of my most excruciating memories.
An Ada exception is when a routine gets in trouble and says 'Beam me up, Scotty'.