Slide 1

Slide 1 text

P R O M I S E N O T T O U S E P R O M I S E S F R P F U N C T I O N A L R E A C T I V E P R O G R A M M I N G F U N C T I O N A L P R O G R A M M I N G O V E R T I M E H AV I N G E M PAT H Y W H I L E T E A C H I N G P R O G R A M M I N G @holtbt

Slide 2

Slide 2 text

No content

Slide 3

Slide 3 text

WA I T, T H I S S O U N D S D I F F E R E N T • Talk is posted here: nho.lt/promise • Slides are posted here: nho.lt/promise-slides • The talk isn’t very empathetic • I’ll still address the main points at the end

Slide 4

Slide 4 text

No content

Slide 5

Slide 5 text

W H AT I A M N O T • A neuroscientist • A psychologist • A master of teaching

Slide 6

Slide 6 text

W H AT I A M • A developer • Empathetic (trying to be) • Taught thousands of people to code

Slide 7

Slide 7 text

No content

Slide 8

Slide 8 text

F U N D A M E N TA L T O G O O D T E A C H I N G I S H AV I N G C O M M O N D E F I N I T I O N S O F T E R M S (also the best marital advice I ever got: when arguing, argue about the same thing)

Slide 9

Slide 9 text

K N O W L E D G E : f a c t s , s k i l l s , t e c h n i q u e s , a n d e x p e r i e n c e re l a t e d t o p ro g r a m m i n g

Slide 10

Slide 10 text

A N O T H E R K E Y T O T E A C H I N G T O E S TA B L I S H A N D VA L I D AT E A S S U M P T I O N S (also good marital advice)

Slide 11

Slide 11 text

A S S U M P T I O N S • The student is a willing learner • You know enough to teach • You care more about the student learning than feeling smarter than the student

Slide 12

Slide 12 text

I D O N ’ T T H I N K I I N V E N T E D A N Y O F T H I S B U T T H I S I S M Y M E N TA L M O D E L O F H O W K N O W L E D G E A N D T E A C H I N G W O R K S

Slide 13

Slide 13 text

All Programming Knowledge

Slide 14

Slide 14 text

What You Know

Slide 15

Slide 15 text

W H AT Y O U K N O W • Represents the corner of programming you know. • This is only an infinitesimal corner of all knowledge available

Slide 16

Slide 16 text

What You Know What You Know You Don’t Know

Slide 17

Slide 17 text

W H AT Y O U K N O W Y O U D O N ’ T K N O W • You know the thing exists, you have the vocabulary to Google it and learn it • It’s within reach, just not yet grasped • Example: You understand while loops, you know do loops exist. With a bit of time and Googling, you could understand do loops

Slide 18

Slide 18 text

What You Know What You Know You Don’t Know What You Don’t Know You Don’t Know

Slide 19

Slide 19 text

W H AT Y O U D O N ’ T K N O W Y O U D O N ’ T K N O W • What you don’t even know exists • Knowledge totally out of reach • You can’t Google it because you don’t have the terminology to describe what you’d be looking for • Example: A person just learning about if statements doesn’t have the vocabulary to describe free monads

Slide 20

Slide 20 text

• Contributes to why less experienced devs overestimate their knowledge. • Contributes to why more experienced devs feel dumb a lot

Slide 21

Slide 21 text

S O W H Y I S T H I S R E L AT E D T O T E A C H I N G ?

Slide 22

Slide 22 text

What You Know You Don’t Know What You Don’t Know You Don’t Know What You Know

Slide 23

Slide 23 text

What You Know What you think you can teach well

Slide 24

Slide 24 text

What You Know What you can actually teach well

Slide 25

Slide 25 text

S H A R E D E X P E R I E N C E M A K E S E M PAT H Y H A R D E R

Slide 26

Slide 26 text

Felipe Micha

Slide 27

Slide 27 text

S H A R E D E X P E R I E N C E • A polar plunge is when you dive into freezing water. For some dumb reason ¯\_(ϑ)_/¯ • Micha was excited to do the polar plunge but chickened out at the last moment. Felipe isn’t sympathetic since he’d done it before. Felipe is an asshole. • People who had previously done a polar plunge were less sympathetic than those who had never done it

Slide 28

Slide 28 text

T H E E M PAT H Y G A P

Slide 29

Slide 29 text

A S H U M A N S W E ’ R E R E A L LY B A D AT R E C A L L I N G H O W PA I N F U L E X P E R I E N C E S W E R E

Slide 30

Slide 30 text

W E C H O O S E I N S T E A D T O R E M E M B E R T H AT W E O V E R C A M E T H E C H A L L E N G E A N D E X P E C T O T H E R S T O D O S O A S W E L L

Slide 31

Slide 31 text

F O R L O O P S • Your friend comes to you, telling you that he’s having trouble with for loops • Your answer: “Oh, that’s easy. Let me show you.”

Slide 32

Slide 32 text

F O R L O O P S • Your friend goes to his brother who doesn’t code and says he’s having trouble with for loops, a concept in programming. • His brother’s answer answer: “Oh, that sounds hard. I’m impressed you know so much.”

Slide 33

Slide 33 text

What You Know What you can actually teach well The empathy gap

Slide 34

Slide 34 text

T H E E M PAT H Y G A P • Bridging the empathy gap is a learned and practiced skill • You have to acknowledge that you no longer know what it feels like to learn a skill you already know • Learning to peel back the layers of what you know to teach someone using vocabulary they know is hard

Slide 35

Slide 35 text

. M A P ( ) • “Oh, it’s easy. You just take a function that transforms one value to another, pass that into map, and it’s transforms the array and gives you a transformed array.”

Slide 36

Slide 36 text

No content

Slide 37

Slide 37 text

No content

Slide 38

Slide 38 text

No content

Slide 39

Slide 39 text

No content

Slide 40

Slide 40 text

W E ’ R E TA K I N G A N D M A K I N G I T H A R D

Slide 41

Slide 41 text

P R I V I L E G E

Slide 42

Slide 42 text

What You Know What Your Student Knows Information Privilege

Slide 43

Slide 43 text

I N F O R M AT I O N P R I V I L E G E • Unlike gender, racial, ability, or other inherited trait privilege, your information privilege fluctuates constantly based on what the subject is

Slide 44

Slide 44 text

PA R L O I TA L I A N O

Slide 45

Slide 45 text

N I E M Ó W I Ę P O P O L S K U

Slide 46

Slide 46 text

I N F O R M AT I O N P R I V I L E G E • In two slides I went from a privileged perspective to a bottom of the information pyramid • You must learn to recognize your information privilege and overcome it

Slide 47

Slide 47 text

F U N C T I O N A L P R O G R A M M I N G • Oh, you need to use pure functions • Oh, you need a function without side effects • Oh, you need a function that doesn’t keep or modify any state • Oh, you need a function that given input(s) gives output • Oh, you need to use Haskell

Slide 48

Slide 48 text

No content

Slide 49

Slide 49 text

U S I N G J A R G O N A C T I V E LY P U T S D I S TA N C E B E T W E E N Y O U R S T U D E N T A N D U N D E R S TA N D I N G T H E C O N C E P T

Slide 50

Slide 50 text

E S 7 O B S E R VA B L E S P R O M I S E T O N O T U S E P R O M I S E S @ H O LT B T E S 2 0 1 6 E S 2 0 1 7 java s cr ip t LOL

Slide 51

Slide 51 text

A R R AY S • Arrays are groups of values • [0, 1, 2, 3, 4, 5, 7, 8, 9] • [‘Real Salt Lake’, ‘Seattle Sounders’, ‘LA Galaxy’]

Slide 52

Slide 52 text

U S I N G M A P • With map, we can transform entire arrays • [0, 2, 4, 6, 8, 10, 12, 14, 16, 18] • [‘REAL SALT LAKE’, ‘SEATTLE SOUNDERS’, ‘LA GALAXY’]

Slide 53

Slide 53 text

No content

Slide 54

Slide 54 text

W H AT I F Y O U H A D A N A R R AY T H AT J U S T A P P E A R E D O V E R T I M E ? • Instead of an array, where all your data is there, available already, your array is filled over time • Since we’re only applying a function, we can apply this function now or later • An observable is an array that appears over time

Slide 55

Slide 55 text

E X A M P L E S • [0 . . . . . . . . . 1 . 2 . . . . . . . . 3 . 4 . 5 . . . 6] • [‘Real Salt Lake’ . . . . . . . . . . ‘Seattle Sounders’ . . . . . . ‘LA Galaxy’]

Slide 56

Slide 56 text

E X A M P L E S • [0 . . . . . . . . . 2 . 4 . . . . . . . . 6 . 8 . 10 . . . 12] • [‘REAL SALT LAKE’ . . . . . . . . . . ‘SEATTLE SOUNDERS’ . . . . . . ‘LA GALAXY’]

Slide 57

Slide 57 text

No content

Slide 58

Slide 58 text

W E G E T T O T R E AT A R R AY S A N D O B S E R VA B L E S T H E S A M E WAY

Slide 59

Slide 59 text

W H Y N O T P R O M I S E S • Promises are great for representations of single, one-time async values, like AJAX requests • Promises suck for orchestration, chaining, multi-event, cancellation, or anything besides one-time, simple values • Suck to debug

Slide 60

Slide 60 text

W H Y O B S E R VA B L E S • Still suck to debug • Complex • Composable • Declarative • Able to model very complicated systems

Slide 61

Slide 61 text

O B S E R VA B L E S I S E S . N E X T ? • Yes • Maybe ES2018 if I had to take a guess • TC39 wants (cancelable) promises, observables, async/await, generators, and async iterators all to play nice with each other

Slide 62

Slide 62 text

@holtbt