eighty-twenty rule

eighty-twenty rule

(programming)The program-design version of the law ofdiminishing returns. The 80/20 rule says that roughly 80% ofthe problem can be solved with 20% of the effort that it wouldtake to solve the whole problem.

For example, parsing e-mail addresses in "From:" lines ine-mail messages is notoriously difficult if you follow the RFC2822 specification. However, about 60% of actual "From:"lines are in the format "From: Their Name ", with afar more constrained idea of what can be in "user" or "host"than in RFC 2822. Another 25% just add double-quotes around"Their Name". Matching just those two patterns would thuscover 85% of "From:" lines, with a tiny portion of the coderequired to fully implement RFC2822.

(Adding support for "From: user@host" and "From: user@host(Their Name) " brings coverage to almost 100%, leaving onlyreally baroque things that RFC-2822 permits, like "From:Pete(A wonderful \\) chap)
It is an eternal question whether too much attention is paidto the 80/20 rule (leading to systems that are irrevocablybroken for "unusual" cases), or too little (leading to systemsthat sacrifice usability in the typical case, just so thatrare cases can work properly).

Compare: KISS Principle