On Tue, 13 May 2008, Jonathan Katz wrote:

I find the following nicely hateful. At least it has an explanation of what
setting is what, although it isn't so intuitive...

# The snmp.version parameter controls the SNMP Version to use:
#     0 = Use SNMP Version 1
#     1 = Use SNMP Version 2
#     3 = Use SNMP Version 3
snmp.version=0


Hmn. Did some earlier version of this fine piece of software by chance only support v1 and v2whatever, at which point you had a boolean flag?

Something like:

# Set to 1 to enable SNMP v2, otherwise use v1
# snmp.v2=1

The hateful parser reading the configuration would, of course, use 0 as a convenient default.

Then, magically, v3 support appears. Changing the property key is easy enough, that's only in the configuration parser after all (*cough*, right?). As for the value, you can't just pick '2' for v3, because that would confuse your users who'd think it actually means v2. And you can't just renumber the whole mess either since that would force you to change the hardcoded constant '1' scribbled all over the code _and_ require your users to touch the configuration file when upgrading.

So it's easier to just grab '3' for it. 3 is good. Love the 3.

Highly intuitive, no? :)

--
-J

Reply via email to