What if your brain were ~* literally *~ JavaScript? Jenna Zeigen - - PowerPoint PPT Presentation

what if your brain were literally javascript
SMART_READER_LITE
LIVE PREVIEW

What if your brain were ~* literally *~ JavaScript? Jenna Zeigen - - PowerPoint PPT Presentation

What if your brain were ~* literally *~ JavaScript? Jenna Zeigen RejectJS 2015 Engineering Manager @ DigitalOcean zeigenvector jenna.is/rejectjs Human JavaScript \_( )_/ (* *) Language& Imagery&


slide-1
SLIDE 1

What if your brain were ~*literally*~ JavaScript?

Jenna Zeigen RejectJS 2015

slide-2
SLIDE 2

zeigenvector Engineering Manager @ DigitalOcean

slide-3
SLIDE 3

jenna.is/rejectjs

slide-4
SLIDE 4

Human JavaScript

slide-5
SLIDE 5

¯\_(ツ)_/¯ ヽ(*‿*)ノ

slide-6
SLIDE 6

Language& Imagery& Perception& Thinking& Concepts& Categories& Memory& Attention& Judgement& Reasoning& Decision Making& Consciousness…

slide-7
SLIDE 7

Language& Imagery& Perception& Thinking& Concepts& Categories& Memory& Attention& Judgement& Reasoning& Decision Making& Consciousness…

slide-8
SLIDE 8
  • 1. Human Language vs. Programming Languages
  • 2. Human Concepts + Categories vs. JavaScript

Prototypes + Primitives

  • 3. Human Attention vs. the JavaScript event loop
slide-9
SLIDE 9

Language

slide-10
SLIDE 10

Language

natural language vs. programming language

  • regulation
  • evolution
  • learning
slide-11
SLIDE 11

Language

Programming languages

create and manipulate the

environment, rather than just describe it.

slide-12
SLIDE 12

Language

Humans JavaScript syntax semantics morphology phonology pragmatics

slide-13
SLIDE 13

Language

Humans JavaScript syntax semantics morphology phonology pragmatics

slide-14
SLIDE 14

Language

Humans JavaScript syntax semantics morphology phonology pragmatics

slide-15
SLIDE 15

Language context.

http://www.ecma-international.org/ecma-262/6.0/index.html#sec-syntactic-and-lexical-grammars

slide-16
SLIDE 16

Language

“I saw the unicorn with the binoculars.”

slide-17
SLIDE 17

Language

“I saw the unicorn with the binoculars.”

slide-18
SLIDE 18

Language context.

slide-19
SLIDE 19

Language

https://en.wikipedia.org/wiki/Anaphora_(linguistics)

Reference: pronouns + variables

slide-20
SLIDE 20

Anaphora: “Jenna gave a talk on the cognitive science of JavaScript, and she totally rocked it.” she it talk Jenna

Language

slide-21
SLIDE 21

Cataphora: “Since she was there last year, Jenna was excited to visit Berlin.” Berlin she there Jenna

Language

slide-22
SLIDE 22

Language

slide-23
SLIDE 23

Language

Reference: pronouns + JavaScript’s this

slide-24
SLIDE 24

Language

http://www.ecma-international.org/ecma-262/6.0/index.html#sec-error-handling-and-language-extensions

slide-25
SLIDE 25

Language

http://www.ecma-international.org/ecma-262/6.0/index.html#sec-error-handling-and-language-extensions

slide-26
SLIDE 26

Concepts + Categories

slide-27
SLIDE 27

“knowledge representation”

Concepts + Categories

slide-28
SLIDE 28

http://www.photogalaxy.com/pic/eventhorizon-20/yorkie_puppy.jpg

Concepts + Categories

slide-29
SLIDE 29

http://www.photogalaxy.com/pic/eventhorizon-20/yorkie_puppy.jpg

Concepts + Categories

slide-30
SLIDE 30

Concepts + Categories

classical vs. prototypal

(inheritance)

classical vs. prototype

(categorization theories)

slide-31
SLIDE 31

Concepts + Categories

classical vs. prototypal

(inheritance)

classical vs. prototype

(categorization theories)

coincidence? ¯\_(ツ)_/¯

slide-32
SLIDE 32

Concepts + Categories

“In a computer system designed for the storage of semantic information, it is more economical to store generalized information with superset nodes, rather than with all the individual nodes to which such a generalization might apply. But such a storage system incurs the cost of additional processing time in retrieving the information. When the implications of such a model were tested for human [subjects] using well-ordered hierarchies that are part of the common culture, there was a substantial agreement between the predictions and the data.” (Collins & Quillian, 1969)

slide-33
SLIDE 33

Animal Bird Fish Canary Ostrich Shark Salmon

  • Has skin
  • Can move around
  • Eats
  • Breathes
  • Has fins
  • Can swim
  • Has gills
  • Has wings
  • Can fly
  • Has feathers
  • Can sing
  • Is yellow
  • Has long, thin legs
  • Is tall
  • Can’t fly
  • Can bite
  • Is dangerous
  • Is pink
  • Is edible
  • Swims upstream to

lay eggs

Collins & Quillian, 1969

slide-34
SLIDE 34

Animal Bird Fish Canary Ostrich Shark Salmon

  • Has skin
  • Can move around
  • Eats
  • Breathes
  • Has fins
  • Can swim
  • Has gills
  • Has wings
  • Can fly
  • Has feathers
  • Can sing
  • Is yellow
  • Has long, thin legs
  • Is tall
  • Can’t fly
  • Can bite
  • Is dangerous
  • Is pink
  • Is edible
  • Swims upstream to

lay eggs

Collins & Quillian, 1969

Is a canary a bird?

slide-35
SLIDE 35

Animal Bird Fish Canary Ostrich Shark Salmon

  • Has skin
  • Can move around
  • Eats
  • Breathes
  • Has fins
  • Can swim
  • Has gills
  • Has wings
  • Can fly
  • Has feathers
  • Can sing
  • Is yellow
  • Has long, thin legs
  • Is tall
  • Can’t fly
  • Can bite
  • Is dangerous
  • Is pink
  • Is edible
  • Swims upstream to

lay eggs

Collins & Quillian, 1969

Is a canary an animal?

slide-36
SLIDE 36

Animal Bird Fish Canary Ostrich Shark Salmon

  • Has skin
  • Can move around
  • Eats
  • Breathes
  • Has fins
  • Can swim
  • Has gills
  • Has wings
  • Can fly
  • Has feathers
  • Can sing
  • Is yellow
  • Has long, thin legs
  • Is tall
  • Can’t fly
  • Can bite
  • Is dangerous
  • Is pink
  • Is edible
  • Swims upstream to

lay eggs

Collins & Quillian, 1969

Is a canary yellow?

slide-37
SLIDE 37

Animal Bird Fish Canary Ostrich Shark Salmon

  • Has skin
  • Can move around
  • Eats
  • Breathes
  • Has fins
  • Can swim
  • Has gills
  • Has wings
  • Can fly
  • Has feathers
  • Can sing
  • Is yellow
  • Has long, thin legs
  • Is tall
  • Can’t fly
  • Can bite
  • Is dangerous
  • Is pink
  • Is edible
  • Swims upstream to

lay eggs

Collins & Quillian, 1969

Does a canary breathe?

slide-38
SLIDE 38

Concepts + Categories

Is a shark a fish?

slide-39
SLIDE 39

Concepts + Categories

Prototype theory (Rosch, 1973):

  • we store an average ideal representation of a category

Exemplar theory

  • we store an instance of a category that is a

combination of all experienced exemplars

slide-40
SLIDE 40

Concepts + Categories

Basic Level Categories:

A “natural” level of categorization

slide-41
SLIDE 41

Animal Canary Ostrich Shark Salmon

  • Has skin
  • Can move around
  • Eats
  • Breathes
  • Has fins
  • Can swim
  • Has gills
  • Has wings
  • Can fly
  • Has feathers
  • Can sing
  • Is yellow
  • Has long, thin legs
  • Is tall
  • Can’t fly
  • Can bite
  • Is dangerous
  • Is pink
  • Is edible
  • Swims upstream to

lay eggs

Collins & Quillian, 1969

Bird Fish

slide-42
SLIDE 42

Concepts + Categories

Basic Level Categories:

ECMAScript language types? (Boolean, Null, Undefined, Number, String, Symbol)

http://www.ecma-international.org/ecma-262/6.0/index.html#sec-ecmascript-data-types-and-values

slide-43
SLIDE 43

Concepts + Categories

Basic Level Categories:

ECMAScript language types? (Boolean, Null, Undefined, Number, String, Symbol)

http://www.ecma-international.org/ecma-262/6.0/index.html#sec-ecmascript-data-types-and-values

slide-44
SLIDE 44

Concepts + Categories

Basic Level Categories:

ECMAScript types? (Boolean, Null, Undefined, Number, String, Symbol)

http://www.ecma-international.org/ecma-262/6.0/index.html#sec-ecmascript-data-types-and-values

slide-45
SLIDE 45

Concepts + Categories

http://www.ecma-international.org/ecma-262/6.0/index.html#sec-ecmascript-data-types-and-values

Basic Level Categories:

But what about Arrays? Functions? Dates? Promises?

slide-46
SLIDE 46

Concepts + Categories

http://www.ecma-international.org/ecma-262/6.0/index.html#sec-ecmascript-data-types-and-values

“Well-Known Intrinsic Objects” Basic Level Categories:

But what about Arrays? Functions? Dates? Promises?

slide-47
SLIDE 47
slide-48
SLIDE 48

Attention

slide-49
SLIDE 49

Attention

  • attention as a filter
  • attention as a spotlight
  • attention as glue
  • attention as control
slide-50
SLIDE 50

Attention

blue green red

  • range
slide-51
SLIDE 51

Attention

  • attention as a filter
  • attention as a spotlight
  • attention as glue
  • attention as control
slide-52
SLIDE 52

Attention

Attention as threads!

  • attention as a filter
  • attention as a spotlight
  • attention as glue
  • attention as control
slide-53
SLIDE 53

Attention

Humans are pretty bad at multitasking:

  • inattentional blindness
  • dichotic listening task
  • shadowing

(Simons, 1999; Cherry, 1953; Triesman, 1964; Allport et al., 1972 )

slide-54
SLIDE 54

Attention

(Simons, 1999; Cherry, 1953; Triesman, 1964; Allport et al., 1972 )

“These are the words you aren’t supposed to be listening to.” “These are the words you need to repeat back.” “These are the words you need to repeat back.”

slide-55
SLIDE 55

Attention

(Simons, 1999; Cherry, 1953; Triesman, 1964; Allport et al., 1972 )

“These are the words you need to repeat back.” “Words these are the aren’t supposed to you be to listening.” “These are the words you need to repeat back.”

slide-56
SLIDE 56

Attention

(Simons, 1999; Cherry, 1953; Triesman, 1964; Allport et al., 1972 )

“These are the words you need to repeat back.”

slide-57
SLIDE 57

Attention

(Simons, 1999; Cherry, 1953; Triesman, 1964; Allport et al., 1972 )

DOG

“These are the words you need to repeat back.”

slide-58
SLIDE 58

Attention

(Simons, 1999; Cherry, 1953; Triesman, 1964; Allport et al., 1972 )

“dog” “These are the words you need to repeat back.”

slide-59
SLIDE 59

Attention

Humans are pretty bad at multitasking:

  • inattentional blindness
  • dichotic listening task
  • shadowing

task-specific resources

(Simons, 1999; Cherry, 1953; Triesman, 1964; Allport et al., 1972 )

slide-60
SLIDE 60

Attention

JavaScript does not multitask.

  • single-threaded
  • non-blocking
  • asynchronous
slide-61
SLIDE 61
slide-62
SLIDE 62

http://itsadventuretimepeasants.tumblr.com/

slide-63
SLIDE 63

Thanks!

Me, @zeigenvector