I tried coding on pot a long time ago and had a similar experience. I had written something so profound, but couldn't quite get it to compile: an endless loop.
But with light amounts of LSD (under 100ug) I've found studying compsci ideas to be useful. Not that I get any mystical insight but that they're so important, they stay in my mind forever.