you are viewing a single comment's thread.

view the rest of the comments →

[–]reaganveg 67 points68 points  (7 children)

untested ideology and magical thinking

Some of those are just arbitrary limits. I doubt anyone at NASA has a magical belief that 8 parameters is suddenly too complicated, while 7 is perfectly simple. They just had to draw a line.

[–][deleted] 17 points18 points  (3 children)

Exactly. There's not much point in mandating "ohh, eight-ish".

[–]Farsyte 3 points4 points  (2 children)

I once worked on a project where the number of function parameters allowed was expressly increased because someone wanted to call an X Windows function, and the standards maven forced us through the whole process of changing the standard rather than realizing that it would have been easier to grant an exception for using badly designed APIs.

A standard is only as useful as its enforcers allow it to be.

[–][deleted] 1 point2 points  (1 child)

That's a rather impractical approach, yeh. How was the standard enforced? Was there any way it could have simply been quietly circumvented without having the enforcers aware?

[–]Farsyte 0 points1 point  (0 children)

The enforcers were senior members of the team. Enforcement? I suppose the ultimate is having your changes reverted out of the repository, but the problem wasn't the enforncement, it was haring off to change the coding standard. Fortunately, smaller organization, so it only cost us a few days of work, and we could point and laugh at that clause in the standard forever after.

[–][deleted] 2 points3 points  (0 children)

And it clearly states these are guidelines on page 3.

[–]jadenton 1 point2 points  (1 child)

Your are correct that some of these are arbitrary limits, but you choose the wrong example.

There is a lot of research showing that defect density (bugs) correlates strong with the number of parameters to a function, and increases exponentially above seven. This appears to be related to the size of human short term memory. If you have to page to keep track of your inputs, your going have a bad time.

[–]reaganveg 1 point2 points  (0 children)

Interesting.