writing code for other people tom mullen l.
Download
Skip this Video
Loading SlideShow in 5 Seconds..
Writing Code for Other People Tom Mullen PowerPoint Presentation
Download Presentation
Writing Code for Other People Tom Mullen

Loading in 2 Seconds...

play fullscreen
1 / 30

Writing Code for Other People Tom Mullen - PowerPoint PPT Presentation


  • 186 Views
  • Uploaded on

The barriers and techniques of human intelligence are starting to be uncovered by psychologists. There are remarkable parallels between the cognitive model and principles established by software designers.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about 'Writing Code for Other People Tom Mullen' - Samuel


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
writing code for other people tom mullen

The barriers and techniques of human intelligence are starting to be uncovered by psychologists. There are remarkable parallels between the cognitive model and principles established by software designers.

It is as if the jigsaw puzzle that software designers have been working on has been turned over to reveal another picture on the back, the very same picture that psychologists have been building...

Writing Code for Other PeopleTom Mullen
overview
Overview
  • Cognitive Psychology (Chunking and Memory)
  • Analogies
    • Psychologists Definition
    • Code Structures
  • Fundamental Metric
  • Using the Cognitive Model
overview3
Overview
  • Cognitive Psychology (Chunking and Memory)
  • Analogies
    • Psychologists Definition
    • Code Structures
  • Fundamental Metric
  • Using the Cognitive Model
chunking and memory
Chunking and Memory
  • A chunk is “a collection of memory elements having strong associations with one another but weak associations with elements within other chunks”
  • Structured Design Principle: “maximise cohesion and reduce coupling”
chunking and memory6
Chunking and Memory
  • STM Capacity Limit
    • CRC Model
    • Refactoring
  • STM Time Limit
    • Indirection cost
summary
Summary

Conjecture: Current software languages and design principles guide a programmer to produce code that is a direct textual representation of the memory network of the solution within the brain (subject to the constraints of short term memory).

overview10
Overview
  • Cognitive Psychology (Chunking and Memory)
  • Analogies
    • Psychologists Definition
    • Code Structures
  • Fundamental Metric
  • Using the Cognitive Model
overview11
Overview
  • Cognitive Psychology (Chunking and Memory)
  • Analogies
    • Psychologists Definition
    • Code Structures
  • Fundamental Metric
  • Using the Cognitive Model
overview15
Overview
  • Cognitive Psychology (Chunking and Memory)
  • Analogies
    • Psychologists Definition
    • Code Structures
  • Fundamental Metric
  • Using the Cognitive Model
analogy patterns in software attribute only map
Analogy Patterns in SoftwareAttribute Only [Map]
  • Map exchangeCountry = new HashMap();
  • exchangeCountry.put("CBOT","US");
  • exchangeCountry.put("LIFFE","England");
  • Na Aa Nv Av
analogy patterns in software statement shape
Analogy Patterns in SoftwareStatement Shape
  • private boolean isValid()
  • {
  • if (expirationDate== null ||
  • !( expirationDate.getTime() > 0 ) )
  • return false;
  • if (contractNumber == null ||
  • !(contractNumber.longValue() > 0) )
  • return false;
analogy patterns in software method name prefix
Analogy Patterns in SoftwareMethod Name (Prefix)
  • public void visitExpression(Node a){};
  • public void visitBlock(Node a){};
  • public void visitFile(Node a){};
analogy patterns in software application level
Analogy Patterns in SoftwareApplication Level
  • Running Instances are Literal Similarities of one another.
  • Configuration details the attributes
  • IOC mechanisms allow operations
overview23
Overview
  • Cognitive Psychology (Chunking and Memory)
  • Analogies
    • Psychologists Definition
    • Code Structures
  • Fundamental Metric
  • Using the Cognitive Model
parlay
Parlay?
  • In Pirates of the Caribbean what was Captain Barbossa's response to Elizabeth Swan's demand that the Pirate Code required him to put her ashore safely?
4 minus analogies rule
4 minus Analogies Rule

The core fundamental metric of software de-sign is that software should be chunked in elements of four (or fewer) after allowing for any number of varieties of analogies.

the pirate code
The Pirate Code
  • “… more what you’d call ‘guidelines’ than actual rules”
  • – Capt. Barbossa, Pirates of the Caribbean: The Curse of the Black Pearl
overview28
Overview
  • Cognitive Psychology (Chunking and Memory)
  • Analogies
    • Psychologists Definition
    • Code Structures
  • Fundamental Metric
  • Using the Cognitive Model
using the cognitive model
Using the Cognitive Model
  • Can be taught using life experiences
  • Is the foundation of software design principles
  • Design principles still need to be learned!
  • Use to discover new principles?
conclusion
Conclusion
  • Cognitive Psychology: Detailed the strong mapping between the cognitive model and design principles.
  • Chunking Analogies: The two primary disciplines in good software design are:
    • recognising & coding analogies
    • chunking.
  • Used these results to discover the “4 minus analogies” rule.

tom@tom-mullen.com Questions? http://www.chunkinganalogies.com