Observation #27 - On Consistency
Mar 4th, 2010 by Alex
As seen in production code.
$TEN_MB = 8 * 1024 * 1024;
I guess ten was just a little bit too much?
Rants and musings, without care for substance.
Mar 4th, 2010 by Alex
As seen in production code.
$TEN_MB = 8 * 1024 * 1024;
I guess ten was just a little bit too much?
Looks like someone needed to be schooled in the finer points of search and replace in vi:
:%s/TEN/EIGHT/g
Damien: Or why it isn’t called $SIZE_LIMIT or something more descriptive.
Funny, sometimes those things make perfect sense to the author, but with no comments they make no sense at all.
Heres a good one for consistency from a router config
term apply-local-pref-130 {
from {
protocol bgp;
community LOCAL_PREF_130;
}
then {
local-preference 170;
next policy;
}
}