Ockham's razor

Plurality should not be posited without necessity.

Ockham's razor or the law of parsimony (lex parsimoniae) is a problem solving principle devised by William of Ockham, who was an Franciscan friar, scholastic philosopher and theologian.

The principle gives precedence to simplicity: of two competing theories the one with the least assumptions should be chosen.

There are various justifications for Ockham's razor, based on induction, logic and probability theory. But the basic idea behind all can be summed up with 

Fewer assumptions lead to lesser statistical noise (or fewer possibilities of error).

This law can also be applied to software architecture and design by the following rule.

With two competing patterns of implementation, the one with fewer layers or variables should be chosen.

It is important to understand that alternatives need to be fully evaluated in terms of maintainability, performance and future extensibility. If competing alternatives are sufficiently equivalent on these parameters, they can be evaluated by Ockham's razor.

Diagnostic parsimony advocates that when diagnosing a ailment, a doctor should strive to look for the fewest possible causes that account for all symptoms. The same logic could be extended to debugging defects in software. An engineer should look for the fewest possible causes for a defect. This should help in finding the shortest possible path to fixing a defect. And should also help engineers to look at multiple defects at a higher level to see if the defect is caused by a error in implementation or there is a larger impact due to a choice of a design pattern.

要查看或添加评论,请登录

Adrain P.的更多文章

  • JavaScript applications without a framework

    JavaScript applications without a framework

    A lengthy background More than a decade ago, I was co-leading a project where we were building a web mail application…

  • 1950s House to Zero Energy Home

    1950s House to Zero Energy Home

    Two years ago we bought an old 1060 square feet house which was built in 1954. Since the time it was built, there were…

  • Interface inheritance vs Implementation inheritance

    Interface inheritance vs Implementation inheritance

    Implementation inheritance is a relationship where a child class inherits behaviour implementation from a base class…

    2 条评论

社区洞察

其他会员也浏览了