Writing Code for Other People Tom Mullen The barriers and techniques of human intelligence are starting to be uncovered by psychologists. There are remarkable.

Slides:



Advertisements
Similar presentations
Design Patterns.
Advertisements

Architecture Representation
Cmput Lecture 8 Department of Computing Science University of Alberta ©Duane Szafron 2000 Revised 1/26/00 The Java Memory Model.
CSCI 3 Introduction to Computer Science. CSCI 3 Course Description: –An overview of the fundamentals of computer science. Topics covered include number.
Topic: Theoretical Bases for Cognitive Method Objectives Trainees will be able to give reasons for the design and procedures of the Cognitive Method.
Computer Science: A Structured Programming Approach Using C1 Objectives ❏ To understand the structure of a C-language program. ❏ To write your first C.
L6-1-S1Design Heuristics - 1 © M.E. Fayad SJSU -- CmpE Software System Engineering Dr. M.E. Fayad, Professor Computer Engineering Department,
5.0 Objects First with Java A Practical Introduction using BlueJ David J. Barnes Michael Kölling.
Computer Systems & Architecture Lesson Software Product Lines.
Cognitive level of Analysis
Chapter 6– Artifacts of the process
Define critical thinking and discuss why it is an important topic to be addressed by today's educators. How is critical thinking similar to and different.
SEC(R) 2008 Intel® Concurrent Collections for C++ - a model for parallel programming Nikolay Kurtov Software and Services.
1 CSC 221: Computer Programming I Fall 2004 course overview  what did we set out to learn?  what did you actually learn?  where do you go from here?
Systems Analysis and Design in a Changing World, Fifth Edition
Lesson One: Intro to Cognitive Psychology Specification A – Models of Memory 1.The multi-store model including concepts of encoding, capacity and duration.
ARTIFICIAL INTELLIGENCE [INTELLIGENT AGENTS PARADIGM] Professor Janis Grundspenkis Riga Technical University Faculty of Computer Science and Information.
Chapter 6 System Engineering - Computer-based system - System engineering process - “Business process” engineering - Product engineering (Source: Pressman,
Knowledge and Memory: How we conceptualize information.
5.0 Objects First with Java A Practical Introduction using BlueJ Introduction to Computer Science I Instructor: Allyson Anderson.
Introduction to MDA (Model Driven Architecture) CYT.
A performance evaluation approach openModeller: A Framework for species distribution Modelling.
Psychology of Thinking: Embedding Artifice in Nature.
Structural Modeling. Objectives O Understand the rules and style guidelines for creating CRC cards, class diagrams, and object diagrams. O Understand.
Human-Computer Interaction
SOFTWARE DESIGN AND ARCHITECTURE LECTURE 05. Review Software design methods Design Paradigms Typical Design Trade-offs.
Software Design Design is the process of applying various techniques and principles for the purpose of defining a device, a process,, or a system in sufficient.
GRASP: Designing Objects with Responsibilities
Lecture 6: Structural Modeling
SOFTWARE DESIGN. INTRODUCTION There are 3 distinct types of activities in design 1.External design 2.Architectural design 3.Detailed design Architectural.
Software Design: Principles, Process, and Concepts Getting Started with Design.
An Overview of a Well-Structured Essay. Before We Get Started... 4 Guiding Principles: –Structure –Organization –Communication.
Article Summary of The Structural Complexity of Software: An Experimental Test By Darcy, Kemerer, Slaughter and Tomayko In IEEE Transactions of Software.
1 CSC 221: Computer Programming I Spring 2008 course overview  What did we set out to learn?  What did you actually learn?  Where do you go from here?
Learning to Share Meaning in a Multi-Agent System (Part I) Ganesh Padmanabhan.
9-Dec Dec-15  INTRODUCTION.  FEATURES OF OOP.  ORGANIZATION OF DATA & FUNCTION IN OOP.  OOP’S DESIGN.
Higher Mental Function: Information Processing Scott S. Rubin, Ph.D. Neuroscience.
The “chunking” THEORIEs
Cognitive Science Overview Introduction, Syllabus
Minds and Computers Discovering the nature of intelligence by studying intelligence in all its forms: human and machine Artificial intelligence (A.I.)
Introduction to Computer Programming using Fortran 77.
Review A program is… a set of instructions that tell a computer what to do. Programs can also be called… software. Hardware refers to… the physical components.
6.0 Objects First with Java A Practical Introduction using BlueJ David J. Barnes Michael Kölling.
11 Systems Analysis and Design in a Changing World, Fifth Edition.
MT311 Java Application Development and Programming Languages Li Tak Sing( 李德成 )
Intelligent Database Systems Lab 國立雲林科技大學 National Yunlin University of Science and Technology Advisor : Dr. Hsu Graduate : Yu Cheng Chen Author: Michael.
Software Metrics 1.
Objects First with Java A Practical Introduction using BlueJ
Understand the Fundamentals of Classes
CSC 221: Computer Programming I Spring 2010
Cognitive Psychology Memory
Chapter 7 Psychology: Memory.
CSC 221: Computer Programming I Fall 2005
Intro To Classes Review
Reasoning deduction, induction, abduction Problem solving
BASICS OF SOFTWARE TESTING Chapter 1. Topics to be covered 1. Humans and errors, 2. Testing and Debugging, 3. Software Quality- Correctness Reliability.
Apply Expert, Creator, Controller, Low Coupling, High Cohesion
The Object Oriented Approach to Design
Problem Solving (design of programs) CS140: Introduction to Computing 1 8/26/13.
Objects First with Java A Practical Introduction using BlueJ
INFS 6225 – Object-Oriented Systems Analysis & Design
IFIP16/ICEUT2000 Integrated Visualization-based Environment for Computer Science Education Kimio Sugita, Youzou Miyadera Kensei Tsuchida, Takeo Yaku I.
Defining Classes and Methods
Objects First with Java A Practical Introduction using BlueJ
Cognitive Level of Analysis: Cognitive Processes
Adaptive multi-voxel representation of stimuli, rules and responses
Psychology of Thinking: Embedding Artifice in Nature
Use of Models to explain behaviour
Objects First with Java A Practical Introduction using BlueJ
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...

Overview Cognitive Psychology (Chunking and Memory) Analogies  Psychologists Definition  Code Structures Fundamental Metric Using the Cognitive Model

Overview Cognitive Psychology (Chunking and Memory) Analogies  Psychologists Definition  Code Structures Fundamental Metric Using the Cognitive Model

Elements of Cognitive Psychology

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 Memory STM Capacity Limit  CRC Model  Refactoring STM Time Limit  Indirection cost

LTM Structure Discrimination Nets

Cognitive Model

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).

Overview Cognitive Psychology (Chunking and Memory) Analogies  Psychologists Definition  Code Structures Fundamental Metric Using the Cognitive Model

Overview Cognitive Psychology (Chunking and Memory) Analogies  Psychologists Definition  Code Structures Fundamental Metric Using the Cognitive Model

Analogies

Meeting Room Analogy

Gentner Classification

Overview Cognitive Psychology (Chunking and Memory) Analogies  Psychologists Definition  Code Structures Fundamental Metric Using the Cognitive Model

Analogy Template

Analogy Patterns in Software

Analogy Patterns in Software Attribute Only [Map] Map exchangeCountry = new HashMap(); exchangeCountry.put("CBOT","US"); exchangeCountry.put("LIFFE","England"); Na Aa Nv Av

Analogy Patterns in Software Statement Shape p rivate boolean isValid() { if (expirationDate == null || !( expirationDate.getTime() > 0 ) ) return false; if (contractNumber == null || !(contractNumber.longValue() > 0) ) return false;

Analogical Translations

Analogy Patterns in Software Method Name (Prefix) public void visitExpression(Node a){}; public void visitBlock(Node a){}; public void visitFile(Node a){};

Analogy Patterns in Software Application Level Running Instances are Literal Similarities of one another. Configuration details the attributes IOC mechanisms allow operations

Overview Cognitive Psychology (Chunking and Memory) Analogies  Psychologists Definition  Code Structures Fundamental Metric Using the Cognitive Model

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 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 “… more what you’d call ‘guidelines’ than actual rules” – Capt. Barbossa, Pirates of the Caribbean: The Curse of the Black Pearl

Overview Cognitive Psychology (Chunking and Memory) Analogies  Psychologists Definition  Code Structures Fundamental Metric 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 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. Questions?