login
Header Space

 
 

Re: Compliments and Knob Question

Score:
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
To: L <l@...>
Cc: misc <misc@...>
Date: Wednesday, December 5, 2007 - 2:09 am

On 5/12/2007, at 4:24 PM, L wrote:

[cut]

My understanding of knob is an option or a switch.  I guess the  
meaning is like a music console - all those knobs you can turn to  
fiddle with sound.

So you start off with command X that moves bytes from A to B.

So the user does ...

X A B

... and his bytes are moved.

Then dev. "a" adds an option - a knob.

X [a] A B

Then dev. "b" add his option

X [a|b] A B

Then devs "c", "d", "e" etc.  And someone adds the -quiet knob, the - 
verbose knob.  And obviously if you run -quiet you would ignore - 
verbose?  Or the other way round?

X [a|b|c|d|e|f] A B

By now the code starts to have a lot of conditionals:

if a and b but not c
	do this
otherwise if f
	do that

Code gets messy - harder to follow - bugs creep in (potentially  
security related.)  When you want to add feature Z - which ones of  
all those knobs/options should it handle?  In what way?  Was it  
REALLY worth adding all those options for a couple of people here or  
there (who could have piped output / used a Perl script / whatever?)   
Usually not.

I guess it would be the same for an API - you start with a simple  
entry point and end up with a lot of entry points, or having a whole  
heap of options in every entry point.

My 2c ...
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
Compliments and Knob Question, L, (Tue Dec 4, 11:24 pm)
Re: Compliments and Knob Question, Richard Toohey, (Wed Dec 5, 2:09 am)
Re: Compliments and Knob Question, Richard Toohey, (Wed Dec 5, 2:12 am)
Re: Compliments and Knob Question, Brian, (Wed Dec 5, 5:22 am)
Re: Compliments and Knob Question, Craig Hammond, (Wed Dec 5, 1:10 am)
Re: Compliments and Knob Question, Jeremy Huiskamp, (Wed Dec 5, 12:56 am)
Re: Compliments and Knob Question, Edd Barrett, (Wed Dec 5, 5:23 am)
Re: Compliments and Knob Question, Brian, (Wed Dec 5, 1:35 am)
speck-geostationary