I think it's usually a mistake when you write code that tries to tell the difference between production and development modes. I normally try to put that information in the configuration. After all, when you test your code, don't you want to test the stuff that's going to run in production? I wouldn't want to test my non-production branches and have untested production code.
But, as JavaFan mentioned, it would be hard to pin down a particular best. Your "best" way may differ from my "best" way, primarily because I'll have a different notion of best than you will.
...roboticus
When your only tool is a hammer, all problems look like your thumb.
In reply to Re: Best practices for distinguishing "development" from "production?"
by roboticus
in thread Best practices for distinguishing "development" from "production?"
by locked_user sundialsvc4
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |