Your resident specialist then proceeds to actively ignore @deprecated and make use of your old code in ever more interesting ways, duplicating functionality and causing headaches.
How do you stop it?
class Logger {
public static function debug($message) {
//Your standard debugging logger method(s)
}
public static function deprecated($message) {
if (Config::isTestSite()) { throw new DontBeRetardedException($message); }
self::debug($message);
}
}
function UglyCode() {
Logger::deprecated("Don't use UglyCode()");
}
Stops specialists in their tracks!
No comments:
Post a Comment