Where am I ? Salesforce

It’s an age old question: “Where the hell am I?”  I don’t like to stop and ask for directions and neither does my code.  I’m surprised it took me this long to require some way for my code to be able to detect the environment in which it was running.

I needed to answer these two questions: