syque.com

The Psychology of Quality and More

| Menu | Books | Share | Search | Settings |

C Style: Standards and Guidelines (contents)

CHAPTER 2 : Psychological Factors

PART 1 : BASICS

CHAPTER 2 : Psychological Factors

2.1 Pattern Recognition
2.2 Filtering
2.3 Habit
2.4 Redundancy
2.5 Cues and Context
2.6 Recognizing Basic features
2.7 Short Term, Working and Long Term memory
2.8 Chunking
2.9 The Rule of Seven
2.10 Context Switching
2.11 Modifying the image
2.12 Memorizing sounds
2.13 Eye focus
2.14 Eye movement
2.15 Looking ahead
2.16 Looking back
2.17 The subconscious is always right
2.18 Natural ambition
2.19 Summary

<--Prev page | Next page -->

 

2.9 The Rule of Seven

There is a rule of nature commonly known as the 'rule of seven'. This appears in grouping situations, where control is optimized around the seven mark. It appears in a wide number of situations, from the grouping of leaves on plants, to the number of layers in the OSI network model, to the number of layers of management in the Catholic church, to the number of chunks of information that the short-term memory can comfortably handle.

A simple application of this in programming is where there might be seven chunks of code in a function, each containing seven statements, thus giving a reasonable function size of around 49 lines.

The actual grouping count in many situations is actually rather inexact, and an extension to this rule is 'seven, plus or minus two'. Thus, if the size of a group is steadily increasing, when it gets to ten it can be broken into two independent groups of five, each of which now fits back into the bottom end of the five to nine range. Applying this to the previous example gives a function size range of between 25 and 100 lines.

 

<--Prev page | Next page -->

 

Site Menu

| Home | Top | Settings |

Quality: | Quality Toolbook | Tools of the Trade | Improvement Encyclopedia | Quality Articles | Being Creative | Being Persuasive |

And: | C Style (Book) | Stories | Articles | Bookstore | My Photos | About | Contact |

Settings: | Computer layout | Mobile layout | Small font | Medium font | Large font | Translate |

 

You can buy books here

More Kindle books:

And the big
paperback book


Look inside

 

Please help and share:

 

| Home | Top | Menu |

© Changing Works 2002-
Massive Content -- Maximum Speed