Mathematica makes it easy to "bulletproof" packages, and prevent features of their environment from affecting their internal operation.
Module — localize names of variables
BeginPackage — isolate names by declaring a separate context for package functions
Begin — isolate names in the implementation of a package
Protect — protect a symbol against redefinition
ReadProtected — protect against definitions being read
Locked — attribute to prevent protection from being changed
Evaluation Bulletproofing
Block — block out changes to system or other variables
BlockRandom — block out reseeding of pseudorandom generators
$VersionNumber — Mathematica version number for comparisons
$SystemID — short description of computer system
Notebook Interface Bulletproofing