Defining Programming Standards   
for Professional Programmers 
  

         

Home

Contents

1: Standards

2: Psychological Factors

3: General Principles

4: Commenting

5: Naming

6: Code Layout

7: File Layout

8: Language Usage

9: Data Usage

10: Programming Usage

11: Implementing Standards

A: Example Standard

B: References

C: Glossary

Syque

About

Share this page:

Google
C Style
syque.com
Web

 

 

Books and
more at:

USA:

In association with amazon.com

UK:

In Association with Amazon.co.uk

Canada:

In Association with amazon.ca

 

 

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.5 Cues and Context

The brain is also good at guessing patterns, especially given the start of a known pattern. The moment that a pattern starts, the brain immediately takes this as a cue. It starts trying to predict the rest of the pattern by fitting all known continuations to the given start-piece of pattern. Thus if you read the following sentence, one word at a time:

 

"As I lead him by the nose, he believes every word I tell him."

 

From the very beginning, "As I", you have pictures of yourself, or a previously described first party. "lead" has two pronunciation and meanings - it appears to be a present-tense verb here (although the metal 'lead' could associate with the past tense 'led' and cause confusion); "him" makes a male, but is he human? a dog?; "by the nose" gives images of bulls; "as he believes" makes "him" human (bulls aren't that clever); "every word I tell him" shows the early part of the sentence to be a figure of speech and makes the whole sentence intelligible.

By using clear sentences and structure, we can avoid ambiguities and confusion from the first part of the sentence to the end. For example, a very simple rearrangement of the above sentence may make understanding a little easier:

 

"He believes every word I tell him, as I lead him by the nose."

 

This sentence by itself is not very informative, as the rest of the story is not present. It is the greater context which gives sense to the individual words and sentences. Understanding is a function of both words and context.

Similarly, when reading a program, there must be sufficient surrounding information to be able to make sense of the individual lines of code, functions and modules. This informations must also be clear, avoiding ambiguous words and phrases.

 

<--Prev page | Next page -->

 

 

  © Syque 1995-2010

Massive Content -- Maximum Speed