WEBVTT

1
00:00:05.100 --> 00:00:12.600
<00:00:05.100>It <00:00:06.500>thanks.

2
00:00:09.600 --> 00:00:13.000
Hello

3
00:00:12.200 --> 00:00:16.800
<00:00:12.200>for <00:00:12.479>the <00:00:12.760>introduction. <00:00:13.040>Yes, <00:00:13.319>so <00:00:13.600>I'm

4
00:00:15.800 --> 00:00:18.100
<00:00:15.800>glad <00:00:16.266>at <00:00:16.733>so <00:00:17.200>many

5
00:00:18.100 --> 00:00:21.300
<00:00:18.100>people <00:00:18.207>of <00:00:18.315>you <00:00:18.423>are <00:00:18.530>here. <00:00:18.638>So <00:00:18.746>I <00:00:18.853>have <00:00:18.961>to <00:00:19.069>walk <00:00:19.176>back <00:00:19.284>on <00:00:19.392>promise <00:00:19.500>on

6
00:00:21.300 --> 00:00:24.200
<00:00:21.300>the <00:00:21.427>abstract. <00:00:21.554>So <00:00:21.681>I <00:00:21.809>cannot <00:00:21.936>build <00:00:22.063>the <00:00:22.190>entire <00:00:22.318>data <00:00:22.445>pipeline <00:00:22.572>scratch <00:00:22.700>because

7
00:00:24.200 --> 00:00:27.100
<00:00:24.200>you <00:00:24.355>only <00:00:24.511>have <00:00:24.666>25 <00:00:24.822>minutes <00:00:24.977>and <00:00:25.133>I <00:00:25.288>also <00:00:25.444>have <00:00:25.599>to

8
00:00:27.100 --> 00:00:30.200
<00:00:27.100>motivate <00:00:27.227>a <00:00:27.354>bit <00:00:27.481>of <00:00:27.609>the <00:00:27.736>stuff <00:00:27.863>that <00:00:27.990>we're <00:00:28.118>doing, <00:00:28.245>but <00:00:28.372>I <00:00:28.500>can

9
00:00:30.200 --> 00:00:33.400
<00:00:30.200>promise <00:00:30.300>you <00:00:30.400>that <00:00:30.500>I'm <00:00:30.599>going <00:00:30.700>to <00:00:30.800>show <00:00:30.900>you <00:00:31.000>the <00:00:31.099>type <00:00:31.200>of <00:00:31.300>the <00:00:31.400>data <00:00:31.500>Pipeline <00:00:31.599>and

10
00:00:33.400 --> 00:00:36.400
<00:00:33.400>who <00:00:33.516>cares <00:00:33.633>about <00:00:33.750>implementation. <00:00:33.866>Anyway, <00:00:33.983>if <00:00:34.100>you <00:00:34.216>type <00:00:34.333>checks, <00:00:34.449>right, <00:00:34.566>it's <00:00:34.683>fine. <00:00:34.800>Nobody

11
00:00:36.400 --> 00:00:39.700
<00:00:36.400>needs <00:00:36.574>to <00:00:36.750>run <00:00:36.925>it. <00:00:37.100>So <00:00:37.275>let's <00:00:37.449>let's <00:00:37.625>dive <00:00:37.800>straight

12
00:00:39.700 --> 00:00:42.500
<00:00:39.700>in <00:00:39.980>and <00:00:40.260>how <00:00:40.540>many <00:00:40.820>here <00:00:41.100>of

13
00:00:42.500 --> 00:00:43.800
<00:00:42.500>you <00:00:42.792>have <00:00:43.085>already <00:00:43.377>used <00:00:43.669>typescript

14
00:00:45.700 --> 00:00:48.700
<00:00:45.700>Wow, <00:00:45.933>okay, <00:00:46.166>that's <00:00:46.400>a <00:00:46.633>lot. <00:00:46.866>So <00:00:47.100>I

15
00:00:48.700 --> 00:00:51.300
<00:00:48.700>am <00:00:48.855>going <00:00:49.011>to <00:00:49.166>motivate. <00:00:49.322>I'm <00:00:49.477>still <00:00:49.633>going <00:00:49.788>to <00:00:49.944>motivate <00:00:50.100>a

16
00:00:51.300 --> 00:00:54.000
<00:00:51.300>bit <00:00:51.427>of <00:00:51.554>the <00:00:51.681>stuff <00:00:51.809>because <00:00:51.936>I <00:00:52.063>have <00:00:52.190>seen <00:00:52.318>a <00:00:52.445>project <00:00:52.572>that <00:00:52.699>people

17
00:00:54.100 --> 00:00:57.500
<00:00:54.100>are <00:00:54.227>using <00:00:54.354>typescript <00:00:54.481>because <00:00:54.609>it's <00:00:54.736>the <00:00:54.863>next <00:00:54.990>tip <00:00:55.118>cool <00:00:55.245>thing <00:00:55.372>about <00:00:55.500>it

18
00:00:57.500 --> 00:01:00.000
<00:00:57.500>does <00:00:57.675>actually <00:00:57.850>have <00:00:58.025>some <00:00:58.200>fundamental <00:00:58.375>reasons <00:00:58.550>why <00:00:58.725>we <00:00:58.900>should

19
00:01:00.100 --> 00:01:00.400
<00:01:00.100>be <00:01:00.235>using <00:01:00.370>it.

20
00:01:01.300 --> 00:01:04.100
<00:01:01.300>So <00:01:01.427>if <00:01:01.554>you <00:01:01.681>look <00:01:01.809>at <00:01:01.936>the <00:01:02.063>home <00:01:02.190>page <00:01:02.318>of <00:01:02.445>typescript, <00:01:02.572>you <00:01:02.699>see

21
00:01:04.100 --> 00:01:07.200
<00:01:04.099>that <00:01:04.255>it <00:01:04.411>advertises <00:01:04.566>itself <00:01:04.722>as <00:01:04.877>JavaScript <00:01:05.033>with <00:01:05.188>Syntax <00:01:05.344>for <00:01:05.500>types.

22
00:01:07.200 --> 00:01:10.300
<00:01:07.200>So <00:01:07.355>that's <00:01:07.511>that's <00:01:07.666>the <00:01:07.822>entire <00:01:07.977>idea. <00:01:08.133>You <00:01:08.288>have <00:01:08.444>the <00:01:08.600>normal

23
00:01:10.300 --> 00:01:13.200
<00:01:10.300>JavaScript <00:01:10.427>syntax <00:01:10.554>and <00:01:10.681>then <00:01:10.809>you <00:01:10.936>slap <00:01:11.063>some <00:01:11.190>hives <00:01:11.318>on <00:01:11.445>it, <00:01:11.572>but <00:01:11.700>that's

24
00:01:13.200 --> 00:01:15.100
<00:01:13.200>I <00:01:13.400>think <00:01:13.600>only <00:01:13.800>a <00:01:14.000>part <00:01:14.200>of <00:01:14.400>the <00:01:14.600>story.

25
00:01:16.700 --> 00:01:19.300
<00:01:16.700>If <00:01:16.875>you <00:01:17.050>look <00:01:17.225>a <00:01:17.400>bit <00:01:17.575>deeper, <00:01:17.750>there's <00:01:17.925>actually <00:01:18.100>a

26
00:01:19.300 --> 00:01:23.100
<00:01:19.300>bit <00:01:19.533>some <00:01:19.766>more <00:01:20.000>design <00:01:20.233>criteria <00:01:20.466>beyond <00:01:20.700>Behind

27
00:01:22.100 --> 00:01:25.200
<00:01:22.100>typescript. <00:01:22.449>So <00:01:22.800>the <00:01:23.149>core <00:01:23.500>tenets.

28
00:01:25.200 --> 00:01:29.600
<00:01:25.200>I <00:01:25.355>already <00:01:25.511>showed <00:01:25.666>you <00:01:25.822>that <00:01:25.977>JavaScript <00:01:26.133>plus <00:01:26.288>X <00:01:26.444>second <00:01:26.600>core

29
00:01:28.600 --> 00:01:31.800
<00:01:28.600>tenant <00:01:28.800>is <00:01:29.000>that <00:01:29.199>it <00:01:29.399>has <00:01:29.600>environment <00:01:29.800>Independence. <00:01:30.000>So

30
00:01:31.800 --> 00:01:34.000
<00:01:31.800>it <00:01:31.927>doesn't <00:01:32.054>really <00:01:32.181>matter <00:01:32.309>if <00:01:32.436>you're <00:01:32.563>running <00:01:32.690>it <00:01:32.818>or <00:01:32.945>node <00:01:33.072>if <00:01:33.200>you're

31
00:01:34.500 --> 00:01:37.400
<00:01:34.500>running <00:01:34.655>it <00:01:34.811>on <00:01:34.966>the <00:01:35.122>browser <00:01:35.277>and <00:01:35.433>there's <00:01:35.588>even <00:01:35.744>a <00:01:35.900>project

32
00:01:37.400 --> 00:01:41.200
<00:01:37.400>that <00:01:37.633>compiles <00:01:37.866>typescript <00:01:38.100>directly <00:01:38.333>to <00:01:38.566>webassembly. <00:01:38.800>So

33
00:01:40.200 --> 00:01:42.300
<00:01:40.200>all <00:01:40.550>of <00:01:40.900>that <00:01:41.250>is <00:01:41.600>possible.

34
00:01:43.500 --> 00:01:46.200
<00:01:43.500>Um, <00:01:43.733>what's <00:01:43.966>also <00:01:44.200>quite <00:01:44.433>interesting <00:01:44.666>and <00:01:44.900>what

35
00:01:46.200 --> 00:01:49.300
<00:01:46.200>sets <00:01:46.355>typescript <00:01:46.511>apart <00:01:46.666>from <00:01:46.822>many <00:01:46.977>other <00:01:47.133>programming <00:01:47.288>languages <00:01:47.444>with <00:01:47.600>the

36
00:01:49.300 --> 00:01:52.400
<00:01:49.300>types <00:01:49.440>of <00:01:49.580>system <00:01:49.720>that <00:01:49.860>it <00:01:50.000>has <00:01:50.140>structural <00:01:50.280>typing <00:01:50.420>AKA <00:01:50.560>duct <00:01:50.700>typing.

37
00:01:52.400 --> 00:01:55.800
<00:01:52.400>I <00:01:52.600>pulled <00:01:52.800>this <00:01:53.000>Twitter <00:01:53.200>this <00:01:53.400>image <00:01:53.600>of <00:01:53.800>some

38
00:01:55.800 --> 00:01:58.300
<00:01:55.800>artists <00:01:55.975>from <00:01:56.149>Twitter. <00:01:56.325>So <00:01:56.500>here's <00:01:56.675>the <00:01:56.850>the <00:01:57.024>handle <00:01:57.200>it

39
00:01:58.300 --> 00:02:01.200
<00:01:58.300>has <00:01:58.407>nothing <00:01:58.515>to <00:01:58.623>do <00:01:58.730>with <00:01:58.838>programming, <00:01:58.946>but <00:01:59.053>I <00:01:59.161>found <00:01:59.269>it <00:01:59.376>very <00:01:59.484>funny <00:01:59.592>as <00:01:59.700>an

40
00:02:01.200 --> 00:02:02.700
<00:02:01.200>illustration <00:02:01.425>of <00:02:01.650>what <00:02:01.875>Dove <00:02:02.100>typing <00:02:02.325>is <00:02:02.550>about.

41
00:02:04.300 --> 00:02:07.700
<00:02:04.300>Right. <00:02:04.500>So <00:02:04.700>the <00:02:04.899>fourth <00:02:05.100>tenant <00:02:05.300>is <00:02:05.500>type <00:02:05.700>inference

42
00:02:07.700 --> 00:02:10.600
<00:02:07.700>and <00:02:07.980>that <00:02:08.259>sounds <00:02:08.539>quite <00:02:08.820>mundane. <00:02:09.100>But

43
00:02:10.600 --> 00:02:13.100
<00:02:10.600>if <00:02:10.775>you <00:02:10.949>had <00:02:11.125>talked <00:02:11.299>about <00:02:11.475>type <00:02:11.650>inference <00:02:11.825>10 <00:02:12.000>years

44
00:02:13.100 --> 00:02:16.400
<00:02:13.100>ago, <00:02:13.239>nobody <00:02:13.380>would <00:02:13.519>have <00:02:13.660>believed <00:02:13.799>you <00:02:13.940>that <00:02:14.079>such <00:02:14.220>a <00:02:14.359>powerful <00:02:14.500>language

45
00:02:16.400 --> 00:02:19.300
<00:02:16.400>would <00:02:16.575>ever <00:02:16.750>have <00:02:16.925>it <00:02:17.100>so <00:02:17.275>they <00:02:17.450>made <00:02:17.625>it <00:02:17.800>possible

46
00:02:19.300 --> 00:02:22.400
<00:02:19.300>to <00:02:19.427>do <00:02:19.554>a <00:02:19.681>lot <00:02:19.809>of <00:02:19.936>things <00:02:20.063>with <00:02:20.190>a <00:02:20.318>very <00:02:20.445>verbal <00:02:20.572>with <00:02:20.700>a

47
00:02:22.400 --> 00:02:23.000
<00:02:22.400>very <00:02:22.670>tourist <00:02:22.940>syntax.

48
00:02:23.600 --> 00:02:26.300
<00:02:23.600>And <00:02:23.880>finally, <00:02:24.160>you <00:02:24.440>will <00:02:24.720>not <00:02:25.000>find

49
00:02:26.300 --> 00:02:29.700
<00:02:26.300>that <00:02:26.440>written <00:02:26.580>on <00:02:26.720>the <00:02:26.860>typescript <00:02:27.000>web <00:02:27.140>page. <00:02:27.280>It <00:02:27.420>supports <00:02:27.560>wonky <00:02:27.700>JavaScript

50
00:02:29.700 --> 00:02:32.300
<00:02:29.700>patterns, <00:02:29.899>but <00:02:30.100>I <00:02:30.299>will <00:02:30.500>explain <00:02:30.700>now <00:02:30.899>in <00:02:31.100>a

51
00:02:32.300 --> 00:02:35.400
<00:02:32.300>bit <00:02:32.427>detail <00:02:32.554>what <00:02:32.681>I <00:02:32.809>mean <00:02:32.936>was <00:02:33.063>wonky <00:02:33.190>patterns <00:02:33.318>and <00:02:33.445>how <00:02:33.572>that <00:02:33.700>actually

52
00:02:35.400 --> 00:02:38.300
<00:02:35.400>pays <00:02:35.555>into <00:02:35.711>what <00:02:35.866>I'm <00:02:36.022>trying <00:02:36.177>to <00:02:36.333>do <00:02:36.488>now <00:02:36.644>in <00:02:36.800>the

53
00:02:38.300 --> 00:02:39.000
<00:02:38.300>remainder <00:02:38.510>of <00:02:38.720>that <00:02:38.930>talk.

54
00:02:39.800 --> 00:02:42.700
<00:02:39.800>So <00:02:40.000>let's <00:02:40.200>start. <00:02:40.400>What <00:02:40.600>is <00:02:40.800>Javascript <00:02:41.000>even <00:02:41.200>what

55
00:02:42.700 --> 00:02:43.400
<00:02:42.700>is <00:02:43.015>this <00:02:43.330>language?

56
00:02:44.100 --> 00:02:47.300
<00:02:44.100>So <00:02:44.255>JavaScript, <00:02:44.411>this <00:02:44.566>is <00:02:44.722>very <00:02:44.877>funny <00:02:45.033>language <00:02:45.188>that <00:02:45.344>allows <00:02:45.500>you

57
00:02:47.300 --> 00:02:48.300
<00:02:47.300>to <00:02:47.750>do <00:02:48.200>everything.

58
00:02:49.300 --> 00:02:52.700
<00:02:49.300>So <00:02:49.500>you <00:02:49.700>can <00:02:49.900>add <00:02:50.100>errors <00:02:50.300>to <00:02:50.500>objects. <00:02:50.700>You

59
00:02:52.700 --> 00:02:55.500
<00:02:52.700>can <00:02:52.855>multiply <00:02:53.011>object <00:02:53.166>with <00:02:53.322>numbers <00:02:53.477>and <00:02:53.633>you <00:02:53.788>can <00:02:53.944>compare <00:02:54.100>apples

60
00:02:55.500 --> 00:02:58.800
<00:02:55.500>with <00:02:55.616>orange <00:02:55.733>that <00:02:55.850>will <00:02:55.966>not <00:02:56.083>stop <00:02:56.200>you <00:02:56.316>from <00:02:56.433>doing <00:02:56.550>that <00:02:56.666>who <00:02:56.783>are <00:02:56.900>seeing

61
00:02:58.800 --> 00:02:59.600
<00:02:58.800>this <00:02:59.160>diagram <00:02:59.519>already?

62
00:03:00.800 --> 00:03:03.800
<00:03:00.800>So <00:03:00.940>it's <00:03:01.080>kind <00:03:01.220>of <00:03:01.360>like <00:03:01.500>the <00:03:01.640>the <00:03:01.780>Trinity <00:03:01.920>of <00:03:02.060>JavaScript <00:03:02.200>so

63
00:03:03.800 --> 00:03:06.500
<00:03:03.800>you <00:03:04.000>can <00:03:04.200>compare <00:03:04.400>the <00:03:04.600>empty <00:03:04.800>array <00:03:05.000>zero <00:03:05.200>and

64
00:03:06.500 --> 00:03:09.600
<00:03:06.500>it <00:03:06.655>will <00:03:06.811>get <00:03:06.966>will <00:03:07.122>be <00:03:07.277>true. <00:03:07.433>You <00:03:07.588>can <00:03:07.744>compare <00:03:07.900>zero

65
00:03:09.600 --> 00:03:12.600
<00:03:09.600>with <00:03:09.700>the <00:03:09.799>strings <00:03:09.900>here. <00:03:10.000>It <00:03:10.100>will <00:03:10.200>be <00:03:10.299>true <00:03:10.400>but <00:03:10.500>comparing <00:03:10.600>these <00:03:10.700>two <00:03:10.799>things <00:03:10.900>will <00:03:11.000>be

66
00:03:12.600 --> 00:03:13.800
<00:03:12.600>this <00:03:13.140>holes. <00:03:13.680>So

67
00:03:14.900 --> 00:03:17.900
<00:03:14.900>If <00:03:15.040>you <00:03:15.180>like <00:03:15.320>if <00:03:15.460>you <00:03:15.600>show <00:03:15.740>that <00:03:15.880>to <00:03:16.020>any <00:03:16.160>mathematician, <00:03:16.300>they

68
00:03:17.900 --> 00:03:18.700
<00:03:17.900>will <00:03:18.260>just <00:03:18.620>cry.

69
00:03:19.500 --> 00:03:21.600
<00:03:19.500>It's <00:03:19.780>just <00:03:20.060>not <00:03:20.340>very <00:03:20.620>good. <00:03:20.900>So.

70
00:03:22.800 --> 00:03:25.800
<00:03:22.800>typescript <00:03:23.000>set <00:03:23.200>out <00:03:23.400>to <00:03:23.600>fix <00:03:23.800>this <00:03:24.000>and <00:03:24.200>fixing

71
00:03:25.800 --> 00:03:27.300
<00:03:25.800>it <00:03:26.250>they <00:03:26.700>did <00:03:27.150>so

72
00:03:28.300 --> 00:03:31.200
<00:03:28.300>Many <00:03:28.580>JavaScript <00:03:28.860>developers <00:03:29.140>are <00:03:29.420>aware <00:03:29.700>that

73
00:03:31.200 --> 00:03:34.600
<00:03:31.200>their <00:03:31.355>language <00:03:31.511>has <00:03:31.666>problems <00:03:31.822>and <00:03:31.977>they <00:03:32.133>ask <00:03:32.288>for <00:03:32.444>simple <00:03:32.600>solution

74
00:03:34.600 --> 00:03:37.400
<00:03:34.600>to <00:03:34.833>those <00:03:35.066>problems. <00:03:35.299>But <00:03:35.533>the <00:03:35.766>ultimately <00:03:36.000>this

75
00:03:37.400 --> 00:03:40.700
<00:03:37.400>is <00:03:37.500>what <00:03:37.600>they <00:03:37.700>got <00:03:37.800>on <00:03:37.900>the <00:03:38.000>right <00:03:38.100>hand <00:03:38.200>side. <00:03:38.300>So <00:03:38.400>they <00:03:38.500>got <00:03:38.600>that <00:03:38.700>and <00:03:38.800>a

76
00:03:40.700 --> 00:03:42.500
<00:03:40.700>lot <00:03:40.933>more <00:03:41.166>on <00:03:41.399>top <00:03:41.633>of <00:03:41.866>that <00:03:42.100>so

77
00:03:43.900 --> 00:03:46.600
<00:03:43.900>In <00:03:44.075>the <00:03:44.250>history <00:03:44.425>and <00:03:44.600>the <00:03:44.775>evolution <00:03:44.950>of <00:03:45.125>typescript. <00:03:45.300>I've

78
00:03:46.600 --> 00:03:49.600
<00:03:46.600>seen <00:03:46.775>like <00:03:46.950>a <00:03:47.125>hype <00:03:47.299>cycle <00:03:47.475>where <00:03:47.650>people <00:03:47.825>were <00:03:48.000>got

79
00:03:49.600 --> 00:03:52.600
<00:03:49.600>very <00:03:49.727>excited <00:03:49.854>that <00:03:49.981>they <00:03:50.109>now <00:03:50.236>have <00:03:50.363>all <00:03:50.490>those <00:03:50.618>shiny <00:03:50.745>tools <00:03:50.872>and <00:03:51.000>you

80
00:03:52.600 --> 00:03:55.300
<00:03:52.600>should <00:03:52.727>be <00:03:52.854>all <00:03:52.981>using <00:03:53.109>them <00:03:53.236>to <00:03:53.363>in <00:03:53.490>order <00:03:53.618>to <00:03:53.745>create <00:03:53.872>types <00:03:54.000>of

81
00:03:55.300 --> 00:03:58.800
<00:03:55.300>code. <00:03:55.455>But <00:03:55.611>then <00:03:55.766>we <00:03:55.922>also <00:03:56.077>had <00:03:56.233>like <00:03:56.388>the <00:03:56.544>anti-hype <00:03:56.700>and

82
00:03:58.800 --> 00:04:01.800
<00:03:58.800>basically <00:03:59.150>people <00:03:59.500>saying <00:03:59.850>like <00:04:00.200>you

83
00:04:01.800 --> 00:04:04.400
<00:04:01.800>lost <00:04:01.940>control <00:04:02.080>if <00:04:02.220>you <00:04:02.360>life <00:04:02.500>if <00:04:02.640>you <00:04:02.780>cannot <00:04:02.920>if <00:04:03.060>you <00:04:03.200>cannot

84
00:04:04.400 --> 00:04:07.300
<00:04:04.400>even <00:04:04.555>program <00:04:04.711>with <00:04:04.866>all <00:04:05.022>type, <00:04:05.177>right, <00:04:05.333>so <00:04:05.488>I'm <00:04:05.644>trying <00:04:05.800>to

85
00:04:07.300 --> 00:04:10.700
<00:04:07.300>ignore <00:04:07.440>this <00:04:07.580>entire <00:04:07.720>hype <00:04:07.860>and <00:04:08.000>anti-hype. <00:04:08.140>I'm <00:04:08.280>trying <00:04:08.420>to <00:04:08.560>carve <00:04:08.700>out

86
00:04:10.700 --> 00:04:13.200
<00:04:10.700>a <00:04:10.875>reasonable <00:04:11.049>set <00:04:11.225>of <00:04:11.399>the <00:04:11.575>type <00:04:11.750>system. <00:04:11.924>It's <00:04:12.100>an

87
00:04:13.200 --> 00:04:17.100
<00:04:13.200>advanced <00:04:13.307>set <00:04:13.415>of <00:04:13.523>the <00:04:13.630>type <00:04:13.738>system, <00:04:13.846>but <00:04:13.953>I <00:04:14.061>think <00:04:14.169>it's <00:04:14.276>reasonable <00:04:14.384>set <00:04:14.492>and <00:04:14.600>let's

88
00:04:16.100 --> 00:04:19.000
<00:04:16.100>just <00:04:16.300>see <00:04:16.500>where <00:04:16.700>we <00:04:16.900>can <00:04:17.100>go <00:04:17.300>from <00:04:17.500>there.

89
00:04:20.300 --> 00:04:23.200
<00:04:20.300>Okay, <00:04:20.416>was <00:04:20.533>that <00:04:20.650>out <00:04:20.766>of <00:04:20.883>the <00:04:21.000>way? <00:04:21.116>Let's <00:04:21.233>move <00:04:21.350>on <00:04:21.466>to <00:04:21.583>chapter <00:04:21.700>2

90
00:04:23.200 --> 00:04:24.000
<00:04:23.200>typing <00:04:23.560>the <00:04:23.920>Dom.

91
00:04:24.700 --> 00:04:27.500
<00:04:24.700>So <00:04:24.840>I'm <00:04:24.979>not <00:04:25.120>sure <00:04:25.260>if <00:04:25.400>you've <00:04:25.539>watched <00:04:25.680>any <00:04:25.820>of <00:04:25.960>the <00:04:26.099>Keynotes

92
00:04:27.500 --> 00:04:30.200
<00:04:27.500>today, <00:04:27.616>but <00:04:27.733>there <00:04:27.850>was <00:04:27.966>a <00:04:28.083>lot <00:04:28.200>of <00:04:28.316>about <00:04:28.433>a <00:04:28.550>lot <00:04:28.666>of <00:04:28.783>about <00:04:28.900>talking

93
00:04:30.200 --> 00:04:33.500
<00:04:30.200>about <00:04:30.479>web <00:04:30.760>fundamentals <00:04:31.039>and <00:04:31.320>how <00:04:31.599>to

94
00:04:33.500 --> 00:04:36.400
<00:04:33.500>how <00:04:33.733>to <00:04:33.966>build <00:04:34.200>solid <00:04:34.433>web <00:04:34.666>application. <00:04:34.900>And

95
00:04:36.400 --> 00:04:40.000
<00:04:36.400>what <00:04:36.527>does <00:04:36.654>html <00:04:36.781>what <00:04:36.909>is <00:04:37.036>the <00:04:37.163>domain <00:04:37.290>so <00:04:37.418>on <00:04:37.545>so <00:04:37.672>I <00:04:37.799>think

96
00:04:39.300 --> 00:04:42.200
<00:04:39.300>this <00:04:39.475>is <00:04:39.650>one <00:04:39.825>of <00:04:40.000>the <00:04:40.175>core <00:04:40.350>principles <00:04:40.525>that <00:04:40.700>also

97
00:04:42.200 --> 00:04:45.700
<00:04:42.200>guided <00:04:42.375>the <00:04:42.550>design <00:04:42.724>of <00:04:42.900>a <00:04:43.075>typescript <00:04:43.250>because <00:04:43.425>there's <00:04:43.599>a

98
00:04:45.700 --> 00:04:48.500
<00:04:45.700>very <00:04:45.875>common <00:04:46.050>pattern <00:04:46.224>in <00:04:46.400>the <00:04:46.575>Dom <00:04:46.750>and <00:04:46.925>that's <00:04:47.099>that

99
00:04:48.500 --> 00:04:52.000
<00:04:48.500>pattern <00:04:48.733>for <00:04:48.966>adding <00:04:49.200>event <00:04:49.433>listeners <00:04:49.666>to <00:04:49.900>objects.

100
00:04:53.100 --> 00:04:56.600
<00:04:53.100>So <00:04:53.300>this <00:04:53.500>is <00:04:53.700>straight-up <00:04:53.900>pulled <00:04:54.100>from <00:04:54.300>mdn. <00:04:54.500>So

101
00:04:56.600 --> 00:05:00.300
<00:04:56.600>that's <00:04:56.755>nothing <00:04:56.911>fancy <00:04:57.066>going <00:04:57.222>on <00:04:57.377>here. <00:04:57.533>You <00:04:57.688>have <00:04:57.844>this <00:04:58.000>at

102
00:04:59.300 --> 00:05:02.600
<00:04:59.300>event <00:04:59.500>listener <00:04:59.700>methods <00:04:59.900>are <00:05:00.100>available <00:05:00.300>on <00:05:00.500>almost <00:05:00.700>everything

103
00:05:02.600 --> 00:05:05.100
<00:05:02.600>in <00:05:02.833>the <00:05:03.066>Dom <00:05:03.300>and <00:05:03.533>there <00:05:03.766>are <00:05:04.000>three

104
00:05:05.100 --> 00:05:08.500
<00:05:05.100>variants <00:05:05.200>of <00:05:05.300>that. <00:05:05.400>So <00:05:05.500>the <00:05:05.600>first <00:05:05.700>variant <00:05:05.800>is <00:05:05.900>you <00:05:06.000>just <00:05:06.100>give <00:05:06.200>a <00:05:06.300>type <00:05:06.400>and <00:05:06.500>the

105
00:05:08.500 --> 00:05:11.000
<00:05:08.500>function <00:05:08.627>so <00:05:08.754>for <00:05:08.881>kinds <00:05:09.009>for <00:05:09.136>example, <00:05:09.263>you <00:05:09.390>can <00:05:09.518>say <00:05:09.645>I <00:05:09.772>want <00:05:09.900>to

106
00:05:11.100 --> 00:05:14.100
<00:05:11.100>add <00:05:11.207>a <00:05:11.315>click <00:05:11.423>Handler. <00:05:11.530>I <00:05:11.638>want <00:05:11.746>to <00:05:11.853>add <00:05:11.961>a <00:05:12.069>mouse <00:05:12.176>over <00:05:12.284>Handler <00:05:12.392>and <00:05:12.500>so

107
00:05:14.100 --> 00:05:14.100
on.

108
00:05:14.800 --> 00:05:17.400
<00:05:14.800>The <00:05:14.940>second <00:05:15.080>version <00:05:15.220>is <00:05:15.360>where <00:05:15.500>you <00:05:15.640>have <00:05:15.780>a <00:05:15.920>third <00:05:16.060>parameter <00:05:16.200>where

109
00:05:17.400 --> 00:05:20.700
<00:05:17.400>you <00:05:17.555>can <00:05:17.711>give <00:05:17.866>some <00:05:18.022>options <00:05:18.177>for <00:05:18.333>example <00:05:18.488>bubbling <00:05:18.644>and <00:05:18.799>then

110
00:05:20.700 --> 00:05:23.300
<00:05:20.700>the <00:05:20.875>last <00:05:21.050>one <00:05:21.224>is <00:05:21.400>a <00:05:21.575>Boolean <00:05:21.750>use <00:05:21.925>capture, <00:05:22.099>which

111
00:05:23.300 --> 00:05:25.100
<00:05:23.300>I <00:05:23.440>have <00:05:23.580>no <00:05:23.720>idea <00:05:23.860>what <00:05:24.000>it <00:05:24.140>is, <00:05:24.280>but <00:05:24.420>it <00:05:24.560>is <00:05:24.700>there.

112
00:05:25.700 --> 00:05:28.500
<00:05:25.700>So <00:05:25.840>this <00:05:25.979>is <00:05:26.120>already <00:05:26.260>something <00:05:26.400>that <00:05:26.539>you <00:05:26.680>cannot <00:05:26.820>do <00:05:26.960>in <00:05:27.099>many

113
00:05:28.500 --> 00:05:31.600
<00:05:28.500>other <00:05:28.700>programming <00:05:28.900>languages <00:05:29.100>having <00:05:29.300>these <00:05:29.500>kinds <00:05:29.700>of <00:05:29.900>overloads.

114
00:05:31.600 --> 00:05:34.700
<00:05:31.600>So <00:05:31.740>many <00:05:31.880>can <00:05:32.020>do <00:05:32.160>it <00:05:32.300>some <00:05:32.440>others <00:05:32.580>can't <00:05:32.720>but <00:05:32.860>here's <00:05:33.000>where

115
00:05:34.700 --> 00:05:35.200
<00:05:34.700>it <00:05:34.925>gets <00:05:35.150>interesting.

116
00:05:36.600 --> 00:05:38.000
<00:05:36.600>if <00:05:36.915>we <00:05:37.230>look <00:05:37.545>at <00:05:37.860>an

117
00:05:38.900 --> 00:05:41.500
<00:05:38.900>example <00:05:39.250>invocation <00:05:39.599>of <00:05:39.950>this <00:05:40.299>we

118
00:05:41.500 --> 00:05:44.400
<00:05:41.500>can <00:05:41.675>see <00:05:41.850>that <00:05:42.025>here's <00:05:42.200>supposed <00:05:42.375>to <00:05:42.550>be <00:05:42.725>a <00:05:42.900>string

119
00:05:44.400 --> 00:05:46.100
<00:05:44.400>a <00:05:44.866>string <00:05:45.333>literal <00:05:45.799>click.

120
00:05:47.100 --> 00:05:50.800
<00:05:47.100>And <00:05:47.193>then <00:05:47.286>you <00:05:47.380>get <00:05:47.473>an <00:05:47.566>event <00:05:47.660>handler. <00:05:47.753>And <00:05:47.846>now <00:05:47.940>the <00:05:48.033>cool <00:05:48.126>thing <00:05:48.220>is <00:05:48.313>that <00:05:48.406>the <00:05:48.500>type

121
00:05:50.800 --> 00:05:53.200
<00:05:50.800>of <00:05:51.033>this <00:05:51.266>event <00:05:51.500>changes <00:05:51.733>depending <00:05:51.966>on <00:05:52.200>the

122
00:05:53.200 --> 00:05:54.700
<00:05:53.200>string. <00:05:53.469>Literally <00:05:53.740>you're <00:05:54.010>passing <00:05:54.280>in <00:05:54.550>there.

123
00:05:55.700 --> 00:05:58.800
<00:05:55.700>And <00:05:55.855>that's <00:05:56.011>something <00:05:56.166>that <00:05:56.322>typescript. <00:05:56.477>I <00:05:56.633>mean, <00:05:56.788>it's <00:05:56.944>people <00:05:57.099>have

124
00:05:58.800 --> 00:06:01.100
<00:05:58.800>done <00:05:59.000>it <00:05:59.200>before <00:05:59.400>but <00:05:59.600>typescript <00:05:59.800>brought <00:06:00.000>this <00:06:00.200>to

125
00:06:01.100 --> 00:06:04.600
<00:06:01.100>the <00:06:01.216>mainstream. <00:06:01.333>So <00:06:01.450>this <00:06:01.566>is <00:06:01.683>something <00:06:01.800>that's <00:06:01.916>I <00:06:02.033>find <00:06:02.150>very <00:06:02.266>exciting <00:06:02.383>but <00:06:02.500>it's

126
00:06:04.600 --> 00:06:07.600
<00:06:04.600>also <00:06:04.775>very <00:06:04.950>tricky <00:06:05.125>to <00:06:05.300>get <00:06:05.475>right. <00:06:05.650>So <00:06:05.825>if <00:06:06.000>we

127
00:06:07.600 --> 00:06:10.700
<00:06:07.600>actually <00:06:07.740>look <00:06:07.880>at <00:06:08.020>how <00:06:08.160>that's <00:06:08.300>implemented, <00:06:08.440>we <00:06:08.580>will <00:06:08.720>see <00:06:08.860>that <00:06:09.000>this

128
00:06:10.700 --> 00:06:13.500
<00:06:10.700>event <00:06:10.979>is <00:06:11.260>an <00:06:11.539>instance <00:06:11.820>of <00:06:12.099>mouse

129
00:06:13.500 --> 00:06:16.300
<00:06:13.500>event. <00:06:13.675>So <00:06:13.850>you <00:06:14.025>can <00:06:14.200>access <00:06:14.375>the <00:06:14.550>detail <00:06:14.725>property <00:06:14.900>which

130
00:06:16.300 --> 00:06:19.500
<00:06:16.300>gives <00:06:16.400>you <00:06:16.500>account <00:06:16.600>of <00:06:16.700>how <00:06:16.800>often <00:06:16.900>it <00:06:17.000>has <00:06:17.100>been <00:06:17.200>clicked. <00:06:17.300>So <00:06:17.400>that's <00:06:17.500>something <00:06:17.600>that's <00:06:17.700>specific

131
00:06:19.500 --> 00:06:22.100
<00:06:19.500>to <00:06:19.627>the <00:06:19.754>mouse <00:06:19.881>event. <00:06:20.009>And <00:06:20.136>then <00:06:20.263>you <00:06:20.390>also <00:06:20.518>get <00:06:20.645>the <00:06:20.772>properties <00:06:20.900>from

132
00:06:22.100 --> 00:06:25.100
<00:06:22.100>UI <00:06:22.240>event <00:06:22.380>because <00:06:22.520>most <00:06:22.660>event <00:06:22.800>inherits <00:06:22.940>from <00:06:23.080>UI <00:06:23.220>event <00:06:23.360>and <00:06:23.500>then

133
00:06:25.100 --> 00:06:27.700
<00:06:25.100>also <00:06:25.255>everything <00:06:25.411>from <00:06:25.566>event <00:06:25.722>because <00:06:25.877>that's <00:06:26.033>what <00:06:26.188>it <00:06:26.344>inherits <00:06:26.500>from

134
00:06:28.700 --> 00:06:32.800
<00:06:28.700>Now <00:06:28.979>this <00:06:29.260>is <00:06:29.539>one <00:06:29.820>instance <00:06:30.099>who

135
00:06:31.800 --> 00:06:34.400
<00:06:31.800>here <00:06:32.150>has <00:06:32.500>already <00:06:32.850>seen <00:06:33.200>the

136
00:06:34.400 --> 00:06:36.500
<00:06:34.400>type <00:06:34.633>definitions <00:06:34.866>for <00:06:35.099>the <00:06:35.333>Dom <00:06:35.566>in <00:06:35.799>typescript.

137
00:06:37.500 --> 00:06:40.400
<00:06:37.500>Okay, <00:06:37.655>that's <00:06:37.811>very <00:06:37.966>few <00:06:38.122>people. <00:06:38.277>I'm <00:06:38.433>going <00:06:38.588>to <00:06:38.744>show <00:06:38.900>it

138
00:06:40.400 --> 00:06:43.300
<00:06:40.400>to <00:06:40.516>you <00:06:40.633>now <00:06:40.750>for <00:06:40.866>the <00:06:40.983>people <00:06:41.099>who <00:06:41.216>have <00:06:41.333>not <00:06:41.450>seen <00:06:41.566>it. <00:06:41.683>I'm <00:06:41.799>not

139
00:06:43.300 --> 00:06:46.400
<00:06:43.300>sure <00:06:43.407>where <00:06:43.515>the <00:06:43.623>emergency <00:06:43.730>exits <00:06:43.838>are, <00:06:43.946>but <00:06:44.053>you <00:06:44.161>might <00:06:44.269>want <00:06:44.376>to <00:06:44.484>look <00:06:44.592>around <00:06:44.700>already.

140
00:06:48.100 --> 00:06:51.200
<00:06:48.100>So <00:06:48.200>this <00:06:48.300>is <00:06:48.400>what <00:06:48.500>it <00:06:48.600>looks <00:06:48.700>like. <00:06:48.800>Don't <00:06:48.900>worry. <00:06:49.000>I'll <00:06:49.100>go <00:06:49.200>through <00:06:49.300>it <00:06:49.400>in <00:06:49.500>a

141
00:06:51.200 --> 00:06:51.700
<00:06:51.200>bit <00:06:51.425>more <00:06:51.650>detail.

142
00:06:52.500 --> 00:06:52.600
So

143
00:06:53.500 --> 00:06:56.400
<00:06:53.500>we <00:06:53.627>first <00:06:53.754>start <00:06:53.881>defining <00:06:54.009>an <00:06:54.136>interface <00:06:54.263>and <00:06:54.390>this <00:06:54.518>is <00:06:54.645>not <00:06:54.772>my <00:06:54.900>code.

144
00:06:56.400 --> 00:06:59.400
<00:06:56.400>This <00:06:56.555>is <00:06:56.711>called <00:06:56.866>it's <00:06:57.022>written <00:06:57.177>my <00:06:57.333>Mac <00:06:57.488>stuff. <00:06:57.644>We <00:06:57.799>have

145
00:06:59.400 --> 00:07:02.600
<00:06:59.400>interface. <00:06:59.599>It's <00:06:59.799>called <00:07:00.000>Global <00:07:00.200>event <00:07:00.400>handles <00:07:00.599>event <00:07:00.799>following

146
00:07:02.600 --> 00:07:05.800
<00:07:02.600>the <00:07:02.775>spring <00:07:02.950>boot <00:07:03.125>School <00:07:03.300>of <00:07:03.475>class <00:07:03.650>naming <00:07:03.825>we <00:07:04.000>have

147
00:07:06.700 --> 00:07:09.300
<00:07:06.700>Many <00:07:06.979>properties <00:07:07.260>and <00:07:07.539>those <00:07:07.820>properties <00:07:08.099>have

148
00:07:09.300 --> 00:07:12.500
<00:07:09.300>string <00:07:09.533>literals <00:07:09.766>that <00:07:10.000>resemble <00:07:10.233>the <00:07:10.466>event <00:07:10.700>names

149
00:07:12.500 --> 00:07:16.000
<00:07:12.500>and <00:07:12.616>then <00:07:12.733>they <00:07:12.850>have <00:07:12.966>type. <00:07:13.083>So <00:07:13.200>for <00:07:13.316>example <00:07:13.433>here <00:07:13.550>we <00:07:13.666>have <00:07:13.783>click <00:07:13.900>as

150
00:07:15.200 --> 00:07:18.100
<00:07:15.200>a <00:07:15.375>string <00:07:15.550>literal <00:07:15.724>and <00:07:15.900>that's <00:07:16.075>of <00:07:16.250>type <00:07:16.425>mouse <00:07:16.599>event.

151
00:07:18.800 --> 00:07:21.400
<00:07:18.800>Now <00:07:18.955>the <00:07:19.111>important <00:07:19.266>thing <00:07:19.422>is <00:07:19.577>there's <00:07:19.733>not <00:07:19.888>actually <00:07:20.044>an <00:07:20.200>implementation

152
00:07:21.400 --> 00:07:24.600
<00:07:21.400>of <00:07:21.599>this <00:07:21.799>interface <00:07:22.000>that <00:07:22.200>interface <00:07:22.400>is <00:07:22.599>purely <00:07:22.799>syntactic

153
00:07:24.600 --> 00:07:27.800
<00:07:24.600>sugar. <00:07:24.800>It <00:07:25.000>just <00:07:25.200>declares <00:07:25.400>the <00:07:25.600>mapping <00:07:25.800>between <00:07:26.000>the

154
00:07:27.800 --> 00:07:30.200
<00:07:27.800>Stringer <00:07:28.033>tools <00:07:28.266>and <00:07:28.500>the <00:07:28.733>events. <00:07:28.966>So <00:07:29.200>that's

155
00:07:30.200 --> 00:07:33.000
<00:07:30.200>that's <00:07:30.327>the <00:07:30.454>key <00:07:30.581>idea. <00:07:30.709>No <00:07:30.836>one <00:07:30.963>is <00:07:31.090>going <00:07:31.218>to <00:07:31.345>implement <00:07:31.472>that <00:07:31.599>interface.

156
00:07:33.600 --> 00:07:36.400
<00:07:33.600>Now <00:07:33.800>this <00:07:34.000>is <00:07:34.200>where <00:07:34.400>the <00:07:34.600>actual <00:07:34.800>stuff <00:07:35.000>happens.

157
00:07:36.400 --> 00:07:39.400
<00:07:36.400>So <00:07:36.555>Global <00:07:36.711>event <00:07:36.866>handlers <00:07:37.022>is <00:07:37.177>a <00:07:37.333>special <00:07:37.488>interface <00:07:37.644>that <00:07:37.799>just

158
00:07:39.400 --> 00:07:43.000
<00:07:39.400>describes <00:07:39.555>what <00:07:39.711>the <00:07:39.866>event <00:07:40.022>listener <00:07:40.177>method <00:07:40.333>looks <00:07:40.488>like <00:07:40.644>and <00:07:40.799>each

159
00:07:42.400 --> 00:07:45.600
<00:07:42.400>Dom <00:07:42.679>event <00:07:42.960>in <00:07:43.239>extends <00:07:43.520>from <00:07:43.799>this

160
00:07:45.600 --> 00:07:48.200
<00:07:45.600>Global <00:07:45.775>events <00:07:45.950>Handler <00:07:46.125>interface. <00:07:46.300>So <00:07:46.475>that <00:07:46.650>each <00:07:46.825>Dom <00:07:47.000>event

161
00:07:48.200 --> 00:07:51.800
<00:07:48.200>Dom <00:07:48.400>object <00:07:48.599>have <00:07:48.800>this <00:07:49.000>method <00:07:49.200>now <00:07:49.400>this <00:07:49.599>already

162
00:07:51.800 --> 00:07:54.600
<00:07:51.800>looks <00:07:51.975>quite <00:07:52.150>complicated. <00:07:52.325>So <00:07:52.500>let's <00:07:52.675>go <00:07:52.850>through <00:07:53.025>this <00:07:53.200>line

163
00:07:54.600 --> 00:07:54.900
<00:07:54.600>by <00:07:54.870>line.

164
00:07:56.700 --> 00:07:59.600
<00:07:56.700>Um <00:07:56.840>what <00:07:56.979>we're <00:07:57.120>actually <00:07:57.260>going <00:07:57.400>to <00:07:57.539>focus <00:07:57.680>on <00:07:57.820>the <00:07:57.960>type <00:07:58.099>parameters

165
00:07:59.600 --> 00:08:02.300
<00:07:59.600>here <00:07:59.755>the <00:07:59.911>key <00:08:00.066>extends <00:08:00.222>key <00:08:00.377>of <00:08:00.533>blah <00:08:00.688>blah <00:08:00.844>blah. <00:08:01.000>And

166
00:08:02.300 --> 00:08:05.800
<00:08:02.300>then <00:08:02.440>we <00:08:02.580>also <00:08:02.720>look <00:08:02.860>at <00:08:03.000>this <00:08:03.140>this <00:08:03.280>listener <00:08:03.420>so <00:08:03.560>swimming <00:08:03.700>in

167
00:08:05.800 --> 00:08:06.400
<00:08:05.800>on <00:08:05.980>this <00:08:06.159>a <00:08:06.340>bit.

168
00:08:07.200 --> 00:08:10.600
<00:08:07.200>This <00:08:07.375>key <00:08:07.550>off <00:08:07.724>this <00:08:07.900>key <00:08:08.075>of <00:08:08.250>operator <00:08:08.425>gives <00:08:08.599>you

169
00:08:10.600 --> 00:08:13.400
<00:08:10.600>a <00:08:10.800>union <00:08:11.000>type <00:08:11.200>for <00:08:11.400>all <00:08:11.600>those <00:08:11.800>string <00:08:12.000>address

170
00:08:13.400 --> 00:08:16.500
<00:08:13.400>here. <00:08:13.507>So <00:08:13.615>in <00:08:13.723>the <00:08:13.830>end <00:08:13.938>of <00:08:14.046>what <00:08:14.153>the <00:08:14.261>compiler <00:08:14.369>will <00:08:14.476>see <00:08:14.584>you <00:08:14.692>can <00:08:14.799>supply

171
00:08:16.500 --> 00:08:19.700
<00:08:16.500>a <00:08:16.733>choice <00:08:16.966>of <00:08:17.200>these <00:08:17.433>different <00:08:17.666>string <00:08:17.900>literals

172
00:08:19.700 --> 00:08:22.300
<00:08:19.700>so <00:08:19.875>you <00:08:20.050>can <00:08:20.224>supply <00:08:20.400>a <00:08:20.575>board <00:08:20.750>click <00:08:20.925>Mouse <00:08:21.099>over

173
00:08:22.300 --> 00:08:22.700
<00:08:22.300>and <00:08:22.480>so <00:08:22.659>on.

174
00:08:23.600 --> 00:08:26.500
<00:08:23.600>And <00:08:23.740>that <00:08:23.880>shakes <00:08:24.020>us <00:08:24.160>to <00:08:24.300>type <00:08:24.440>parameter <00:08:24.580>K. <00:08:24.720>Now. <00:08:24.860>The <00:08:25.000>K

175
00:08:26.500 --> 00:08:29.600
<00:08:26.500>here <00:08:26.627>is <00:08:26.754>actually <00:08:26.881>going <00:08:27.009>to <00:08:27.136>be <00:08:27.263>a <00:08:27.390>concrete <00:08:27.518>string <00:08:27.645>literal. <00:08:27.772>So <00:08:27.900>in

176
00:08:29.600 --> 00:08:32.100
<00:08:29.600>language <00:08:29.833>like <00:08:30.066>Java <00:08:30.300>or <00:08:30.533>kotlin <00:08:30.766>is <00:08:31.000>on

177
00:08:32.100 --> 00:08:35.200
<00:08:32.100>K <00:08:32.240>would <00:08:32.380>be <00:08:32.520>string. <00:08:32.659>But <00:08:32.800>here <00:08:32.940>in <00:08:33.080>time <00:08:33.220>to <00:08:33.360>do <00:08:33.500>is

178
00:08:35.200 --> 00:08:38.400
<00:08:35.200>actually <00:08:35.307>a <00:08:35.415>very <00:08:35.523>specific <00:08:35.630>string. <00:08:35.738>It's <00:08:35.846>just <00:08:35.953>gonna <00:08:36.061>be <00:08:36.169>the <00:08:36.276>string <00:08:36.384>aboard <00:08:36.492>or <00:08:36.600>the

179
00:08:38.400 --> 00:08:39.100
<00:08:38.400>string <00:08:38.557>click <00:08:38.715>and <00:08:38.872>so <00:08:39.030>on.

180
00:08:40.100 --> 00:08:43.300
<00:08:40.100>um, <00:08:40.227>then <00:08:40.354>you <00:08:40.481>just <00:08:40.609>pass <00:08:40.736>that <00:08:40.863>as <00:08:40.990>a <00:08:41.118>type <00:08:41.245>just <00:08:41.372>a <00:08:41.500>string

181
00:08:43.300 --> 00:08:47.100
<00:08:43.299>literal <00:08:43.455>and <00:08:43.611>here <00:08:43.766>in <00:08:43.922>The <00:08:44.077>Listener, <00:08:44.233>which <00:08:44.388>is <00:08:44.544>a <00:08:44.699>function

182
00:08:46.100 --> 00:08:49.500
<00:08:46.100>that <00:08:46.333>you <00:08:46.566>pass <00:08:46.800>into <00:08:47.033>Advent <00:08:47.266>listener <00:08:47.500>you

183
00:08:49.500 --> 00:08:50.000
select

184
00:08:50.700 --> 00:08:52.700
<00:08:50.700>the <00:08:51.050>appropriate <00:08:51.400>type <00:08:51.750>of <00:08:52.100>that

185
00:08:53.600 --> 00:08:56.300
<00:08:53.600>event. <00:08:53.775>So <00:08:53.950>here <00:08:54.125>we <00:08:54.300>have <00:08:54.475>the <00:08:54.650>global <00:08:54.825>event <00:08:55.000>handles

186
00:08:56.300 --> 00:08:59.200
<00:08:56.300>event <00:08:56.427>map <00:08:56.554>and <00:08:56.681>then <00:08:56.809>the <00:08:56.936>scrap <00:08:57.063>brackets <00:08:57.190>and <00:08:57.318>click <00:08:57.445>and <00:08:57.572>then <00:08:57.699>we

187
00:08:59.200 --> 00:09:02.300
<00:08:59.200>actually <00:08:59.340>look <00:08:59.480>here <00:08:59.620>and <00:08:59.760>say <00:08:59.900>well <00:09:00.040>the <00:09:00.180>click <00:09:00.320>is <00:09:00.460>associated <00:09:00.600>with

188
00:09:02.300 --> 00:09:05.700
<00:09:02.300>the <00:09:02.427>mouse <00:09:02.554>event. <00:09:02.681>And <00:09:02.809>this <00:09:02.936>is <00:09:03.063>the <00:09:03.190>purpose <00:09:03.318>of <00:09:03.445>that <00:09:03.572>interface. <00:09:03.699>The

189
00:09:05.700 --> 00:09:08.400
<00:09:05.700>interface <00:09:05.875>is <00:09:06.050>just <00:09:06.225>there <00:09:06.400>to <00:09:06.575>allow <00:09:06.750>the <00:09:06.925>typing <00:09:07.100>of

190
00:09:08.400 --> 00:09:09.000
<00:09:08.400>that <00:09:08.940>method.

191
00:09:10.200 --> 00:09:13.000
<00:09:10.200>and <00:09:10.327>then <00:09:10.454>you <00:09:10.581>have <00:09:10.709>another <00:09:10.836>parameter <00:09:10.963>for <00:09:11.090>these <00:09:11.218>options <00:09:11.345>so <00:09:11.472>you <00:09:11.600>can

192
00:09:13.200 --> 00:09:14.700
<00:09:13.200>have <00:09:13.470>a <00:09:13.740>Boolean <00:09:14.010>or <00:09:14.280>whatever <00:09:14.550>so

193
00:09:15.900 --> 00:09:18.100
<00:09:15.900>To <00:09:16.100>summarize <00:09:16.300>what <00:09:16.500>we've <00:09:16.699>seen <00:09:16.900>on <00:09:17.100>this <00:09:17.300>slide

194
00:09:18.100 --> 00:09:21.400
<00:09:18.100>is <00:09:18.240>that <00:09:18.380>we <00:09:18.520>have <00:09:18.660>a <00:09:18.800>properties <00:09:18.940>in <00:09:19.080>an <00:09:19.220>interface. <00:09:19.360>You <00:09:19.500>can

195
00:09:21.400 --> 00:09:24.300
<00:09:21.400>select <00:09:21.600>those <00:09:21.800>properties <00:09:22.000>as <00:09:22.199>a <00:09:22.400>particular <00:09:22.600>Union <00:09:22.800>type

196
00:09:24.300 --> 00:09:27.300
<00:09:24.300>with <00:09:24.533>the <00:09:24.766>key <00:09:25.000>of <00:09:25.233>operator <00:09:25.466>and <00:09:25.699>then

197
00:09:27.300 --> 00:09:30.600
<00:09:27.300>you <00:09:27.500>can <00:09:27.699>select <00:09:27.900>the <00:09:28.099>value <00:09:28.300>of <00:09:28.500>that <00:09:28.699>proper

198
00:09:30.600 --> 00:09:35.200
<00:09:30.600>type <00:09:30.800>of <00:09:31.000>that <00:09:31.200>property <00:09:31.400>based <00:09:31.600>on <00:09:31.800>these <00:09:32.000>square

199
00:09:33.200 --> 00:09:36.100
<00:09:33.200>brackets <00:09:33.550>the <00:09:33.900>same <00:09:34.250>way <00:09:34.600>you

200
00:09:36.100 --> 00:09:37.000
<00:09:36.100>would <00:09:36.302>do <00:09:36.505>a <00:09:36.707>value <00:09:36.910>access.

201
00:09:37.900 --> 00:09:40.300
<00:09:37.900>And <00:09:38.055>that's <00:09:38.211>how <00:09:38.366>it <00:09:38.522>all <00:09:38.677>fits <00:09:38.833>together. <00:09:38.988>Now. <00:09:39.144>This <00:09:39.300>is

202
00:09:40.300 --> 00:09:43.200
<00:09:40.300>even <00:09:40.500>just <00:09:40.699>a <00:09:40.900>fairly <00:09:41.099>simple <00:09:41.300>example <00:09:41.500>from <00:09:41.699>the

203
00:09:43.200 --> 00:09:46.600
<00:09:43.200>typing <00:09:43.327>for <00:09:43.454>the <00:09:43.581>Dom. <00:09:43.709>So <00:09:43.836>there's <00:09:43.963>a <00:09:44.090>lot <00:09:44.218>more <00:09:44.345>complicated <00:09:44.472>examples <00:09:44.600>there.

204
00:09:48.800 --> 00:09:51.500
<00:09:48.800>If <00:09:48.939>you <00:09:49.079>want <00:09:49.219>to <00:09:49.359>if <00:09:49.500>you <00:09:49.640>want <00:09:49.780>to <00:09:49.920>be <00:09:50.060>in <00:09:50.199>for

205
00:09:51.500 --> 00:09:54.200
<00:09:51.500>a <00:09:51.616>wild <00:09:51.733>ride <00:09:51.850>look <00:09:51.966>at <00:09:52.083>the <00:09:52.200>react <00:09:52.316>typings, <00:09:52.433>it's <00:09:52.550>a <00:09:52.666>lot <00:09:52.783>worse <00:09:52.900>than

206
00:09:54.200 --> 00:09:54.400
that.

207
00:09:55.100 --> 00:09:58.200
<00:09:55.100>But <00:09:55.255>anyway, <00:09:55.411>I <00:09:55.566>digress <00:09:55.722>this <00:09:55.877>is <00:09:56.033>they <00:09:56.188>did <00:09:56.344>that <00:09:56.500>and

208
00:09:58.200 --> 00:10:01.300
<00:09:58.200>they <00:09:58.340>did <00:09:58.480>that <00:09:58.620>also <00:09:58.760>for <00:09:58.900>node.js <00:09:59.040>and <00:09:59.180>many <00:09:59.320>other <00:09:59.460>libraries <00:09:59.600>like

209
00:10:01.300 --> 00:10:04.700
<00:10:01.300>react. <00:10:01.439>So <00:10:01.579>the <00:10:01.719>key <00:10:01.859>idea <00:10:02.000>is <00:10:02.140>that <00:10:02.280>if <00:10:02.420>you <00:10:02.560>have <00:10:02.699>some

210
00:10:05.600 --> 00:10:08.600
<00:10:05.600>library <00:10:05.727>that <00:10:05.854>you're <00:10:05.981>using <00:10:06.109>some <00:10:06.236>programming <00:10:06.363>pattern <00:10:06.490>that <00:10:06.618>you're <00:10:06.745>using <00:10:06.872>from <00:10:07.000>JavaScript

211
00:10:08.600 --> 00:10:11.300
<00:10:08.600>chances <00:10:08.800>are <00:10:09.000>very <00:10:09.200>high. <00:10:09.400>They're <00:10:09.600>just <00:10:09.800>high <00:10:10.000>quality

212
00:10:11.300 --> 00:10:14.300
<00:10:11.300>type <00:10:11.455>definition <00:10:11.611>for <00:10:11.766>typescript <00:10:11.922>that <00:10:12.077>can <00:10:12.233>support <00:10:12.388>all <00:10:12.544>of <00:10:12.699>the

213
00:10:14.300 --> 00:10:17.400
<00:10:14.300>stuff <00:10:14.407>that <00:10:14.515>you <00:10:14.623>can <00:10:14.730>do. <00:10:14.838>So <00:10:14.946>you're <00:10:15.053>having <00:10:15.161>you <00:10:15.269>have <00:10:15.376>five <00:10:15.484>different <00:10:15.592>parameters <00:10:15.699>and

214
00:10:17.400 --> 00:10:21.100
<00:10:17.400>depending <00:10:17.507>on <00:10:17.615>what <00:10:17.723>you <00:10:17.830>stuff <00:10:17.938>in <00:10:18.046>there. <00:10:18.153>You <00:10:18.261>get <00:10:18.369>other <00:10:18.476>stuff <00:10:18.584>there <00:10:18.692>fine <00:10:18.800>typescript

215
00:10:20.100 --> 00:10:21.400
<00:10:20.100>can <00:10:20.685>do <00:10:21.270>it.

216
00:10:22.500 --> 00:10:25.800
<00:10:22.500>All <00:10:22.655>right. <00:10:22.811>Now <00:10:22.966>the <00:10:23.122>motivation <00:10:23.277>of <00:10:23.433>the <00:10:23.588>way <00:10:23.744>I <00:10:23.900>can

217
00:10:25.800 --> 00:10:28.700
<00:10:25.800>actually <00:10:26.079>start <00:10:26.359>talking <00:10:26.640>about <00:10:26.920>what <00:10:27.199>I

218
00:10:28.700 --> 00:10:32.100
<00:10:28.700>promised <00:10:28.875>in <00:10:29.050>the <00:10:29.225>abstract <00:10:29.400>of <00:10:29.575>this <00:10:29.750>talk <00:10:29.925>namely <00:10:30.100>data

219
00:10:31.100 --> 00:10:34.700
<00:10:31.100>pipelines. <00:10:31.380>How <00:10:31.660>many <00:10:31.940>here <00:10:32.220>have <00:10:32.500>used

220
00:10:34.700 --> 00:10:36.500
<00:10:34.700>pandas <00:10:35.400>python <00:10:36.100>pandas?

221
00:10:37.300 --> 00:10:40.200
<00:10:37.300>Okay, <00:10:37.455>that's <00:10:37.611>a <00:10:37.766>few <00:10:37.922>people <00:10:38.077>for <00:10:38.233>those <00:10:38.388>of <00:10:38.544>you <00:10:38.699>who

222
00:10:40.200 --> 00:10:43.600
<00:10:40.200>don't <00:10:40.355>know <00:10:40.511>pandas <00:10:40.666>is <00:10:40.822>a <00:10:40.977>very <00:10:41.133>popular <00:10:41.288>data <00:10:41.444>science <00:10:41.600>library

223
00:10:43.600 --> 00:10:46.600
<00:10:43.600>for <00:10:43.880>python <00:10:44.160>that's <00:10:44.440>in <00:10:44.720>the <00:10:45.000>nutshell.

224
00:10:47.400 --> 00:10:50.100
<00:10:47.400>And <00:10:47.540>one <00:10:47.680>of <00:10:47.819>the <00:10:47.959>key <00:10:48.100>objects <00:10:48.240>that <00:10:48.380>pandas <00:10:48.520>is <00:10:48.660>dealing <00:10:48.800>with

225
00:10:50.100 --> 00:10:53.200
<00:10:50.100>are <00:10:50.255>so <00:10:50.411>called <00:10:50.566>dataframes <00:10:50.722>and <00:10:50.877>data <00:10:51.033>frames <00:10:51.188>are <00:10:51.344>basically <00:10:51.500>tables.

226
00:10:54.300 --> 00:10:57.100
<00:10:54.300>Now, <00:10:54.474>what <00:10:54.650>is <00:10:54.824>that <00:10:55.000>about? <00:10:55.175>So <00:10:55.349>data <00:10:55.525>science <00:10:55.699>is

227
00:10:57.100 --> 00:11:00.100
<00:10:57.100>basically <00:10:57.275>just <00:10:57.450>tables <00:10:57.625>right <00:10:57.800>disclaimer. <00:10:57.975>I <00:10:58.150>am <00:10:58.325>not <00:10:58.500>a

228
00:11:00.100 --> 00:11:03.000
<00:11:00.100>data <00:11:00.300>scientist. <00:11:00.500>Please <00:11:00.700>do <00:11:00.900>not <00:11:01.100>kill <00:11:01.300>me <00:11:01.500>and

229
00:11:04.300 --> 00:11:07.400
<00:11:04.300>in <00:11:04.427>data <00:11:04.554>science, <00:11:04.681>you <00:11:04.809>have <00:11:04.936>these <00:11:05.063>tables. <00:11:05.190>So <00:11:05.318>you <00:11:05.445>have <00:11:05.572>rectangular <00:11:05.699>pieces

230
00:11:07.400 --> 00:11:10.200
<00:11:07.400>of <00:11:07.540>data <00:11:07.680>with <00:11:07.819>columns <00:11:07.959>and <00:11:08.100>rows <00:11:08.240>and <00:11:08.380>those <00:11:08.520>columns <00:11:08.660>may <00:11:08.800>have

231
00:11:10.200 --> 00:11:13.200
<00:11:10.200>types <00:11:10.433>and <00:11:10.666>you <00:11:10.900>can <00:11:11.133>exchange <00:11:11.366>them <00:11:11.600>for

232
00:11:13.200 --> 00:11:16.300
<00:11:13.200>example <00:11:13.340>with <00:11:13.480>CSV <00:11:13.620>or <00:11:13.760>this <00:11:13.900>explore <00:11:14.040>whatever <00:11:14.180>but <00:11:14.320>you <00:11:14.460>don't <00:11:14.600>just

233
00:11:16.300 --> 00:11:18.500
<00:11:16.300>want <00:11:16.427>to <00:11:16.554>look <00:11:16.681>at <00:11:16.809>the <00:11:16.936>data. <00:11:17.063>You <00:11:17.190>want <00:11:17.318>to <00:11:17.445>analyze <00:11:17.572>the <00:11:17.699>data?

234
00:11:19.300 --> 00:11:22.900
<00:11:19.300>And <00:11:19.455>this <00:11:19.611>is <00:11:19.766>where <00:11:19.922>it <00:11:20.077>becomes <00:11:20.233>interesting <00:11:20.388>because <00:11:20.544>I've <00:11:20.699>done

235
00:11:22.900 --> 00:11:25.700
<00:11:22.900>a <00:11:23.133>toy <00:11:23.366>project <00:11:23.600>with <00:11:23.833>pandas <00:11:24.066>last <00:11:24.300>year.

236
00:11:26.400 --> 00:11:29.100
<00:11:26.400>And <00:11:26.555>I <00:11:26.711>managed <00:11:26.866>to <00:11:27.022>get <00:11:27.177>some <00:11:27.333>insight <00:11:27.488>off <00:11:27.644>the <00:11:27.800>data.

237
00:11:29.100 --> 00:11:32.500
<00:11:29.100>But <00:11:29.216>the <00:11:29.333>problem <00:11:29.450>was <00:11:29.566>that <00:11:29.683>pandas <00:11:29.800>did <00:11:29.916>not <00:11:30.033>help <00:11:30.150>me <00:11:30.266>at <00:11:30.383>all <00:11:30.500>when

238
00:11:32.500 --> 00:11:35.700
<00:11:32.500>looking <00:11:32.616>at <00:11:32.733>the <00:11:32.850>shape <00:11:32.966>of <00:11:33.083>my <00:11:33.200>data. <00:11:33.316>So <00:11:33.433>it <00:11:33.550>is <00:11:33.666>very <00:11:33.783>easy <00:11:33.900>to

239
00:11:35.700 --> 00:11:38.900
<00:11:35.700>write <00:11:35.900>code <00:11:36.100>in <00:11:36.300>pandas <00:11:36.500>that <00:11:36.700>will <00:11:36.900>just <00:11:37.100>throw

240
00:11:38.900 --> 00:11:41.500
<00:11:38.900>errors <00:11:39.133>left <00:11:39.366>and <00:11:39.600>right <00:11:39.833>and <00:11:40.066>the <00:11:40.300>errors

241
00:11:41.500 --> 00:11:45.000
<00:11:41.500>that <00:11:41.616>you <00:11:41.733>get <00:11:41.850>are <00:11:41.966>basically <00:11:42.083>exception <00:11:42.200>traces <00:11:42.316>and <00:11:42.433>then <00:11:42.550>you <00:11:42.666>see <00:11:42.783>a <00:11:42.900>hundred

242
00:11:44.500 --> 00:11:47.800
<00:11:44.500>lines <00:11:44.655>down <00:11:44.811>the <00:11:44.966>stack <00:11:45.122>race. <00:11:45.277>You <00:11:45.433>see? <00:11:45.588>Well, <00:11:45.744>there's <00:11:45.900>an

243
00:11:47.800 --> 00:11:50.200
<00:11:47.800>integer <00:11:47.900>and <00:11:48.000>you <00:11:48.099>try <00:11:48.199>to <00:11:48.300>convert <00:11:48.400>it <00:11:48.500>to <00:11:48.599>the <00:11:48.699>string <00:11:48.800>but <00:11:48.900>it <00:11:49.000>isn't <00:11:49.099>and <00:11:49.199>then

244
00:11:50.200 --> 00:11:53.400
<00:11:50.200>you <00:11:50.307>have <00:11:50.415>to <00:11:50.523>reverse <00:11:50.630>and <00:11:50.738>you <00:11:50.846>know, <00:11:50.953>well, <00:11:51.061>what <00:11:51.169>what <00:11:51.276>column <00:11:51.384>had <00:11:51.492>Now <00:11:51.600>a

245
00:11:53.400 --> 00:11:55.700
<00:11:53.400>type <00:11:53.555>that <00:11:53.711>wasn't <00:11:53.866>expecting <00:11:54.022>so <00:11:54.177>I <00:11:54.333>got <00:11:54.488>frustrated <00:11:54.644>with <00:11:54.800>that.

246
00:11:56.500 --> 00:11:59.400
<00:11:56.500>And <00:11:56.655>I <00:11:56.811>started <00:11:56.966>thinking <00:11:57.122>about <00:11:57.277>this <00:11:57.433>could <00:11:57.588>be <00:11:57.744>potentially <00:11:57.900>improve

247
00:11:59.400 --> 00:12:02.400
<00:11:59.400>that <00:11:59.633>now <00:11:59.866>I'm <00:12:00.100>not <00:12:00.333>exactly <00:12:00.566>sure <00:12:00.800>but

248
00:12:02.400 --> 00:12:05.200
<00:12:02.400>I <00:12:02.516>think <00:12:02.633>so <00:12:02.750>python <00:12:02.866>also <00:12:02.983>has <00:12:03.100>Type <00:12:03.216>annotations. <00:12:03.333>No, <00:12:03.449>I <00:12:03.566>think <00:12:03.683>there's <00:12:03.800>no

249
00:12:05.200 --> 00:12:08.200
<00:12:05.200>such <00:12:05.307>thing <00:12:05.415>for <00:12:05.523>pandas. <00:12:05.630>I'm <00:12:05.738>not <00:12:05.846>sure <00:12:05.953>if <00:12:06.061>there's <00:12:06.169>if <00:12:06.276>you <00:12:06.384>can <00:12:06.492>use <00:12:06.600>that.

250
00:12:08.200 --> 00:12:11.700
<00:12:08.200>But <00:12:08.327>anyway, <00:12:08.454>I <00:12:08.581>care <00:12:08.709>more <00:12:08.836>about <00:12:08.963>typescript <00:12:09.090>anyway, <00:12:09.218>so <00:12:09.345>I <00:12:09.472>thought <00:12:09.600>they

251
00:12:11.700 --> 00:12:14.400
<00:12:11.700>might <00:12:11.807>not <00:12:11.915>build <00:12:12.023>a <00:12:12.130>prototype <00:12:12.238>and <00:12:12.346>this <00:12:12.453>is <00:12:12.561>what <00:12:12.669>I'm <00:12:12.776>going <00:12:12.884>to <00:12:12.992>report <00:12:13.100>here

252
00:12:14.400 --> 00:12:14.600
on.

253
00:12:15.700 --> 00:12:18.300
<00:12:15.700>Um, <00:12:15.900>so <00:12:16.100>let's <00:12:16.300>first <00:12:16.500>start <00:12:16.700>at <00:12:16.900>looking <00:12:17.100>at

254
00:12:18.300 --> 00:12:21.500
<00:12:18.300>typical <00:12:18.474>operations <00:12:18.650>that <00:12:18.824>you <00:12:19.000>would <00:12:19.175>do <00:12:19.349>with <00:12:19.525>such <00:12:19.699>data

255
00:12:21.500 --> 00:12:24.300
<00:12:21.500>frames. <00:12:21.655>So, <00:12:21.811>of <00:12:21.966>course <00:12:22.122>the <00:12:22.277>easiest <00:12:22.433>thing <00:12:22.588>is <00:12:22.744>you <00:12:22.900>access

256
00:12:24.300 --> 00:12:27.100
<00:12:24.300>some <00:12:24.416>row <00:12:24.533>at <00:12:24.650>a <00:12:24.766>particular <00:12:24.883>column <00:12:25.000>and <00:12:25.116>then <00:12:25.233>you <00:12:25.349>get <00:12:25.466>the <00:12:25.583>type <00:12:25.699>of

257
00:12:27.100 --> 00:12:30.900
<00:12:27.100>that <00:12:27.227>thing <00:12:27.354>back. <00:12:27.481>So <00:12:27.609>if <00:12:27.736>you <00:12:27.863>have <00:12:27.990>a <00:12:28.118>column <00:12:28.245>that's <00:12:28.372>all <00:12:28.500>integers

258
00:12:30.900 --> 00:12:33.200
<00:12:30.900>then <00:12:31.055>accessing <00:12:31.211>that <00:12:31.366>column <00:12:31.522>should <00:12:31.677>always <00:12:31.833>give <00:12:31.988>an <00:12:32.144>integer. <00:12:32.300>So

259
00:12:33.200 --> 00:12:36.500
<00:12:33.200>we <00:12:33.355>do <00:12:33.511>not <00:12:33.666>support <00:12:33.822>any <00:12:33.977>sort <00:12:34.133>of <00:12:34.288>heterogeneous <00:12:34.444>columns <00:12:34.600>in

260
00:12:36.500 --> 00:12:37.400
<00:12:36.500>the <00:12:36.905>ideal <00:12:37.310>world.

261
00:12:38.300 --> 00:12:41.900
<00:12:38.300>Then <00:12:38.455>you <00:12:38.611>can <00:12:38.766>maybe <00:12:38.922>filter <00:12:39.077>roles <00:12:39.233>by <00:12:39.388>predicate. <00:12:39.544>You <00:12:39.699>can

262
00:12:41.900 --> 00:12:44.200
<00:12:41.900>say. <00:12:42.040>Well <00:12:42.180>I <00:12:42.319>want <00:12:42.459>to <00:12:42.600>keep <00:12:42.740>all <00:12:42.880>the <00:12:43.020>rows <00:12:43.160>that <00:12:43.300>have

263
00:12:44.200 --> 00:12:47.300
<00:12:44.200>a <00:12:44.340>particular <00:12:44.480>value <00:12:44.620>set <00:12:44.760>to <00:12:44.900>null <00:12:45.040>or <00:12:45.180>the <00:12:45.320>other <00:12:45.460>way <00:12:45.600>around.

264
00:12:48.100 --> 00:12:51.700
<00:12:48.100>You <00:12:48.240>may <00:12:48.380>want <00:12:48.520>to <00:12:48.660>drop <00:12:48.800>columns. <00:12:48.940>If <00:12:49.080>you're <00:12:49.220>importing <00:12:49.360>large <00:12:49.500>existing

265
00:12:51.700 --> 00:12:54.500
<00:12:51.700>data <00:12:51.980>sets. <00:12:52.260>There's <00:12:52.540>a <00:12:52.820>truckload <00:12:53.100>of

266
00:12:54.500 --> 00:12:57.300
<00:12:54.500>various <00:12:54.607>columns <00:12:54.715>and <00:12:54.823>you <00:12:54.930>don't <00:12:55.038>even <00:12:55.146>need <00:12:55.253>them <00:12:55.361>all <00:12:55.469>in <00:12:55.576>your <00:12:55.684>memory. <00:12:55.792>So <00:12:55.900>it

267
00:12:57.300 --> 00:13:00.800
<00:12:57.300>just <00:12:57.427>drop <00:12:57.554>them <00:12:57.681>out. <00:12:57.809>You <00:12:57.936>may <00:12:58.063>want <00:12:58.190>to <00:12:58.318>compute <00:12:58.445>new <00:12:58.572>columns <00:12:58.699>based

268
00:13:00.800 --> 00:13:03.100
<00:13:00.800>on <00:13:01.033>existing <00:13:01.266>columns <00:13:01.500>or <00:13:01.733>this <00:13:01.966>one <00:13:02.199>is

269
00:13:03.100 --> 00:13:06.200
<00:13:03.100>my <00:13:03.216>favorite <00:13:03.333>because <00:13:03.450>it's <00:13:03.566>the <00:13:03.683>hardest <00:13:03.800>one <00:13:03.916>to <00:13:04.033>type <00:13:04.150>which <00:13:04.266>is <00:13:04.383>aggregating <00:13:04.500>and

270
00:13:06.200 --> 00:13:07.100
<00:13:06.200>grouping <00:13:06.605>by <00:13:07.010>column.

271
00:13:08.900 --> 00:13:11.500
<00:13:08.900>Which <00:13:09.074>is <00:13:09.250>of <00:13:09.425>course <00:13:09.600>a <00:13:09.775>fairly <00:13:09.949>vital <00:13:10.125>operation. <00:13:10.300>So

272
00:13:11.500 --> 00:13:14.100
<00:13:11.500>for <00:13:11.655>example, <00:13:11.811>you <00:13:11.966>have <00:13:12.122>a <00:13:12.277>list <00:13:12.433>of <00:13:12.588>sales <00:13:12.744>and <00:13:12.900>you

273
00:13:14.100 --> 00:13:17.100
<00:13:14.100>want <00:13:14.255>to <00:13:14.411>aggregate <00:13:14.566>all <00:13:14.722>sales <00:13:14.877>particular <00:13:15.033>quarters. <00:13:15.188>So <00:13:15.344>you <00:13:15.500>want

274
00:13:17.100 --> 00:13:20.200
<00:13:17.100>to <00:13:17.240>get <00:13:17.380>an <00:13:17.520>aggregated <00:13:17.660>list <00:13:17.800>of <00:13:17.940>how <00:13:18.080>many <00:13:18.220>products <00:13:18.360>of <00:13:18.500>that

275
00:13:20.200 --> 00:13:23.400
<00:13:20.200>item <00:13:20.355>or <00:13:20.511>how <00:13:20.666>many <00:13:20.822>how <00:13:20.977>much <00:13:21.133>quantity <00:13:21.288>of <00:13:21.444>that <00:13:21.600>item

276
00:13:23.400 --> 00:13:27.500
<00:13:23.400>you <00:13:23.516>sold <00:13:23.633>in <00:13:23.750>quarter <00:13:23.866>one <00:13:23.983>quarter <00:13:24.100>two <00:13:24.216>and <00:13:24.333>so <00:13:24.449>on <00:13:24.566>so <00:13:24.683>that's <00:13:24.800>fairly

277
00:13:27.500 --> 00:13:30.000
<00:13:27.500>intricate <00:13:27.700>because <00:13:27.900>the <00:13:28.100>aggregation <00:13:28.300>also <00:13:28.500>depends <00:13:28.700>on <00:13:28.900>the

278
00:13:30.400 --> 00:13:33.500
<00:13:30.400>type. <00:13:30.507>So <00:13:30.615>if <00:13:30.723>you <00:13:30.830>want <00:13:30.938>to <00:13:31.046>aggregate <00:13:31.153>integers, <00:13:31.261>you <00:13:31.369>would <00:13:31.476>do <00:13:31.584>that <00:13:31.692>differently <00:13:31.800>than

279
00:13:33.500 --> 00:13:36.300
<00:13:33.500>aggregating <00:13:33.655>strings <00:13:33.811>or <00:13:33.966>aggregating <00:13:34.122>areas. <00:13:34.277>So <00:13:34.433>that's <00:13:34.588>also <00:13:34.744>a <00:13:34.900>particular

280
00:13:36.300 --> 00:13:37.200
<00:13:36.300>Challenge <00:13:37.110>and

281
00:13:38.400 --> 00:13:41.300
<00:13:38.400>I <00:13:38.540>know <00:13:38.680>people <00:13:38.819>who <00:13:38.959>know <00:13:39.100>pandas <00:13:39.240>very <00:13:39.380>well <00:13:39.520>who <00:13:39.660>can <00:13:39.800>just

282
00:13:41.300 --> 00:13:44.600
<00:13:41.300>like <00:13:41.407>tell <00:13:41.515>me <00:13:41.623>the <00:13:41.730>incantation <00:13:41.838>I <00:13:41.946>have <00:13:42.053>to <00:13:42.161>do <00:13:42.269>to <00:13:42.376>get <00:13:42.484>this <00:13:42.592>right <00:13:42.699>but

283
00:13:44.600 --> 00:13:47.400
<00:13:44.600>just <00:13:44.755>by <00:13:44.911>looking <00:13:45.066>at <00:13:45.222>the <00:13:45.377>documentation, <00:13:45.533>I <00:13:45.688>could <00:13:45.844>never <00:13:46.000>figure

284
00:13:47.400 --> 00:13:50.400
<00:13:47.400>that <00:13:47.555>out <00:13:47.711>correctly <00:13:47.866>and <00:13:48.022>I'm <00:13:48.177>like, <00:13:48.333>I <00:13:48.488>want <00:13:48.644>to <00:13:48.800>type

285
00:13:50.400 --> 00:13:53.200
<00:13:50.400>in <00:13:50.600>full <00:13:50.800>bar <00:13:51.000>dot <00:13:51.199>Aggregate <00:13:51.400>and <00:13:51.600>then <00:13:51.800>I

286
00:13:53.200 --> 00:13:56.400
<00:13:53.200>want <00:13:53.300>to <00:13:53.400>autocomplete <00:13:53.500>to <00:13:53.600>suggest <00:13:53.700>me <00:13:53.800>the <00:13:53.900>types <00:13:54.000>of <00:13:54.100>what <00:13:54.200>I <00:13:54.300>have <00:13:54.400>to <00:13:54.500>do <00:13:54.600>and

287
00:13:56.400 --> 00:13:59.300
<00:13:56.400>then <00:13:56.555>I <00:13:56.711>can <00:13:56.866>give <00:13:57.022>it <00:13:57.177>an <00:13:57.333>implementation <00:13:57.488>of <00:13:57.644>what <00:13:57.800>it

288
00:13:59.300 --> 00:14:02.100
<00:13:59.300>wants <00:13:59.407>from <00:13:59.515>the <00:13:59.623>instead <00:13:59.730>of <00:13:59.838>like <00:13:59.946>randomly <00:14:00.053>trying <00:14:00.161>out <00:14:00.269>things <00:14:00.376>and <00:14:00.484>then <00:14:00.592>seeing <00:14:00.699>if

289
00:14:02.100 --> 00:14:04.300
<00:14:02.100>it <00:14:02.450>succeeds <00:14:02.800>a <00:14:03.150>compound <00:14:03.500>runtime.

290
00:14:05.600 --> 00:14:08.300
<00:14:05.600>All <00:14:05.950>right, <00:14:06.300>so <00:14:06.650>boiling <00:14:07.000>this

291
00:14:08.300 --> 00:14:11.600
<00:14:08.300>all <00:14:08.439>down <00:14:08.579>or <00:14:08.719>basically <00:14:08.859>abstracting <00:14:09.000>this <00:14:09.140>away <00:14:09.280>from <00:14:09.420>this <00:14:09.560>concrete <00:14:09.699>operations.

292
00:14:11.600 --> 00:14:15.200
<00:14:11.600>What <00:14:11.833>we <00:14:12.066>have <00:14:12.300>is <00:14:12.533>that <00:14:12.766>an <00:14:13.000>operation

293
00:14:15.200 --> 00:14:18.500
<00:14:15.200>on <00:14:15.316>such <00:14:15.433>a <00:14:15.550>data <00:14:15.666>frame <00:14:15.783>or <00:14:15.900>table. <00:14:16.016>It's <00:14:16.133>a <00:14:16.250>function <00:14:16.366>that <00:14:16.483>takes <00:14:16.600>in

294
00:14:18.500 --> 00:14:21.300
<00:14:18.500>the <00:14:18.655>table <00:14:18.811>and <00:14:18.966>produces <00:14:19.122>a <00:14:19.277>new <00:14:19.433>table. <00:14:19.588>That's <00:14:19.744>the <00:14:19.900>basic

295
00:14:21.300 --> 00:14:24.200
<00:14:21.300>idea <00:14:21.427>except <00:14:21.554>for <00:14:21.681>the <00:14:21.809>selection. <00:14:21.936>Of <00:14:22.063>course, <00:14:22.190>then <00:14:22.318>you <00:14:22.445>can <00:14:22.572>think <00:14:22.699>of

296
00:14:24.200 --> 00:14:26.100
<00:14:24.200>like <00:14:24.375>having <00:14:24.550>a <00:14:24.725>one-time <00:14:24.900>table <00:14:25.075>that <00:14:25.250>you <00:14:25.425>get <00:14:25.600>out.

297
00:14:27.500 --> 00:14:30.500
<00:14:27.500>Okay, <00:14:27.700>that's <00:14:27.900>not <00:14:28.100>satisfactory. <00:14:28.300>Right? <00:14:28.500>So <00:14:28.700>there's <00:14:28.900>there's

298
00:14:30.500 --> 00:14:33.500
<00:14:30.500>just <00:14:30.640>simple <00:14:30.780>type <00:14:30.920>and <00:14:31.060>we <00:14:31.200>wouldn't <00:14:31.340>here <00:14:31.480>be <00:14:31.620>at <00:14:31.760>the <00:14:31.900>advanced

299
00:14:33.500 --> 00:14:36.100
<00:14:33.500>typing <00:14:33.616>in <00:14:33.733>typescript <00:14:33.850>session <00:14:33.966>for <00:14:34.083>that. <00:14:34.200>So <00:14:34.316>let's <00:14:34.433>zoom <00:14:34.550>on <00:14:34.666>into <00:14:34.783>a <00:14:34.900>little

300
00:14:36.600 --> 00:14:39.700
<00:14:36.600>so <00:14:36.775>one <00:14:36.950>idea <00:14:37.125>is <00:14:37.300>that <00:14:37.475>you <00:14:37.650>can <00:14:37.825>specify <00:14:38.000>the

301
00:14:39.700 --> 00:14:42.200
<00:14:39.700>types <00:14:39.840>of <00:14:39.980>the <00:14:40.120>columns <00:14:40.260>here <00:14:40.400>as <00:14:40.540>a <00:14:40.680>type <00:14:40.820>parameter. <00:14:40.960>So <00:14:41.100>you

302
00:14:42.200 --> 00:14:45.300
<00:14:42.200>can <00:14:42.400>start <00:14:42.600>parameterizing <00:14:42.800>the <00:14:43.000>table <00:14:43.200>class <00:14:43.400>and <00:14:43.600>you

303
00:14:45.300 --> 00:14:48.600
<00:14:45.300>say <00:14:45.439>here <00:14:45.579>the <00:14:45.719>set <00:14:45.859>of <00:14:46.000>columns <00:14:46.140>that <00:14:46.280>it <00:14:46.420>has <00:14:46.560>we <00:14:46.699>look

304
00:14:48.600 --> 00:14:52.200
<00:14:48.600>at <00:14:48.740>the <00:14:48.880>format <00:14:49.020>of <00:14:49.160>that <00:14:49.300>later. <00:14:49.440>And <00:14:49.580>then <00:14:49.720>maybe <00:14:49.860>you're <00:14:50.000>modifying

305
00:14:51.200 --> 00:14:54.500
<00:14:51.200>The <00:14:51.355>Columns <00:14:51.511>and <00:14:51.666>then <00:14:51.822>you <00:14:51.977>get <00:14:52.133>a <00:14:52.288>table <00:14:52.444>with <00:14:52.600>a

306
00:14:54.500 --> 00:14:56.300
<00:14:54.500>different <00:14:54.780>column <00:14:55.060>set <00:14:55.340>of <00:14:55.620>columns <00:14:55.900>out.

307
00:14:57.800 --> 00:15:01.500
<00:14:57.800>Um, <00:14:57.955>this <00:14:58.111>does <00:14:58.266>not <00:14:58.422>yet <00:14:58.577>tell <00:14:58.733>you <00:14:58.888>the <00:14:59.044>the <00:14:59.199>connection

308
00:15:01.500 --> 00:15:04.600
<00:15:01.500>between <00:15:01.655>the <00:15:01.811>calls <00:15:01.966>in <00:15:02.122>and <00:15:02.277>calls <00:15:02.433>out <00:15:02.588>because <00:15:02.744>each <00:15:02.900>of

309
00:15:04.600 --> 00:15:07.400
<00:15:04.600>these <00:15:04.775>operations <00:15:04.950>may <00:15:05.125>do <00:15:05.300>different <00:15:05.475>operations <00:15:05.650>on <00:15:05.825>those <00:15:06.000>columns,

310
00:15:07.400 --> 00:15:10.400
<00:15:07.400>but <00:15:07.555>that's <00:15:07.711>a <00:15:07.866>general <00:15:08.022>idea. <00:15:08.177>You <00:15:08.333>have <00:15:08.488>strongly <00:15:08.644>type <00:15:08.800>tables

311
00:15:10.400 --> 00:15:13.100
<00:15:10.400>where <00:15:10.555>it <00:15:10.711>tells <00:15:10.866>you <00:15:11.022>what <00:15:11.177>the <00:15:11.333>columns <00:15:11.488>are. <00:15:11.644>Now <00:15:11.800>you

312
00:15:13.100 --> 00:15:16.400
<00:15:13.100>might <00:15:13.227>want <00:15:13.354>to <00:15:13.481>ask <00:15:13.609>a <00:15:13.736>question. <00:15:13.863>What <00:15:13.990>about <00:15:14.118>the <00:15:14.245>rows <00:15:14.372>all <00:15:14.500>the

313
00:15:16.400 --> 00:15:19.300
<00:15:16.400>fundamental <00:15:16.507>assumption <00:15:16.615>here <00:15:16.723>is <00:15:16.830>that <00:15:16.938>the <00:15:17.046>roles <00:15:17.153>are <00:15:17.261>all <00:15:17.369>the <00:15:17.476>same. <00:15:17.584>So <00:15:17.692>rows <00:15:17.800>are

314
00:15:19.300 --> 00:15:22.300
<00:15:19.300>just <00:15:19.427>multiple <00:15:19.554>copies <00:15:19.681>of <00:15:19.809>those <00:15:19.936>columns. <00:15:20.063>So <00:15:20.190>we <00:15:20.318>do <00:15:20.445>not <00:15:20.572>have <00:15:20.699>any

315
00:15:22.300 --> 00:15:25.000
<00:15:22.300>sort <00:15:22.533>of <00:15:22.766>heterogeneous <00:15:23.000>roles. <00:15:23.233>I'm <00:15:23.466>not <00:15:23.699>even

316
00:15:25.200 --> 00:15:28.400
<00:15:25.200>sure <00:15:25.287>what <00:15:25.375>the <00:15:25.462>use <00:15:25.550>case <00:15:25.637>for <00:15:25.725>that <00:15:25.812>would <00:15:25.900>be <00:15:25.987>if <00:15:26.075>you <00:15:26.162>had <00:15:26.250>heterogeneous <00:15:26.337>columns <00:15:26.425>and <00:15:26.512>rows, <00:15:26.600>so

317
00:15:28.400 --> 00:15:30.600
<00:15:28.400>I'm <00:15:28.680>I'm <00:15:28.959>completely <00:15:29.240>sparing <00:15:29.520>without <00:15:29.800>you.

318
00:15:31.300 --> 00:15:32.700
<00:15:31.300>Okay, <00:15:31.480>let's <00:15:31.660>zoom <00:15:31.840>on <00:15:32.020>this <00:15:32.200>a <00:15:32.380>little <00:15:32.560>more.

319
00:15:34.700 --> 00:15:37.900
<00:15:34.700>If <00:15:34.840>you're <00:15:34.980>familiar <00:15:35.120>with <00:15:35.260>the <00:15:35.400>generics <00:15:35.540>from <00:15:35.680>let's <00:15:35.820>say <00:15:35.960>C++ <00:15:36.100>or

320
00:15:37.900 --> 00:15:40.100
<00:15:37.900>Java <00:15:38.055>and <00:15:38.211>so <00:15:38.366>on <00:15:38.522>you <00:15:38.677>would <00:15:38.833>have <00:15:38.988>actually <00:15:39.144>quite <00:15:39.300>a

321
00:15:40.100 --> 00:15:43.600
<00:15:40.100>hard <00:15:40.255>time <00:15:40.411>of <00:15:40.566>coming <00:15:40.722>up <00:15:40.877>with <00:15:41.033>what <00:15:41.188>that <00:15:41.344>type <00:15:41.500>parameter

322
00:15:43.600 --> 00:15:48.800
<00:15:43.600>should <00:15:43.755>look <00:15:43.911>like <00:15:44.066>so <00:15:44.222>actually <00:15:44.377>defining <00:15:44.533>that <00:15:44.688>interface <00:15:44.844>fortunately <00:15:45.000>in

323
00:15:47.800 --> 00:15:50.900
<00:15:47.800>typescript. <00:15:48.033>It's <00:15:48.266>a <00:15:48.500>lot <00:15:48.733>easier <00:15:48.966>because <00:15:49.199>I

324
00:15:50.900 --> 00:15:53.600
<00:15:50.900>told <00:15:51.133>you <00:15:51.366>typescript <00:15:51.600>has <00:15:51.833>duct <00:15:52.066>types. <00:15:52.300>So

325
00:15:53.600 --> 00:15:57.500
<00:15:53.600>it <00:15:53.755>is <00:15:53.911>always <00:15:54.066>possible <00:15:54.222>to <00:15:54.377>just <00:15:54.533>come <00:15:54.688>up <00:15:54.844>with <00:15:55.000>Anonymous

326
00:15:56.500 --> 00:15:59.500
<00:15:56.500>record <00:15:56.850>types <00:15:57.200>and <00:15:57.550>then <00:15:57.900>just

327
00:15:59.500 --> 00:16:02.200
<00:15:59.500>slap <00:15:59.627>them <00:15:59.754>in <00:15:59.881>as <00:16:00.009>type <00:16:00.136>parameters <00:16:00.263>and <00:16:00.390>then <00:16:00.518>you <00:16:00.645>have <00:16:00.772>an <00:16:00.900>object

328
00:16:02.200 --> 00:16:05.200
<00:16:02.200>type <00:16:02.327>in <00:16:02.454>Java. <00:16:02.581>You <00:16:02.709>would <00:16:02.836>always <00:16:02.963>have <00:16:03.090>to <00:16:03.218>define <00:16:03.345>a <00:16:03.472>class <00:16:03.600>and

329
00:16:05.200 --> 00:16:08.200
<00:16:05.200>then <00:16:05.277>you <00:16:05.355>have <00:16:05.433>the <00:16:05.511>reference <00:16:05.588>that <00:16:05.666>class <00:16:05.744>and <00:16:05.822>then <00:16:05.900>if <00:16:05.977>you <00:16:06.055>want <00:16:06.133>to <00:16:06.211>add <00:16:06.288>something <00:16:06.366>to <00:16:06.444>the <00:16:06.522>class <00:16:06.600>you

330
00:16:08.200 --> 00:16:11.300
<00:16:08.200>have <00:16:08.316>to <00:16:08.433>refactor <00:16:08.550>blah <00:16:08.666>blah. <00:16:08.783>None <00:16:08.900>of <00:16:09.016>that <00:16:09.133>is <00:16:09.250>necessary <00:16:09.366>typescript. <00:16:09.483>So <00:16:09.600>what

331
00:16:11.300 --> 00:16:14.500
<00:16:11.300>can <00:16:11.455>we <00:16:11.611>do <00:16:11.766>we <00:16:11.922>can <00:16:12.077>Define <00:16:12.233>interface <00:16:12.388>table <00:16:12.544>as <00:16:12.699>follows?

332
00:16:14.500 --> 00:16:17.200
<00:16:14.500>We <00:16:14.627>give <00:16:14.754>it <00:16:14.881>one <00:16:15.009>type <00:16:15.136>parameter <00:16:15.263>we <00:16:15.390>call <00:16:15.518>it <00:16:15.645>calls <00:16:15.772>and <00:16:15.900>we

333
00:16:17.200 --> 00:16:20.500
<00:16:17.200>say <00:16:17.375>that <00:16:17.550>calls <00:16:17.725>extends <00:16:17.900>record <00:16:18.075>string <00:16:18.250>any <00:16:18.425>now <00:16:18.600>record

334
00:16:20.500 --> 00:16:23.600
<00:16:20.500>is <00:16:20.700>the <00:16:20.900>super <00:16:21.100>type <00:16:21.300>of <00:16:21.500>all <00:16:21.700>the <00:16:21.900>object

335
00:16:23.600 --> 00:16:26.100
<00:16:23.600>types <00:16:23.775>in <00:16:23.950>typescript. <00:16:24.125>So <00:16:24.300>what <00:16:24.475>you're <00:16:24.650>saying <00:16:24.825>here <00:16:25.000>is

336
00:16:26.100 --> 00:16:29.500
<00:16:26.100>yes <00:16:26.300>objects <00:16:26.500>very <00:16:26.700>of <00:16:26.900>strings <00:16:27.100>if <00:16:27.300>keys <00:16:27.500>and

337
00:16:29.500 --> 00:16:32.300
<00:16:29.500>anything <00:16:29.780>as <00:16:30.060>value, <00:16:30.340>so, <00:16:30.620>you <00:16:30.900>know,

338
00:16:32.300 --> 00:16:34.400
<00:16:32.300>can <00:16:32.533>we <00:16:32.766>hit <00:16:33.000>a <00:16:33.233>Virginia <00:16:33.466>here <00:16:33.699>and

339
00:16:34.800 --> 00:16:37.300
<00:16:34.800>The <00:16:34.955>key <00:16:35.111>idea <00:16:35.266>is <00:16:35.422>that <00:16:35.577>the <00:16:35.733>calls <00:16:35.888>then <00:16:36.044>is <00:16:36.199>the

340
00:16:37.300 --> 00:16:40.700
<00:16:37.300>concrete <00:16:37.416>record <00:16:37.533>type. <00:16:37.650>So <00:16:37.766>you <00:16:37.883>have <00:16:38.000>a <00:16:38.116>concrete <00:16:38.233>record <00:16:38.349>type <00:16:38.466>where <00:16:38.583>you're <00:16:38.699>mapping

341
00:16:40.700 --> 00:16:42.300
<00:16:40.700>some <00:16:41.050>properties <00:16:41.400>to <00:16:41.750>some <00:16:42.100>values.

342
00:16:43.200 --> 00:16:46.200
<00:16:43.200>And <00:16:43.327>this <00:16:43.454>also <00:16:43.581>has <00:16:43.709>a <00:16:43.836>nice <00:16:43.963>benefit <00:16:44.090>of <00:16:44.218>having <00:16:44.345>named <00:16:44.472>columns. <00:16:44.600>So

343
00:16:46.200 --> 00:16:49.400
<00:16:46.200>you <00:16:46.327>don't <00:16:46.454>have <00:16:46.581>to <00:16:46.709>counter <00:16:46.836>columns <00:16:46.963>you <00:16:47.090>just <00:16:47.218>already <00:16:47.345>have <00:16:47.472>you <00:16:47.600>already

344
00:16:49.400 --> 00:16:51.100
<00:16:49.400>have <00:16:49.600>attached <00:16:49.800>names <00:16:50.000>to <00:16:50.199>that <00:16:50.400>by <00:16:50.600>that <00:16:50.800>construction.

345
00:16:52.100 --> 00:16:52.900
<00:16:52.100>Let's <00:16:52.280>look <00:16:52.460>at <00:16:52.640>an <00:16:52.819>example.

346
00:16:54.200 --> 00:16:57.800
<00:16:54.200>This <00:16:54.400>is <00:16:54.600>a <00:16:54.800>fairly <00:16:55.000>standard <00:16:55.200>sales <00:16:55.400>data <00:16:55.600>set

347
00:16:57.800 --> 00:17:00.600
<00:16:57.800>so <00:16:58.079>you <00:16:58.359>have <00:16:58.640>some <00:16:58.920>some <00:16:59.199>index

348
00:17:00.600 --> 00:17:04.000
<00:17:00.600>in <00:17:00.775>that <00:17:00.950>table. <00:17:01.125>Like <00:17:01.300>we <00:17:01.475>were <00:17:01.650>doing <00:17:01.825>SQL. <00:17:02.000>You

349
00:17:03.100 --> 00:17:06.400
<00:17:03.100>have <00:17:03.275>an <00:17:03.450>order <00:17:03.625>ID <00:17:03.800>and <00:17:03.975>to <00:17:04.150>all <00:17:04.325>the <00:17:04.500>database

350
00:17:06.400 --> 00:17:09.400
<00:17:06.400>people <00:17:06.527>here. <00:17:06.654>Yes, <00:17:06.781>it <00:17:06.909>is. <00:17:07.036>The <00:17:07.163>normalized. <00:17:07.290>It <00:17:07.418>is <00:17:07.545>not <00:17:07.672>the <00:17:07.800>normalized

351
00:17:09.400 --> 00:17:12.400
<00:17:09.400>table. <00:17:09.575>Let's <00:17:09.750>just <00:17:09.925>ignore <00:17:10.100>that. <00:17:10.275>So <00:17:10.450>you <00:17:10.625>have <00:17:10.800>two

352
00:17:12.400 --> 00:17:15.300
<00:17:12.400>or <00:17:12.527>you <00:17:12.654>have <00:17:12.781>two <00:17:12.909>order <00:17:13.036>of <00:17:13.163>ABC <00:17:13.290>and <00:17:13.418>the <00:17:13.545>EF <00:17:13.672>and <00:17:13.800>the

353
00:17:15.300 --> 00:17:18.200
<00:17:15.300>ABC <00:17:15.500>order <00:17:15.700>has <00:17:15.899>two <00:17:16.099>items <00:17:16.300>and <00:17:16.500>DF <00:17:16.700>order

354
00:17:18.200 --> 00:17:20.600
<00:17:18.200>has <00:17:18.340>another <00:17:18.480>item <00:17:18.620>and <00:17:18.760>you <00:17:18.900>know, <00:17:19.040>you <00:17:19.180>get <00:17:19.319>the <00:17:19.460>idea, <00:17:19.600>right?

355
00:17:21.300 --> 00:17:23.500
<00:17:21.300>So <00:17:21.533>you <00:17:21.766>have <00:17:22.000>strings <00:17:22.233>and <00:17:22.466>integers <00:17:22.700>here?

356
00:17:24.100 --> 00:17:27.800
<00:17:24.099>The <00:17:24.240>way <00:17:24.379>we <00:17:24.520>can <00:17:24.659>represent <00:17:24.800>that <00:17:24.939>now <00:17:25.079>in <00:17:25.219>this <00:17:25.359>tiny <00:17:25.500>little

357
00:17:27.800 --> 00:17:30.500
<00:17:27.800>pandas <00:17:28.033>clone <00:17:28.266>for <00:17:28.500>typescript <00:17:28.733>is <00:17:28.966>as <00:17:29.200>follows.

358
00:17:31.100 --> 00:17:34.500
<00:17:31.100>We <00:17:31.300>we <00:17:31.500>use <00:17:31.699>the <00:17:31.899>table <00:17:32.100>interface <00:17:32.300>and <00:17:32.500>we

359
00:17:34.500 --> 00:17:37.400
<00:17:34.500>give <00:17:34.627>it <00:17:34.754>the <00:17:34.881>parameter. <00:17:35.009>That's <00:17:35.136>this <00:17:35.263>such <00:17:35.390>a <00:17:35.518>record <00:17:35.645>type <00:17:35.772>and <00:17:35.900>we

360
00:17:37.400 --> 00:17:40.100
<00:17:37.400>just <00:17:37.555>list <00:17:37.711>all <00:17:37.866>the <00:17:38.022>columns <00:17:38.177>and <00:17:38.333>give <00:17:38.488>all <00:17:38.644>their <00:17:38.800>types.

361
00:17:41.200 --> 00:17:44.400
<00:17:41.200>And <00:17:41.400>notably <00:17:41.600>an <00:17:41.800>object <00:17:42.000>of <00:17:42.200>that <00:17:42.400>type <00:17:42.600>doesn't

362
00:17:44.400 --> 00:17:47.700
<00:17:44.400>even <00:17:44.527>have <00:17:44.654>to <00:17:44.781>exist. <00:17:44.909>It's <00:17:45.036>just <00:17:45.163>a <00:17:45.290>Markov <00:17:45.418>for <00:17:45.545>the <00:17:45.672>compiler. <00:17:45.800>Well

363
00:17:47.700 --> 00:17:50.700
<00:17:47.700>this <00:17:47.875>table <00:17:48.050>sort <00:17:48.225>of <00:17:48.400>has <00:17:48.575>this <00:17:48.750>rectangular <00:17:48.925>shape <00:17:49.100>with

364
00:17:50.700 --> 00:17:52.500
<00:17:50.700>these <00:17:50.933>four <00:17:51.166>columns. <00:17:51.400>That's <00:17:51.633>the <00:17:51.866>general <00:17:52.100>idea.

365
00:17:53.500 --> 00:17:55.100
<00:17:53.500>right, <00:17:54.900>so

366
00:17:57.500 --> 00:18:00.600
<00:17:57.500>we <00:17:57.675>don't <00:17:57.850>actually <00:17:58.025>need <00:17:58.200>anything <00:17:58.375>else <00:17:58.550>for <00:17:58.725>typing <00:17:58.900>this

367
00:18:00.600 --> 00:18:03.100
<00:18:00.600>this <00:18:00.800>table <00:18:01.000>interface. <00:18:01.199>But <00:18:01.399>at <00:18:01.600>that <00:18:01.800>point <00:18:02.000>we

368
00:18:03.100 --> 00:18:06.200
<00:18:03.100>don't <00:18:03.227>even <00:18:03.354>have <00:18:03.481>an <00:18:03.609>implementation <00:18:03.736>of <00:18:03.863>it <00:18:03.990>yet <00:18:04.118>for <00:18:04.245>the <00:18:04.372>implementation <00:18:04.500>is

369
00:18:06.200 --> 00:18:09.400
<00:18:06.200>yet <00:18:06.375>missing <00:18:06.550>and <00:18:06.725>I <00:18:06.900>will <00:18:07.075>show <00:18:07.250>the <00:18:07.425>implementation <00:18:07.600>now,

370
00:18:09.400 --> 00:18:12.600
<00:18:09.400>but <00:18:09.575>first, <00:18:09.750>let <00:18:09.925>me <00:18:10.100>give <00:18:10.275>some <00:18:10.450>additional <00:18:10.625>context <00:18:10.800>here.

371
00:18:14.600 --> 00:18:18.000
<00:18:14.600>What <00:18:14.833>I'm <00:18:15.066>showing <00:18:15.300>you <00:18:15.533>here <00:18:15.766>basically <00:18:16.000>shows

372
00:18:17.200 --> 00:18:20.200
<00:18:17.200>you <00:18:17.433>a <00:18:17.666>nice <00:18:17.900>API <00:18:18.133>a <00:18:18.366>nice <00:18:18.600>type

373
00:18:20.200 --> 00:18:20.600
API.

374
00:18:21.900 --> 00:18:24.400
<00:18:21.900>how <00:18:22.075>to <00:18:22.250>implement <00:18:22.425>it <00:18:22.600>is <00:18:22.775>a <00:18:22.950>completely <00:18:23.125>different <00:18:23.300>story

375
00:18:24.400 --> 00:18:26.500
<00:18:24.400>because <00:18:24.680>typescript <00:18:24.960>while <00:18:25.240>it <00:18:25.520>has <00:18:25.800>very

376
00:18:27.600 --> 00:18:30.700
<00:18:27.600>Advanced <00:18:28.066>types, <00:18:28.533>sometimes <00:18:29.000>the

377
00:18:30.700 --> 00:18:33.300
<00:18:30.700>implementation <00:18:30.900>facilities <00:18:31.100>do <00:18:31.300>not <00:18:31.500>catch <00:18:31.700>up. <00:18:31.900>So <00:18:32.100>it

378
00:18:33.300 --> 00:18:36.600
<00:18:33.300>is <00:18:33.427>very <00:18:33.554>possible <00:18:33.681>for <00:18:33.809>you <00:18:33.936>in <00:18:34.063>types <00:18:34.190>to <00:18:34.318>construct <00:18:34.445>a <00:18:34.572>type <00:18:34.700>that

379
00:18:36.600 --> 00:18:39.300
<00:18:36.600>is <00:18:36.800>completely <00:18:37.000>legal <00:18:37.199>yet. <00:18:37.399>You <00:18:37.600>cannot <00:18:37.800>Implement <00:18:38.000>that

380
00:18:39.300 --> 00:18:41.400
<00:18:39.300>type <00:18:39.766>without <00:18:40.233>using <00:18:40.700>Corrections

381
00:18:42.200 --> 00:18:45.100
<00:18:42.200>and <00:18:42.327>that's <00:18:42.454>a <00:18:42.581>bit <00:18:42.709>frustrating <00:18:42.836>but <00:18:42.963>it's <00:18:43.090>sometimes <00:18:43.218>happens <00:18:43.345>and <00:18:43.472>it's <00:18:43.600>it's

382
00:18:45.100 --> 00:18:48.300
<00:18:45.100>a <00:18:45.300>trade-off <00:18:45.500>they <00:18:45.699>have <00:18:45.899>made <00:18:46.100>so <00:18:46.300>when <00:18:46.500>I

383
00:18:48.300 --> 00:18:51.700
<00:18:48.300>show <00:18:48.427>you <00:18:48.554>the <00:18:48.681>code <00:18:48.809>in <00:18:48.936>a <00:18:49.063>moment, <00:18:49.190>you <00:18:49.318>will <00:18:49.445>see <00:18:49.572>Corrections <00:18:49.700>and

384
00:18:51.700 --> 00:18:54.100
<00:18:51.700>it <00:18:51.827>doesn't <00:18:51.954>mean <00:18:52.081>that <00:18:52.209>the <00:18:52.336>API <00:18:52.463>is <00:18:52.590>bad. <00:18:52.718>It <00:18:52.845>just <00:18:52.972>means <00:18:53.100>that

385
00:18:54.100 --> 00:18:57.400
<00:18:54.100>sometimes <00:18:54.255>the <00:18:54.411>compiler <00:18:54.566>cannot <00:18:54.722>type <00:18:54.877>check <00:18:55.033>all <00:18:55.188>the <00:18:55.344>ambitious <00:18:55.500>stuff

386
00:18:57.400 --> 00:19:00.400
<00:18:57.400>that <00:18:57.516>we're <00:18:57.633>building <00:18:57.750>in <00:18:57.866>APS. <00:18:57.983>That's <00:18:58.100>a <00:18:58.216>completely <00:18:58.333>normal <00:18:58.450>thing. <00:18:58.566>It's <00:18:58.683>it's <00:18:58.800>not

387
00:19:00.400 --> 00:19:02.800
<00:19:00.400>something <00:19:00.540>that <00:19:00.680>just <00:19:00.820>I <00:19:00.960>do <00:19:01.100>many <00:19:01.240>people <00:19:01.380>do <00:19:01.520>it <00:19:01.660>in <00:19:01.800>typescript.

388
00:19:03.600 --> 00:19:06.200
<00:19:03.600>Okay, <00:19:03.800>without <00:19:04.000>out <00:19:04.199>of <00:19:04.399>the <00:19:04.600>way. <00:19:04.800>Let's <00:19:05.000>look

389
00:19:06.200 --> 00:19:08.100
<00:19:06.200>at <00:19:06.480>the <00:19:06.760>actual <00:19:07.040>implementation <00:19:07.320>of <00:19:07.600>this.

390
00:19:08.800 --> 00:19:11.500
<00:19:08.800>So <00:19:09.000>I <00:19:09.200>have <00:19:09.399>split <00:19:09.600>up <00:19:09.800>the <00:19:10.000>implementation <00:19:10.200>into

391
00:19:11.500 --> 00:19:14.600
<00:19:11.500>two <00:19:12.200>interfaces <00:19:12.900>a

392
00:19:14.600 --> 00:19:17.800
<00:19:14.600>series <00:19:14.833>interface <00:19:15.066>and <00:19:15.300>a <00:19:15.533>table <00:19:15.766>interface <00:19:16.000>a

393
00:19:17.800 --> 00:19:20.200
<00:19:17.800>series <00:19:17.940>is <00:19:18.080>basically <00:19:18.220>just <00:19:18.360>a <00:19:18.500>single <00:19:18.639>column <00:19:18.780>and <00:19:18.919>I <00:19:19.060>stole <00:19:19.200>that

394
00:19:20.200 --> 00:19:21.400
<00:19:20.200>terminology <00:19:20.470>from <00:19:20.740>pandas <00:19:21.010>as <00:19:21.280>well.

395
00:19:21.900 --> 00:19:24.100
<00:19:21.900>So <00:19:22.100>a <00:19:22.300>series <00:19:22.500>it's <00:19:22.700>a <00:19:22.900>very <00:19:23.100>simple <00:19:23.300>interface.

396
00:19:25.200 --> 00:19:27.300
<00:19:25.200>It <00:19:25.433>sort <00:19:25.666>of <00:19:25.900>acts <00:19:26.133>like <00:19:26.366>an <00:19:26.600>array.

397
00:19:27.900 --> 00:19:30.600
<00:19:27.900>It's <00:19:28.055>typed <00:19:28.211>array. <00:19:28.366>So <00:19:28.522>it <00:19:28.677>has <00:19:28.833>some <00:19:28.988>element <00:19:29.144>type <00:19:29.300>and

398
00:19:30.600 --> 00:19:33.700
<00:19:30.600>it <00:19:30.740>has <00:19:30.879>a <00:19:31.020>length <00:19:31.159>and <00:19:31.300>you <00:19:31.439>can <00:19:31.580>select <00:19:31.719>elements <00:19:31.860>at <00:19:32.000>a

399
00:19:33.700 --> 00:19:36.200
<00:19:33.700>particular <00:19:33.980>index. <00:19:34.260>So <00:19:34.540>nothing <00:19:34.820>fancy <00:19:35.100>there.

400
00:19:37.200 --> 00:19:39.800
<00:19:37.200>and <00:19:37.480>now <00:19:37.760>for <00:19:38.040>the <00:19:38.320>table <00:19:38.600>interface

401
00:19:40.800 --> 00:19:43.700
<00:19:40.800>I <00:19:41.000>have <00:19:41.200>extended <00:19:41.399>this <00:19:41.600>slightly. <00:19:41.800>Let's <00:19:42.000>just <00:19:42.200>ignore

402
00:19:43.700 --> 00:19:46.400
<00:19:43.700>this <00:19:43.933>this <00:19:44.166>part <00:19:44.400>for <00:19:44.633>now. <00:19:44.866>I've <00:19:45.100>also

403
00:19:46.400 --> 00:19:49.400
<00:19:46.400>added <00:19:46.575>the <00:19:46.750>an <00:19:46.925>index <00:19:47.100>column <00:19:47.275>here. <00:19:47.450>So <00:19:47.625>I've <00:19:47.800>shown

404
00:19:49.400 --> 00:19:52.700
<00:19:49.400>this <00:19:49.507>on <00:19:49.615>the <00:19:49.723>slide <00:19:49.830>earlier <00:19:49.938>you <00:19:50.046>had <00:19:50.153>an <00:19:50.261>index <00:19:50.369>that <00:19:50.476>wasn't <00:19:50.584>integer <00:19:50.692>and <00:19:50.800>I

405
00:19:52.700 --> 00:19:55.200
<00:19:52.700>think <00:19:52.816>in <00:19:52.933>pandas <00:19:53.050>you <00:19:53.166>don't <00:19:53.283>actually <00:19:53.400>need <00:19:53.516>an <00:19:53.633>index <00:19:53.750>but <00:19:53.866>here <00:19:53.983>I <00:19:54.100>decided

406
00:19:55.200 --> 00:19:58.300
<00:19:55.200>that <00:19:55.316>you <00:19:55.433>won't <00:19:55.550>gonna <00:19:55.666>need <00:19:55.783>an <00:19:55.900>index <00:19:56.016>and <00:19:56.133>that <00:19:56.250>columns <00:19:56.366>extends <00:19:56.483>record. <00:19:56.600>That's

407
00:19:58.300 --> 00:19:59.000
<00:19:58.300>the <00:19:58.510>same <00:19:58.720>as <00:19:58.930>before.

408
00:20:00.200 --> 00:20:00.400
now

409
00:20:01.600 --> 00:20:04.300
<00:20:01.600>let's <00:20:01.755>look <00:20:01.911>at <00:20:02.066>the <00:20:02.222>methods <00:20:02.377>one <00:20:02.533>by <00:20:02.688>one. <00:20:02.844>We <00:20:03.000>have

410
00:20:04.300 --> 00:20:08.100
<00:20:04.300>an <00:20:04.475>index <00:20:04.649>method <00:20:04.825>that <00:20:05.000>gives <00:20:05.175>you <00:20:05.350>a <00:20:05.524>serious. <00:20:05.700>So

411
00:20:07.100 --> 00:20:10.700
<00:20:07.100>an <00:20:07.274>array <00:20:07.449>of <00:20:07.625>all <00:20:07.800>the <00:20:07.975>indexes <00:20:08.149>in <00:20:08.324>that <00:20:08.500>table.

412
00:20:10.700 --> 00:20:13.400
<00:20:10.700>So <00:20:10.900>just <00:20:11.100>selects <00:20:11.300>the <00:20:11.500>first <00:20:11.700>index <00:20:11.900>column <00:20:12.100>basically

413
00:20:13.400 --> 00:20:16.400
<00:20:13.400>and <00:20:13.633>then <00:20:13.866>we <00:20:14.100>have <00:20:14.333>another <00:20:14.566>selection <00:20:14.800>method

414
00:20:16.400 --> 00:20:19.300
<00:20:16.400>which <00:20:16.555>just <00:20:16.711>selects <00:20:16.866>a <00:20:17.022>single <00:20:17.177>column. <00:20:17.333>That's <00:20:17.488>not <00:20:17.644>the <00:20:17.800>index

415
00:20:19.300 --> 00:20:22.300
<00:20:19.300>column <00:20:19.407>and <00:20:19.515>here <00:20:19.623>we <00:20:19.730>see <00:20:19.838>the <00:20:19.946>pattern <00:20:20.053>that <00:20:20.161>I've <00:20:20.269>showed <00:20:20.376>you <00:20:20.484>where <00:20:20.592>from <00:20:20.700>the

416
00:20:22.300 --> 00:20:25.600
<00:20:22.300>early <00:20:22.475>on <00:20:22.649>we <00:20:22.825>start <00:20:23.000>by <00:20:23.175>saying <00:20:23.350>call <00:20:23.524>extensive <00:20:23.700>key

417
00:20:25.600 --> 00:20:28.300
<00:20:25.600>of <00:20:25.755>calls <00:20:25.911>so <00:20:26.066>calls <00:20:26.222>as <00:20:26.377>a <00:20:26.533>record <00:20:26.688>so <00:20:26.844>key <00:20:27.000>of

418
00:20:28.300 --> 00:20:31.500
<00:20:28.300>calls <00:20:28.533>selects <00:20:28.766>all <00:20:29.000>the <00:20:29.233>property <00:20:29.466>values <00:20:29.700>in

419
00:20:31.500 --> 00:20:35.000
<00:20:31.500>all <00:20:31.675>the <00:20:31.850>property <00:20:32.025>keys <00:20:32.200>in <00:20:32.375>that <00:20:32.550>record. <00:20:32.725>So <00:20:32.900>in

420
00:20:34.400 --> 00:20:37.900
<00:20:34.400>the <00:20:34.600>example <00:20:34.800>from <00:20:35.000>before <00:20:35.200>you <00:20:35.400>would <00:20:35.600>specify <00:20:35.800>order

421
00:20:37.900 --> 00:20:40.200
<00:20:37.900>ID <00:20:38.180>line <00:20:38.460>item <00:20:38.740>quantity <00:20:39.020>and <00:20:39.300>so

422
00:20:40.200 --> 00:20:44.000
<00:20:40.200>on <00:20:40.355>and <00:20:40.511>then <00:20:40.666>we're <00:20:40.822>returning <00:20:40.977>a <00:20:41.133>series <00:20:41.288>where <00:20:41.444>the <00:20:41.600>element

423
00:20:43.300 --> 00:20:46.300
<00:20:43.300>type <00:20:43.533>of <00:20:43.766>the <00:20:44.000>series <00:20:44.233>is <00:20:44.466>selecting <00:20:44.700>that

424
00:20:46.300 --> 00:20:47.900
<00:20:46.300>call <00:20:47.000>from <00:20:47.700>calls.

425
00:20:48.300 --> 00:20:51.000
<00:20:48.300>So <00:20:48.500>if <00:20:48.700>you're <00:20:48.899>specifying <00:20:49.100>order <00:20:49.300>idv <00:20:49.500>would <00:20:49.700>be

426
00:20:51.200 --> 00:20:54.800
<00:20:51.200>getting <00:20:51.340>a <00:20:51.480>series <00:20:51.620>of <00:20:51.760>string <00:20:51.900>if <00:20:52.040>we <00:20:52.180>selecting <00:20:52.320>the <00:20:52.460>quantity <00:20:52.600>we

427
00:20:54.800 --> 00:20:57.300
<00:20:54.800>would <00:20:55.000>be <00:20:55.200>we <00:20:55.399>would <00:20:55.600>get <00:20:55.800>series <00:20:56.000>of <00:20:56.200>number.

428
00:20:58.800 --> 00:21:01.200
<00:20:58.800>And <00:20:58.955>then <00:20:59.111>finally <00:20:59.266>we <00:20:59.422>can <00:20:59.577>also <00:20:59.733>have <00:20:59.888>a <00:21:00.044>lookup <00:21:00.200>function

429
00:21:01.200 --> 00:21:04.300
<00:21:01.200>where <00:21:01.400>we <00:21:01.600>just <00:21:01.800>do <00:21:02.000>the <00:21:02.200>single <00:21:02.400>row <00:21:02.600>log

430
00:21:04.300 --> 00:21:07.500
<00:21:04.300>look <00:21:04.427>up <00:21:04.554>so <00:21:04.681>we <00:21:04.809>select <00:21:04.936>that <00:21:05.063>by <00:21:05.190>an <00:21:05.318>index <00:21:05.445>and <00:21:05.572>then <00:21:05.700>I've

431
00:21:07.500 --> 00:21:10.200
<00:21:07.500>just <00:21:07.640>defined <00:21:07.780>the <00:21:07.920>utility <00:21:08.060>type <00:21:08.200>that <00:21:08.340>matches <00:21:08.480>together <00:21:08.620>the <00:21:08.760>columns <00:21:08.900>with

432
00:21:10.200 --> 00:21:13.200
<00:21:10.200>an <00:21:10.340>index <00:21:10.480>that <00:21:10.620>does <00:21:10.760>really <00:21:10.900>matter <00:21:11.040>so <00:21:11.180>much <00:21:11.320>or <00:21:11.460>undefined <00:21:11.600>if

433
00:21:13.200 --> 00:21:13.900
<00:21:13.200>it <00:21:13.410>doesn't <00:21:13.620>actually <00:21:13.830>exist.

434
00:21:15.300 --> 00:21:19.100
<00:21:15.300>Okay, <00:21:15.475>so <00:21:15.649>that's <00:21:15.825>the <00:21:16.000>that's <00:21:16.175>the <00:21:16.350>interface. <00:21:16.524>I <00:21:16.700>avoided

435
00:21:18.100 --> 00:21:21.700
<00:21:18.100>putting <00:21:18.333>the <00:21:18.566>type <00:21:18.800>definitions <00:21:19.033>of <00:21:19.266>group <00:21:19.500>by

436
00:21:21.700 --> 00:21:24.000
<00:21:21.700>and <00:21:21.840>the <00:21:21.980>rest <00:21:22.120>of <00:21:22.260>that <00:21:22.400>on <00:21:22.540>that <00:21:22.680>slide, <00:21:22.820>but <00:21:22.960>you <00:21:23.100>know

437
00:21:24.300 --> 00:21:28.200
<00:21:24.300>just <00:21:24.416>to <00:21:24.533>give <00:21:24.649>you <00:21:24.766>give <00:21:24.883>you <00:21:25.000>a <00:21:25.116>rough <00:21:25.233>idea <00:21:25.350>of <00:21:25.466>this <00:21:25.583>and <00:21:25.700>without

438
00:21:27.200 --> 00:21:29.000
<00:21:27.200>further <00:21:28.600>ado.

439
00:21:30.200 --> 00:21:33.100
<00:21:30.200>I'm <00:21:30.316>going <00:21:30.433>to <00:21:30.550>show <00:21:30.666>you <00:21:30.783>this <00:21:30.900>and <00:21:31.016>as <00:21:31.133>a <00:21:31.250>demo, <00:21:31.366>and <00:21:31.483>I <00:21:31.600>hope

440
00:21:33.100 --> 00:21:34.500
<00:21:33.100>the <00:21:33.351>demo <00:21:33.604>got <00:21:33.856>arrested <00:21:34.108>me <00:21:34.360>today.

441
00:21:36.300 --> 00:21:39.300
<00:21:36.300>So <00:21:36.427>just <00:21:36.554>to <00:21:36.681>just <00:21:36.809>to <00:21:36.936>let <00:21:37.063>you <00:21:37.190>know <00:21:37.318>that <00:21:37.445>I'm <00:21:37.572>not <00:21:37.700>actually

442
00:21:39.300 --> 00:21:39.900
<00:21:39.300>cheating <00:21:39.840>here.

443
00:21:41.500 --> 00:21:44.900
<00:21:41.500>This <00:21:41.655>is <00:21:41.811>the <00:21:41.966>interface. <00:21:42.122>I've <00:21:42.277>defined <00:21:42.433>some <00:21:42.588>more. <00:21:42.744>I've <00:21:42.900>defined

444
00:21:44.900 --> 00:21:47.800
<00:21:44.900>some <00:21:45.250>more <00:21:45.600>additional <00:21:45.950>utilities <00:21:46.300>here

445
00:21:47.800 --> 00:21:50.400
<00:21:47.800>and <00:21:47.975>there <00:21:48.149>we <00:21:48.325>have <00:21:48.500>the <00:21:48.675>table <00:21:48.850>interface <00:21:49.024>and <00:21:49.200>here

446
00:21:50.400 --> 00:21:53.700
<00:21:50.400>you <00:21:50.527>can <00:21:50.654>see <00:21:50.781>the <00:21:50.909>group <00:21:51.036>by <00:21:51.163>drop <00:21:51.290>and <00:21:51.418>so <00:21:51.545>on. <00:21:51.672>It's <00:21:51.800>a

447
00:21:53.700 --> 00:21:56.800
<00:21:53.700>bit <00:21:53.800>too <00:21:53.900>long <00:21:54.000>for <00:21:54.100>the <00:21:54.200>slide, <00:21:54.300>but <00:21:54.400>it's <00:21:54.500>not <00:21:54.600>definitely <00:21:54.700>not <00:21:54.800>too <00:21:54.900>long <00:21:55.000>for <00:21:55.100>for

448
00:21:56.800 --> 00:21:59.000
<00:21:56.800>actually <00:21:56.975>using <00:21:57.149>this <00:21:57.325>in <00:21:57.500>code. <00:21:57.675>So <00:21:57.850>I <00:21:58.024>will <00:21:58.200>not

449
00:21:59.200 --> 00:22:02.500
<00:21:59.200>go <00:21:59.327>into <00:21:59.454>details <00:21:59.581>because <00:21:59.709>of <00:21:59.836>time <00:21:59.963>but <00:22:00.090>you <00:22:00.218>can <00:22:00.345>see <00:22:00.472>it's <00:22:00.600>not

450
00:22:02.500 --> 00:22:05.100
<00:22:02.500>so <00:22:02.700>complex. <00:22:02.900>So <00:22:03.100>it <00:22:03.300>may <00:22:03.500>be <00:22:03.700>a <00:22:03.900>bit

451
00:22:05.100 --> 00:22:07.100
<00:22:05.100>more <00:22:05.274>complex <00:22:05.449>than <00:22:05.625>usual, <00:22:05.800>but <00:22:05.975>it's <00:22:06.149>not <00:22:06.324>so <00:22:06.500>bad.

452
00:22:07.900 --> 00:22:10.500
<00:22:07.900>And <00:22:08.100>I <00:22:08.300>can <00:22:08.500>now <00:22:08.700>show <00:22:08.900>you <00:22:09.100>how <00:22:09.300>this

453
00:22:10.500 --> 00:22:12.500
<00:22:10.500>would <00:22:10.733>be <00:22:10.966>how <00:22:11.200>this <00:22:11.433>works <00:22:11.666>in <00:22:11.900>practice.

454
00:22:13.400 --> 00:22:16.500
<00:22:13.400>So <00:22:13.600>I <00:22:13.800>have <00:22:14.000>here <00:22:14.200>a <00:22:14.400>node <00:22:14.600>shell <00:22:14.800>where

455
00:22:16.500 --> 00:22:19.200
<00:22:16.500>I've <00:22:16.700>just <00:22:16.900>imported. <00:22:17.100>This <00:22:17.300>default <00:22:17.500>table <00:22:17.700>is <00:22:17.900>a

456
00:22:19.200 --> 00:22:22.500
<00:22:19.200>very <00:22:19.327>stupid <00:22:19.454>implementation <00:22:19.581>of <00:22:19.709>the <00:22:19.836>table <00:22:19.963>interface. <00:22:20.090>It <00:22:20.218>doesn't <00:22:20.345>do <00:22:20.472>any <00:22:20.600>optimization.

457
00:22:22.500 --> 00:22:25.200
<00:22:22.500>It's <00:22:22.627>just <00:22:22.754>a <00:22:22.881>bunch <00:22:23.009>of <00:22:23.136>objects. <00:22:23.263>Of <00:22:23.390>course <00:22:23.518>in <00:22:23.645>production <00:22:23.772>code. <00:22:23.900>You

458
00:22:25.200 --> 00:22:28.100
<00:22:25.200>would <00:22:25.355>probably <00:22:25.511>put <00:22:25.666>that <00:22:25.822>down <00:22:25.977>to <00:22:26.133>C <00:22:26.288>Level <00:22:26.444>buffers, <00:22:26.600>whatever

459
00:22:28.100 --> 00:22:31.300
<00:22:28.100>I <00:22:28.240>don't <00:22:28.379>care <00:22:28.520>about <00:22:28.659>any <00:22:28.800>of <00:22:28.939>this, <00:22:29.080>but <00:22:29.219>I <00:22:29.360>can <00:22:29.500>show

460
00:22:31.300 --> 00:22:33.500
<00:22:31.300>you <00:22:31.455>this <00:22:31.611>example <00:22:31.766>from <00:22:31.922>the <00:22:32.077>slides <00:22:32.233>so <00:22:32.388>we <00:22:32.544>can <00:22:32.700>import

461
00:22:34.700 --> 00:22:37.300
<00:22:34.700>particular <00:22:34.933>table <00:22:35.166>and <00:22:35.400>I'm <00:22:35.633>just <00:22:35.866>importing <00:22:36.100>here

462
00:22:37.300 --> 00:22:38.400
<00:22:37.300>an <00:22:37.795>array <00:22:38.290>of

463
00:22:39.500 --> 00:22:42.900
<00:22:39.500>Deprecation <00:22:39.655>warning <00:22:39.811>I <00:22:39.966>don't <00:22:40.122>care <00:22:40.277>about <00:22:40.433>deprecating <00:22:40.588>stuff. <00:22:40.744>So <00:22:40.900>I've

464
00:22:42.900 --> 00:22:44.700
<00:22:42.900>just <00:22:43.366>imported <00:22:43.833>a <00:22:44.300>table.

465
00:22:45.900 --> 00:22:48.900
<00:22:45.900>And <00:22:46.180>I've <00:22:46.460>also <00:22:46.740>provided <00:22:47.020>a <00:22:47.300>dump

466
00:22:48.900 --> 00:22:51.600
<00:22:48.900>function <00:22:49.075>to <00:22:49.250>just <00:22:49.425>print <00:22:49.600>it <00:22:49.775>out <00:22:49.950>again. <00:22:50.125>So <00:22:50.300>here

467
00:22:51.600 --> 00:22:54.000
<00:22:51.600>nothing <00:22:51.833>fancy <00:22:52.066>to <00:22:52.300>symbol <00:22:52.533>that <00:22:52.766>you <00:22:53.000>see

468
00:22:54.200 --> 00:22:57.700
<00:22:54.200>here <00:22:54.307>is <00:22:54.415>the <00:22:54.523>index. <00:22:54.630>So <00:22:54.738>it's <00:22:54.846>zero <00:22:54.953>one <00:22:55.061>two, <00:22:55.169>it's <00:22:55.276>just <00:22:55.384>an <00:22:55.492>increasing <00:22:55.600>integer

469
00:22:57.700 --> 00:22:57.900
index.

470
00:22:59.200 --> 00:23:02.800
<00:22:59.200>Now <00:22:59.300>I <00:22:59.400>can <00:22:59.500>do <00:22:59.600>stuff <00:22:59.700>with <00:22:59.800>it. <00:22:59.900>So <00:23:00.000>for <00:23:00.100>example, <00:23:00.200>I <00:23:00.300>can <00:23:00.400>select <00:23:00.500>from <00:23:00.600>that.

471
00:23:04.300 --> 00:23:07.000
<00:23:04.300>So <00:23:04.407>I <00:23:04.515>have <00:23:04.623>selected <00:23:04.730>the <00:23:04.838>quantity <00:23:04.946>and <00:23:05.053>now <00:23:05.161>of <00:23:05.269>course <00:23:05.376>you <00:23:05.484>don't <00:23:05.592>see <00:23:05.700>the

472
00:23:07.300 --> 00:23:10.900
<00:23:07.300>type. <00:23:07.427>So <00:23:07.554>I <00:23:07.681>will <00:23:07.809>probably <00:23:07.936>just <00:23:08.063>show <00:23:08.190>you <00:23:08.318>this <00:23:08.445>again <00:23:08.572>series <00:23:08.700>1

473
00:23:10.900 --> 00:23:12.100
<00:23:10.900>what <00:23:11.440>was <00:23:11.980>types?

474
00:23:13.300 --> 00:23:16.500
<00:23:13.300>So <00:23:13.455>what <00:23:13.611>do <00:23:13.766>you <00:23:13.922>think <00:23:14.077>this <00:23:14.233>type <00:23:14.388>is <00:23:14.544>gonna <00:23:14.700>be?

475
00:23:18.900 --> 00:23:19.400
<00:23:18.900>any <00:23:19.350>ideas

476
00:23:21.200 --> 00:23:22.100
<00:23:21.200>that's <00:23:21.470>probably <00:23:21.740>number <00:23:22.010>right?

477
00:23:26.900 --> 00:23:29.400
<00:23:26.900>Right, <00:23:27.075>so <00:23:27.250>this <00:23:27.425>obviously <00:23:27.600>type <00:23:27.775>check. <00:23:27.950>So <00:23:28.125>if <00:23:28.300>it

478
00:23:29.400 --> 00:23:32.300
<00:23:29.400>typed <00:23:29.507>is <00:23:29.615>correct, <00:23:29.723>we <00:23:29.830>don't <00:23:29.938>even <00:23:30.046>need <00:23:30.153>to <00:23:30.261>look <00:23:30.369>at <00:23:30.476>it, <00:23:30.584>but <00:23:30.692>I <00:23:30.800>will

479
00:23:32.300 --> 00:23:34.500
<00:23:32.300>look <00:23:32.475>at <00:23:32.649>it. <00:23:32.825>Anyway <00:23:33.000>just <00:23:33.175>to <00:23:33.350>approve <00:23:33.524>a <00:23:33.700>point.

480
00:23:35.600 --> 00:23:38.000
<00:23:35.600>So <00:23:35.774>we <00:23:35.949>have <00:23:36.125>the <00:23:36.300>quantity <00:23:36.475>here. <00:23:36.649>Then <00:23:36.824>we <00:23:37.000>can

481
00:23:38.200 --> 00:23:41.100
<00:23:38.200>also <00:23:38.355>do <00:23:38.511>stuff <00:23:38.666>like <00:23:38.822>adding <00:23:38.977>adding <00:23:39.133>columns. <00:23:39.288>So <00:23:39.444>I <00:23:39.600>have

482
00:23:41.100 --> 00:23:44.400
<00:23:41.100>one <00:23:41.274>example <00:23:41.449>here <00:23:41.625>for <00:23:41.800>adding <00:23:41.975>a <00:23:42.149>column <00:23:42.324>where <00:23:42.500>a

483
00:23:44.400 --> 00:23:47.200
<00:23:44.400>computer <00:23:44.555>total <00:23:44.711>price <00:23:44.866>because <00:23:45.022>so <00:23:45.177>far. <00:23:45.333>I've <00:23:45.488>only <00:23:45.644>had <00:23:45.800>the

484
00:23:48.700 --> 00:23:51.200
<00:23:48.700>I <00:23:48.855>thought <00:23:49.011>you <00:23:49.166>had <00:23:49.322>a <00:23:49.477>single <00:23:49.633>price <00:23:49.788>and <00:23:49.944>the <00:23:50.100>quantity

485
00:23:51.200 --> 00:23:54.400
<00:23:51.200>and <00:23:51.300>from <00:23:51.400>that <00:23:51.500>we <00:23:51.600>can <00:23:51.700>compute <00:23:51.800>the <00:23:51.900>total <00:23:52.000>price <00:23:52.100>and <00:23:52.200>this <00:23:52.300>is <00:23:52.400>what <00:23:52.500>will <00:23:52.600>look

486
00:23:54.400 --> 00:23:56.400
<00:23:54.400>like. <00:23:54.575>I <00:23:54.750>have <00:23:54.925>a <00:23:55.100>function <00:23:55.275>it's <00:23:55.450>called <00:23:55.625>insert <00:23:55.800>compute.

487
00:23:57.100 --> 00:24:00.300
<00:23:57.100>And <00:23:57.300>it <00:23:57.500>selects <00:23:57.699>the <00:23:57.899>quantity <00:23:58.100>and <00:23:58.300>the <00:23:58.500>single

488
00:24:00.300 --> 00:24:02.200
<00:24:00.300>price <00:24:00.500>and <00:24:00.700>gives <00:24:00.899>us <00:24:01.100>back <00:24:01.300>the <00:24:01.500>total <00:24:01.700>price.

489
00:24:03.600 --> 00:24:06.400
<00:24:03.600>And <00:24:03.774>now <00:24:03.949>I <00:24:04.125>could <00:24:04.300>select <00:24:04.475>the <00:24:04.649>total <00:24:04.824>price <00:24:05.000>and

490
00:24:06.400 --> 00:24:09.200
<00:24:06.400>we <00:24:06.540>will <00:24:06.680>see <00:24:06.820>that <00:24:06.960>the <00:24:07.100>total <00:24:07.240>prices <00:24:07.380>actually <00:24:07.520>also <00:24:07.660>a <00:24:07.800>series

491
00:24:09.200 --> 00:24:09.700
<00:24:09.200>of <00:24:09.650>number.

492
00:24:10.700 --> 00:24:13.100
<00:24:10.700>Right, <00:24:10.900>so <00:24:11.100>that's <00:24:11.300>fair <00:24:11.500>enough <00:24:11.700>and <00:24:11.900>we <00:24:12.100>can

493
00:24:13.100 --> 00:24:17.100
<00:24:13.100>also <00:24:13.227>do <00:24:13.354>the <00:24:13.481>same <00:24:13.609>thing <00:24:13.736>for <00:24:13.863>dropping <00:24:13.990>and <00:24:14.118>so <00:24:14.245>on. <00:24:14.372>So <00:24:14.500>yeah,

494
00:24:16.100 --> 00:24:19.300
<00:24:16.100>I <00:24:16.333>think <00:24:16.566>I'm <00:24:16.800>running <00:24:17.033>basically <00:24:17.266>out <00:24:17.500>of

495
00:24:19.300 --> 00:24:22.300
<00:24:19.300>time. <00:24:19.427>So <00:24:19.554>I <00:24:19.681>will <00:24:19.809>just <00:24:19.936>show <00:24:20.063>the <00:24:20.190>dropping <00:24:20.318>example, <00:24:20.445>but <00:24:20.572>not <00:24:20.700>the

496
00:24:22.300 --> 00:24:26.300
<00:24:22.300>group <00:24:22.416>by <00:24:22.533>example. <00:24:22.649>You <00:24:22.766>just <00:24:22.883>have <00:24:23.000>to <00:24:23.116>leave <00:24:23.233>me <00:24:23.350>on <00:24:23.466>that <00:24:23.583>from <00:24:23.700>now

497
00:24:26.300 --> 00:24:28.200
<00:24:26.300>on <00:24:26.766>we <00:24:27.233>can <00:24:27.700>drop.

498
00:24:29.400 --> 00:24:32.600
<00:24:29.400>The <00:24:29.633>we <00:24:29.866>can <00:24:30.100>drop <00:24:30.333>the <00:24:30.566>order <00:24:30.800>actually

499
00:24:32.600 --> 00:24:35.300
<00:24:32.600>from <00:24:32.755>this <00:24:32.911>or <00:24:33.066>some <00:24:33.222>other <00:24:33.377>things <00:24:33.533>and <00:24:33.688>then <00:24:33.844>you <00:24:34.000>see

500
00:24:35.300 --> 00:24:38.500
<00:24:35.300>we <00:24:35.407>get <00:24:35.515>the <00:24:35.623>new <00:24:35.730>table <00:24:35.838>where <00:24:35.946>the <00:24:36.053>index <00:24:36.161>is <00:24:36.269>still <00:24:36.376>a <00:24:36.484>number <00:24:36.592>and <00:24:36.700>then

501
00:24:38.500 --> 00:24:40.200
<00:24:38.500>we <00:24:38.733>just <00:24:38.966>have <00:24:39.200>a <00:24:39.433>smaller <00:24:39.666>record <00:24:39.900>here.

502
00:24:40.900 --> 00:24:43.200
<00:24:40.900>And <00:24:41.075>we <00:24:41.250>can <00:24:41.425>dump <00:24:41.600>that <00:24:41.775>and <00:24:41.950>then <00:24:42.125>you <00:24:42.300>see

503
00:24:43.200 --> 00:24:44.200
<00:24:43.200>that <00:24:43.500>it's <00:24:43.800>actually <00:24:44.100>removed.

504
00:24:46.800 --> 00:24:48.100
<00:24:46.800>able <00:24:47.385>three <00:24:47.969>dump

505
00:24:48.900 --> 00:24:51.700
<00:24:48.900>And <00:24:49.075>then <00:24:49.250>we <00:24:49.425>see <00:24:49.600>well, <00:24:49.775>we <00:24:49.950>have <00:24:50.125>removed <00:24:50.300>many

506
00:24:51.700 --> 00:24:54.400
<00:24:51.700>of <00:24:51.827>these <00:24:51.954>things. <00:24:52.081>We <00:24:52.209>just <00:24:52.336>have <00:24:52.463>item <00:24:52.590>quantity <00:24:52.718>in <00:24:52.845>total <00:24:52.972>price, <00:24:53.100>which

507
00:24:54.400 --> 00:24:55.900
<00:24:54.400>is <00:24:54.625>also <00:24:54.850>not <00:24:55.075>reflected <00:24:55.300>in <00:24:55.525>the <00:24:55.750>type.

508
00:24:56.800 --> 00:24:59.500
<00:24:56.800>So <00:24:57.080>yeah, <00:24:57.360>that's <00:24:57.639>actually <00:24:57.919>fairly <00:24:58.200>simple.

509
00:24:59.500 --> 00:25:02.300
<00:24:59.500>So <00:24:59.616>it <00:24:59.733>did <00:24:59.850>not <00:24:59.966>take <00:25:00.083>me <00:25:00.200>so <00:25:00.316>long <00:25:00.433>to <00:25:00.550>put <00:25:00.666>the <00:25:00.783>types <00:25:00.900>together.

510
00:25:02.300 --> 00:25:05.300
<00:25:02.300>It <00:25:02.416>took <00:25:02.533>me <00:25:02.649>a <00:25:02.766>bit <00:25:02.883>longer <00:25:03.000>to <00:25:03.116>actually <00:25:03.233>implement <00:25:03.350>it <00:25:03.466>and <00:25:03.583>to <00:25:03.700>actually

511
00:25:05.300 --> 00:25:08.200
<00:25:05.300>implement <00:25:05.416>it <00:25:05.533>efficiently <00:25:05.649>to <00:25:05.766>make <00:25:05.883>it <00:25:06.000>as <00:25:06.116>fast <00:25:06.233>as <00:25:06.350>pandas <00:25:06.466>and <00:25:06.583>python <00:25:06.700>it

512
00:25:08.200 --> 00:25:11.600
<00:25:08.200>wrote <00:25:08.375>pretty <00:25:08.550>take <00:25:08.725>a <00:25:08.900>lot <00:25:09.075>of <00:25:09.250>time. <00:25:09.425>But <00:25:09.600>yeah.

513
00:25:11.600 --> 00:25:14.300
<00:25:11.600>Anyway, <00:25:11.755>I'm <00:25:11.911>not <00:25:12.066>really <00:25:12.222>again. <00:25:12.377>I'm <00:25:12.533>not <00:25:12.688>really <00:25:12.844>that <00:25:13.000>interested

514
00:25:14.300 --> 00:25:17.500
<00:25:14.300>in <00:25:14.407>running <00:25:14.515>that <00:25:14.623>stuff. <00:25:14.730>I'm <00:25:14.838>just <00:25:14.946>here <00:25:15.053>to <00:25:15.161>Showcase <00:25:15.269>how <00:25:15.376>to <00:25:15.484>build <00:25:15.592>such <00:25:15.700>apis.

515
00:25:18.800 --> 00:25:21.200
<00:25:18.800>All <00:25:19.033>right, <00:25:19.266>so <00:25:19.500>I'm <00:25:19.733>getting <00:25:19.966>close <00:25:20.200>to

516
00:25:21.200 --> 00:25:24.000
<00:25:21.200>the <00:25:21.300>end <00:25:21.400>of <00:25:21.500>my <00:25:21.600>talk. <00:25:21.700>If <00:25:21.800>you <00:25:21.900>want <00:25:22.000>to <00:25:22.100>scan <00:25:22.200>this <00:25:22.300>QR <00:25:22.400>code. <00:25:22.500>We <00:25:22.600>have

517
00:25:24.100 --> 00:25:28.300
<00:25:24.100>a <00:25:24.193>few <00:25:24.286>blog <00:25:24.379>posts <00:25:24.473>and <00:25:24.566>podcasts <00:25:24.659>and <00:25:24.753>so <00:25:24.846>on <00:25:24.939>on <00:25:25.033>the <00:25:25.126>topic <00:25:25.219>of <00:25:25.313>typescript, <00:25:25.406>so <00:25:25.500>I

518
00:25:27.300 --> 00:25:30.300
<00:25:27.300>will <00:25:27.475>also <00:25:27.649>try <00:25:27.825>to <00:25:28.000>publish <00:25:28.175>the <00:25:28.350>code <00:25:28.524>there <00:25:28.700>at

519
00:25:30.300 --> 00:25:30.500
<00:25:30.300>some <00:25:30.480>point.

520
00:25:31.600 --> 00:25:34.300
<00:25:31.600>Yeah, <00:25:31.774>take <00:25:31.949>some <00:25:32.125>time <00:25:32.300>to <00:25:32.475>scan <00:25:32.649>the <00:25:32.824>QR <00:25:33.000>code.

521
00:25:35.100 --> 00:25:38.400
<00:25:35.100>And <00:25:35.333>as <00:25:35.566>a <00:25:35.800>final <00:25:36.033>world <00:25:36.266>as <00:25:36.500>a

522
00:25:38.400 --> 00:25:41.700
<00:25:38.400>final <00:25:38.633>world <00:25:38.866>while <00:25:39.100>I'm <00:25:39.333>very <00:25:39.566>fond <00:25:39.800>of

523
00:25:41.700 --> 00:25:44.600
<00:25:41.700>categorizing <00:25:41.855>values <00:25:42.011>by <00:25:42.166>their <00:25:42.322>types. <00:25:42.477>I'm <00:25:42.633>not <00:25:42.788>so <00:25:42.944>fun <00:25:43.100>by

524
00:25:44.600 --> 00:25:47.400
<00:25:44.600>categorizing <00:25:44.833>Human <00:25:45.066>by <00:25:45.300>the <00:25:45.533>outside <00:25:45.766>properties. <00:25:46.000>So

525
00:25:47.400 --> 00:25:50.300
<00:25:47.400>please <00:25:47.516>try <00:25:47.633>not <00:25:47.750>to <00:25:47.866>do <00:25:47.983>that. <00:25:48.100>Just <00:25:48.216>try <00:25:48.333>to <00:25:48.450>do <00:25:48.566>that <00:25:48.683>in <00:25:48.800>your

526
00:25:50.300 --> 00:25:53.300
<00:25:50.300>code. <00:25:50.455>And <00:25:50.611>with <00:25:50.766>that. <00:25:50.922>I'm <00:25:51.077>very <00:25:51.233>happy <00:25:51.388>to <00:25:51.544>answer <00:25:51.700>any

527
00:25:53.300 --> 00:25:53.300
questions.

528
00:26:02.700 --> 00:26:05.200
<00:26:02.700>All <00:26:02.840>right. <00:26:02.980>Thank <00:26:03.120>you <00:26:03.260>very <00:26:03.400>much <00:26:03.540>for <00:26:03.680>sharing <00:26:03.820>your <00:26:03.960>knowledge <00:26:04.100>with

529
00:26:05.200 --> 00:26:08.200
<00:26:05.200>us <00:26:05.355>today. <00:26:05.511>We <00:26:05.666>have <00:26:05.822>a <00:26:05.977>question <00:26:06.133>in <00:26:06.288>the <00:26:06.444>app. <00:26:06.600>If

530
00:26:08.200 --> 00:26:11.200
<00:26:08.200>anyone <00:26:08.316>would <00:26:08.433>like <00:26:08.550>to <00:26:08.666>throw <00:26:08.783>in <00:26:08.900>another <00:26:09.016>question, <00:26:09.133>we <00:26:09.250>have <00:26:09.366>a <00:26:09.483>few <00:26:09.600>minutes.

531
00:26:13.700 --> 00:26:15.800
<00:26:13.700>So <00:26:14.050>this <00:26:14.400>is <00:26:14.750>from <00:26:15.100>Vladimir.

532
00:26:16.700 --> 00:26:20.000
<00:26:16.700>Is <00:26:16.875>it <00:26:17.050>possible <00:26:17.225>to <00:26:17.400>consume <00:26:17.575>the <00:26:17.750>partial <00:26:17.925>objects <00:26:18.100>object

533
00:26:19.100 --> 00:26:22.200
<00:26:19.100>in <00:26:19.333>the <00:26:19.566>Constructor <00:26:19.800>and <00:26:20.033>guarantee <00:26:20.266>that <00:26:20.500>all

534
00:26:22.200 --> 00:26:24.500
<00:26:22.200>required <00:26:22.666>properties <00:26:23.133>are <00:26:23.600>initialized?

535
00:26:26.900 --> 00:26:29.200
<00:26:26.900>Um <00:26:27.133>partial <00:26:27.366>objects. <00:26:27.600>Yes. <00:26:27.833>I <00:26:28.066>mean <00:26:28.300>there

536
00:26:29.200 --> 00:26:32.800
<00:26:29.200>is <00:26:29.340>a <00:26:29.480>there's <00:26:29.620>a <00:26:29.760>utility <00:26:29.900>type <00:26:30.040>that's <00:26:30.180>called <00:26:30.320>partial <00:26:30.460>which <00:26:30.600>allows

537
00:26:32.800 --> 00:26:35.500
<00:26:32.800>you <00:26:33.033>to <00:26:33.266>emit <00:26:33.500>any <00:26:33.733>any <00:26:33.966>value <00:26:34.200>from

538
00:26:35.500 --> 00:26:36.200
<00:26:35.500>an <00:26:36.130>object.

539
00:26:37.200 --> 00:26:41.200
<00:26:37.200>But <00:26:37.327>then <00:26:37.454>at <00:26:37.581>some <00:26:37.709>point <00:26:37.836>you <00:26:37.963>have <00:26:38.090>to <00:26:38.218>specify <00:26:38.345>the <00:26:38.472>actual <00:26:38.600>default

540
00:26:40.200 --> 00:26:41.700
<00:26:40.200>value <00:26:40.875>for <00:26:41.550>that.

541
00:26:42.400 --> 00:26:45.300
<00:26:42.400>So <00:26:42.600>I'm <00:26:42.800>not <00:26:43.000>aware <00:26:43.200>of <00:26:43.400>any <00:26:43.600>Library <00:26:43.800>function

542
00:26:45.300 --> 00:26:47.600
<00:26:45.300>that <00:26:45.416>would <00:26:45.533>do <00:26:45.649>that, <00:26:45.766>but <00:26:45.883>it <00:26:46.000>should <00:26:46.116>be <00:26:46.233>simply <00:26:46.350>enough <00:26:46.466>to <00:26:46.583>put <00:26:46.700>together.

543
00:26:50.900 --> 00:26:53.400
<00:26:50.900>All <00:26:51.075>right. <00:26:51.250>Do <00:26:51.425>we <00:26:51.600>have <00:26:51.775>any <00:26:51.950>other <00:26:52.125>questions? <00:26:52.300>Okay.

544
00:26:56.600 --> 00:26:59.700
<00:26:56.600>Sorry, <00:26:56.755>hi. <00:26:56.911>Thanks <00:26:57.066>a <00:26:57.222>lot <00:26:57.377>for <00:26:57.533>the <00:26:57.688>talk. <00:26:57.844>You <00:26:58.000>know

545
00:26:59.700 --> 00:27:02.200
<00:26:59.700>your <00:26:59.933>last <00:27:00.166>page <00:27:00.400>you <00:27:00.633>added <00:27:00.866>a <00:27:01.100>column.

546
00:27:04.300 --> 00:27:07.500
<00:27:04.300>And <00:27:04.500>codes <00:27:04.700>I <00:27:04.899>think <00:27:05.100>it's <00:27:05.300>here <00:27:05.500>somewhere. <00:27:05.700>Yeah.

547
00:27:07.500 --> 00:27:10.200
<00:27:07.500>Yeah <00:27:07.655>you <00:27:07.811>added <00:27:07.966>the <00:27:08.122>column <00:27:08.277>that <00:27:08.433>needed <00:27:08.588>deleted <00:27:08.744>column. <00:27:08.900>Can

548
00:27:10.200 --> 00:27:13.700
<00:27:10.200>you <00:27:10.355>infer <00:27:10.511>about <00:27:10.666>a <00:27:10.822>new <00:27:10.977>type <00:27:11.133>in <00:27:11.288>typescript <00:27:11.444>if <00:27:11.600>you

549
00:27:13.700 --> 00:27:17.100
<00:27:13.700>add <00:27:13.855>a <00:27:14.011>column <00:27:14.166>and <00:27:14.322>next <00:27:14.477>slide <00:27:14.633>you <00:27:14.788>can <00:27:14.944>basically <00:27:15.100>yeah

550
00:27:16.100 --> 00:27:19.200
<00:27:16.100>just <00:27:16.566>copy <00:27:17.033>paste <00:27:17.500>the

551
00:27:19.200 --> 00:27:20.100
<00:27:19.200>invocation <00:27:19.605>here <00:27:20.010>again.

552
00:27:23.200 --> 00:27:24.800
<00:27:23.200>So <00:27:23.550>it's <00:27:23.900>a <00:27:24.250>bit <00:27:24.600>small.

553
00:27:25.600 --> 00:27:27.000
<00:27:25.600>I <00:27:25.851>have <00:27:26.104>to <00:27:26.356>make <00:27:26.608>that <00:27:26.860>smaller.

554
00:27:29.200 --> 00:27:32.600
<00:27:29.200>So <00:27:29.307>here <00:27:29.415>this <00:27:29.523>is <00:27:29.630>how <00:27:29.738>this <00:27:29.846>is <00:27:29.953>how <00:27:30.061>the <00:27:30.169>fold <00:27:30.276>invocation <00:27:30.384>looks <00:27:30.492>like <00:27:30.600>and

555
00:27:32.600 --> 00:27:35.500
<00:27:32.600>this <00:27:32.727>is <00:27:32.854>complete <00:27:32.981>type <00:27:33.109>inference. <00:27:33.236>So <00:27:33.363>I <00:27:33.490>don't <00:27:33.618>have <00:27:33.745>to <00:27:33.872>specify <00:27:34.000>any

556
00:27:35.500 --> 00:27:38.400
<00:27:35.500>of <00:27:35.627>the <00:27:35.754>types <00:27:35.881>there. <00:27:36.009>It <00:27:36.136>knows <00:27:36.263>that <00:27:36.390>quantity <00:27:36.518>and <00:27:36.645>price <00:27:36.772>on <00:27:36.900>numbers.

557
00:27:38.400 --> 00:27:41.000
<00:27:38.400>It <00:27:38.527>knows <00:27:38.654>that <00:27:38.781>the <00:27:38.909>multiplication <00:27:39.036>return <00:27:39.163>to <00:27:39.290>number. <00:27:39.418>So <00:27:39.545>I'm <00:27:39.672>adding <00:27:39.800>a

558
00:27:41.600 --> 00:27:44.600
<00:27:41.600>column <00:27:41.716>total <00:27:41.833>price <00:27:41.949>with <00:27:42.066>number <00:27:42.183>and <00:27:42.300>there's <00:27:42.416>no <00:27:42.533>need <00:27:42.649>for <00:27:42.766>me <00:27:42.883>to <00:27:43.000>specify

559
00:27:44.600 --> 00:27:45.500
<00:27:44.600>any <00:27:45.004>type <00:27:45.410>parameters.

560
00:27:48.100 --> 00:27:51.500
<00:27:48.100>In <00:27:48.240>typescript <00:27:48.379>know <00:27:48.520>that <00:27:48.659>total <00:27:48.800>price <00:27:48.939>will <00:27:49.080>be <00:27:49.219>of <00:27:49.360>type <00:27:49.500>number

561
00:27:51.500 --> 00:27:54.100
<00:27:51.500>Yes. <00:27:51.700>Actually, <00:27:51.900>let <00:27:52.100>me <00:27:52.300>show <00:27:52.500>you <00:27:52.700>this <00:27:52.900>in

562
00:27:54.100 --> 00:27:56.200
<00:27:54.100>in <00:27:54.240>vs <00:27:54.379>code <00:27:54.520>so <00:27:54.659>that <00:27:54.800>you <00:27:54.939>know <00:27:55.080>that <00:27:55.219>I'm <00:27:55.360>not <00:27:55.500>cheating.

563
00:27:59.300 --> 00:28:00.700
<00:27:59.300>So <00:27:59.552>here's <00:27:59.804>the <00:28:00.056>same <00:28:00.308>code <00:28:00.560>again.

564
00:28:02.600 --> 00:28:05.200
<00:28:02.600>So <00:28:02.740>here <00:28:02.879>I <00:28:03.020>have <00:28:03.159>the <00:28:03.300>table <00:28:03.439>1.install <00:28:03.580>compute <00:28:03.719>and <00:28:03.860>I <00:28:04.000>can

565
00:28:05.200 --> 00:28:08.300
<00:28:05.200>hover <00:28:05.327>over <00:28:05.454>this <00:28:05.581>and <00:28:05.709>it <00:28:05.836>will <00:28:05.963>show <00:28:06.090>me <00:28:06.218>that <00:28:06.345>total <00:28:06.472>price <00:28:06.600>is

566
00:28:08.300 --> 00:28:08.600
<00:28:08.300>a <00:28:08.570>number.

567
00:28:09.200 --> 00:28:12.100
<00:28:09.200>So <00:28:09.355>it <00:28:09.511>completely <00:28:09.666>invert <00:28:09.822>that <00:28:09.977>with <00:28:10.133>no <00:28:10.288>problem. <00:28:10.444>I <00:28:10.600>didn't

568
00:28:12.100 --> 00:28:15.900
<00:28:12.100>have <00:28:12.255>to <00:28:12.411>specify <00:28:12.566>anything. <00:28:12.722>It <00:28:12.877>did <00:28:13.033>not <00:28:13.188>actually <00:28:13.344>simply <00:28:13.500>fight

569
00:28:15.900 --> 00:28:18.700
<00:28:15.900>a <00:28:16.055>type. <00:28:16.211>So <00:28:16.366>you <00:28:16.522>still <00:28:16.677>have <00:28:16.833>that <00:28:16.988>that <00:28:17.144>intersection, <00:28:17.300>but

570
00:28:18.700 --> 00:28:20.100
<00:28:18.700>if <00:28:19.015>you <00:28:19.330>then <00:28:19.645>actually <00:28:19.960>select

571
00:28:20.700 --> 00:28:23.400
<00:28:20.700>The <00:28:20.840>serious <00:28:20.980>and <00:28:21.120>it <00:28:21.260>will <00:28:21.400>be <00:28:21.540>able <00:28:21.680>to <00:28:21.820>simplify <00:28:21.960>that <00:28:22.100>it

572
00:28:23.400 --> 00:28:24.600
<00:28:23.400>returns <00:28:23.670>a <00:28:23.940>series <00:28:24.210>of <00:28:24.480>number.

573
00:28:25.800 --> 00:28:26.300
<00:28:25.800>Yeah <00:28:26.250>this

574
00:28:26.600 --> 00:28:27.400
<00:28:26.600>is <00:28:26.960>an <00:28:27.320>invaluable

575
00:28:27.500 --> 00:28:30.200
<00:28:27.500>feature <00:28:27.627>like <00:28:27.754>control <00:28:27.881>hovering <00:28:28.009>over <00:28:28.136>those <00:28:28.263>things <00:28:28.390>to <00:28:28.518>actually <00:28:28.645>see <00:28:28.772>what <00:28:28.900>you

576
00:28:30.200 --> 00:28:30.800
<00:28:30.200>have <00:28:30.380>come <00:28:30.560>up <00:28:30.740>with.

577
00:28:35.400 --> 00:28:38.300
<00:28:35.400>All <00:28:35.540>right. <00:28:35.680>Thank <00:28:35.820>you <00:28:35.960>very <00:28:36.100>much <00:28:36.240>for <00:28:36.380>being <00:28:36.520>here <00:28:36.660>today. <00:28:36.800>Let's

578
00:28:38.300 --> 00:28:39.600
<00:28:38.300>give <00:28:38.533>a <00:28:38.768>final <00:28:39.002>hand <00:28:39.235>to <00:28:39.469>life.