If you have a procedure with 10 parameters, you probably missed some.
About this quote
- What does it mean?
- Complex procedures often fail because they try to do too much.
- In plain terms
- Too many parameters mean the code is too complex.
- What can you take from it?
- Simplify functions by reducing parameters.
Where it applies
Putting it to work
Questions to consider
- Is your function too big?
- Can you group these inputs?
Another view
Sometimes many parameters are necessary for APIs.
More from Alan Perlis
If a listener nods his head when you're explaining your program, wake him up.
Permalink to quote #10 In computing, turning the obvious into the useful is a living definition of the word 'frustration'.
Permalink to quote #12 I think it is inevitable that people program poorly. Training will not substantially help matters. We have to learn to live with it.
Permalink to quote #9
Related quotes
Science may be described as the art of systematic over-simplification - the art of discerning what we may with advantage omit.
Karl PopperKarl Popper quote #8 Everything is explicable in the terms of the behavior of a small child.
Stanislaw LemStanislaw Lem quote #14 There are probably better ways to do that, but it would make the parser more complex. I do, occasionally, struggle feebly against complexity... :-)
Larry WallLarry Wall quote #23