WEBVTT

1
00:00:01.640 --> 00:00:05.620
<00:00:01.640>So, <00:00:01.767>hi. <00:00:01.894>Welcome <00:00:02.021>to <00:00:02.149>this <00:00:02.276>talk, <00:00:02.403>where <00:00:02.530>we <00:00:02.658>are <00:00:02.785>actually <00:00:02.912>going <00:00:03.040>to

2
00:00:05.660 --> 00:00:09.380
<00:00:05.660>be <00:00:05.787>scripting <00:00:05.914>with <00:00:06.041>Java. <00:00:06.169>This <00:00:06.296>is <00:00:06.423>not <00:00:06.550>going <00:00:06.678>to <00:00:06.805>be <00:00:06.932>about <00:00:07.060>JavaScript.

3
00:00:10.080 --> 00:00:13.440
<00:00:10.080>Mind <00:00:10.235>this <00:00:10.391>space <00:00:10.546>between <00:00:10.702>Java <00:00:10.857>and <00:00:11.013>the <00:00:11.168>script <00:00:11.324>over <00:00:11.480>here.

4
00:00:15.660 --> 00:00:18.560
<00:00:15.660>So, <00:00:15.835>first <00:00:16.010>few <00:00:16.184>words <00:00:16.360>about <00:00:16.535>me. <00:00:16.710>I'm <00:00:16.885>Jens <00:00:17.060>Knippa.

5
00:00:18.780 --> 00:00:22.580
<00:00:18.780>I'm <00:00:18.920>working <00:00:19.060>as <00:00:19.200>a <00:00:19.340>software <00:00:19.480>engineer <00:00:19.620>for <00:00:19.760>OpenValue <00:00:19.900>in <00:00:20.040>Düsseldorf, <00:00:20.180>Germany.

6
00:00:23.540 --> 00:00:27.130
<00:00:23.540>And <00:00:23.773>we're <00:00:24.006>a <00:00:24.240>small <00:00:24.473>consulting <00:00:24.706>company <00:00:24.939>focused

7
00:00:27.180 --> 00:00:28.880
<00:00:27.180>mainly <00:00:27.530>on <00:00:27.880>the <00:00:28.230>Java <00:00:28.580>ecosystem.

8
00:00:30.660 --> 00:00:33.180
<00:00:30.660>Yeah, <00:00:30.835>and <00:00:31.010>I'll <00:00:31.185>tend <00:00:31.360>to <00:00:31.535>work <00:00:31.710>in <00:00:31.885>different <00:00:32.060>projects

9
00:00:34.000 --> 00:00:34.440
<00:00:34.000>all <00:00:34.198>the <00:00:34.396>time,

10
00:00:36.220 --> 00:00:40.200
<00:00:36.220>where <00:00:36.360>I <00:00:36.500>generally <00:00:36.640>learn <00:00:36.780>new <00:00:36.920>technologies, <00:00:37.060>new <00:00:37.199>domains, <00:00:37.339>all <00:00:37.480>these <00:00:37.620>kinds

11
00:00:40.260 --> 00:00:44.020
<00:00:40.260>of <00:00:40.400>things, <00:00:40.540>and <00:00:40.680>yeah. <00:00:40.820>What <00:00:40.960>I <00:00:41.099>learn, <00:00:41.239>I <00:00:41.379>usually <00:00:41.519>like <00:00:41.660>to

12
00:00:44.040 --> 00:00:45.440
<00:00:44.040>share <00:00:44.292>in <00:00:44.544>talks <00:00:44.796>like <00:00:45.047>that <00:00:45.300>one.

13
00:00:46.780 --> 00:00:49.920
<00:00:46.780>And <00:00:46.955>small <00:00:47.130>fun <00:00:47.305>fact <00:00:47.480>about <00:00:47.655>me, <00:00:47.830>I <00:00:48.005>like <00:00:48.180>cats,

14
00:00:50.420 --> 00:00:53.260
<00:00:50.420>and <00:00:50.620>that's <00:00:50.820>why <00:00:51.020>you <00:00:51.220>all <00:00:51.420>watching <00:00:51.620>this <00:00:51.820>video

15
00:00:54.120 --> 00:00:58.000
<00:00:54.120>actually <00:00:54.220>have <00:00:54.320>to <00:00:54.419>learn <00:00:54.519>a <00:00:54.620>few <00:00:54.720>facts <00:00:54.820>about <00:00:54.919>cats <00:00:55.019>and <00:00:55.120>why <00:00:55.220>we're <00:00:55.320>also <00:00:55.419>going <00:00:55.519>to

16
00:00:58.040 --> 00:00:58.780
<00:00:58.040>build <00:00:58.262>our <00:00:58.484>own <00:00:58.706>cat.

17
00:01:00.440 --> 00:01:01.580
<00:01:00.440>So, <00:01:00.782>let's <00:01:01.123>get <00:01:01.466>started.

18
00:01:03.980 --> 00:01:07.800
<00:01:03.980>Whenever <00:01:04.119>you <00:01:04.259>think <00:01:04.399>about <00:01:04.539>scripting, <00:01:04.679>Java <00:01:04.819>is <00:01:04.959>probably <00:01:05.099>not <00:01:05.239>the <00:01:05.379>first

19
00:01:07.860 --> 00:01:10.560
<00:01:07.860>thing <00:01:08.060>that <00:01:08.260>comes <00:01:08.460>to <00:01:08.660>mind. <00:01:08.860>Probably <00:01:09.060>Bash <00:01:09.260>is.

20
00:01:11.960 --> 00:01:12.540
<00:01:11.960>But <00:01:12.482>whenever

21
00:01:13.500 --> 00:01:14.780
<00:01:13.500>I <00:01:13.730>have <00:01:13.960>to <00:01:14.191>script <00:01:14.421>in <00:01:14.652>Bash,

22
00:01:15.680 --> 00:01:18.080
<00:01:15.680>I <00:01:15.835>have <00:01:15.991>the <00:01:16.146>same <00:01:16.302>problem <00:01:16.457>like <00:01:16.613>Jacob <00:01:16.768>Warden <00:01:16.924>over <00:01:17.080>here.

23
00:01:18.780 --> 00:01:22.280
<00:01:18.780>And <00:01:18.896>to <00:01:19.013>quote <00:01:19.130>him, <00:01:19.246>"The <00:01:19.363>opposite <00:01:19.480>of <00:01:19.596>it's <00:01:19.713>like <00:01:19.830>riding <00:01:19.946>a <00:01:20.063>bike <00:01:20.180>is,

24
00:01:22.800 --> 00:01:26.420
<00:01:22.800>it's <00:01:22.927>like <00:01:23.054>programming <00:01:23.181>in <00:01:23.309>Bash." <00:01:23.436>A <00:01:23.563>phrase <00:01:23.690>which <00:01:23.818>means <00:01:23.945>that <00:01:24.072>no <00:01:24.200>matter

25
00:01:26.840 --> 00:01:30.560
<00:01:26.840>how <00:01:26.947>many <00:01:27.055>times <00:01:27.163>you <00:01:27.270>do <00:01:27.378>something, <00:01:27.486>you'll <00:01:27.593>have <00:01:27.701>to <00:01:27.809>relearn <00:01:27.916>it <00:01:28.024>every <00:01:28.132>single <00:01:28.240>time.

26
00:01:32.180 --> 00:01:34.480
<00:01:32.180>And <00:01:32.413>that's <00:01:32.646>exactly <00:01:32.880>my <00:01:33.113>problem <00:01:33.346>with <00:01:33.580>Bash.

27
00:01:35.300 --> 00:01:37.190
<00:01:35.300>I <00:01:35.533>just <00:01:35.766>don't <00:01:36.000>use <00:01:36.233>it <00:01:36.466>often <00:01:36.700>enough,

28
00:01:38.000 --> 00:01:41.590
<00:01:38.000>and <00:01:38.140>the <00:01:38.280>syntax <00:01:38.420>is <00:01:38.560>a <00:01:38.700>little <00:01:38.840>off <00:01:38.980>compared <00:01:39.120>to <00:01:39.260>other <00:01:39.400>programming

29
00:01:41.660 --> 00:01:45.620
<00:01:41.660>languages. <00:01:41.759>So <00:01:41.860>every <00:01:41.960>time <00:01:42.060>I <00:01:42.160>want <00:01:42.259>to <00:01:42.360>use <00:01:42.460>it, <00:01:42.560>I <00:01:42.660>don't <00:01:42.759>know <00:01:42.860>how <00:01:42.960>it <00:01:43.060>works

30
00:01:45.660 --> 00:01:47.000
<00:01:45.660>anymore. <00:01:45.901>I <00:01:46.142>have <00:01:46.383>to <00:01:46.624>Google <00:01:46.866>it

31
00:01:47.880 --> 00:01:48.570
<00:01:47.880>again <00:01:48.190>and <00:01:48.500>again.

32
00:01:49.880 --> 00:01:52.460
<00:01:49.880>Might <00:01:50.054>also <00:01:50.229>be <00:01:50.405>my <00:01:50.580>goldfish <00:01:50.755>brain. <00:01:50.929>So, <00:01:51.104>who <00:01:51.280>knows?

33
00:01:54.400 --> 00:01:54.610
But

34
00:01:55.440 --> 00:01:57.870
<00:01:55.440>a <00:01:55.580>good <00:01:55.720>thing, <00:01:55.860>we <00:01:56.000>have <00:01:56.140>a <00:01:56.280>few <00:01:56.420>other <00:01:56.560>options <00:01:56.700>for <00:01:56.840>scripting.

35
00:01:58.330 --> 00:02:01.010
<00:01:58.330>Another <00:01:58.505>option <00:01:58.679>would, <00:01:58.855>for <00:01:59.030>example, <00:01:59.205>be <00:01:59.380>to <00:01:59.554>use <00:01:59.730>Python.

36
00:02:02.940 --> 00:02:06.539
<00:02:02.940>But <00:02:03.056>with <00:02:03.173>Python, <00:02:03.289>my <00:02:03.406>issue <00:02:03.523>is, <00:02:03.640>it's <00:02:03.756>a <00:02:03.873>great <00:02:03.990>language, <00:02:04.106>it's <00:02:04.223>a <00:02:04.340>great

37
00:02:06.620 --> 00:02:10.150
<00:02:06.620>ecosystem, <00:02:06.795>but <00:02:06.970>all <00:02:07.145>the <00:02:07.320>tooling, <00:02:07.495>like <00:02:07.670>build <00:02:07.845>tooling, <00:02:08.020>dependency

38
00:02:10.220 --> 00:02:10.861
management,

39
00:02:12.040 --> 00:02:14.780
<00:02:12.040>it's <00:02:12.179>a <00:02:12.320>total <00:02:12.459>mess. <00:02:12.600>There's <00:02:12.739>so <00:02:12.880>many <00:02:13.019>ways <00:02:13.160>to <00:02:13.299>do <00:02:13.440>something.

40
00:02:15.180 --> 00:02:16.800
<00:02:15.180>You <00:02:15.380>can <00:02:15.580>use <00:02:15.780>Anaconda, <00:02:15.980>you <00:02:16.180>can <00:02:16.380>use <00:02:16.580>PIP,

41
00:02:18.540 --> 00:02:22.160
<00:02:18.540>whatever. <00:02:18.715>You <00:02:18.890>can <00:02:19.065>download <00:02:19.239>packages <00:02:19.415>for <00:02:19.590>Python, <00:02:19.765>usually <00:02:19.940>using

42
00:02:22.340 --> 00:02:23.760
<00:02:22.340>your <00:02:22.766>regular <00:02:23.192>package <00:02:23.618>manager.

43
00:02:25.260 --> 00:02:25.570
And

44
00:02:26.540 --> 00:02:30.320
<00:02:26.540>don't <00:02:26.667>forget <00:02:26.794>to <00:02:26.921>activate <00:02:27.049>your <00:02:27.176>venv. <00:02:27.303>Otherwise, <00:02:27.430>this <00:02:27.558>gets <00:02:27.685>a <00:02:27.812>huge <00:02:27.940>mess.

45
00:02:30.760 --> 00:02:34.320
<00:02:30.760>And <00:02:31.040>this <00:02:31.320>is <00:02:31.600>something <00:02:31.880>that <00:02:32.160>usually

46
00:02:35.620 --> 00:02:39.440
<00:02:35.620>I <00:02:35.747>don't <00:02:35.874>like <00:02:36.001>about <00:02:36.129>Python. <00:02:36.256>I <00:02:36.383>know <00:02:36.510>many <00:02:36.638>people <00:02:36.765>use <00:02:36.892>venv, <00:02:37.020>and

47
00:02:39.720 --> 00:02:42.120
<00:02:39.720>this <00:02:39.859>is <00:02:40.000>a <00:02:40.140>great <00:02:40.280>tool <00:02:40.420>which <00:02:40.560>fixes <00:02:40.700>most <00:02:40.840>of <00:02:40.980>the <00:02:41.120>issues.

48
00:02:42.600 --> 00:02:45.350
<00:02:42.600>But <00:02:42.755>lots <00:02:42.911>of <00:02:43.066>projects <00:02:43.222>still <00:02:43.377>have <00:02:43.533>these <00:02:43.688>old <00:02:43.844>build <00:02:44.000>tools,

49
00:02:46.560 --> 00:02:47.170
<00:02:46.560>which <00:02:47.109>I'm

50
00:02:48.800 --> 00:02:49.580
<00:02:48.800>not <00:02:48.975>really <00:02:49.151>a <00:02:49.326>fan <00:02:49.501>of.

51
00:02:50.780 --> 00:02:50.920
So,

52
00:02:52.820 --> 00:02:56.540
<00:02:52.820>let's <00:02:52.975>have <00:02:53.131>a <00:02:53.286>look <00:02:53.442>at <00:02:53.597>what <00:02:53.753>our <00:02:53.908>next <00:02:54.064>option <00:02:54.220>is,

53
00:02:57.320 --> 00:02:58.000
<00:02:57.320>and <00:02:57.626>it's <00:02:57.932>Java.

54
00:02:59.020 --> 00:03:02.540
<00:02:59.020>And <00:02:59.147>Java <00:02:59.274>is <00:02:59.401>usually <00:02:59.529>not <00:02:59.656>the <00:02:59.783>thing <00:02:59.910>you <00:03:00.038>think <00:03:00.165>about <00:03:00.292>when <00:03:00.420>scripting,

55
00:03:03.140 --> 00:03:06.980
<00:03:03.140>but <00:03:03.267>let's <00:03:03.394>have <00:03:03.521>a <00:03:03.649>look <00:03:03.776>at <00:03:03.903>it. <00:03:04.030>What <00:03:04.158>might <00:03:04.285>be <00:03:04.412>advantages <00:03:04.540>we

56
00:03:07.020 --> 00:03:07.460
<00:03:07.020>have <00:03:07.416>there?

57
00:03:08.540 --> 00:03:11.440
<00:03:08.540>First <00:03:08.739>of <00:03:08.940>all, <00:03:09.140>it's <00:03:09.340>statically <00:03:09.540>typed <00:03:09.739>and <00:03:09.940>compiled.

58
00:03:12.000 --> 00:03:13.940
<00:03:12.000>It's <00:03:12.233>usually <00:03:12.466>not <00:03:12.700>really <00:03:12.933>a <00:03:13.166>thing <00:03:13.400>for

59
00:03:17.860 --> 00:03:18.690
<00:03:17.860>scripting <00:03:18.607>languages,

60
00:03:19.660 --> 00:03:23.620
<00:03:19.660>but <00:03:19.787>it <00:03:19.914>can <00:03:20.041>come <00:03:20.169>in <00:03:20.296>handy. <00:03:20.423>You <00:03:20.550>don't <00:03:20.678>have <00:03:20.805>to <00:03:20.932>run <00:03:21.060>the

61
00:03:23.640 --> 00:03:25.880
<00:03:23.640>program <00:03:23.795>to <00:03:23.951>actually <00:03:24.106>find <00:03:24.262>certain <00:03:24.417>errors <00:03:24.573>and <00:03:24.728>stuff <00:03:24.884>like <00:03:25.040>that.

62
00:03:26.310 --> 00:03:27.740
<00:03:26.310>You <00:03:26.524>just <00:03:26.739>get <00:03:26.953>the <00:03:27.168>feedback <00:03:27.382>right <00:03:27.597>away.

63
00:03:29.700 --> 00:03:33.460
<00:03:29.700>One <00:03:29.899>thing <00:03:30.100>that's <00:03:30.299>not <00:03:30.500>really <00:03:30.700>relevant <00:03:30.899>for <00:03:31.100>scripting

64
00:03:33.560 --> 00:03:35.180
<00:03:33.560>is <00:03:33.910>it's <00:03:34.260>meant <00:03:34.610>for <00:03:34.960>maintainability.

65
00:03:35.260 --> 00:03:39.140
<00:03:35.260>It's <00:03:35.435>a <00:03:35.609>nice <00:03:35.785>thing, <00:03:35.959>but <00:03:36.135>I <00:03:36.310>don't <00:03:36.484>really <00:03:36.660>100%

66
00:03:39.150 --> 00:03:39.980
<00:03:39.150>need <00:03:39.399>it <00:03:39.648>for <00:03:39.897>scripting.

67
00:03:41.660 --> 00:03:44.860
<00:03:41.660>Compared <00:03:41.799>to <00:03:41.940>Bash <00:03:42.079>or <00:03:42.220>Python, <00:03:42.359>it <00:03:42.500>has <00:03:42.640>a <00:03:42.780>lot <00:03:42.920>more <00:03:43.060>performance.

68
00:03:45.780 --> 00:03:48.860
<00:03:45.780>And <00:03:45.935>as <00:03:46.091>Python <00:03:46.246>as <00:03:46.402>well, <00:03:46.557>it <00:03:46.713>has <00:03:46.868>a <00:03:47.024>huge <00:03:47.180>ecosystem.

69
00:03:50.300 --> 00:03:54.140
<00:03:50.300>And <00:03:50.416>the <00:03:50.533>point <00:03:50.650>which <00:03:50.766>is, <00:03:50.883>at <00:03:51.000>least <00:03:51.116>for <00:03:51.233>me, <00:03:51.350>the <00:03:51.466>most <00:03:51.583>relevant <00:03:51.700>is

70
00:03:54.440 --> 00:03:58.120
<00:03:54.440>that <00:03:54.547>I <00:03:54.655>am <00:03:54.763>familiar <00:03:54.870>with <00:03:54.978>Java, <00:03:55.086>so <00:03:55.193>scripting <00:03:55.301>is <00:03:55.409>a <00:03:55.516>lot <00:03:55.624>easier <00:03:55.732>for <00:03:55.840>me.

71
00:04:00.820 --> 00:04:04.260
<00:04:00.820>But <00:04:00.927>let's <00:04:01.035>have <00:04:01.143>a <00:04:01.250>look <00:04:01.358>at <00:04:01.466>why <00:04:01.573>Java <00:04:01.681>might <00:04:01.789>not <00:04:01.896>be <00:04:02.004>suitable <00:04:02.112>for <00:04:02.220>scripting.

72
00:04:05.160 --> 00:04:05.640
And

73
00:04:06.500 --> 00:04:10.400
<00:04:06.500>whenever <00:04:06.640>people <00:04:06.780>complain <00:04:06.920>about <00:04:07.060>Java <00:04:07.200>here, <00:04:07.340>that <00:04:07.480>it's <00:04:07.620>verbose, <00:04:07.760>that <00:04:07.900>it

74
00:04:10.440 --> 00:04:14.220
<00:04:10.440>has <00:04:10.595>lots <00:04:10.751>of <00:04:10.906>boilerplate, <00:04:11.062>you <00:04:11.217>need <00:04:11.373>ceremony <00:04:11.528>to <00:04:11.684>do <00:04:11.840>anything.

75
00:04:15.980 --> 00:04:17.120
<00:04:15.980>But <00:04:17.006>let's

76
00:04:17.921 --> 00:04:18.161
check

77
00:04:19.180 --> 00:04:22.340
<00:04:19.180>if <00:04:19.459>this <00:04:19.740>is <00:04:20.019>really <00:04:20.300>valid <00:04:20.579>critique.

78
00:04:23.480 --> 00:04:25.030
<00:04:23.480>I <00:04:23.759>know <00:04:24.038>these <00:04:24.317>points <00:04:24.596>are <00:04:24.875>really

79
00:04:26.280 --> 00:04:28.880
<00:04:26.280>concerning. <00:04:26.455>It <00:04:26.630>makes <00:04:26.804>it <00:04:26.979>not <00:04:27.155>really <00:04:27.330>valuable <00:04:27.505>for <00:04:27.679>scripting.

80
00:04:29.500 --> 00:04:31.460
<00:04:29.500>But <00:04:29.675>let's <00:04:29.850>check <00:04:30.025>if <00:04:30.200>these <00:04:30.375>are <00:04:30.550>really <00:04:30.725>still <00:04:30.900>true.

81
00:04:33.640 --> 00:04:37.480
<00:04:33.640>And <00:04:33.747>to <00:04:33.855>check <00:04:33.963>it, <00:04:34.070>if <00:04:34.178>it's <00:04:34.286>still <00:04:34.393>true, <00:04:34.501>we <00:04:34.609>just <00:04:34.716>look <00:04:34.824>at <00:04:34.932>what <00:04:35.039>changed

82
00:04:37.900 --> 00:04:40.719
<00:04:37.900>in <00:04:38.075>the <00:04:38.250>Java <00:04:38.424>ecosystem, <00:04:38.599>maybe <00:04:38.775>even <00:04:38.950>the <00:04:39.125>language <00:04:39.299>itself.

83
00:04:41.860 --> 00:04:44.840
<00:04:41.860>And <00:04:42.015>the <00:04:42.171>first <00:04:42.326>thing <00:04:42.482>I <00:04:42.637>want <00:04:42.793>to <00:04:42.948>show <00:04:43.104>you <00:04:43.260>is

84
00:04:46.220 --> 00:04:48.160
<00:04:46.220>the <00:04:46.500>launch <00:04:46.780>single <00:04:47.060>file <00:04:47.340>source <00:04:47.620>code.

85
00:04:49.200 --> 00:04:52.440
<00:04:49.200>With <00:04:49.316>it, <00:04:49.433>you <00:04:49.550>can <00:04:49.666>now <00:04:49.783>run <00:04:49.900>Java <00:04:50.016>files <00:04:50.133>without <00:04:50.250>the <00:04:50.366>Java <00:04:50.483>C <00:04:50.599>command.

86
00:04:54.200 --> 00:04:57.380
<00:04:54.200>Probably <00:04:54.307>most <00:04:54.415>of <00:04:54.523>you <00:04:54.630>still <00:04:54.738>know <00:04:54.846>it <00:04:54.953>from <00:04:55.061>university, <00:04:55.169>when <00:04:55.276>you <00:04:55.384>were <00:04:55.492>in <00:04:55.599>university,

87
00:04:58.940 --> 00:05:01.980
<00:04:58.940>you <00:04:59.047>were <00:04:59.155>writing <00:04:59.263>your <00:04:59.370>Java <00:04:59.478>code <00:04:59.586>in <00:04:59.693>some <00:04:59.801>kind <00:04:59.909>of <00:05:00.016>text <00:05:00.124>editor <00:05:00.232>or <00:05:00.340>whatever,

88
00:05:03.040 --> 00:05:06.510
<00:05:03.040>then <00:05:03.127>you <00:05:03.215>were <00:05:03.302>running <00:05:03.390>Java <00:05:03.477>C, <00:05:03.565>then <00:05:03.652>it <00:05:03.740>would <00:05:03.827>spit <00:05:03.915>out <00:05:04.002>a <00:05:04.090>class <00:05:04.177>file, <00:05:04.265>which <00:05:04.352>is <00:05:04.440>Java

89
00:05:06.640 --> 00:05:10.320
<00:05:06.640>bytecode, <00:05:06.767>and <00:05:06.894>then <00:05:07.021>you <00:05:07.149>could <00:05:07.276>run <00:05:07.403>the <00:05:07.530>bytecode <00:05:07.658>using <00:05:07.785>the <00:05:07.912>Java <00:05:08.039>command.

90
00:05:12.060 --> 00:05:13.660
<00:05:12.060>Nowadays, <00:05:12.260>you <00:05:12.460>don't <00:05:12.660>have <00:05:12.860>to <00:05:13.060>do <00:05:13.260>it <00:05:13.460>anymore.

91
00:05:15.120 --> 00:05:19.020
<00:05:15.120>Not <00:05:15.260>because <00:05:15.400>you <00:05:15.540>usually <00:05:15.680>don't <00:05:15.820>work <00:05:15.960>like <00:05:16.100>that, <00:05:16.240>but <00:05:16.380>also <00:05:16.520>you

92
00:05:19.400 --> 00:05:20.160
<00:05:19.400>don't <00:05:19.570>need <00:05:19.742>to <00:05:19.913>do <00:05:20.084>it,

93
00:05:21.980 --> 00:05:25.940
<00:05:21.980>because <00:05:22.120>you <00:05:22.260>can <00:05:22.400>now <00:05:22.540>run <00:05:22.680>Java <00:05:22.820>files <00:05:22.960>without <00:05:23.100>the <00:05:23.240>Java <00:05:23.380>C

94
00:05:26.000 --> 00:05:29.740
<00:05:26.000>command. <00:05:26.140>And <00:05:26.280>the <00:05:26.420>bytecode <00:05:26.560>will <00:05:26.700>be <00:05:26.840>compiled <00:05:26.980>into <00:05:27.120>memory <00:05:27.260>and <00:05:27.400>then

95
00:05:29.840 --> 00:05:30.080
run.

96
00:05:31.540 --> 00:05:32.940
<00:05:31.540>So <00:05:31.720>let's <00:05:31.900>have <00:05:32.080>a <00:05:32.260>little <00:05:32.440>look <00:05:32.620>at <00:05:32.800>that.

97
00:05:35.680 --> 00:05:39.440
<00:05:35.680>We'll <00:05:35.787>just <00:05:35.895>write <00:05:36.003>a <00:05:36.110>simple <00:05:36.218>Java <00:05:36.326>and <00:05:36.433>run <00:05:36.541>it <00:05:36.649>the <00:05:36.756>old <00:05:36.864>way, <00:05:36.972>and <00:05:37.080>then

98
00:05:39.560 --> 00:05:43.510
<00:05:39.560>just <00:05:39.700>do <00:05:39.840>it <00:05:39.980>with <00:05:40.120>the <00:05:40.260>new <00:05:40.400>command. <00:05:40.540>So <00:05:40.680>let's <00:05:40.820>write <00:05:40.960>a

99
00:05:43.540 --> 00:05:44.560
<00:05:43.540>Java <00:05:44.458>script

100
00:05:46.880 --> 00:05:48.280
<00:05:46.880>and <00:05:47.090>write <00:05:47.300>it <00:05:47.510>with <00:05:47.719>all <00:05:47.929>the <00:05:48.140>ceremony.

101
00:05:49.500 --> 00:05:52.300
<00:05:49.500>So <00:05:49.966>it's <00:05:50.433>public <00:05:50.900>class

102
00:05:52.360 --> 00:05:56.820
JavaScript.

103
00:05:59.420 --> 00:06:02.500
<00:05:59.420>Public <00:05:59.886>static <00:06:00.353>void <00:06:00.820>main

104
00:06:04.260 --> 00:06:05.560
<00:06:04.260>command <00:06:05.430>string

105
00:06:12.890 --> 00:06:16.350
<00:06:12.890>And <00:06:14.289>System.out.println,

106
00:06:18.290 --> 00:06:19.370
<00:06:18.290>"Hello, <00:06:19.262>world!"

107
00:06:23.570 --> 00:06:26.050
<00:06:23.570>I've <00:06:23.745>just <00:06:23.920>closed <00:06:24.094>the <00:06:24.270>brackets, <00:06:24.445>and <00:06:24.620>here <00:06:24.795>we <00:06:24.969>go.

108
00:06:26.610 --> 00:06:27.370
<00:06:26.610>This <00:06:26.952>is <00:06:27.294>the

109
00:06:27.450 --> 00:06:31.430
Hello

110
00:06:31.490 --> 00:06:33.450
<00:06:31.490>World <00:06:31.690>example <00:06:31.890>probably <00:06:32.090>most <00:06:32.290>of <00:06:32.490>you <00:06:32.690>still <00:06:32.890>know.

111
00:06:35.370 --> 00:06:39.210
<00:06:35.370>And <00:06:35.510>we <00:06:35.650>kind <00:06:35.790>of <00:06:35.930>get <00:06:36.070>why <00:06:36.210>people <00:06:36.350>say <00:06:36.490>this <00:06:36.630>is <00:06:36.770>verbose,

112
00:06:39.290 --> 00:06:39.510
right?

113
00:06:40.690 --> 00:06:44.510
<00:06:40.690>You <00:06:40.777>see, <00:06:40.865>just <00:06:40.952>to <00:06:41.040>have <00:06:41.127>a <00:06:41.215>Hello <00:06:41.302>World <00:06:41.390>product, <00:06:41.477>you <00:06:41.565>have <00:06:41.652>to <00:06:41.740>write <00:06:41.827>that <00:06:41.915>many <00:06:42.002>code, <00:06:42.090>so

114
00:06:44.590 --> 00:06:48.570
<00:06:44.590>many <00:06:44.717>statements, <00:06:44.844>and <00:06:44.971>you <00:06:45.099>need <00:06:45.226>to <00:06:45.353>know <00:06:45.480>all <00:06:45.608>of <00:06:45.735>it, <00:06:45.862>what <00:06:45.990>it

115
00:06:48.650 --> 00:06:52.350
<00:06:48.650>is <00:06:48.766>and <00:06:48.883>whatever, <00:06:49.000>just <00:06:49.116>to <00:06:49.233>run <00:06:49.349>it. <00:06:49.466>And <00:06:49.583>it's <00:06:49.700>not <00:06:49.816>nice <00:06:49.933>for <00:06:50.049>beginners.

116
00:06:53.110 --> 00:06:53.390
Nah.

117
00:06:54.730 --> 00:06:57.250
<00:06:54.730>But <00:06:54.905>we <00:06:55.080>wanted <00:06:55.255>to <00:06:55.430>compile <00:06:55.605>it <00:06:55.780>and <00:06:55.955>run <00:06:56.130>it.

118
00:06:57.430 --> 00:07:01.170
<00:06:57.430>So <00:06:57.546>we <00:06:57.663>see <00:06:57.780>here, <00:06:57.896>there <00:06:58.013>we <00:06:58.130>don't <00:06:58.246>have <00:06:58.363>any <00:06:58.480>class <00:06:58.596>file <00:06:58.713>or <00:06:58.830>something.

119
00:07:04.510 --> 00:07:06.380
<00:07:04.510>Let's <00:07:05.210>compile <00:07:05.909>our

120
00:07:07.210 --> 00:07:08.070
JavaScript.

121
00:07:10.490 --> 00:07:14.330
<00:07:10.490>And <00:07:10.583>here <00:07:10.676>we <00:07:10.770>go. <00:07:10.863>Now <00:07:10.956>we <00:07:11.050>get <00:07:11.143>a <00:07:11.236>class <00:07:11.330>file <00:07:11.423>over <00:07:11.516>here, <00:07:11.610>which <00:07:11.703>is <00:07:11.796>the <00:07:11.890>Java

122
00:07:14.390 --> 00:07:17.190
<00:07:14.390>bytecode. <00:07:14.623>We <00:07:14.856>can <00:07:15.090>also <00:07:15.323>print <00:07:15.556>it <00:07:15.789>out.

123
00:07:19.030 --> 00:07:22.830
<00:07:19.030>And <00:07:19.137>you <00:07:19.245>see <00:07:19.353>that <00:07:19.460>it's <00:07:19.568>some <00:07:19.676>kind <00:07:19.783>of <00:07:19.891>readable, <00:07:19.999>but <00:07:20.106>also <00:07:20.214>some <00:07:20.322>kind <00:07:20.429>of

124
00:07:22.870 --> 00:07:26.790
<00:07:22.870>gibberish. <00:07:23.070>This <00:07:23.270>is <00:07:23.470>actually <00:07:23.670>what <00:07:23.870>the <00:07:24.070>JVM <00:07:24.270>uses

125
00:07:26.870 --> 00:07:27.790
<00:07:26.870>to <00:07:27.146>execute <00:07:27.422>the <00:07:27.698>code.

126
00:07:29.090 --> 00:07:32.390
<00:07:29.090>So <00:07:29.323>we <00:07:29.556>can <00:07:29.789>now <00:07:30.023>run <00:07:30.256>that <00:07:30.489>Java.

127
00:07:37.710 --> 00:07:40.610
<00:07:37.710>This <00:07:37.826>class <00:07:37.943>file <00:07:38.060>with <00:07:38.176>this <00:07:38.293>bytecode, <00:07:38.409>and <00:07:38.526>we <00:07:38.643>get <00:07:38.760>a <00:07:38.876>Hello <00:07:38.993>World <00:07:39.109>back.

128
00:07:41.630 --> 00:07:43.990
<00:07:41.630>But <00:07:41.770>as <00:07:41.909>we <00:07:42.050>said, <00:07:42.190>we <00:07:42.330>don't <00:07:42.469>have <00:07:42.610>to <00:07:42.750>do <00:07:42.890>it <00:07:43.030>anymore.

129
00:07:44.250 --> 00:07:46.230
<00:07:44.250>So <00:07:44.530>let's <00:07:44.810>remove <00:07:45.090>that <00:07:45.370>class <00:07:45.650>file.

130
00:07:49.210 --> 00:07:50.550
<00:07:49.210>And <00:07:49.411>you <00:07:49.611>see <00:07:49.813>it's <00:07:50.014>not <00:07:50.215>there <00:07:50.416>anymore,

131
00:07:51.350 --> 00:07:52.630
<00:07:51.350>and <00:07:51.542>we <00:07:51.734>can <00:07:51.926>now <00:07:52.118>just <00:07:52.310>run <00:07:52.502>it,

132
00:07:55.750 --> 00:07:56.130
<00:07:55.750>like <00:07:56.092>that.

133
00:07:57.430 --> 00:07:59.750
<00:07:57.430>And <00:07:57.663>it <00:07:57.896>will <00:07:58.130>output <00:07:58.363>us <00:07:58.596>Hello, <00:07:58.830>world!

134
00:08:00.810 --> 00:08:03.150
<00:08:00.810>So, <00:08:01.010>nice. <00:08:01.210>We <00:08:01.410>don't <00:08:01.610>need <00:08:01.810>to <00:08:02.010>compile <00:08:02.210>anymore.

135
00:08:03.210 --> 00:08:06.570
<00:08:03.210>And <00:08:03.349>quick <00:08:03.489>check, <00:08:03.630>there's <00:08:03.770>also <00:08:03.909>no <00:08:04.049>compiled <00:08:04.190>class <00:08:04.330>file <00:08:04.469>over <00:08:04.609>here.

136
00:08:08.010 --> 00:08:11.850
<00:08:08.010>Nice <00:08:08.117>thing, <00:08:08.225>we <00:08:08.333>don't <00:08:08.440>have <00:08:08.548>to <00:08:08.656>use <00:08:08.763>that <00:08:08.871>step <00:08:08.979>anymore, <00:08:09.086>and <00:08:09.194>we <00:08:09.302>can <00:08:09.409>cut

137
00:08:11.890 --> 00:08:13.410
<00:08:11.890>down <00:08:12.346>some <00:08:12.802>ceremony. <00:08:13.258>Nice.

138
00:08:14.790 --> 00:08:15.030
But

139
00:08:17.070 --> 00:08:18.329
<00:08:17.070>can <00:08:17.231>we <00:08:17.393>take <00:08:17.555>it <00:08:17.717>a <00:08:17.879>little <00:08:18.041>step <00:08:18.203>further?

140
00:08:18.790 --> 00:08:21.590
<00:08:18.790>So <00:08:18.906>for <00:08:19.023>example, <00:08:19.140>when <00:08:19.256>we <00:08:19.373>know <00:08:19.490>Bash, <00:08:19.606>we <00:08:19.723>have <00:08:19.840>some <00:08:19.956>kind <00:08:20.073>of <00:08:20.190>shebang.

141
00:08:22.210 --> 00:08:26.050
<00:08:22.210>And <00:08:22.385>we <00:08:22.560>now <00:08:22.734>also <00:08:22.909>have <00:08:23.085>that <00:08:23.260>in <00:08:23.435>Java. <00:08:23.609>And

142
00:08:26.090 --> 00:08:29.430
<00:08:26.090>fun <00:08:26.265>fact, <00:08:26.440>this <00:08:26.614>is <00:08:26.789>already <00:08:26.965>in <00:08:27.140>there <00:08:27.315>since <00:08:27.489>Java

143
00:08:29.870 --> 00:08:32.670
<00:08:29.870>11, <00:08:30.150>which <00:08:30.430>is <00:08:30.710>already <00:08:30.990>really <00:08:31.270>old.

144
00:08:35.110 --> 00:08:39.010
<00:08:35.110>So <00:08:35.210>we <00:08:35.310>now <00:08:35.409>have <00:08:35.510>shebang <00:08:35.610>support <00:08:35.710>in <00:08:35.810>Java, <00:08:35.909>which <00:08:36.010>means <00:08:36.110>we <00:08:36.210>have <00:08:36.310>that <00:08:36.409>hash <00:08:36.510>bang,

145
00:08:39.970 --> 00:08:40.451
hashtag,

146
00:08:42.130 --> 00:08:43.890
<00:08:42.130>exclamation <00:08:42.480>mark <00:08:42.830>syntax <00:08:43.179>over <00:08:43.530>there.

147
00:08:44.410 --> 00:08:48.150
<00:08:44.410>And <00:08:44.517>then <00:08:44.625>there's <00:08:44.733>a <00:08:44.840>path <00:08:44.948>described <00:08:45.056>how <00:08:45.163>to <00:08:45.271>execute <00:08:45.379>the <00:08:45.486>file, <00:08:45.594>and <00:08:45.702>all <00:08:45.810>the

148
00:08:48.830 --> 00:08:52.410
<00:08:48.830>remaining <00:08:49.005>content <00:08:49.180>of <00:08:49.355>the <00:08:49.530>file <00:08:49.705>is <00:08:49.880>executed <00:08:50.055>using <00:08:50.230>this

149
00:08:52.550 --> 00:08:56.430
<00:08:52.550>program, <00:08:53.949>which

150
00:08:56.450 --> 00:08:57.230
<00:08:56.450>is <00:08:56.684>stated <00:08:56.918>on <00:08:57.152>there.

151
00:08:58.670 --> 00:08:59.390
<00:08:58.670>But <00:08:58.993>important <00:08:59.318>note,

152
00:09:01.570 --> 00:09:02.430
<00:09:01.570>for <00:09:01.957>Java <00:09:02.343>commands

153
00:09:03.410 --> 00:09:05.390
<00:09:03.410>in <00:09:03.689>JDK <00:09:03.969>22, <00:09:04.250>we <00:09:04.530>see <00:09:04.810>later,

154
00:09:06.930 --> 00:09:09.110
<00:09:06.930>we <00:09:07.163>can <00:09:07.396>even <00:09:07.630>execute <00:09:07.863>multiple <00:09:08.096>source <00:09:08.329>files.

155
00:09:09.770 --> 00:09:13.290
<00:09:09.770>We <00:09:09.944>can't <00:09:10.120>do <00:09:10.295>that <00:09:10.470>with <00:09:10.645>the <00:09:10.819>shebang. <00:09:10.995>But <00:09:11.170>yeah.

156
00:09:14.010 --> 00:09:15.730
<00:09:14.010>Let's <00:09:14.210>have <00:09:14.410>a <00:09:14.610>look <00:09:14.810>at <00:09:15.010>how <00:09:15.210>it <00:09:15.410>looks.

157
00:09:17.330 --> 00:09:21.270
<00:09:17.330>I <00:09:17.457>installed <00:09:17.584>my <00:09:17.711>Java <00:09:17.839>using <00:09:17.966>SDK <00:09:18.093>Man, <00:09:18.220>so <00:09:18.348>I <00:09:18.475>don't <00:09:18.602>have <00:09:18.730>it

158
00:09:21.450 --> 00:09:21.890
installed,

159
00:09:23.550 --> 00:09:27.390
<00:09:23.550>like <00:09:23.750>here <00:09:23.949>in <00:09:24.150>user <00:09:24.349>bin <00:09:24.550>Java. <00:09:24.750>But <00:09:24.949>I

160
00:09:27.459 --> 00:09:31.290
<00:09:27.459>can <00:09:27.575>just <00:09:27.692>use <00:09:27.809>the <00:09:27.925>env <00:09:28.042>to <00:09:28.159>get <00:09:28.275>the <00:09:28.392>location <00:09:28.508>of <00:09:28.625>my <00:09:28.742>Java <00:09:28.858>back.

161
00:09:32.210 --> 00:09:35.250
<00:09:32.210>And <00:09:32.443>let's <00:09:32.676>change <00:09:32.910>our <00:09:33.143>JavaScript <00:09:33.376>that <00:09:33.610>way.

162
00:09:37.530 --> 00:09:38.370
<00:09:37.530>So <00:09:38.286>it's

163
00:09:39.070 --> 00:09:45.470
#!/usr/bin/env

164
00:09:46.210 --> 00:09:47.370
-S

165
00:09:48.390 --> 00:09:48.890
java

166
00:09:49.070 --> 00:09:53.150
$MY_SOURCE25.

167
00:09:53.890 --> 00:09:54.830
<00:09:53.890>Here <00:09:54.101>we <00:09:54.313>go. <00:09:54.524>That's <00:09:54.736>it.

168
00:09:56.430 --> 00:09:59.950
<00:09:56.430>Now <00:09:56.585>I <00:09:56.741>can <00:09:56.896>change <00:09:57.052>my <00:09:57.207>Java <00:09:57.363>version <00:09:57.518>with <00:09:57.674>SDK <00:09:57.829>Man,

169
00:10:00.610 --> 00:10:03.490
<00:10:00.610>and <00:10:00.810>each <00:10:01.010>time <00:10:01.210>it <00:10:01.410>will <00:10:01.610>also <00:10:01.810>use <00:10:02.010>the

170
00:10:04.430 --> 00:10:06.410
<00:10:04.430>current <00:10:04.709>default <00:10:04.989>version <00:10:05.270>I <00:10:05.550>have <00:10:05.829>set.

171
00:10:07.310 --> 00:10:11.250
<00:10:07.310>It <00:10:07.465>will <00:10:07.621>respect <00:10:07.776>that <00:10:07.932>now. <00:10:08.087>So <00:10:08.243>let's <00:10:08.398>save <00:10:08.554>it, <00:10:08.709>and

172
00:10:11.290 --> 00:10:12.890
<00:10:11.290>we <00:10:11.490>can <00:10:11.689>actually <00:10:11.890>make <00:10:12.089>it <00:10:12.290>a <00:10:12.490>JavaScript <00:10:12.689>now.

173
00:10:13.450 --> 00:10:14.410
Maybe

174
00:10:15.410 --> 00:10:19.010
<00:10:15.410>move <00:10:15.876>it <00:10:16.343>javascript.java <00:10:16.810>to

175
00:10:19.060 --> 00:10:20.790
<00:10:19.060>javascript. <00:10:19.526>So <00:10:19.993>rename <00:10:20.459>it,

176
00:10:22.510 --> 00:10:24.830
<00:10:22.510>and <00:10:22.743>now <00:10:22.976>we <00:10:23.210>have <00:10:23.443>the <00:10:23.676>issue <00:10:23.910>that

177
00:10:26.249 --> 00:10:30.210
<00:10:26.249>it <00:10:26.404>is <00:10:26.560>not <00:10:26.715>executable. <00:10:26.871>So <00:10:27.026>if <00:10:27.182>we <00:10:27.337>look <00:10:27.493>here, <00:10:27.649>there

178
00:10:30.290 --> 00:10:31.780
<00:10:30.290>is <00:10:30.737>an <00:10:31.184>x <00:10:31.631>missing.

179
00:10:33.870 --> 00:10:34.770
<00:10:33.870>We <00:10:34.140>can <00:10:34.410>change <00:10:34.680>that

180
00:10:35.930 --> 00:10:39.790
<00:10:35.930>just <00:10:36.104>with <00:10:36.280>change <00:10:36.454>mod. <00:10:36.630>And <00:10:36.805>now <00:10:36.979>all <00:10:37.155>we <00:10:37.329>have

181
00:10:39.830 --> 00:10:43.630
<00:10:39.830>to <00:10:39.985>do <00:10:40.141>is <00:10:40.296>use <00:10:40.452>this <00:10:40.607>./ <00:10:40.763>syntax, <00:10:40.918>and <00:10:41.074>we <00:10:41.230>can

182
00:10:43.670 --> 00:10:45.280
<00:10:43.670>execute <00:10:44.370>our <00:10:45.069>JavaScript.

183
00:10:46.270 --> 00:10:47.870
<00:10:46.270>And <00:10:46.470>we <00:10:46.670>get <00:10:46.870>a <00:10:47.069>Hello <00:10:47.270>World <00:10:47.470>back. <00:10:47.670>Nice.

184
00:10:51.150 --> 00:10:51.290
So

185
00:10:54.190 --> 00:10:57.690
<00:10:54.190>let's <00:10:54.365>go <00:10:54.540>back <00:10:54.715>and <00:10:54.890>see <00:10:55.065>if <00:10:55.240>there <00:10:55.415>maybe <00:10:55.590>is

186
00:10:57.730 --> 00:11:00.970
<00:10:57.730>something <00:10:57.930>even <00:10:58.130>more <00:10:58.330>interesting <00:10:58.530>that <00:10:58.730>changed <00:10:58.930>in <00:10:59.130>Java.

187
00:11:03.910 --> 00:11:07.790
<00:11:03.910>Because <00:11:04.017>we <00:11:04.125>lost <00:11:04.233>some <00:11:04.340>ceremony, <00:11:04.448>but <00:11:04.556>it <00:11:04.663>would <00:11:04.771>be <00:11:04.879>nice <00:11:04.986>to <00:11:05.094>lose <00:11:05.202>maybe <00:11:05.310>some

188
00:11:07.810 --> 00:11:10.730
<00:11:07.810>boilerplate. <00:11:08.276>And <00:11:08.743>good <00:11:09.209>news,

189
00:11:11.830 --> 00:11:14.910
<00:11:11.830>this <00:11:12.063>changed <00:11:12.296>really <00:11:12.530>recent <00:11:12.763>in <00:11:12.996>JDK <00:11:13.230>25.

190
00:11:16.030 --> 00:11:19.910
<00:11:16.030>And <00:11:16.204>instead <00:11:16.380>of <00:11:16.555>writing <00:11:16.730>System.out.println, <00:11:16.905>we <00:11:17.079>can <00:11:17.255>now <00:11:17.430>write

191
00:11:19.970 --> 00:11:21.870
<00:11:19.970>io.println, <00:11:20.250>which <00:11:20.530>is <00:11:20.810>a <00:11:21.090>little <00:11:21.370>shorter.

192
00:11:23.010 --> 00:11:26.770
<00:11:23.010>And <00:11:23.150>we <00:11:23.290>can <00:11:23.430>use <00:11:23.569>the <00:11:23.710>same <00:11:23.850>with <00:11:23.990>readLine <00:11:24.130>to <00:11:24.270>get <00:11:24.410>CLI

193
00:11:26.930 --> 00:11:27.690
<00:11:26.930>text <00:11:27.272>input <00:11:27.614>back.

194
00:11:29.790 --> 00:11:31.730
<00:11:29.790>We <00:11:29.990>also <00:11:30.189>don't <00:11:30.390>need <00:11:30.589>a <00:11:30.790>class <00:11:30.990>decorator <00:11:31.189>anymore.

195
00:11:35.130 --> 00:11:38.370
<00:11:35.130>The <00:11:35.330>Java <00:11:35.530>base <00:11:35.730>module <00:11:35.930>is <00:11:36.130>automatically <00:11:36.330>imported, <00:11:36.530>which

196
00:11:38.430 --> 00:11:42.070
<00:11:38.430>means <00:11:38.630>that <00:11:38.829>stuff <00:11:39.030>like <00:11:39.229>lists <00:11:39.430>or <00:11:39.630>something <00:11:39.829>is

197
00:11:42.150 --> 00:11:45.490
<00:11:42.150>already <00:11:42.257>in <00:11:42.365>there, <00:11:42.473>and <00:11:42.580>we <00:11:42.688>don't <00:11:42.796>have <00:11:42.903>to <00:11:43.011>write <00:11:43.119>an <00:11:43.226>explicit <00:11:43.334>import <00:11:43.442>for <00:11:43.550>it.

198
00:11:47.910 --> 00:11:51.670
<00:11:47.910>And <00:11:48.026>we <00:11:48.143>now <00:11:48.260>have <00:11:48.376>a <00:11:48.493>simple <00:11:48.610>main. <00:11:48.726>Instead <00:11:48.843>of <00:11:48.959>public <00:11:49.076>static <00:11:49.193>void <00:11:49.310>main

199
00:11:51.710 --> 00:11:55.250
<00:11:51.710>string <00:11:51.837>args, <00:11:51.964>we <00:11:52.091>just <00:11:52.219>have <00:11:52.346>void <00:11:52.473>main, <00:11:52.600>which <00:11:52.728>is <00:11:52.855>a <00:11:52.982>lot <00:11:53.110>shorter.

200
00:11:56.970 --> 00:12:00.250
<00:11:56.970>So <00:11:57.203>let's <00:11:57.436>cut <00:11:57.670>all <00:11:57.903>that <00:11:58.136>slack, <00:11:58.370>that

201
00:12:00.330 --> 00:12:00.970
boilerplate,

202
00:12:02.290 --> 00:12:05.830
<00:12:02.290>and, <00:12:02.490>oops, <00:12:02.689>wrong <00:12:02.890>file, <00:12:03.089>right? <00:12:03.290>We <00:12:03.490>renamed <00:12:03.689>it.

203
00:12:06.910 --> 00:12:08.050
<00:12:06.910>And <00:12:07.115>make <00:12:07.320>it <00:12:07.525>a <00:12:07.730>lot <00:12:07.935>shorter.

204
00:12:10.210 --> 00:12:13.200
<00:12:10.210>So <00:12:10.410>we <00:12:10.610>said <00:12:10.810>we <00:12:11.010>can <00:12:11.210>remove <00:12:11.410>the <00:12:11.610>class

205
00:12:13.250 --> 00:12:16.750
<00:12:13.250>decorator <00:12:13.600>and <00:12:13.950>even <00:12:14.300>the <00:12:14.650>public

206
00:12:16.810 --> 00:12:17.790
<00:12:16.810>static <00:12:17.251>over <00:12:17.692>here.

207
00:12:21.820 --> 00:12:23.400
<00:12:21.820>We <00:12:22.100>can <00:12:22.380>remove <00:12:22.660>the <00:12:22.940>String <00:12:23.220>args.

208
00:12:26.160 --> 00:12:27.080
<00:12:26.160>This <00:12:26.574>can <00:12:26.988>go,

209
00:12:28.760 --> 00:12:29.120
<00:12:28.760>and <00:12:29.084>it's

210
00:12:32.580 --> 00:12:33.600
<00:12:32.580>IO.print <00:12:33.039>line <00:12:33.498>now.

211
00:12:34.500 --> 00:12:36.280
<00:12:34.500>So <00:12:34.850>this <00:12:35.200>is <00:12:35.550>now <00:12:35.900>the,

212
00:12:37.460 --> 00:12:40.580
<00:12:37.460>I <00:12:37.600>would <00:12:37.740>say, <00:12:37.880>smallest <00:12:38.020>"Hello, <00:12:38.160>World!" <00:12:38.300>example <00:12:38.440>in <00:12:38.580>Java <00:12:38.720>you <00:12:38.860>can

213
00:12:40.620 --> 00:12:43.840
<00:12:40.620>have. <00:12:40.775>But <00:12:40.931>we <00:12:41.086>can <00:12:41.242>make <00:12:41.397>it <00:12:41.553>a <00:12:41.708>little <00:12:41.864>more <00:12:42.020>personal.

214
00:12:46.920 --> 00:12:50.060
<00:12:46.920>Let's <00:12:47.036>just <00:12:47.153>say <00:12:47.270>we <00:12:47.386>want <00:12:47.503>to <00:12:47.620>have <00:12:47.736>some <00:12:47.853>input <00:12:47.969>from <00:12:48.086>the <00:12:48.203>CLI <00:12:48.319>back.

215
00:12:50.240 --> 00:12:53.040
<00:12:50.240>We <00:12:50.473>can <00:12:50.706>now <00:12:50.940>use <00:12:51.173>var <00:12:51.406>name <00:12:51.640>is

216
00:12:53.280 --> 00:12:54.700
IO.readLine.

217
00:12:58.100 --> 00:13:01.200
<00:12:58.100>Please <00:12:58.333>enter <00:12:58.566>your-- <00:12:58.800>Oh, <00:12:59.033>that <00:12:59.266>was <00:12:59.500>wrong.

218
00:13:07.940 --> 00:13:11.820
<00:13:07.940>Okay. <00:13:08.220>I'll <00:13:08.500>just <00:13:08.780>redo <00:13:09.060>it <00:13:09.340>then.

219
00:13:12.880 --> 00:13:15.400
<00:13:12.880>Undo <00:13:13.055>is <00:13:13.230>probably <00:13:13.405>not <00:13:13.580>the <00:13:13.755>right <00:13:13.930>way <00:13:14.105>over <00:13:14.280>here.

220
00:13:15.940 --> 00:13:18.920
<00:13:15.940>So <00:13:16.220>var <00:13:16.500>name <00:13:16.780>is <00:13:17.060>equal <00:13:17.340>to

221
00:13:20.080 --> 00:13:21.640
IO.readLine.

222
00:13:23.160 --> 00:13:23.600
Please

223
00:13:24.620 --> 00:13:26.520
<00:13:24.620>enter <00:13:25.320>your <00:13:26.020>name.

224
00:13:30.080 --> 00:13:31.800
<00:13:30.080>Now <00:13:30.280>we <00:13:30.480>can <00:13:30.680>say, <00:13:30.880>instead <00:13:31.080>of <00:13:31.280>"Hello, <00:13:31.480>World!",

225
00:13:32.620 --> 00:13:33.140
<00:13:32.620>"Hello, <00:13:33.088>Name!"

226
00:13:34.740 --> 00:13:35.980
<00:13:34.740>And <00:13:34.926>now <00:13:35.112>we <00:13:35.298>get <00:13:35.484>a <00:13:35.670>personal <00:13:35.856>greeting.

227
00:13:37.840 --> 00:13:37.980
So,

228
00:13:40.420 --> 00:13:44.220
<00:13:40.420>we <00:13:40.620>can <00:13:40.819>execute <00:13:41.020>it <00:13:41.219>again <00:13:41.420>using <00:13:41.620>this <00:13:41.819>./syntax,

229
00:13:44.800 --> 00:13:46.320
<00:13:44.800>and <00:13:44.995>now <00:13:45.190>you're <00:13:45.386>prompted <00:13:45.581>to <00:13:45.777>enter <00:13:45.972>a <00:13:46.168>name.

230
00:13:47.080 --> 00:13:47.620
And

231
00:13:48.720 --> 00:13:52.620
<00:13:48.720>I'll <00:13:48.847>just <00:13:48.974>enter <00:13:49.101>my <00:13:49.229>name <00:13:49.356>and <00:13:49.483>say <00:13:49.610>Jens, <00:13:49.738>and <00:13:49.865>I <00:13:49.992>get, <00:13:50.120>"Hello,

232
00:13:52.720 --> 00:13:54.420
<00:13:52.720>Jens!" <00:13:53.000>back, <00:13:53.280>which <00:13:53.560>is <00:13:53.840>nice. <00:13:54.120>Right.

233
00:13:56.780 --> 00:13:59.840
<00:13:56.780>So <00:13:56.896>we <00:13:57.013>really <00:13:57.130>cut <00:13:57.246>a <00:13:57.363>lot <00:13:57.480>of <00:13:57.596>slack. <00:13:57.713>We <00:13:57.829>got <00:13:57.946>a <00:13:58.063>personal <00:13:58.180>greeting.

234
00:14:01.040 --> 00:14:03.580
<00:14:01.040>Let's <00:14:01.180>check <00:14:01.319>if <00:14:01.459>we <00:14:01.599>can <00:14:01.740>take <00:14:01.880>it <00:14:02.020>a <00:14:02.160>little <00:14:02.300>further <00:14:02.439>in.

235
00:14:07.420 --> 00:14:11.200
<00:14:07.420>And <00:14:07.620>we <00:14:07.819>actually <00:14:08.020>can. <00:14:08.219>In <00:14:08.420>JDK <00:14:08.620>22, <00:14:08.819>we

236
00:14:11.560 --> 00:14:15.300
<00:14:11.560>can <00:14:11.793>now <00:14:12.026>launch <00:14:12.260>multi-file <00:14:12.493>source <00:14:12.726>code <00:14:12.959>programs.

237
00:14:17.620 --> 00:14:20.220
<00:14:17.620>And <00:14:17.775>it <00:14:17.931>means <00:14:18.086>that <00:14:18.242>we <00:14:18.397>can <00:14:18.553>not <00:14:18.708>only <00:14:18.864>just <00:14:19.020>run

238
00:14:21.600 --> 00:14:25.180
<00:14:21.600>one <00:14:21.740>Java <00:14:21.880>file <00:14:22.020>with <00:14:22.160>the <00:14:22.300>Java <00:14:22.440>command, <00:14:22.580>but <00:14:22.720>actually <00:14:22.860>multiple <00:14:23.000>ones.

239
00:14:25.460 --> 00:14:29.380
<00:14:25.460>We <00:14:25.740>can <00:14:26.020>actually <00:14:26.300>extract <00:14:26.580>some <00:14:26.860>classes,

240
00:14:29.500 --> 00:14:32.200
<00:14:29.500>put <00:14:29.655>in <00:14:29.811>different <00:14:29.966>files, <00:14:30.122>stuff <00:14:30.277>like <00:14:30.433>this, <00:14:30.588>structure <00:14:30.744>our <00:14:30.900>code.

241
00:14:33.240 --> 00:14:34.160
<00:14:33.240>That's <00:14:33.516>now <00:14:33.792>all <00:14:34.068>possible.

242
00:14:36.070 --> 00:14:40.000
<00:14:36.070>And <00:14:36.186>one <00:14:36.303>really <00:14:36.420>nice <00:14:36.536>thing <00:14:36.653>we <00:14:36.770>can <00:14:36.886>also <00:14:37.003>do <00:14:37.120>is <00:14:37.236>we <00:14:37.353>can <00:14:37.470>execute

243
00:14:40.040 --> 00:14:42.560
<00:14:40.040>Java <00:14:40.506>files <00:14:40.973>with <00:14:41.439>dependencies.

244
00:14:43.700 --> 00:14:47.560
<00:14:43.700>The <00:14:43.840>way <00:14:43.980>it <00:14:44.120>works <00:14:44.260>is <00:14:44.400>we <00:14:44.540>can <00:14:44.680>use <00:14:44.820>the <00:14:44.960>-cp <00:14:45.100>or

245
00:14:47.640 --> 00:14:49.320
<00:14:47.640>--classpath <00:14:49.040>option,

246
00:14:51.040 --> 00:14:54.440
<00:14:51.040>and <00:14:51.180>just <00:14:51.319>specify <00:14:51.459>a <00:14:51.599>folder <00:14:51.740>and <00:14:51.880>say, <00:14:52.020>"Hey," <00:14:52.160>with <00:14:52.300>the <00:14:52.439>star,

247
00:14:55.790 --> 00:14:59.710
<00:14:55.790>"use <00:14:55.883>all <00:14:55.976>the <00:14:56.069>Java <00:14:56.163>files <00:14:56.256>or <00:14:56.349>whatever <00:14:56.443>from <00:14:56.536>the <00:14:56.630>folder <00:14:56.723>and <00:14:56.816>then <00:14:56.910>put <00:14:57.003>it <00:14:57.096>on <00:14:57.189>the

248
00:14:59.760 --> 00:15:00.280
classpath."

249
00:15:02.720 --> 00:15:04.880
<00:15:02.720>And <00:15:02.953>I <00:15:03.186>actually <00:15:03.420>prepared <00:15:03.653>a <00:15:03.886>little <00:15:04.120>example.

250
00:15:06.080 --> 00:15:09.780
<00:15:06.080>What <00:15:06.207>I <00:15:06.334>want <00:15:06.461>to <00:15:06.589>show <00:15:06.716>you <00:15:06.843>is <00:15:06.970>there's <00:15:07.098>some <00:15:07.225>really <00:15:07.352>nice <00:15:07.480>cat

251
00:15:09.900 --> 00:15:12.960
<00:15:09.900>fact <00:15:10.250>API, <00:15:10.600>which <00:15:10.949>is <00:15:11.300>catfacts.ninja.

252
00:15:13.920 --> 00:15:14.840
<00:15:13.920>There <00:15:14.748>you

253
00:15:16.520 --> 00:15:16.840
have

254
00:15:19.500 --> 00:15:20.120
endpoint,

255
00:15:21.840 --> 00:15:22.420
<00:15:21.840>which <00:15:22.362>has

256
00:15:23.420 --> 00:15:25.720
<00:15:23.420>/fact. <00:15:23.699>It's <00:15:23.979>just <00:15:24.260>a <00:15:24.540>simple <00:15:24.819>get,

257
00:15:26.560 --> 00:15:27.920
<00:15:26.560>and <00:15:27.171>it <00:15:27.784>returns

258
00:15:30.160 --> 00:15:33.360
<00:15:30.160>the <00:15:30.287>fact <00:15:30.414>as <00:15:30.541>a <00:15:30.669>string <00:15:30.796>and <00:15:30.923>the <00:15:31.050>length <00:15:31.178>of <00:15:31.305>the <00:15:31.432>fact <00:15:31.560>as

259
00:15:34.220 --> 00:15:37.900
<00:15:34.220>an <00:15:34.347>integer. <00:15:34.474>And <00:15:34.601>we <00:15:34.729>just <00:15:34.856>want <00:15:34.983>to <00:15:35.110>write <00:15:35.238>a <00:15:35.365>simple <00:15:35.492>script <00:15:35.620>that

260
00:15:37.940 --> 00:15:40.520
<00:15:37.940>calls <00:15:38.173>that <00:15:38.406>API <00:15:38.640>and <00:15:38.873>returns <00:15:39.106>the <00:15:39.340>fact.

261
00:15:42.480 --> 00:15:44.400
<00:15:42.480>So <00:15:42.830>I <00:15:43.180>already <00:15:43.530>prepared <00:15:43.880>that.

262
00:15:46.400 --> 00:15:47.260
<00:15:46.400>It's <00:15:46.787>over <00:15:47.174>here.

263
00:15:50.180 --> 00:15:51.260
<00:15:50.180>There <00:15:50.423>we <00:15:50.665>have <00:15:50.909>two <00:15:51.152>files.

264
00:15:52.500 --> 00:15:56.340
<00:15:52.500>The <00:15:52.700>CatFact <00:15:52.900>itself <00:15:53.100>and <00:15:53.300>GetCatFacts, <00:15:53.500>which <00:15:53.700>is <00:15:53.900>logic.

265
00:15:56.920 --> 00:16:00.260
<00:15:56.920>Let's <00:15:57.027>have <00:15:57.135>a <00:15:57.243>look <00:15:57.350>at <00:15:57.458>the <00:15:57.566>CatFact <00:15:57.673>first, <00:15:57.781>and <00:15:57.889>it <00:15:57.996>more <00:15:58.104>or <00:15:58.212>less <00:15:58.319>just

266
00:16:00.300 --> 00:16:01.600
<00:16:00.300>represents <00:16:00.885>the <00:16:01.470>JSON

267
00:16:02.720 --> 00:16:06.480
<00:16:02.720>we <00:16:02.827>get <00:16:02.935>back. <00:16:03.043>It's <00:16:03.150>the <00:16:03.258>fact <00:16:03.366>as <00:16:03.473>a <00:16:03.581>string <00:16:03.689>and <00:16:03.796>the <00:16:03.904>int <00:16:04.012>as <00:16:04.120>length.

268
00:16:07.160 --> 00:16:10.330
<00:16:07.160>It's <00:16:07.276>a <00:16:07.393>Java <00:16:07.510>record. <00:16:07.626>It's <00:16:07.743>nice <00:16:07.860>for <00:16:07.976>code <00:16:08.093>organization <00:16:08.209>to <00:16:08.326>make <00:16:08.443>a <00:16:08.560>little--

269
00:16:11.520 --> 00:16:12.340
<00:16:11.520>Nice <00:16:11.889>to <00:16:12.258>read.

270
00:16:14.920 --> 00:16:18.780
<00:16:14.920>So <00:16:15.036>let's <00:16:15.153>have <00:16:15.270>a <00:16:15.386>look <00:16:15.503>at <00:16:15.620>the <00:16:15.736>GetCatFacts <00:16:15.853>where <00:16:15.969>the <00:16:16.086>actual <00:16:16.203>logic <00:16:16.319>is.

271
00:16:19.760 --> 00:16:23.280
<00:16:19.760>Here <00:16:19.900>we <00:16:20.040>use <00:16:20.180>the <00:16:20.319>Java <00:16:20.460>HTTP <00:16:20.600>client, <00:16:20.740>which <00:16:20.880>is <00:16:21.020>also <00:16:21.160>there

272
00:16:23.440 --> 00:16:24.870
<00:16:23.440>since <00:16:23.761>Java <00:16:24.083>11, <00:16:24.405>I <00:16:24.727>think.

273
00:16:27.140 --> 00:16:30.760
<00:16:27.140>And <00:16:27.267>we <00:16:27.394>just <00:16:27.521>use <00:16:27.649>this <00:16:27.776>client <00:16:27.903>to <00:16:28.030>send <00:16:28.158>an <00:16:28.285>HTTP <00:16:28.412>request <00:16:28.540>to

274
00:16:30.820 --> 00:16:32.460
catfact.ninja/fact,

275
00:16:33.380 --> 00:16:34.280
<00:16:33.380>get <00:16:33.650>a <00:16:33.920>JSON <00:16:34.189>back.

276
00:16:35.580 --> 00:16:38.760
<00:16:35.580>And <00:16:35.755>now <00:16:35.930>the <00:16:36.105>ugly <00:16:36.280>part <00:16:36.455>comes, <00:16:36.630>which <00:16:36.805>is <00:16:36.980>string

277
00:16:38.800 --> 00:16:39.580
manipulation.

278
00:16:41.960 --> 00:16:44.320
<00:16:41.960>Like <00:16:42.240>JSON <00:16:42.520>parsing <00:16:42.800>using <00:16:43.080>string <00:16:43.360>manipulation.

279
00:16:45.040 --> 00:16:48.020
<00:16:45.040>And <00:16:45.240>whenever <00:16:45.439>you <00:16:45.640>see <00:16:45.839>this, <00:16:46.040>I'm <00:16:46.240>pretty <00:16:46.439>sure,

280
00:16:49.320 --> 00:16:50.810
<00:16:49.320>for <00:16:49.511>you, <00:16:49.703>you <00:16:49.894>have <00:16:50.086>the <00:16:50.277>same <00:16:50.469>that <00:16:50.661>you

281
00:16:51.720 --> 00:16:55.620
<00:16:51.720>just <00:16:51.860>program <00:16:52.000>it, <00:16:52.140>and <00:16:52.280>after <00:16:52.420>you <00:16:52.560>read <00:16:52.700>it <00:16:52.840>maybe <00:16:52.980>even <00:16:53.120>five

282
00:16:55.630 --> 00:16:57.140
<00:16:55.630>minutes <00:16:55.824>later, <00:16:56.018>you <00:16:56.212>already <00:16:56.406>forgot <00:16:56.600>what <00:16:56.794>it <00:16:56.989>does.

283
00:16:58.440 --> 00:17:00.960
<00:16:58.440>So <00:16:58.540>this <00:16:58.640>is <00:16:58.740>just <00:16:58.840>really <00:16:58.940>ugly, <00:16:59.040>and <00:16:59.140>we'll <00:16:59.240>clean <00:16:59.340>that <00:16:59.440>up <00:16:59.540>in <00:16:59.640>a <00:16:59.740>later <00:16:59.840>step.

284
00:17:02.320 --> 00:17:02.580
But

285
00:17:03.760 --> 00:17:04.040
<00:17:03.760>here <00:17:04.012>we

286
00:17:05.300 --> 00:17:09.040
<00:17:05.300>get <00:17:05.440>the <00:17:05.579>JSON <00:17:05.720>back, <00:17:05.859>create <00:17:06.000>a <00:17:06.139>fact, <00:17:06.280>create <00:17:06.419>length, <00:17:06.560>build <00:17:06.700>a

287
00:17:09.100 --> 00:17:11.280
<00:17:09.099>CatFact <00:17:09.255>record <00:17:09.411>out <00:17:09.566>of <00:17:09.722>it, <00:17:09.877>and <00:17:10.033>then <00:17:10.188>just <00:17:10.344>print <00:17:10.500>it.

288
00:17:11.940 --> 00:17:13.340
<00:17:11.940>So <00:17:12.360>let's <00:17:12.780>run <00:17:13.199>it.

289
00:17:15.980 --> 00:17:16.480
Java

290
00:17:17.381 --> 00:17:21.060
<00:17:17.381>GetCatFacts. <00:17:17.497>And <00:17:17.614>we <00:17:17.731>just <00:17:17.847>specify <00:17:17.964>that <00:17:18.081>one <00:17:18.197>class, <00:17:18.314>even <00:17:18.431>though <00:17:18.547>we <00:17:18.664>have <00:17:18.781>two

291
00:17:21.100 --> 00:17:23.740
<00:17:21.099>classes <00:17:21.379>there, <00:17:21.659>and <00:17:21.939>will <00:17:22.219>still <00:17:22.500>work.

292
00:17:25.590 --> 00:17:29.240
<00:17:25.589>And <00:17:25.764>the <00:17:25.939>output <00:17:26.115>is, <00:17:26.290>"Cats <00:17:26.464>respond <00:17:26.639>mostly <00:17:26.814>readily <00:17:26.990>to

293
00:17:29.280 --> 00:17:31.180
<00:17:29.280>names <00:17:29.560>that <00:17:29.840>ends <00:17:30.120>in <00:17:30.399>an <00:17:30.680>ee."

294
00:17:33.680 --> 00:17:35.740
<00:17:33.680>I <00:17:33.820>didn't <00:17:33.960>know <00:17:34.100>that <00:17:34.240>one. <00:17:34.380>It's <00:17:34.520>a <00:17:34.660>nice <00:17:34.800>fact <00:17:34.940>to <00:17:35.080>know.

295
00:17:35.820 --> 00:17:39.120
<00:17:35.820>So <00:17:35.995>nice <00:17:36.169>to <00:17:36.345>learn <00:17:36.520>something <00:17:36.695>new <00:17:36.870>about <00:17:37.044>cats, <00:17:37.220>right?

296
00:17:41.160 --> 00:17:44.820
<00:17:41.160>But <00:17:41.393>as <00:17:41.626>I <00:17:41.860>said, <00:17:42.093>we <00:17:42.326>can <00:17:42.560>actually

297
00:17:45.420 --> 00:17:46.400
<00:17:45.420>take <00:17:45.640>it <00:17:45.861>a <00:17:46.081>step <00:17:46.302>further.

298
00:17:47.820 --> 00:17:51.370
<00:17:47.820>We <00:17:47.975>can <00:17:48.131>put <00:17:48.286>stuff <00:17:48.442>on <00:17:48.597>the <00:17:48.753>classpath <00:17:48.908>and <00:17:49.064>even <00:17:49.220>Java

299
00:17:51.440 --> 00:17:55.140
<00:17:51.440>files. <00:17:51.615>So <00:17:51.790>why <00:17:51.965>do <00:17:52.140>we <00:17:52.315>stick <00:17:52.490>to <00:17:52.665>the <00:17:52.840>ugly

300
00:17:55.240 --> 00:17:58.200
<00:17:55.240>string <00:17:55.706>parsing <00:17:56.173>for <00:17:56.640>JSON?

301
00:17:59.160 --> 00:18:00.040
<00:17:59.160>So <00:17:59.292>we <00:17:59.424>don't <00:17:59.556>have <00:17:59.688>to <00:17:59.820>do <00:17:59.952>that.

302
00:18:01.260 --> 00:18:04.880
<00:18:01.260>And <00:18:01.460>we <00:18:01.660>can <00:18:01.860>use, <00:18:02.060>for <00:18:02.260>example, <00:18:02.460>some <00:18:02.660>simple

303
00:18:04.940 --> 00:18:08.740
<00:18:04.940>library. <00:18:05.290>It's <00:18:05.640>json.org <00:18:05.990>for <00:18:06.340>Java,

304
00:18:09.100 --> 00:18:11.460
<00:18:09.100>and <00:18:09.255>it's <00:18:09.411>really <00:18:09.566>nice <00:18:09.722>because <00:18:09.877>it <00:18:10.033>has <00:18:10.188>no <00:18:10.344>other <00:18:10.500>dependencies.

305
00:18:11.900 --> 00:18:15.600
<00:18:11.900>Because <00:18:12.040>the <00:18:12.180>thing <00:18:12.320>is, <00:18:12.460>when <00:18:12.600>it <00:18:12.740>puts <00:18:12.880>dependencies <00:18:13.020>on <00:18:13.160>the <00:18:13.300>classpath,

306
00:18:16.080 --> 00:18:19.900
<00:18:16.080>we <00:18:16.220>have <00:18:16.360>to <00:18:16.500>download <00:18:16.639>them. <00:18:16.780>And <00:18:16.919>when <00:18:17.060>a <00:18:17.199>dependency <00:18:17.340>has <00:18:17.480>other

307
00:18:19.920 --> 00:18:23.840
<00:18:19.920>dependencies, <00:18:20.047>so <00:18:20.174>it <00:18:20.301>has <00:18:20.429>transitive <00:18:20.556>dependencies, <00:18:20.683>we <00:18:20.810>also <00:18:20.938>have <00:18:21.065>to <00:18:21.192>download <00:18:21.320>them

308
00:18:24.916 --> 00:18:28.456
<00:18:24.916>And <00:18:25.043>if <00:18:25.170>our <00:18:25.297>transitive <00:18:25.425>dependencies <00:18:25.552>have <00:18:25.679>transitive <00:18:25.806>dependencies, <00:18:25.934>we <00:18:26.061>also <00:18:26.188>have <00:18:26.316>to

309
00:18:28.476 --> 00:18:30.476
<00:18:28.476>download <00:18:28.651>them. <00:18:28.826>And <00:18:29.001>you <00:18:29.176>know <00:18:29.351>where <00:18:29.526>I'm <00:18:29.701>going, <00:18:29.876>right?

310
00:18:30.636 --> 00:18:33.176
<00:18:30.636>This <00:18:30.763>can <00:18:30.890>create <00:18:31.017>a <00:18:31.145>lot <00:18:31.272>of <00:18:31.399>work, <00:18:31.526>and <00:18:31.654>once <00:18:31.781>you <00:18:31.908>update, <00:18:32.036>it's

311
00:18:34.956 --> 00:18:36.896
<00:18:34.956>going <00:18:35.189>to <00:18:35.422>explode <00:18:35.656>in <00:18:35.889>your <00:18:36.122>face. <00:18:36.356>So

312
00:18:38.576 --> 00:18:42.556
<00:18:38.576>in <00:18:38.856>my <00:18:39.136>opinion, <00:18:39.416>this <00:18:39.696>works <00:18:39.976>best

313
00:18:42.616 --> 00:18:45.996
<00:18:42.616>with <00:18:42.966>simple <00:18:43.316>dependencies <00:18:43.666>that <00:18:44.016>have

314
00:18:46.036 --> 00:18:48.036
<00:18:46.036>no <00:18:46.502>other <00:18:46.969>dependencies <00:18:47.436>itself.

315
00:18:49.356 --> 00:18:52.956
<00:18:49.356>And <00:18:49.496>I <00:18:49.636>prepared <00:18:49.776>that <00:18:49.916>already. <00:18:50.056>So <00:18:50.196>let's <00:18:50.336>change <00:18:50.476>into <00:18:50.616>this <00:18:50.756>specific

316
00:18:53.016 --> 00:18:53.366
folder.

317
00:18:55.896 --> 00:18:56.536
<00:18:55.896>Like <00:18:56.088>that <00:18:56.280>for <00:18:56.472>you.

318
00:18:57.896 --> 00:18:58.756
<00:18:57.896>Here <00:18:58.089>we <00:18:58.283>have <00:18:58.476>a <00:18:58.670>folder.

319
00:18:59.896 --> 00:19:00.996
<00:18:59.896>No, <00:19:00.391>wrong <00:19:00.886>folder.

320
00:19:03.296 --> 00:19:04.116
<00:19:03.296>Let's <00:19:03.665>change <00:19:04.034>here.

321
00:19:05.476 --> 00:19:06.456
<00:19:05.476>Here <00:19:05.652>we <00:19:05.828>have <00:19:06.005>a <00:19:06.181>folder <00:19:06.358>lib,

322
00:19:07.356 --> 00:19:08.836
<00:19:07.356>and <00:19:07.689>in <00:19:08.022>this <00:19:08.355>folder <00:19:08.688>lib,

323
00:19:11.756 --> 00:19:13.996
<00:19:11.756>we <00:19:12.106>see <00:19:12.456>that <00:19:12.806>Jackson <00:19:13.156>jar.

324
00:19:15.776 --> 00:19:17.396
<00:19:15.776>And <00:19:16.009>this <00:19:16.242>is <00:19:16.476>actually <00:19:16.709>an <00:19:16.942>external <00:19:17.176>dependency

325
00:19:18.776 --> 00:19:20.596
<00:19:18.776>that <00:19:19.009>does <00:19:19.242>the <00:19:19.476>JSON <00:19:19.709>parsing <00:19:19.942>for <00:19:20.176>us.

326
00:19:21.436 --> 00:19:22.096
And

327
00:19:23.296 --> 00:19:25.476
<00:19:23.296>now <00:19:23.496>we <00:19:23.696>have <00:19:23.896>a <00:19:24.096>simple <00:19:24.296>script <00:19:24.496>in <00:19:24.696>here,

328
00:19:26.726 --> 00:19:30.486
<00:19:26.726>where <00:19:26.881>this <00:19:27.037>Jackson <00:19:27.192>object <00:19:27.348>is <00:19:27.503>imported, <00:19:27.659>and <00:19:27.814>you <00:19:27.970>see <00:19:28.126>that

329
00:19:30.516 --> 00:19:32.796
<00:19:30.516>the <00:19:30.796>response <00:19:31.076>we <00:19:31.356>get <00:19:31.636>back, <00:19:31.916>which

330
00:19:34.236 --> 00:19:37.716
<00:19:34.236>still <00:19:34.352>is <00:19:34.469>a <00:19:34.586>JSON <00:19:34.702>string, <00:19:34.819>and <00:19:34.936>we're <00:19:35.052>now <00:19:35.169>putting <00:19:35.286>it <00:19:35.402>into <00:19:35.519>this <00:19:35.636>JSON

331
00:19:37.796 --> 00:19:38.236
object.

332
00:19:39.076 --> 00:19:39.356
Say,

333
00:19:40.356 --> 00:19:42.936
<00:19:40.356>get <00:19:40.556>the <00:19:40.756>fact <00:19:40.956>as <00:19:41.156>a <00:19:41.356>string <00:19:41.556>and <00:19:41.756>the

334
00:19:44.216 --> 00:19:48.176
<00:19:44.216>length <00:19:44.315>as <00:19:44.416>an <00:19:44.515>int, <00:19:44.616>and <00:19:44.716>then <00:19:44.815>put <00:19:44.916>it <00:19:45.015>into <00:19:45.116>this <00:19:45.216>record <00:19:45.315>here <00:19:45.416>and <00:19:45.515>print <00:19:45.616>it

335
00:19:48.216 --> 00:19:48.616
<00:19:48.216>once <00:19:48.576>again.

336
00:19:50.336 --> 00:19:50.636
So

337
00:19:53.076 --> 00:19:54.116
<00:19:53.076>let's <00:19:53.388>execute <00:19:53.700>it <00:19:54.012>again.

338
00:19:55.036 --> 00:19:58.996
<00:19:55.036>And <00:19:55.163>when <00:19:55.290>we <00:19:55.417>execute <00:19:55.545>now <00:19:55.672>like <00:19:55.799>that, <00:19:55.926>we <00:19:56.054>get <00:19:56.181>an <00:19:56.308>error <00:19:56.436>message

339
00:19:59.276 --> 00:20:02.556
<00:19:59.276>because <00:19:59.431>we <00:19:59.587>don't <00:19:59.742>have <00:19:59.898>that <00:20:00.053>Jackson.org <00:20:00.209>on <00:20:00.364>the <00:20:00.520>class <00:20:00.676>path.

340
00:20:03.376 --> 00:20:06.446
<00:20:03.376>So <00:20:03.551>we <00:20:03.726>have <00:20:03.901>to <00:20:04.076>remember <00:20:04.251>to <00:20:04.426>actually <00:20:04.601>say, <00:20:04.776>"Hey,

341
00:20:07.076 --> 00:20:11.056
<00:20:07.076>Java <00:20:07.276>-cp <00:20:07.476>lib," <00:20:07.676>and <00:20:07.876>put <00:20:08.076>everything <00:20:08.276>in <00:20:08.476>that

342
00:20:11.116 --> 00:20:13.296
<00:20:11.116>folder, <00:20:11.316>all <00:20:11.516>the <00:20:11.716>dependencies <00:20:11.916>into <00:20:12.116>the <00:20:12.316>class <00:20:12.516>path.

343
00:20:15.756 --> 00:20:19.216
<00:20:15.756>Yeah, <00:20:15.931>and <00:20:16.106>now <00:20:16.281>it <00:20:16.456>should <00:20:16.631>work, <00:20:16.806>and <00:20:16.981>it <00:20:17.156>does.

344
00:20:20.616 --> 00:20:24.416
<00:20:20.616>And <00:20:20.732>the <00:20:20.849>fact <00:20:20.966>is, <00:20:21.082>according <00:20:21.199>to <00:20:21.316>Hebrew <00:20:21.432>legend, <00:20:21.549>Noah <00:20:21.666>prayed <00:20:21.782>to <00:20:21.899>God <00:20:22.016>for

345
00:20:24.476 --> 00:20:28.336
<00:20:24.476>help <00:20:24.576>protecting <00:20:24.676>all <00:20:24.776>the <00:20:24.876>food <00:20:24.976>he <00:20:25.076>stored <00:20:25.176>on <00:20:25.276>the <00:20:25.376>ark <00:20:25.476>from <00:20:25.576>being <00:20:25.676>eaten <00:20:25.776>by <00:20:25.876>rats.

346
00:20:28.366 --> 00:20:32.256
<00:20:28.366>In <00:20:28.482>reply, <00:20:28.599>God <00:20:28.716>made <00:20:28.832>the <00:20:28.949>lion <00:20:29.066>sneeze <00:20:29.182>and <00:20:29.299>out <00:20:29.416>popped <00:20:29.532>a <00:20:29.649>cat, <00:20:29.766>which

347
00:20:32.296 --> 00:20:34.096
<00:20:32.296>is <00:20:32.529>nearly... <00:20:32.762>That's <00:20:32.996>a <00:20:33.229>cute <00:20:33.462>fact, <00:20:33.696>right?

348
00:20:37.096 --> 00:20:37.296
So,

349
00:20:39.576 --> 00:20:43.516
<00:20:39.576>I <00:20:39.926>think <00:20:40.276>we're <00:20:40.626>now <00:20:40.976>getting

350
00:20:43.556 --> 00:20:46.196
<00:20:43.556>there. <00:20:43.789>We're <00:20:44.022>actually <00:20:44.256>writing <00:20:44.489>actual <00:20:44.722>scripts, <00:20:44.956>right?

351
00:20:46.976 --> 00:20:47.456
And

352
00:20:48.976 --> 00:20:52.756
<00:20:48.976>we <00:20:49.103>can <00:20:49.230>have <00:20:49.357>a <00:20:49.485>look <00:20:49.612>at <00:20:49.739>certain <00:20:49.866>Java <00:20:49.994>features <00:20:50.121>that <00:20:50.248>are <00:20:50.376>also

353
00:20:52.836 --> 00:20:56.706
<00:20:52.836>nice, <00:20:53.036>and <00:20:53.236>we <00:20:53.436>used <00:20:53.636>somewhere <00:20:53.836>in <00:20:54.036>there, <00:20:54.236>but

354
00:20:56.706 --> 00:21:00.196
<00:20:56.706>they <00:20:56.833>are <00:20:56.960>not <00:20:57.087>that <00:20:57.215>big. <00:20:57.342>So, <00:20:57.469>for <00:20:57.596>example, <00:20:57.724>we <00:20:57.851>used <00:20:57.978>the <00:20:58.106>var

355
00:21:00.316 --> 00:21:00.776
keyword

356
00:21:01.936 --> 00:21:05.196
<00:21:01.936>to <00:21:02.076>make <00:21:02.216>our <00:21:02.356>code <00:21:02.495>just <00:21:02.636>a <00:21:02.775>little <00:21:02.916>simpler <00:21:03.055>and <00:21:03.196>not <00:21:03.336>use

357
00:21:06.576 --> 00:21:06.796
the

358
00:21:08.616 --> 00:21:09.796
<00:21:08.616>variable <00:21:08.881>type <00:21:09.147>all <00:21:09.412>the <00:21:09.678>time.

359
00:21:11.436 --> 00:21:13.776
<00:21:11.436>We <00:21:11.669>also <00:21:11.902>used <00:21:12.136>records <00:21:12.369>for <00:21:12.602>code <00:21:12.836>organization.

360
00:21:15.216 --> 00:21:19.016
<00:21:15.216>Another <00:21:15.416>thing <00:21:15.616>you <00:21:15.815>could <00:21:16.015>imagine <00:21:16.216>using <00:21:16.416>is <00:21:16.616>text

361
00:21:19.076 --> 00:21:19.516
blocks

362
00:21:20.436 --> 00:21:23.836
<00:21:20.436>to <00:21:20.576>actually <00:21:20.716>write <00:21:20.856>simple <00:21:20.995>JSON <00:21:21.136>templates <00:21:21.275>and <00:21:21.416>send <00:21:21.555>it <00:21:21.696>somewhere <00:21:21.836>using

363
00:21:25.296 --> 00:21:29.196
<00:21:25.296>the <00:21:25.451>HTTP <00:21:25.607>clients. <00:21:25.762>So <00:21:25.918>maybe <00:21:26.073>call <00:21:26.229>REST <00:21:26.384>communication, <00:21:26.540>stuff <00:21:26.696>like

364
00:21:29.236 --> 00:21:29.436
that.

365
00:21:31.096 --> 00:21:34.936
<00:21:31.096>We <00:21:31.236>used <00:21:31.376>the <00:21:31.516>HTTP <00:21:31.656>client <00:21:31.796>API <00:21:31.936>for <00:21:32.076>HTTP <00:21:32.216>requests <00:21:32.356>to <00:21:32.496>REST

366
00:21:34.956 --> 00:21:35.396
endpoints.

367
00:21:36.216 --> 00:21:39.996
<00:21:36.216>But <00:21:36.343>you <00:21:36.470>could <00:21:36.597>also <00:21:36.725>imagine <00:21:36.852>doing <00:21:36.979>stuff <00:21:37.106>like <00:21:37.234>getting <00:21:37.361>and <00:21:37.488>parsing <00:21:37.616>websites,

368
00:21:40.256 --> 00:21:41.956
<00:21:40.256>for <00:21:40.489>example, <00:21:40.722>scraping <00:21:40.956>or <00:21:41.189>stuff <00:21:41.422>like <00:21:41.656>that.

369
00:21:44.056 --> 00:21:46.976
<00:21:44.056>And <00:21:44.196>we <00:21:44.336>now <00:21:44.476>also <00:21:44.616>have <00:21:44.756>a <00:21:44.896>simple <00:21:45.036>web <00:21:45.176>server <00:21:45.316>in <00:21:45.456>Java.

370
00:21:48.116 --> 00:21:51.996
<00:21:48.116>So <00:21:48.232>you <00:21:48.349>could <00:21:48.466>imagine <00:21:48.582>writing <00:21:48.699>scripts, <00:21:48.816>for <00:21:48.932>example, <00:21:49.049>where <00:21:49.166>you <00:21:49.282>want <00:21:49.399>to <00:21:49.516>use

371
00:21:52.076 --> 00:21:55.536
<00:21:52.076>HTTP <00:21:52.251>endpoints <00:21:52.426>as <00:21:52.601>control <00:21:52.776>interface <00:21:52.951>or <00:21:53.126>stuff <00:21:53.301>like <00:21:53.476>that.

372
00:21:55.966 --> 00:21:56.216
Right?

373
00:21:57.785 --> 00:21:59.296
<00:21:57.785>That's <00:21:58.011>some <00:21:58.238>really <00:21:58.464>nice <00:21:58.691>features <00:21:58.918>in <00:21:59.144>Java.

374
00:21:59.936 --> 00:22:02.296
<00:21:59.936>And <00:22:00.216>that's <00:22:00.495>even <00:22:00.775>not <00:22:01.055>everything <00:22:01.336>because

375
00:22:04.116 --> 00:22:04.716
<00:22:04.116>we <00:22:04.386>now <00:22:04.656>have

376
00:22:05.576 --> 00:22:07.076
<00:22:05.576>a <00:22:06.026>draft <00:22:06.476>in <00:22:06.926>Java

377
00:22:08.336 --> 00:22:09.556
<00:22:08.336>for <00:22:08.885>JSON <00:22:09.434>documents.

378
00:22:11.076 --> 00:22:14.996
<00:22:11.076>It <00:22:11.203>doesn't <00:22:11.330>mean <00:22:11.457>really <00:22:11.585>that <00:22:11.712>it's <00:22:11.839>going <00:22:11.966>to <00:22:12.094>come <00:22:12.221>anytime <00:22:12.348>soon, <00:22:12.476>but

379
00:22:15.036 --> 00:22:18.496
<00:22:15.036>it <00:22:15.163>means <00:22:15.290>there <00:22:15.417>are <00:22:15.545>plans <00:22:15.672>to <00:22:15.799>do <00:22:15.926>it <00:22:16.054>and <00:22:16.181>it <00:22:16.308>might <00:22:16.436>come.

380
00:22:18.556 --> 00:22:22.396
<00:22:18.556>So <00:22:18.656>in <00:22:18.756>the <00:22:18.856>future, <00:22:18.956>we <00:22:19.056>might <00:22:19.156>have <00:22:19.256>some <00:22:19.356>simple <00:22:19.456>JSON <00:22:19.556>parsing <00:22:19.656>in <00:22:19.756>Java, <00:22:19.856>and <00:22:19.956>we

381
00:22:22.436 --> 00:22:24.536
<00:22:22.436>don't <00:22:23.136>need <00:22:23.836>this

382
00:22:25.536 --> 00:22:26.616
<00:22:25.536>Java <00:22:26.022>mangling <00:22:26.508>anymore.

383
00:22:28.136 --> 00:22:31.456
<00:22:28.136>And <00:22:28.485>the <00:22:28.836>proposal <00:22:29.186>and <00:22:29.536>example

384
00:22:31.656 --> 00:22:34.516
<00:22:31.656>is <00:22:31.856>like <00:22:32.056>the <00:22:32.255>one <00:22:32.456>I <00:22:32.656>listed <00:22:32.856>over <00:22:33.056>here.

385
00:22:36.266 --> 00:22:40.236
<00:22:36.266>So <00:22:36.382>it <00:22:36.499>might <00:22:36.616>look <00:22:36.732>something <00:22:36.849>like <00:22:36.966>that <00:22:37.082>in <00:22:37.199>the <00:22:37.316>future, <00:22:37.432>which <00:22:37.549>is <00:22:37.666>actually

386
00:22:40.276 --> 00:22:43.976
<00:22:40.276>kind <00:22:40.392>of <00:22:40.509>similar <00:22:40.626>to <00:22:40.742>the <00:22:40.859>one <00:22:40.976>we <00:22:41.092>already <00:22:41.209>used <00:22:41.326>in <00:22:41.442>the <00:22:41.559>Jackson.org <00:22:41.676>library.

387
00:22:45.376 --> 00:22:45.635
So

388
00:22:46.616 --> 00:22:48.236
<00:22:46.616>it <00:22:46.816>would <00:22:47.016>be <00:22:47.216>nice <00:22:47.416>to <00:22:47.616>actually <00:22:47.816>get <00:22:48.016>that.

389
00:22:49.496 --> 00:22:52.876
<00:22:49.496>And <00:22:49.696>we'll <00:22:49.896>now <00:22:50.096>make <00:22:50.296>a <00:22:50.496>little <00:22:50.696>intermediate <00:22:50.896>summary.

390
00:22:55.356 --> 00:22:58.976
<00:22:55.356>So <00:22:55.449>when <00:22:55.542>you <00:22:55.636>want <00:22:55.729>to <00:22:55.822>get <00:22:55.916>started <00:22:56.009>with <00:22:56.102>scripting <00:22:56.196>in <00:22:56.289>Java, <00:22:56.382>start <00:22:56.476>with <00:22:56.569>a <00:22:56.662>simple <00:22:56.756>void

391
00:22:59.016 --> 00:22:59.256
main.

392
00:23:00.836 --> 00:23:04.626
<00:23:00.836>If <00:23:00.943>you <00:23:01.051>need <00:23:01.159>to <00:23:01.266>organize <00:23:01.374>code, <00:23:01.482>then <00:23:01.589>maybe <00:23:01.697>add <00:23:01.805>some <00:23:01.912>methods <00:23:02.020>and <00:23:02.128>classes <00:23:02.236>and

393
00:23:04.636 --> 00:23:05.956
<00:23:04.636>split <00:23:04.933>it <00:23:05.230>into <00:23:05.526>multiple <00:23:05.823>files.

394
00:23:07.556 --> 00:23:10.916
<00:23:07.556>If <00:23:07.696>you <00:23:07.836>need <00:23:07.976>more <00:23:08.116>functionality, <00:23:08.256>you <00:23:08.396>can <00:23:08.536>use <00:23:08.676>the <00:23:08.816>JDK <00:23:08.956>API.

395
00:23:11.136 --> 00:23:14.056
<00:23:11.136>There's <00:23:11.291>actually <00:23:11.447>lots <00:23:11.602>of <00:23:11.758>functionality <00:23:11.913>you <00:23:12.069>might <00:23:12.224>want <00:23:12.380>to <00:23:12.536>use.

396
00:23:15.136 --> 00:23:16.176
<00:23:15.136>There's <00:23:15.447>lots <00:23:15.760>of <00:23:16.072>options.

397
00:23:17.956 --> 00:23:20.416
<00:23:17.956>But <00:23:18.156>I'm <00:23:18.356>pretty <00:23:18.555>sure <00:23:18.755>at <00:23:18.956>some <00:23:19.156>point <00:23:19.356>you

398
00:23:21.276 --> 00:23:25.176
<00:23:21.276>run <00:23:21.476>out <00:23:21.676>of <00:23:21.876>possibilities <00:23:22.076>the <00:23:22.276>regular <00:23:22.476>APIs <00:23:22.676>provide,

399
00:23:26.296 --> 00:23:28.056
<00:23:26.296>and <00:23:26.496>then <00:23:26.696>you <00:23:26.896>want <00:23:27.096>to <00:23:27.296>use <00:23:27.496>some <00:23:27.696>dependencies.

400
00:23:31.176 --> 00:23:34.576
<00:23:31.176>You <00:23:31.303>can <00:23:31.430>add <00:23:31.557>simple <00:23:31.685>dependencies <00:23:31.812>to <00:23:31.939>class <00:23:32.066>path <00:23:32.194>as <00:23:32.321>we <00:23:32.448>already <00:23:32.576>did,

401
00:23:35.636 --> 00:23:39.436
<00:23:35.636>but <00:23:35.811>you <00:23:35.985>might <00:23:36.161>not <00:23:36.336>want <00:23:36.511>to <00:23:36.686>put <00:23:36.860>dependencies <00:23:37.036>with

402
00:23:39.476 --> 00:23:42.946
<00:23:39.476>transitive <00:23:39.603>dependencies <00:23:39.730>in <00:23:39.857>there <00:23:39.985>because <00:23:40.112>it's <00:23:40.239>going <00:23:40.366>to <00:23:40.494>be <00:23:40.621>a <00:23:40.748>lot <00:23:40.876>of

403
00:23:42.996 --> 00:23:46.116
<00:23:42.996>overhead <00:23:43.229>to <00:23:43.462>maintain <00:23:43.696>or <00:23:43.929>actually <00:23:44.162>to <00:23:44.396>initially

404
00:23:46.996 --> 00:23:47.436
<00:23:46.996>set <00:23:47.194>it <00:23:47.391>up.

405
00:23:50.876 --> 00:23:53.856
<00:23:50.876>But <00:23:51.051>what <00:23:51.226>if <00:23:51.401>we <00:23:51.576>want <00:23:51.751>to <00:23:51.926>use <00:23:52.101>transitive <00:23:52.276>dependencies?

406
00:23:54.056 --> 00:23:57.956
<00:23:54.056>Because <00:23:54.183>it <00:23:54.310>kind <00:23:54.437>of <00:23:54.565>sucks <00:23:54.692>if <00:23:54.819>I <00:23:54.946>now <00:23:55.074>use <00:23:55.201>my <00:23:55.328>regular <00:23:55.456>ecosystem

407
00:23:58.556 --> 00:24:01.976
<00:23:58.556>with <00:23:58.696>Java, <00:23:58.836>but <00:23:58.976>I <00:23:59.116>can't <00:23:59.256>use <00:23:59.396>the <00:23:59.536>dependencies <00:23:59.676>I <00:23:59.816>regularly <00:23:59.956>use.

408
00:24:03.336 --> 00:24:04.576
<00:24:03.336>And <00:24:03.559>there <00:24:03.782>is <00:24:04.005>actually <00:24:04.228>an <00:24:04.452>option,

409
00:24:05.416 --> 00:24:08.016
<00:24:05.416>and <00:24:05.649>the <00:24:05.882>option <00:24:06.116>is <00:24:06.349>to <00:24:06.582>use <00:24:06.816>JBang.

410
00:24:09.816 --> 00:24:12.156
<00:24:09.816>And <00:24:10.096>with <00:24:10.376>JBang, <00:24:10.656>you <00:24:10.936>can <00:24:11.216>write

411
00:24:13.356 --> 00:24:16.236
<00:24:13.356>and <00:24:13.589>run <00:24:13.822>JavaScript <00:24:14.056>without <00:24:14.289>the <00:24:14.522>traditional <00:24:14.756>setup.

412
00:24:17.876 --> 00:24:21.676
<00:24:17.876>For <00:24:18.003>example, <00:24:18.130>when <00:24:18.257>you <00:24:18.385>want <00:24:18.512>to <00:24:18.639>write <00:24:18.766>Java <00:24:18.894>code <00:24:19.021>with <00:24:19.148>dependencies, <00:24:19.276>you

413
00:24:21.736 --> 00:24:25.646
<00:24:21.736>usually <00:24:21.863>set <00:24:21.990>up <00:24:22.117>a <00:24:22.245>Maven <00:24:22.372>project. <00:24:22.499>You <00:24:22.626>need <00:24:22.754>a <00:24:22.881>POM <00:24:23.008>XML <00:24:23.136>with

414
00:24:25.676 --> 00:24:29.416
<00:24:25.676>all <00:24:25.803>the <00:24:25.930>dependencies. <00:24:26.057>You <00:24:26.185>need <00:24:26.312>the <00:24:26.439>certain <00:24:26.566>folders <00:24:26.694>to <00:24:26.821>put <00:24:26.948>your <00:24:27.076>code

415
00:24:29.496 --> 00:24:33.166
<00:24:29.496>in, <00:24:29.612>like <00:24:29.729>source, <00:24:29.846>main, <00:24:29.962>Java, <00:24:30.079>and <00:24:30.196>then <00:24:30.312>you <00:24:30.429>put <00:24:30.546>your <00:24:30.662>code <00:24:30.779>in <00:24:30.896>there.

416
00:24:33.316 --> 00:24:33.456
So

417
00:24:35.126 --> 00:24:35.426
<00:24:35.126>It <00:24:35.396>is

418
00:24:37.006 --> 00:24:39.846
<00:24:37.006>a <00:24:37.161>little <00:24:37.317>ceremony <00:24:37.472>and <00:24:37.628>I <00:24:37.783>get <00:24:37.939>why <00:24:38.094>people <00:24:38.250>criticize <00:24:38.406>that.

419
00:24:41.086 --> 00:24:42.886
<00:24:41.086>But <00:24:41.241>with <00:24:41.397>JBang, <00:24:41.552>you <00:24:41.708>don't <00:24:41.863>have <00:24:42.019>to <00:24:42.174>do <00:24:42.330>it <00:24:42.486>anymore.

420
00:24:45.166 --> 00:24:48.486
<00:24:45.166>It's <00:24:45.306>just <00:24:45.446>one <00:24:45.586>file, <00:24:45.726>and <00:24:45.866>within <00:24:46.005>that <00:24:46.146>file, <00:24:46.285>you <00:24:46.426>can <00:24:46.566>launch

421
00:24:49.086 --> 00:24:53.066
<00:24:49.086>any <00:24:49.241>Java <00:24:49.397>application <00:24:49.552>or <00:24:49.708>library, <00:24:49.863>anything <00:24:50.019>that's <00:24:50.174>packaged <00:24:50.330>as <00:24:50.486>a

422
00:24:53.166 --> 00:24:55.646
<00:24:53.166>JAR, <00:24:53.446>without <00:24:53.726>any <00:24:54.005>project <00:24:54.285>setup <00:24:54.566>needed.

423
00:24:58.446 --> 00:24:59.066
And

424
00:25:00.126 --> 00:25:03.806
<00:25:00.126>to <00:25:00.281>use, <00:25:00.437>for <00:25:00.592>example, <00:25:00.748>some <00:25:00.903>library <00:25:01.059>packaged <00:25:01.214>as <00:25:01.370>a <00:25:01.526>JAR,

425
00:25:04.446 --> 00:25:04.846
<00:25:04.446>you <00:25:04.806>just

426
00:25:06.106 --> 00:25:08.546
<00:25:06.106>write <00:25:06.386>it <00:25:06.666>like <00:25:06.946>this <00:25:07.226>//deps <00:25:07.506>comment,

427
00:25:10.006 --> 00:25:11.826
<00:25:10.006>and <00:25:10.286>it <00:25:10.566>will <00:25:10.846>get <00:25:11.126>automatically <00:25:11.406>resolved.

428
00:25:13.746 --> 00:25:16.866
<00:25:13.746>You <00:25:14.026>can <00:25:14.306>even <00:25:14.586>create <00:25:14.866>binary <00:25:15.146>files

429
00:25:17.686 --> 00:25:20.566
<00:25:17.686>using <00:25:18.386>the <00:25:19.086>GraalVM,

430
00:25:21.466 --> 00:25:25.106
<00:25:21.466>and <00:25:21.606>you <00:25:21.745>just <00:25:21.886>have <00:25:22.025>to <00:25:22.166>file <00:25:22.305>like <00:25:22.446>this <00:25:22.585>--native <00:25:22.726>flag <00:25:22.866>in

431
00:25:25.146 --> 00:25:27.466
<00:25:25.146>JBang, <00:25:25.379>and <00:25:25.612>it <00:25:25.846>will <00:25:26.079>automatically <00:25:26.312>do <00:25:26.546>it.

432
00:25:29.646 --> 00:25:30.986
<00:25:29.646>There's <00:25:30.048>full <00:25:30.450>IDE <00:25:30.852>support.

433
00:25:32.346 --> 00:25:35.686
<00:25:32.346>You <00:25:32.626>can <00:25:32.906>either <00:25:33.186>use <00:25:33.466>IntelliJ <00:25:33.746>or

434
00:25:37.126 --> 00:25:38.605
<00:25:37.126>Codium, <00:25:37.458>it <00:25:37.791>is <00:25:38.124>I <00:25:38.457>think,

435
00:25:39.825 --> 00:25:43.786
<00:25:39.825>which <00:25:39.965>is <00:25:40.105>the <00:25:40.245>open <00:25:40.385>source <00:25:40.525>variant <00:25:40.665>or <00:25:40.805>the <00:25:40.945>open <00:25:41.085>source <00:25:41.225>foundation

436
00:25:43.866 --> 00:25:44.906
<00:25:43.866>of <00:25:44.178>Visual <00:25:44.490>Studio <00:25:44.802>Code.

437
00:25:46.526 --> 00:25:49.926
<00:25:46.526>There's <00:25:46.619>lots <00:25:46.712>of <00:25:46.806>templates <00:25:46.899>you <00:25:46.992>can <00:25:47.086>use, <00:25:47.179>and <00:25:47.272>we're <00:25:47.366>going <00:25:47.459>to <00:25:47.552>do <00:25:47.646>that <00:25:47.739>later <00:25:47.832>as <00:25:47.926>well,

438
00:25:50.426 --> 00:25:53.946
<00:25:50.426>using <00:25:50.892>the <00:25:51.359>-t <00:25:51.826>for

439
00:25:54.006 --> 00:25:54.946
<00:25:54.006>template <00:25:54.851>command.

440
00:25:56.006 --> 00:25:59.666
<00:25:56.006>And <00:25:56.133>yeah, <00:25:56.260>JBang <00:25:56.387>makes <00:25:56.515>it <00:25:56.642>also <00:25:56.769>super <00:25:56.896>easy <00:25:57.024>to <00:25:57.151>share <00:25:57.278>and <00:25:57.406>reuse

441
00:25:59.826 --> 00:26:00.166
scripts.

442
00:26:02.226 --> 00:26:03.306
<00:26:02.226>Because <00:26:02.469>you <00:26:02.712>could, <00:26:02.955>for <00:26:03.198>example,

443
00:26:04.426 --> 00:26:08.266
<00:26:04.426>just <00:26:04.581>copy <00:26:04.737>the <00:26:04.892>URL <00:26:05.048>to <00:26:05.203>a <00:26:05.359>GitHub <00:26:05.514>Gist <00:26:05.670>and <00:26:05.826>say

444
00:26:08.426 --> 00:26:08.906
JBang

445
00:26:09.826 --> 00:26:13.346
<00:26:09.826>and <00:26:09.942>the <00:26:10.059>URL, <00:26:10.176>and <00:26:10.292>it <00:26:10.409>will <00:26:10.526>actually <00:26:10.642>download <00:26:10.759>the <00:26:10.876>Gist <00:26:10.992>and <00:26:11.109>run <00:26:11.226>it.

446
00:26:15.306 --> 00:26:17.026
<00:26:15.306>And <00:26:15.461>there's <00:26:15.617>also <00:26:15.772>a <00:26:15.928>huge <00:26:16.083>app <00:26:16.239>store <00:26:16.394>you <00:26:16.550>can <00:26:16.706>use.

447
00:26:17.506 --> 00:26:19.906
<00:26:17.506>So <00:26:17.739>that <00:26:17.972>makes <00:26:18.206>it <00:26:18.439>super <00:26:18.672>easy <00:26:18.906>to

448
00:26:21.206 --> 00:26:25.166
<00:26:21.206>actually <00:26:21.406>use <00:26:21.606>someone <00:26:21.805>else's <00:26:22.005>code <00:26:22.206>and <00:26:22.406>try <00:26:22.606>their

449
00:26:25.306 --> 00:26:25.846
<00:26:25.306>scripts <00:26:25.792>out.

450
00:26:29.866 --> 00:26:33.186
<00:26:29.866>And <00:26:30.021>I <00:26:30.177>think <00:26:30.332>that's <00:26:30.488>what <00:26:30.643>we're <00:26:30.799>going <00:26:30.954>to <00:26:31.110>do <00:26:31.266>now.

451
00:26:35.386 --> 00:26:35.806
<00:26:35.386>So <00:26:35.764>let's

452
00:26:37.386 --> 00:26:41.146
<00:26:37.386>port <00:26:37.666>our <00:26:37.946>little <00:26:38.226>application <00:26:38.505>to <00:26:38.786>JBang.

453
00:26:44.565 --> 00:26:47.446
<00:26:44.565>I <00:26:44.720>need <00:26:44.876>to <00:26:45.031>quickly <00:26:45.187>switch <00:26:45.342>over <00:26:45.498>here <00:26:45.653>and <00:26:45.809>say <00:26:45.965>jbang

454
00:26:49.386 --> 00:26:49.786
init

455
00:26:51.526 --> 00:26:52.586
get-cat-facts.

456
00:26:55.326 --> 00:26:58.206
<00:26:55.326>Now <00:26:55.606>I <00:26:55.886>say <00:26:56.166>jbang <00:26:56.446>edit <00:26:56.726>get-cat-facts.

457
00:26:59.246 --> 00:26:59.926
<00:26:59.246>And <00:26:59.858>now

458
00:27:00.846 --> 00:27:01.726
<00:27:00.846>Codium <00:27:01.638>opens,

459
00:27:03.346 --> 00:27:04.466
<00:27:03.346>and <00:27:03.682>we <00:27:04.018>get <00:27:04.353>our

460
00:27:05.286 --> 00:27:07.126
<00:27:05.286>initialized <00:27:05.986>get-cat-facts <00:27:06.686>here.

461
00:27:08.426 --> 00:27:10.946
<00:27:08.426>And <00:27:08.553>what <00:27:08.680>we're <00:27:08.807>going <00:27:08.935>to <00:27:09.062>do <00:27:09.189>is <00:27:09.316>we <00:27:09.444>just <00:27:09.571>copy <00:27:09.698>stuff <00:27:09.826>over.

462
00:27:11.226 --> 00:27:15.006
<00:27:11.226>So <00:27:11.366>first <00:27:11.506>of <00:27:11.646>all, <00:27:11.786>I'll <00:27:11.926>just <00:27:12.066>copy <00:27:12.206>that <00:27:12.346>code <00:27:12.486>over <00:27:12.626>here

463
00:27:17.506 --> 00:27:18.786
<00:27:17.506>from <00:27:17.890>our <00:27:18.274>little <00:27:18.658>script,

464
00:27:19.606 --> 00:27:22.926
<00:27:19.606>paste <00:27:19.722>it <00:27:19.839>in <00:27:19.956>here. <00:27:20.072>And <00:27:20.189>to <00:27:20.306>make <00:27:20.422>it <00:27:20.539>simple, <00:27:20.656>I'll <00:27:20.772>also <00:27:20.889>just <00:27:21.006>put

465
00:27:23.146 --> 00:27:26.206
<00:27:23.146>the <00:27:23.495>records <00:27:23.846>down <00:27:24.196>into <00:27:24.546>here.

466
00:27:27.266 --> 00:27:28.886
<00:27:27.266>Oops, <00:27:27.616>that <00:27:27.966>was <00:27:28.316>the <00:27:28.666>wrong...

467
00:27:31.366 --> 00:27:32.226
<00:27:31.366>Make <00:27:31.753>sure <00:27:32.140>to

468
00:27:33.066 --> 00:27:36.066
<00:27:33.066>not <00:27:33.221>just <00:27:33.377>copy <00:27:33.532>the <00:27:33.688>file <00:27:33.843>name. <00:27:33.999>And <00:27:34.154>here <00:27:34.310>we <00:27:34.466>go.

469
00:27:36.206 --> 00:27:36.866
<00:27:36.206>I <00:27:36.503>just <00:27:36.800>ported

470
00:27:38.646 --> 00:27:41.746
<00:27:38.646>our <00:27:38.879>little <00:27:39.112>cat <00:27:39.346>fact <00:27:39.579>application <00:27:39.812>or <00:27:40.046>script

471
00:27:42.886 --> 00:27:46.866
<00:27:42.886>to <00:27:43.061>JBang. <00:27:43.235>But <00:27:43.411>we're <00:27:43.586>still <00:27:43.761>missing <00:27:43.936>this <00:27:44.110>JSON <00:27:44.286>object

472
00:27:46.966 --> 00:27:49.436
<00:27:46.966>over <00:27:47.106>here, <00:27:47.245>so <00:27:47.386>we <00:27:47.525>have <00:27:47.666>to <00:27:47.805>put <00:27:47.946>the <00:27:48.085>dependency <00:27:48.226>in <00:27:48.366>here.

473
00:27:50.366 --> 00:27:54.066
<00:27:50.366>And <00:27:50.646>I <00:27:50.926>already <00:27:51.206>prepared <00:27:51.485>that. <00:27:51.766>Oh.

474
00:27:55.686 --> 00:27:56.686
Hmm.

475
00:27:58.906 --> 00:28:01.046
<00:27:58.906>I've <00:27:59.061>got <00:27:59.217>to <00:27:59.372>look <00:27:59.528>it <00:27:59.683>up. <00:27:59.839>So <00:27:59.994>we <00:28:00.150>go <00:28:00.306>to

476
00:28:01.646 --> 00:28:05.106
<00:28:01.646>json.org, <00:28:02.346>Maven <00:28:03.046>Central.

477
00:28:07.146 --> 00:28:10.286
<00:28:07.146>We <00:28:07.321>just <00:28:07.495>use <00:28:07.671>the <00:28:07.846>Maven <00:28:08.021>coordinates <00:28:08.196>on <00:28:08.370>Maven <00:28:08.546>Central,

478
00:28:11.926 --> 00:28:15.726
<00:28:11.926>and <00:28:12.066>usually <00:28:12.206>the <00:28:12.346>Gradle <00:28:12.485>notation <00:28:12.626>is <00:28:12.765>the <00:28:12.906>best <00:28:13.045>because <00:28:13.186>it's <00:28:13.326>just

479
00:28:15.906 --> 00:28:18.666
<00:28:15.906>one <00:28:16.033>line, <00:28:16.160>and <00:28:16.287>we <00:28:16.415>can <00:28:16.542>just <00:28:16.669>copy <00:28:16.796>it <00:28:16.924>over <00:28:17.051>like <00:28:17.178>this <00:28:17.306>one.

480
00:28:20.086 --> 00:28:22.006
<00:28:20.086>So <00:28:20.436>let's <00:28:20.786>get <00:28:21.136>back <00:28:21.486>into

481
00:28:23.726 --> 00:28:24.066
here.

482
00:28:25.546 --> 00:28:26.826
<00:28:25.546>And <00:28:25.930>we <00:28:26.314>say <00:28:26.698>/lib

483
00:28:27.086 --> 00:28:30.706
<00:28:27.086>deps <00:28:27.786>and <00:28:28.486>this

484
00:28:30.726 --> 00:28:31.546
<00:28:30.726>dependency <00:28:31.095>over <00:28:31.464>here.

485
00:28:32.446 --> 00:28:32.746
<00:28:32.446>And <00:28:32.716>now

486
00:28:33.686 --> 00:28:37.566
<00:28:33.686>we <00:28:33.841>can <00:28:33.997>close <00:28:34.152>it, <00:28:34.308>get <00:28:34.463>back <00:28:34.619>into <00:28:34.774>the <00:28:34.930>terminal, <00:28:35.086>and

487
00:28:37.646 --> 00:28:41.626
<00:28:37.646>say, <00:28:37.821>for <00:28:37.995>example, <00:28:38.171>we <00:28:38.346>can <00:28:38.521>run <00:28:38.696>like <00:28:38.870>this, <00:28:39.046>./get-cat-facts,

488
00:28:42.126 --> 00:28:45.606
<00:28:42.126>and <00:28:42.301>yeah, <00:28:42.476>now <00:28:42.651>we <00:28:42.826>get <00:28:43.001>our <00:28:43.176>cat <00:28:43.351>fact <00:28:43.526>back.

489
00:28:46.386 --> 00:28:49.626
<00:28:46.386>Cats <00:28:46.586>have <00:28:46.786>about <00:28:46.985>130,000 <00:28:47.186>hairs <00:28:47.386>per <00:28:47.586>square <00:28:47.786>inch,

490
00:28:50.266 --> 00:28:53.485
<00:28:50.266>20,155 <00:28:50.616>hairs <00:28:50.966>per <00:28:51.316>square <00:28:51.666>centimeter.

491
00:28:55.646 --> 00:28:56.406
<00:28:55.646>Nice <00:28:55.988>little <00:28:56.330>fact.

492
00:28:58.406 --> 00:29:02.346
<00:28:58.406>Yeah. <00:28:58.533>So <00:28:58.660>that's <00:28:58.787>actually <00:28:58.915>how <00:28:59.042>we <00:28:59.169>make <00:28:59.296>this <00:28:59.424>dependency <00:28:59.551>management <00:28:59.678>a <00:28:59.806>lot

493
00:29:02.386 --> 00:29:02.776
simpler.

494
00:29:04.586 --> 00:29:07.026
<00:29:04.586>But <00:29:04.726>can <00:29:04.866>we <00:29:05.006>take <00:29:05.146>it <00:29:05.286>a <00:29:05.426>step <00:29:05.566>further? <00:29:05.706>So <00:29:05.846>for <00:29:05.986>example,

495
00:29:09.826 --> 00:29:12.586
<00:29:09.826>could <00:29:10.059>we, <00:29:10.292>for <00:29:10.526>example, <00:29:10.759>write <00:29:10.992>CLI <00:29:11.226>applications?

496
00:29:13.326 --> 00:29:16.026
<00:29:13.326>And <00:29:13.526>CLI <00:29:13.726>applications <00:29:13.926>are <00:29:14.126>actually <00:29:14.326>a <00:29:14.526>little <00:29:14.726>different.

497
00:29:17.226 --> 00:29:21.126
<00:29:17.226>So <00:29:17.381>what <00:29:17.537>we <00:29:17.692>have <00:29:17.848>there <00:29:18.003>is <00:29:18.159>we <00:29:18.314>have <00:29:18.470>here <00:29:18.626>an

498
00:29:21.286 --> 00:29:21.726
option

499
00:29:22.666 --> 00:29:25.706
<00:29:22.666>with <00:29:22.866>some <00:29:23.066>parameter <00:29:23.265>here, <00:29:23.466>which <00:29:23.666>is <00:29:23.866>the <00:29:24.066>URL.

500
00:29:26.606 --> 00:29:30.326
<00:29:26.606>You <00:29:26.806>can <00:29:27.006>pipe <00:29:27.206>it <00:29:27.406>and <00:29:27.606>format <00:29:27.806>it <00:29:28.006>nicely.

501
00:29:32.786 --> 00:29:35.946
<00:29:32.786>Let's <00:29:32.961>try <00:29:33.136>to <00:29:33.311>write <00:29:33.486>something <00:29:33.661>like <00:29:33.836>that <00:29:34.011>by <00:29:34.186>ourselves.

502
00:29:37.226 --> 00:29:39.266
<00:29:37.226>And <00:29:37.366>I <00:29:37.506>already <00:29:37.646>said <00:29:37.786>we're <00:29:37.926>going <00:29:38.066>to <00:29:38.206>build <00:29:38.346>our <00:29:38.486>own <00:29:38.626>cat,

503
00:29:40.486 --> 00:29:44.326
<00:29:40.486>and <00:29:40.641>most <00:29:40.797>of <00:29:40.952>you <00:29:41.108>probably <00:29:41.263>know <00:29:41.419>the <00:29:41.574>CLI <00:29:41.730>application, <00:29:41.886>cat.

504
00:29:45.826 --> 00:29:49.326
<00:29:45.826>And <00:29:46.001>cat, <00:29:46.176>what <00:29:46.351>cat <00:29:46.526>does <00:29:46.701>is <00:29:46.876>it <00:29:47.051>prints <00:29:47.226>the

505
00:29:49.386 --> 00:29:51.526
<00:29:49.386>output. <00:29:49.666>Oh, <00:29:49.946>wrong <00:29:50.226>directory <00:29:50.505>over <00:29:50.786>here.

506
00:29:53.306 --> 00:29:56.946
<00:29:53.306>Prints <00:29:53.506>the <00:29:53.706>output <00:29:53.906>of <00:29:54.106>file <00:29:54.306>into <00:29:54.506>the <00:29:54.706>terminal.

507
00:29:58.446 --> 00:30:00.926
<00:29:58.446>So <00:29:58.679>let's <00:29:58.912>try <00:29:59.146>to <00:29:59.379>reproduce <00:29:59.612>that <00:29:59.846>behavior.

508
00:30:03.986 --> 00:30:07.906
<00:30:03.986>We're <00:30:04.126>going <00:30:04.266>to <00:30:04.406>use <00:30:04.546>JBang <00:30:04.686>again, <00:30:04.826>so <00:30:04.966>jbang <00:30:05.106>init, <00:30:05.246>and <00:30:05.386>we

509
00:30:08.426 --> 00:30:10.046
<00:30:08.426>are <00:30:08.626>going <00:30:08.826>to <00:30:09.025>use <00:30:09.226>a <00:30:09.426>template <00:30:09.626>in <00:30:09.826>here.

510
00:30:11.206 --> 00:30:13.046
<00:30:11.206>And <00:30:11.485>that <00:30:11.765>template <00:30:12.045>is <00:30:12.325>called <00:30:12.606>cli.

511
00:30:13.946 --> 00:30:17.686
<00:30:13.946>And <00:30:14.073>when <00:30:14.200>I <00:30:14.327>open <00:30:14.455>it, <00:30:14.582>you'll <00:30:14.709>see <00:30:14.836>that <00:30:14.964>there <00:30:15.091>is <00:30:15.218>also <00:30:15.346>some

512
00:30:17.746 --> 00:30:19.406
<00:30:17.746>dependencies <00:30:18.446>on <00:30:19.146>there.

513
00:30:21.846 --> 00:30:23.106
<00:30:21.846>Jbang <00:30:22.980>edit.

514
00:30:28.726 --> 00:30:32.066
<00:30:28.726>So <00:30:28.842>you <00:30:28.959>already <00:30:29.076>see <00:30:29.192>that <00:30:29.309>there <00:30:29.426>is <00:30:29.542>some <00:30:29.659>dependency <00:30:29.776>in <00:30:29.892>there, <00:30:30.009>which <00:30:30.126>is

515
00:30:32.086 --> 00:30:32.786
PicoCLI.

516
00:30:34.706 --> 00:30:36.246
<00:30:34.706>It <00:30:35.052>has <00:30:35.399>commands <00:30:35.745>and <00:30:36.092>parameters.

517
00:30:37.786 --> 00:30:38.766
<00:30:37.786>That's <00:30:38.668>actually,

518
00:30:39.986 --> 00:30:40.076
yeah

519
00:30:41.006 --> 00:30:44.966
<00:30:41.006>It <00:30:41.113>takes <00:30:41.221>this <00:30:41.329>parameter <00:30:41.436>conversion <00:30:41.544>stuff <00:30:41.652>away <00:30:41.759>from <00:30:41.867>us <00:30:41.975>and <00:30:42.082>makes <00:30:42.190>it <00:30:42.298>easy <00:30:42.406>for

520
00:30:45.026 --> 00:30:45.426
us.

521
00:30:48.346 --> 00:30:51.246
<00:30:48.346>And <00:30:48.579>also <00:30:48.812>helps <00:30:49.046>us <00:30:49.279>a <00:30:49.512>little <00:30:49.746>with

522
00:30:52.186 --> 00:30:56.026
<00:30:52.186>documentation <00:30:52.341>purposes. <00:30:52.497>So <00:30:52.652>for <00:30:52.808>example, <00:30:52.963>if <00:30:53.119>I <00:30:53.274>would <00:30:53.430>add <00:30:53.586>it,

523
00:30:56.586 --> 00:30:59.666
<00:30:56.586>run <00:30:56.819>cat <00:30:57.052>now <00:30:57.286>with <00:30:57.519>the <00:30:57.752>--help <00:30:57.986>command.

524
00:31:00.066 --> 00:31:02.666
<00:31:00.066>I'll <00:31:00.221>do <00:31:00.377>it <00:31:00.532>again <00:31:00.688>so <00:31:00.843>you <00:31:00.999>can <00:31:01.154>see <00:31:01.310>it <00:31:01.466>properly.

525
00:31:04.046 --> 00:31:07.966
<00:31:04.046>You <00:31:04.162>already <00:31:04.279>see <00:31:04.396>that <00:31:04.512>we <00:31:04.629>have <00:31:04.746>a <00:31:04.862>parameter <00:31:04.979>and <00:31:05.096>option <00:31:05.212>description <00:31:05.329>over <00:31:05.446>here.

526
00:31:12.866 --> 00:31:16.606
<00:31:12.866>But <00:31:12.953>what <00:31:13.041>we're <00:31:13.128>going <00:31:13.216>to <00:31:13.303>do <00:31:13.391>is <00:31:13.478>we <00:31:13.566>want <00:31:13.653>to <00:31:13.741>have <00:31:13.828>that <00:31:13.916>one <00:31:14.003>as <00:31:14.091>a <00:31:14.178>cat <00:31:14.266>application.

527
00:31:17.706 --> 00:31:20.446
<00:31:17.706>And <00:31:17.861>that <00:31:18.017>means <00:31:18.172>we <00:31:18.328>need <00:31:18.483>a <00:31:18.639>file <00:31:18.794>as <00:31:18.950>an <00:31:19.106>input.

528
00:31:21.266 --> 00:31:22.106
<00:31:21.266>So <00:31:21.644>we're <00:31:22.022>just

529
00:31:23.006 --> 00:31:26.266
<00:31:23.006>going <00:31:23.133>to <00:31:23.260>edit <00:31:23.387>this <00:31:23.515>over <00:31:23.642>here. <00:31:23.769>Say <00:31:23.896>it's <00:31:24.024>the <00:31:24.151>file <00:31:24.278>to <00:31:24.406>print,

530
00:31:27.466 --> 00:31:28.346
<00:31:27.466>rename <00:31:27.730>it <00:31:27.994>to <00:31:28.258>file,

531
00:31:29.646 --> 00:31:33.446
<00:31:29.646>and <00:31:29.821>just <00:31:29.995>delete <00:31:30.171>that <00:31:30.346>over <00:31:30.521>here. <00:31:30.696>And <00:31:30.870>now <00:31:31.046>we

532
00:31:33.506 --> 00:31:36.586
<00:31:33.506>actually <00:31:33.681>have <00:31:33.856>to <00:31:34.031>print <00:31:34.206>the <00:31:34.381>content <00:31:34.556>of <00:31:34.731>a <00:31:34.906>file

533
00:31:37.486 --> 00:31:38.106
<00:31:37.486>to <00:31:37.765>the <00:31:38.044>output.

534
00:31:39.106 --> 00:31:39.545
And

535
00:31:40.766 --> 00:31:43.626
<00:31:40.766>you <00:31:40.921>don't <00:31:41.077>need <00:31:41.232>a <00:31:41.388>buffered <00:31:41.543>reader <00:31:41.699>or <00:31:41.854>anything <00:31:42.010>in <00:31:42.166>here.

536
00:31:43.686 --> 00:31:47.526
<00:31:43.686>Java <00:31:43.802>actually <00:31:43.919>has <00:31:44.035>functionality <00:31:44.152>now <00:31:44.269>to <00:31:44.386>do <00:31:44.502>it <00:31:44.619>in <00:31:44.735>one <00:31:44.852>line <00:31:44.969>of <00:31:45.086>code.

537
00:31:48.826 --> 00:31:50.806
<00:31:48.826>So, <00:31:49.059>so <00:31:49.292>much <00:31:49.526>about <00:31:49.759>boilerplate. <00:31:49.992>And <00:31:50.226>it's

538
00:31:51.726 --> 00:31:53.946
<00:31:51.726>called <00:31:53.126>Files.readAllLines,

539
00:31:55.386 --> 00:31:58.466
<00:31:55.386>and <00:31:55.852>it's <00:31:56.319>path.of <00:31:56.786>file.

540
00:31:59.886 --> 00:32:03.226
<00:31:59.886>And <00:32:00.166>we <00:32:00.446>say <00:32:00.726>for <00:32:01.005>each <00:32:01.286>it...

541
00:32:04.266 --> 00:32:04.946
<00:32:04.266>No <00:32:04.470>need <00:32:04.674>for <00:32:04.878>it.

542
00:32:07.246 --> 00:32:08.226
<00:32:07.246>Print <00:32:08.128>line.

543
00:32:09.706 --> 00:32:12.996
<00:32:09.706>And <00:32:09.813>here <00:32:09.921>we <00:32:10.029>go. <00:32:10.136>Read <00:32:10.244>all <00:32:10.352>lines, <00:32:10.459>and <00:32:10.567>each <00:32:10.675>line <00:32:10.782>we <00:32:10.890>print <00:32:10.998>to <00:32:11.106>the

544
00:32:13.046 --> 00:32:14.046
output.

545
00:32:16.546 --> 00:32:18.386
<00:32:16.546>So <00:32:17.012>let's <00:32:17.479>run <00:32:17.946>it.

546
00:32:20.486 --> 00:32:21.066
<00:32:20.486>And <00:32:21.008>say

547
00:32:22.486 --> 00:32:24.526
<00:32:22.486>we <00:32:22.836>just <00:32:23.186>print <00:32:23.536>it <00:32:23.886>itself.

548
00:32:25.506 --> 00:32:29.426
<00:32:25.506>And <00:32:25.633>here <00:32:25.760>we <00:32:25.887>go. <00:32:26.015>It <00:32:26.142>works. <00:32:26.269>It <00:32:26.396>can <00:32:26.524>print <00:32:26.651>itself <00:32:26.778>out <00:32:26.906>into

549
00:32:29.446 --> 00:32:29.866
<00:32:29.446>the <00:32:29.824>terminal.

550
00:32:30.846 --> 00:32:32.566
<00:32:30.846>And <00:32:31.079>if <00:32:31.312>we, <00:32:31.546>for <00:32:31.779>example, <00:32:32.012>say <00:32:32.246>help,

551
00:32:33.766 --> 00:32:35.886
<00:32:33.766>it <00:32:33.941>also <00:32:34.116>says <00:32:34.291>this <00:32:34.466>is <00:32:34.641>the <00:32:34.816>file <00:32:34.991>to <00:32:35.166>print.

552
00:32:36.106 --> 00:32:38.186
<00:32:36.106>So <00:32:36.456>our <00:32:36.806>description <00:32:37.156>actually <00:32:37.506>changed.

553
00:32:39.626 --> 00:32:39.806
Nice.

554
00:32:41.006 --> 00:32:43.626
<00:32:41.006>But <00:32:41.206>this <00:32:41.406>is <00:32:41.606>still <00:32:41.806>kind <00:32:42.006>of <00:32:42.206>simple. <00:32:42.406>So

555
00:32:45.286 --> 00:32:47.126
<00:32:45.286>let's <00:32:45.486>just <00:32:45.686>make <00:32:45.886>it <00:32:46.086>a <00:32:46.286>little <00:32:46.486>more <00:32:46.686>difficult.

556
00:32:47.826 --> 00:32:48.026
So

557
00:32:49.065 --> 00:32:52.826
<00:32:49.065>the <00:32:49.265>cat, <00:32:49.465>for <00:32:49.665>example, <00:32:49.865>has <00:32:50.065>a <00:32:50.265>parameter <00:32:50.465>-n

558
00:32:52.926 --> 00:32:53.626
<00:32:52.926>for <00:32:53.556>number.

559
00:32:55.646 --> 00:32:57.176
<00:32:55.646>And <00:32:55.921>it <00:32:56.196>lets <00:32:56.472>you <00:32:56.747>print <00:32:57.023>out

560
00:32:57.986 --> 00:33:00.546
<00:32:57.986>the <00:32:58.086>file <00:32:58.186>with <00:32:58.286>line <00:32:58.386>numbers, <00:32:58.486>and <00:32:58.586>you <00:32:58.686>see <00:32:58.786>it <00:32:58.886>on <00:32:58.986>the <00:32:59.086>left <00:32:59.186>side <00:32:59.286>over <00:32:59.386>here.

561
00:33:02.426 --> 00:33:06.046
<00:33:02.426>So <00:33:02.553>let's <00:33:02.680>try <00:33:02.807>to <00:33:02.935>reuse <00:33:03.062>that <00:33:03.189>behavior <00:33:03.316>and <00:33:03.444>actually <00:33:03.571>make <00:33:03.698>our <00:33:03.826>CLI

562
00:33:06.086 --> 00:33:07.056
<00:33:06.086>application <00:33:06.377>a <00:33:06.668>little <00:33:06.959>more

563
00:33:08.946 --> 00:33:12.846
<00:33:08.946>difficult <00:33:09.226>or <00:33:09.505>more <00:33:09.785>complex, <00:33:10.065>more <00:33:10.346>sophisticated,

564
00:33:12.946 --> 00:33:13.526
<00:33:12.946>you <00:33:13.206>name <00:33:13.468>it.

565
00:33:16.466 --> 00:33:16.946
<00:33:16.466>So <00:33:16.898>what

566
00:33:17.826 --> 00:33:21.106
<00:33:17.826>we <00:33:17.981>now <00:33:18.137>need <00:33:18.292>here <00:33:18.448>is <00:33:18.603>not <00:33:18.759>parameter, <00:33:18.914>but <00:33:19.070>an <00:33:19.226>option.

567
00:33:21.826 --> 00:33:24.116
<00:33:21.826>And <00:33:21.981>we <00:33:22.137>can <00:33:22.292>just <00:33:22.448>declare <00:33:22.603>it <00:33:22.759>like <00:33:22.914>this, <00:33:23.070>add <00:33:23.226>option,

568
00:33:25.046 --> 00:33:26.926
<00:33:25.046>and <00:33:25.512>say <00:33:25.979>the <00:33:26.446>names.

569
00:33:29.206 --> 00:33:30.506
<00:33:29.206>It's <00:33:29.596>actually <00:33:29.986>an <00:33:30.376>array.

570
00:33:32.626 --> 00:33:35.006
<00:33:32.626>It <00:33:32.976>can <00:33:33.326>be <00:33:33.676>-n <00:33:34.026>or

571
00:33:35.786 --> 00:33:37.266
--number.

572
00:33:38.366 --> 00:33:41.666
<00:33:38.366>And <00:33:38.599>it's <00:33:38.832>just <00:33:39.066>a <00:33:39.299>Boolean <00:33:39.532>flag. <00:33:39.766>Help

573
00:33:44.246 --> 00:33:44.666
number.

574
00:33:48.646 --> 00:33:51.606
<00:33:48.646>And <00:33:48.879>now <00:33:49.112>we <00:33:49.346>have <00:33:49.579>to <00:33:49.812>respect <00:33:50.046>also

575
00:33:51.686 --> 00:33:55.566
printing

576
00:33:55.586 --> 00:33:56.106
<00:33:55.586>the <00:33:56.054>numbers.

577
00:33:57.166 --> 00:33:59.966
<00:33:57.166>So <00:33:57.282>we're <00:33:57.399>going <00:33:57.515>to <00:33:57.632>remove <00:33:57.749>some <00:33:57.866>stuff <00:33:57.982>here <00:33:58.099>and <00:33:58.216>add <00:33:58.332>some <00:33:58.449>new <00:33:58.566>stuff.

578
00:34:00.696 --> 00:34:03.506
<00:34:00.696>Actually <00:34:00.929>read <00:34:01.162>the <00:34:01.396>lines <00:34:01.629>into <00:34:01.862>a <00:34:02.096>variable,

579
00:34:05.346 --> 00:34:06.886
<00:34:05.346>and <00:34:05.692>iterate <00:34:06.039>over <00:34:06.385>them. <00:34:06.732>So,

580
00:34:12.667 --> 00:34:16.586
<00:34:12.667>it's <00:34:13.016>smaller <00:34:13.366>lines. <00:34:13.717>Size <00:34:14.067>is...

581
00:34:21.647 --> 00:34:22.147
<00:34:21.647>Here <00:34:21.871>we <00:34:22.096>go.

582
00:34:23.406 --> 00:34:27.366
<00:34:23.406>And <00:34:23.545>now <00:34:23.686>to <00:34:23.826>actually <00:34:23.966>get <00:34:24.105>the <00:34:24.246>old <00:34:24.386>behavior <00:34:24.525>back, <00:34:24.666>we <00:34:24.806>just

583
00:34:27.406 --> 00:34:30.226
<00:34:27.406>have <00:34:27.872>to <00:34:28.339>say <00:34:28.806>io.printline

584
00:34:30.586 --> 00:34:32.556
<00:34:30.585>lines.get <00:34:31.985>i.

585
00:34:34.546 --> 00:34:36.246
<00:34:34.545>Here <00:34:34.779>we <00:34:35.012>are. <00:34:35.245>That's <00:34:35.479>the <00:34:35.712>old <00:34:35.946>behavior.

586
00:34:36.886 --> 00:34:38.906
<00:34:36.886>But <00:34:37.085>we <00:34:37.286>want <00:34:37.485>to <00:34:37.686>print <00:34:37.886>the <00:34:38.085>numbers, <00:34:38.286>right?

587
00:34:39.826 --> 00:34:42.627
<00:34:39.826>So <00:34:39.966>we <00:34:40.106>just <00:34:40.246>make <00:34:40.386>a <00:34:40.525>simple <00:34:40.666>if <00:34:40.806>over <00:34:40.946>here. <00:34:41.086>If <00:34:41.226>number.

588
00:34:43.966 --> 00:34:45.486
<00:34:43.966>No <00:34:44.239>curly <00:34:44.513>brackets <00:34:44.786>in <00:34:45.060>scripting, <00:34:45.333>right?

589
00:34:47.926 --> 00:34:51.766
<00:34:47.926>If <00:34:48.101>the <00:34:48.275>number <00:34:48.451>is <00:34:48.625>there, <00:34:48.801>we <00:34:48.976>say <00:34:49.150>io.print, <00:34:49.326>not

590
00:34:51.806 --> 00:34:54.386
<00:34:51.806>print <00:34:51.981>line <00:34:52.156>to <00:34:52.331>keep <00:34:52.505>it <00:34:52.681>in <00:34:52.856>the <00:34:53.031>same <00:34:53.206>line

591
00:34:55.346 --> 00:34:59.186
<00:34:55.346>and <00:34:55.453>say, <00:34:55.561>I <00:34:55.669>make <00:34:55.776>some <00:34:55.884>spacing <00:34:55.992>in <00:34:56.099>there <00:34:56.207>to <00:34:56.315>get <00:34:56.422>some <00:34:56.530>distance <00:34:56.638>between <00:34:56.746>the

592
00:34:59.205 --> 00:35:00.566
<00:34:59.205>line <00:34:59.449>number <00:34:59.694>and <00:34:59.939>the <00:35:00.184>actual <00:35:00.429>code.

593
00:35:02.286 --> 00:35:02.926
<00:35:02.286>So <00:35:02.478>here <00:35:02.670>we <00:35:02.862>are,

594
00:35:04.506 --> 00:35:08.446
<00:35:04.506>done <00:35:04.705>that, <00:35:04.906>and <00:35:05.106>let's <00:35:05.306>run <00:35:05.506>our <00:35:05.705>cat <00:35:05.906>application

595
00:35:08.486 --> 00:35:12.326
<00:35:08.486>again <00:35:08.661>with <00:35:08.836>line <00:35:09.011>numbers, <00:35:09.185>and <00:35:09.361>there <00:35:09.536>are <00:35:09.711>no <00:35:09.886>line

596
00:35:12.386 --> 00:35:15.926
<00:35:12.386>numbers. <00:35:12.561>Why? <00:35:12.736>Because <00:35:12.911>we <00:35:13.086>didn't <00:35:13.261>specify <00:35:13.436>the <00:35:13.611>parameter, <00:35:13.786>right?

597
00:35:16.706 --> 00:35:17.766
<00:35:16.706>So <00:35:16.944>let's <00:35:17.183>add <00:35:17.421>the <00:35:17.660>parameter.

598
00:35:19.146 --> 00:35:20.346
<00:35:19.146>Let's <00:35:19.362>put <00:35:19.578>a <00:35:19.794>-n <00:35:20.010>in <00:35:20.226>there.

599
00:35:21.596 --> 00:35:23.786
<00:35:21.596>And <00:35:21.771>here <00:35:21.946>we <00:35:22.121>go. <00:35:22.296>There <00:35:22.471>we <00:35:22.646>have <00:35:22.821>line <00:35:22.996>numbers.

600
00:35:26.246 --> 00:35:29.286
<00:35:26.246>And <00:35:26.421>also <00:35:26.596>when <00:35:26.771>we <00:35:26.946>do <00:35:27.121>something <00:35:27.296>like <00:35:27.471>help <00:35:27.646>now,

601
00:35:32.926 --> 00:35:34.976
<00:35:32.926>you <00:35:33.101>see <00:35:33.276>that <00:35:33.451>there's <00:35:33.625>this <00:35:33.801>number <00:35:33.976>over <00:35:34.151>here <00:35:34.326>now.

602
00:35:35.206 --> 00:35:38.546
<00:35:35.206>And <00:35:35.333>we <00:35:35.460>can <00:35:35.587>make <00:35:35.715>it <00:35:35.842>pretty. <00:35:35.969>We <00:35:36.096>can <00:35:36.224>put <00:35:36.351>a <00:35:36.478>description <00:35:36.606>there.

603
00:35:38.586 --> 00:35:39.526
<00:35:38.586>It's <00:35:39.009>super <00:35:39.432>simple.

604
00:35:42.986 --> 00:35:43.966
<00:35:42.986>Let's <00:35:43.279>do <00:35:43.574>that <00:35:43.868>quickly.

605
00:35:46.626 --> 00:35:48.066
<00:35:46.626>Say <00:35:47.922>description,

606
00:35:50.406 --> 00:35:53.886
<00:35:50.406>print <00:35:50.872>with <00:35:51.339>line <00:35:51.806>numbers.

607
00:35:56.646 --> 00:35:57.826
<00:35:56.646>Save <00:35:57.177>it <00:35:57.708>and

608
00:35:59.586 --> 00:36:01.626
<00:35:59.586>print <00:35:59.761>it <00:35:59.935>again <00:36:00.111>with <00:36:00.285>help. <00:36:00.461>And <00:36:00.636>here <00:36:00.810>we <00:36:00.986>have

609
00:36:02.466 --> 00:36:04.766
<00:36:02.466>the <00:36:02.641>number <00:36:02.816>option, <00:36:02.991>which <00:36:03.165>says <00:36:03.341>printed <00:36:03.516>with <00:36:03.691>line <00:36:03.866>numbers.

610
00:36:05.446 --> 00:36:05.546
So

611
00:36:06.466 --> 00:36:06.726
nice.

612
00:36:08.386 --> 00:36:11.066
<00:36:08.386>We <00:36:08.526>can <00:36:08.666>actually <00:36:08.806>write <00:36:08.946>CLI <00:36:09.086>applications <00:36:09.226>in <00:36:09.366>Java, <00:36:09.506>and <00:36:09.646>it's <00:36:09.786>easy.

613
00:36:11.926 --> 00:36:12.546
<00:36:11.926>Who <00:36:12.112>would <00:36:12.298>have <00:36:12.484>thought?

614
00:36:13.726 --> 00:36:14.026
But

615
00:36:15.006 --> 00:36:18.846
<00:36:15.006>let's <00:36:15.286>test <00:36:15.566>our <00:36:15.846>luck <00:36:16.125>a <00:36:16.406>little

616
00:36:18.886 --> 00:36:22.746
<00:36:18.886>more. <00:36:19.086>Can <00:36:19.286>we <00:36:19.486>write <00:36:19.686>more <00:36:19.886>complex <00:36:20.086>applications <00:36:20.286>for

617
00:36:22.826 --> 00:36:24.006
<00:36:22.826>Java <00:36:23.180>on <00:36:23.534>the <00:36:23.888>CLI?

618
00:36:25.086 --> 00:36:27.886
<00:36:25.086>What <00:36:25.261>about <00:36:25.435>TUI <00:36:25.611>applications? <00:36:25.785>Can <00:36:25.961>we <00:36:26.136>write <00:36:26.310>TUI <00:36:26.486>applications?

619
00:36:29.866 --> 00:36:32.366
<00:36:29.866>And <00:36:30.006>most <00:36:30.146>of <00:36:30.286>you <00:36:30.426>probably <00:36:30.566>know <00:36:30.706>what <00:36:30.846>the <00:36:30.986>TUI <00:36:31.126>application <00:36:31.266>is.

620
00:36:33.626 --> 00:36:37.126
<00:36:33.626>This <00:36:33.801>is <00:36:33.976>htop. <00:36:34.151>This <00:36:34.326>is <00:36:34.501>like <00:36:34.676>the <00:36:34.851>Linux <00:36:35.026>task

621
00:36:37.186 --> 00:36:37.646
manager,

622
00:36:38.526 --> 00:36:41.866
<00:36:38.526>where <00:36:38.725>you <00:36:38.926>can <00:36:39.125>see <00:36:39.326>your <00:36:39.526>resources <00:36:39.725>like <00:36:39.926>CPU,

623
00:36:42.206 --> 00:36:42.546
RAM.

624
00:36:43.906 --> 00:36:46.746
<00:36:43.906>But <00:36:44.006>you <00:36:44.106>can <00:36:44.206>also <00:36:44.306>see <00:36:44.406>all <00:36:44.506>the <00:36:44.606>running <00:36:44.706>processes, <00:36:44.806>and <00:36:44.906>you <00:36:45.006>could, <00:36:45.106>for <00:36:45.206>example, <00:36:45.306>kill

625
00:36:46.806 --> 00:36:49.756
<00:36:46.806>them. <00:36:47.006>Really <00:36:47.206>similar <00:36:47.406>to <00:36:47.606>the <00:36:47.806>Windows <00:36:48.006>task <00:36:48.206>manager.

626
00:36:51.196 --> 00:36:52.496
<00:36:51.196>And <00:36:51.430>this <00:36:51.663>is <00:36:51.898>like <00:36:52.132>a <00:36:52.366>classical

627
00:36:53.456 --> 00:36:56.976
<00:36:53.456>TUI <00:36:53.563>application <00:36:53.671>because <00:36:53.779>it <00:36:53.886>pops <00:36:53.994>up <00:36:54.102>in <00:36:54.209>your <00:36:54.317>terminal, <00:36:54.425>and <00:36:54.532>when <00:36:54.640>you <00:36:54.748>close <00:36:54.856>it,

628
00:36:57.616 --> 00:36:58.716
<00:36:57.616>it's <00:36:57.814>like <00:36:58.012>it <00:36:58.210>was <00:36:58.408>never <00:36:58.606>there.

629
00:37:00.476 --> 00:37:04.356
<00:37:00.476>And <00:37:00.616>we <00:37:00.756>can <00:37:00.896>write <00:37:01.036>nice <00:37:01.176>TUI <00:37:01.316>applications <00:37:01.456>in <00:37:01.596>Java <00:37:01.736>as <00:37:01.876>well.

630
00:37:05.136 --> 00:37:07.976
<00:37:05.136>We're <00:37:05.291>going <00:37:05.447>to <00:37:05.602>make <00:37:05.758>it <00:37:05.913>a <00:37:06.069>little <00:37:06.224>simpler, <00:37:06.380>but <00:37:06.536>let's

631
00:37:09.056 --> 00:37:11.776
<00:37:09.056>show <00:37:09.183>you <00:37:09.310>something. <00:37:09.437>And <00:37:09.565>what <00:37:09.692>I <00:37:09.819>want <00:37:09.946>to <00:37:10.074>show <00:37:10.201>you <00:37:10.328>is <00:37:10.456>Tambui.

632
00:37:12.896 --> 00:37:13.816
<00:37:12.896>Tambui <00:37:13.723>is

633
00:37:15.036 --> 00:37:17.476
<00:37:15.036>a <00:37:15.502>library <00:37:15.969>to <00:37:16.436>actually

634
00:37:19.776 --> 00:37:23.736
<00:37:19.776>write <00:37:19.951>TUI <00:37:20.125>applications <00:37:20.301>for <00:37:20.475>Java. <00:37:20.651>And <00:37:20.826>the <00:37:21.000>syntax, <00:37:21.176>the

635
00:37:23.796 --> 00:37:24.465
<00:37:23.796>usage <00:37:23.996>is <00:37:24.197>a <00:37:24.398>little

636
00:37:25.676 --> 00:37:29.456
<00:37:25.676>similar <00:37:25.803>to <00:37:25.930>Rust's <00:37:26.057>rato-tui. <00:37:26.185>It's <00:37:26.312>heavily <00:37:26.439>inspired <00:37:26.566>by <00:37:26.694>it <00:37:26.821>and <00:37:26.948>also <00:37:27.076>by

637
00:37:29.476 --> 00:37:30.816
<00:37:29.476>Python <00:37:30.079>Textual. <00:37:30.682>But

638
00:37:33.676 --> 00:37:37.546
<00:37:33.676>declaring <00:37:33.792>your <00:37:33.909>UIs <00:37:34.026>is <00:37:34.142>a <00:37:34.259>little <00:37:34.375>nicer <00:37:34.492>because <00:37:34.609>you <00:37:34.726>can <00:37:34.842>actually <00:37:34.959>use <00:37:35.076>CSS

639
00:37:37.546 --> 00:37:37.896
styling,

640
00:37:39.516 --> 00:37:41.076
<00:37:39.516>which <00:37:39.716>I <00:37:39.916>think <00:37:40.116>is <00:37:40.316>a <00:37:40.516>really <00:37:40.716>great <00:37:40.916>thing.

641
00:37:43.316 --> 00:37:47.266
<00:37:43.316>And <00:37:43.423>by <00:37:43.531>the <00:37:43.639>way, <00:37:43.746>small <00:37:43.854>fun <00:37:43.962>fact, <00:37:44.069>it's <00:37:44.177>been <00:37:44.285>written <00:37:44.392>by <00:37:44.500>the <00:37:44.608>same <00:37:44.716>guy

642
00:37:47.336 --> 00:37:51.256
<00:37:47.336>who <00:37:47.463>actually <00:37:47.590>wrote <00:37:47.717>JBang, <00:37:47.845>so <00:37:47.972>the <00:37:48.099>integration <00:37:48.226>is <00:37:48.354>also <00:37:48.481>kind <00:37:48.608>of <00:37:48.736>tied

643
00:37:51.316 --> 00:37:51.576
<00:37:51.316>to <00:37:51.550>it.

644
00:37:56.756 --> 00:38:00.476
<00:37:56.756>It's <00:37:56.883>a <00:37:57.010>little <00:37:57.137>more <00:37:57.265>complex <00:37:57.392>than <00:37:57.519>just <00:37:57.646>scripting, <00:37:57.774>so <00:37:57.901>I <00:37:58.028>actually <00:37:58.156>already

645
00:38:00.556 --> 00:38:02.616
<00:38:00.556>prepared <00:38:00.731>it <00:38:00.906>for <00:38:01.081>you, <00:38:01.256>and <00:38:01.431>I <00:38:01.606>got <00:38:01.781>it <00:38:01.956>here.

646
00:38:03.256 --> 00:38:05.056
<00:38:03.256>Let <00:38:03.431>me <00:38:03.606>just <00:38:03.781>show <00:38:03.955>it <00:38:04.131>quickly <00:38:04.306>for <00:38:04.481>a <00:38:04.656>second.

647
00:38:05.656 --> 00:38:09.576
<00:38:05.656>What <00:38:05.811>I <00:38:05.967>did <00:38:06.122>is <00:38:06.278>I <00:38:06.433>ported <00:38:06.589>our <00:38:06.744>cat <00:38:06.900>fact <00:38:07.056>application

648
00:38:09.636 --> 00:38:11.356
<00:38:09.636>as <00:38:09.986>a <00:38:10.336>TUI <00:38:10.686>application. <00:38:11.036>So

649
00:38:13.736 --> 00:38:15.896
<00:38:13.736>let's <00:38:13.935>just <00:38:14.136>run <00:38:14.336>it. <00:38:14.536>I <00:38:14.736>can't <00:38:14.935>run <00:38:15.136>it.

650
00:38:16.756 --> 00:38:18.376
<00:38:16.756>Then <00:38:16.989>I'm <00:38:17.222>going <00:38:17.455>to <00:38:17.689>run <00:38:17.922>with <00:38:18.156>JBang,

651
00:38:20.216 --> 00:38:20.676
<00:38:20.216>like <00:38:20.630>that.

652
00:38:21.956 --> 00:38:22.336
<00:38:21.956>Here <00:38:22.127>we <00:38:22.298>go.

653
00:38:23.576 --> 00:38:26.476
<00:38:23.576>And <00:38:23.809>we <00:38:24.042>get <00:38:24.276>the <00:38:24.509>cat <00:38:24.742>fact <00:38:24.976>application.

654
00:38:27.056 --> 00:38:30.556
<00:38:27.056>I'm <00:38:27.149>just <00:38:27.242>going <00:38:27.336>to <00:38:27.429>move <00:38:27.522>my <00:38:27.616>picture <00:38:27.709>over <00:38:27.802>here <00:38:27.896>so <00:38:27.989>you <00:38:28.082>can <00:38:28.176>see <00:38:28.269>it <00:38:28.362>a <00:38:28.456>little

655
00:38:30.566 --> 00:38:31.556
better.

656
00:38:33.856 --> 00:38:36.956
<00:38:33.856>At <00:38:33.972>the <00:38:34.089>top, <00:38:34.206>we <00:38:34.322>have <00:38:34.439>the <00:38:34.556>cat <00:38:34.672>fact, <00:38:34.789>like <00:38:34.906>a <00:38:35.022>small <00:38:35.139>little <00:38:35.256>banner.

657
00:38:38.356 --> 00:38:40.996
<00:38:38.356>And <00:38:38.496>then <00:38:38.636>we <00:38:38.776>get <00:38:38.916>the <00:38:39.056>fact, <00:38:39.196>and <00:38:39.336>then <00:38:39.476>we <00:38:39.616>get <00:38:39.756>some

658
00:38:42.996 --> 00:38:44.996
<00:38:42.996>hints <00:38:43.346>about <00:38:43.696>the <00:38:44.046>usage <00:38:44.396>of

659
00:38:45.836 --> 00:38:46.436
<00:38:45.836>the <00:38:46.376>application,

660
00:38:48.136 --> 00:38:50.456
<00:38:48.136>which <00:38:48.336>means <00:38:48.536>we <00:38:48.736>can <00:38:48.936>use <00:38:49.136>Q <00:38:49.336>to <00:38:49.536>quit

661
00:38:52.576 --> 00:38:53.806
<00:38:52.576>or <00:38:52.945>any <00:38:53.314>other <00:38:53.683>key

662
00:38:54.836 --> 00:38:55.796
<00:38:54.836>to <00:38:55.051>get <00:38:55.268>another <00:38:55.484>cat <00:38:55.700>fact.

663
00:38:56.796 --> 00:38:59.396
<00:38:56.796>Our <00:38:56.971>cat <00:38:57.145>fact <00:38:57.321>is <00:38:57.495>cats <00:38:57.671>have <00:38:57.846>300 <00:38:58.020>million <00:38:58.196>neurons.

664
00:39:00.176 --> 00:39:02.096
<00:39:00.176>Dogs <00:39:00.526>have <00:39:00.875>about <00:39:01.226>160 <00:39:01.576>million.

665
00:39:04.036 --> 00:39:07.176
<00:39:04.036>Well, <00:39:04.176>who <00:39:04.316>would've <00:39:04.456>thought? <00:39:04.596>But <00:39:04.736>I <00:39:04.876>don't <00:39:05.016>know <00:39:05.156>if <00:39:05.296>size <00:39:05.436>matters.

666
00:39:07.876 --> 00:39:11.716
<00:39:07.876>But <00:39:08.051>yeah, <00:39:08.226>as <00:39:08.401>I <00:39:08.576>said, <00:39:08.751>let's <00:39:08.926>hit <00:39:09.101>some <00:39:09.276>other

667
00:39:11.736 --> 00:39:15.686
<00:39:11.736>keys, <00:39:11.852>and <00:39:11.969>we <00:39:12.086>get <00:39:12.202>another <00:39:12.319>cat <00:39:12.435>fact. <00:39:12.552>So <00:39:12.669>lots <00:39:12.786>of <00:39:12.902>things <00:39:13.019>to <00:39:13.136>read

668
00:39:15.756 --> 00:39:19.476
<00:39:15.756>for <00:39:15.931>you <00:39:16.106>guys. <00:39:16.281>You <00:39:16.455>can <00:39:16.631>just <00:39:16.806>pause <00:39:16.981>or <00:39:17.156>whatever

669
00:39:19.656 --> 00:39:22.436
<00:39:19.656>and <00:39:19.831>enjoy <00:39:20.006>as <00:39:20.181>many <00:39:20.356>cat <00:39:20.531>facts <00:39:20.706>as <00:39:20.881>you <00:39:21.056>want.

670
00:39:24.116 --> 00:39:27.126
<00:39:24.116>But <00:39:24.256>let's <00:39:24.396>check <00:39:24.536>the <00:39:24.676>application <00:39:24.816>now, <00:39:24.956>how <00:39:25.096>it <00:39:25.236>actually <00:39:25.376>is <00:39:25.516>written.

671
00:39:28.276 --> 00:39:30.236
<00:39:28.276>So <00:39:28.975>JBang <00:39:29.676>edit

672
00:39:33.876 --> 00:39:34.776
get-cat-facts.

673
00:39:41.196 --> 00:39:41.516
So

674
00:39:42.756 --> 00:39:46.416
<00:39:42.756>what <00:39:42.931>we <00:39:43.106>have <00:39:43.281>here, <00:39:43.455>we <00:39:43.631>have <00:39:43.806>some <00:39:43.981>Tambui <00:39:44.156>dependencies.

675
00:39:47.296 --> 00:39:51.256
<00:39:47.296>We <00:39:47.395>also <00:39:47.495>see <00:39:47.596>the <00:39:47.696>Jackson <00:39:47.796>node <00:39:47.895>auth <00:39:47.995>dependency <00:39:48.096>once <00:39:48.196>again, <00:39:48.296>just <00:39:48.395>some <00:39:48.495>reusage <00:39:48.596>of <00:39:48.696>the

676
00:39:51.296 --> 00:39:54.996
<00:39:51.296>old <00:39:51.403>script. <00:39:51.511>And <00:39:51.619>we <00:39:51.726>have <00:39:51.834>some <00:39:51.942>native <00:39:52.049>options <00:39:52.157>because <00:39:52.265>I <00:39:52.372>want <00:39:52.480>to <00:39:52.588>show <00:39:52.696>you

677
00:39:55.076 --> 00:39:57.116
<00:39:55.076>the <00:39:55.426>native <00:39:55.776>image <00:39:56.126>generation <00:39:56.476>later.

678
00:40:00.656 --> 00:40:02.236
<00:40:00.656>Then <00:40:00.936>lots <00:40:01.216>of <00:40:01.496>imports <00:40:01.776>over <00:40:02.056>here.

679
00:40:03.276 --> 00:40:05.016
<00:40:03.276>But <00:40:03.509>the <00:40:03.742>interesting <00:40:03.975>stuff <00:40:04.209>starts <00:40:04.442>over <00:40:04.676>here.

680
00:40:05.596 --> 00:40:09.376
<00:40:05.596>So <00:40:05.723>we <00:40:05.850>have <00:40:05.977>a <00:40:06.105>banner <00:40:06.232>here, <00:40:06.359>and <00:40:06.486>the <00:40:06.614>banner <00:40:06.741>is <00:40:06.868>used <00:40:06.996>over

681
00:40:09.436 --> 00:40:13.416
<00:40:09.436>here. <00:40:09.518>We <00:40:09.600>have <00:40:09.683>a <00:40:09.765>rich <00:40:09.847>text <00:40:09.930>area <00:40:10.012>where <00:40:10.094>we <00:40:10.177>just <00:40:10.259>say, <00:40:10.341>"Hey, <00:40:10.424>print <00:40:10.506>it <00:40:10.588>in <00:40:10.671>bold <00:40:10.753>and <00:40:10.836>in

682
00:40:13.456 --> 00:40:14.516
<00:40:13.456>blue," <00:40:13.933>or <00:40:14.410>cyan.

683
00:40:15.936 --> 00:40:18.816
<00:40:15.936>And <00:40:16.111>then <00:40:16.286>we <00:40:16.461>put <00:40:16.636>the <00:40:16.811>cat <00:40:16.986>fact <00:40:17.161>in <00:40:17.336>here.

684
00:40:19.556 --> 00:40:22.796
<00:40:19.556>And <00:40:19.756>there's <00:40:19.956>some <00:40:20.156>simple <00:40:20.356>component <00:40:20.556>with <00:40:20.756>text <00:40:20.956>wrap.

685
00:40:24.536 --> 00:40:28.416
<00:40:24.536>And <00:40:24.676>here <00:40:24.816>is <00:40:24.956>very <00:40:25.096>simple <00:40:25.236>text <00:40:25.376>with <00:40:25.516>how <00:40:25.656>to <00:40:25.796>use <00:40:25.936>the

686
00:40:28.436 --> 00:40:29.036
application.

687
00:40:31.796 --> 00:40:35.556
<00:40:31.796>And <00:40:31.923>in <00:40:32.050>the <00:40:32.177>end <00:40:32.305>is <00:40:32.432>the <00:40:32.559>key <00:40:32.686>handling. <00:40:32.814>And <00:40:32.941>the <00:40:33.068>key <00:40:33.196>handling

688
00:40:35.676 --> 00:40:37.196
<00:40:35.676>is <00:40:36.360>pretty <00:40:37.044>simple.

689
00:40:38.316 --> 00:40:41.566
<00:40:38.316>We <00:40:38.596>say <00:40:38.875>everything <00:40:39.156>with <00:40:39.435>Control <00:40:39.716>+

690
00:40:41.616 --> 00:40:42.956
<00:40:41.616>C <00:40:42.018>or <00:40:42.420>when <00:40:42.822>the

691
00:40:44.156 --> 00:40:47.256
<00:40:44.156>char <00:40:44.296>Q <00:40:44.436>is <00:40:44.576>hit, <00:40:44.716>then <00:40:44.856>we <00:40:44.996>don't <00:40:45.136>want <00:40:45.276>to <00:40:45.416>handle <00:40:45.556>it.

692
00:40:47.416 --> 00:40:49.696
<00:40:47.416>Then <00:40:47.556>we <00:40:47.696>let <00:40:47.836>the <00:40:47.976>framework <00:40:48.116>handle <00:40:48.256>it <00:40:48.396>and <00:40:48.536>do <00:40:48.676>the <00:40:48.816>quit.

693
00:40:51.036 --> 00:40:55.016
<00:40:51.036>And <00:40:51.152>in <00:40:51.269>all <00:40:51.386>other <00:40:51.502>cases, <00:40:51.619>we <00:40:51.736>get <00:40:51.852>another <00:40:51.969>cat <00:40:52.086>fact, <00:40:52.202>and <00:40:52.319>this <00:40:52.436>gets

694
00:40:55.056 --> 00:40:55.556
displayed.

695
00:40:56.536 --> 00:40:57.956
<00:40:56.536>And <00:40:56.749>this <00:40:56.962>syntax <00:40:57.175>you <00:40:57.388>probably <00:40:57.601>already <00:40:57.814>know,

696
00:40:59.576 --> 00:41:00.896
<00:40:59.576>if <00:40:59.774>you <00:40:59.972>have <00:41:00.170>paid <00:41:00.368>attention <00:41:00.566>at <00:41:00.764>least.

697
00:41:02.376 --> 00:41:06.276
<00:41:02.376>It's <00:41:02.503>just <00:41:02.630>the <00:41:02.757>HTTP <00:41:02.885>logic <00:41:03.012>on <00:41:03.139>how <00:41:03.266>to <00:41:03.394>get <00:41:03.521>the <00:41:03.648>cat <00:41:03.776>fact.

698
00:41:07.976 --> 00:41:09.115
<00:41:07.976>So <00:41:09.001>simple

699
00:41:10.336 --> 00:41:13.796
<00:41:10.336>application, <00:41:10.463>but <00:41:10.590>it <00:41:10.717>runs <00:41:10.845>in <00:41:10.972>the <00:41:11.099>terminal <00:41:11.226>and <00:41:11.354>is <00:41:11.481>written <00:41:11.608>in <00:41:11.736>Java.

700
00:41:14.336 --> 00:41:14.636
Nice.

701
00:41:17.556 --> 00:41:21.016
<00:41:17.556>I <00:41:17.683>do <00:41:17.810>have <00:41:17.937>some <00:41:18.065>more <00:41:18.192>small <00:41:18.319>things <00:41:18.446>I <00:41:18.574>can <00:41:18.701>show <00:41:18.828>you <00:41:18.956>about

702
00:41:21.056 --> 00:41:24.196
<00:41:21.056>JBang. <00:41:21.406>So <00:41:21.756>for <00:41:22.106>example, <00:41:22.456>native

703
00:41:24.896 --> 00:41:25.716
<00:41:24.896>image <00:41:25.634>compilation.

704
00:41:26.596 --> 00:41:29.816
<00:41:26.596>Already <00:41:26.771>did <00:41:26.946>it <00:41:27.121>because <00:41:27.296>it <00:41:27.471>takes <00:41:27.646>around <00:41:27.821>30 <00:41:27.996>seconds.

705
00:41:31.556 --> 00:41:33.936
<00:41:31.556>But <00:41:31.731>yeah, <00:41:31.906>it's <00:41:32.081>kind <00:41:32.256>of <00:41:32.431>simple <00:41:32.606>to <00:41:32.781>actually <00:41:32.956>start.

706
00:41:34.536 --> 00:41:38.276
<00:41:34.536>Just <00:41:34.636>use <00:41:34.736>the <00:41:34.836>native <00:41:34.936>flag. <00:41:35.036>I <00:41:35.136>already <00:41:35.236>did <00:41:35.336>the <00:41:35.436>native <00:41:35.536>image <00:41:35.636>compilation, <00:41:35.736>at <00:41:35.836>least <00:41:35.936>I

707
00:41:38.316 --> 00:41:42.016
<00:41:38.316>think. <00:41:38.423>Yeah, <00:41:38.531>here <00:41:38.639>we <00:41:38.746>go. <00:41:38.854>And <00:41:38.962>you <00:41:39.069>see <00:41:39.177>it <00:41:39.285>started <00:41:39.392>a <00:41:39.500>lot <00:41:39.608>quicker <00:41:39.716>than

708
00:41:42.076 --> 00:41:46.036
<00:41:42.076>before. <00:41:42.251>That's <00:41:42.426>because <00:41:42.601>it <00:41:42.776>is <00:41:42.951>just <00:41:43.126>a <00:41:43.301>single <00:41:43.476>binary

709
00:41:46.076 --> 00:41:49.496
<00:41:46.076>it <00:41:46.216>runs <00:41:46.356>now. <00:41:46.496>Does <00:41:46.636>no <00:41:46.776>checks <00:41:46.916>for <00:41:47.056>dependencies, <00:41:47.196>doesn't <00:41:47.336>compile <00:41:47.476>anything.

710
00:41:49.816 --> 00:41:51.456
<00:41:49.816>It's <00:41:50.165>just <00:41:50.515>running <00:41:50.866>straight <00:41:51.216>away.

711
00:41:54.556 --> 00:41:58.336
<00:41:54.556>And <00:41:54.711>it <00:41:54.867>also <00:41:55.022>tells <00:41:55.178>us <00:41:55.333>where <00:41:55.489>the <00:41:55.644>binary <00:41:55.800>is <00:41:55.956>located.

712
00:41:58.416 --> 00:42:00.826
<00:41:58.416>So <00:41:58.616>we <00:41:58.816>could, <00:41:59.016>for <00:41:59.216>example, <00:41:59.416>go <00:41:59.616>in <00:41:59.816>there

713
00:42:03.076 --> 00:42:04.476
<00:42:03.076>and <00:42:03.391>check <00:42:03.706>it <00:42:04.021>out. <00:42:04.336>So

714
00:42:07.356 --> 00:42:11.316
<00:42:07.356>and <00:42:07.456>here <00:42:07.556>you <00:42:07.656>see <00:42:07.756>there <00:42:07.856>is <00:42:07.956>the <00:42:08.056>Java <00:42:08.156>file <00:42:08.256>that's <00:42:08.356>built <00:42:08.456>and <00:42:08.556>also <00:42:08.656>the <00:42:08.756>binary,

715
00:42:11.496 --> 00:42:13.456
<00:42:11.496>which <00:42:11.962>is <00:42:12.429>37 <00:42:12.896>megabytes.

716
00:42:15.116 --> 00:42:18.576
<00:42:15.116>It <00:42:15.349>sounds <00:42:15.582>big, <00:42:15.816>but <00:42:16.049>actually <00:42:16.282>there <00:42:16.516>is

717
00:42:18.616 --> 00:42:21.436
<00:42:18.616>everything <00:42:18.816>else <00:42:19.016>you <00:42:19.216>need <00:42:19.416>in <00:42:19.616>there <00:42:19.816>to <00:42:20.016>run.

718
00:42:21.596 --> 00:42:24.436
<00:42:21.596>So <00:42:21.771>you <00:42:21.946>don't <00:42:22.121>need <00:42:22.296>a <00:42:22.471>JDK, <00:42:22.646>need <00:42:22.821>no <00:42:22.996>Java

719
00:42:24.836 --> 00:42:27.636
<00:42:24.836>SDK <00:42:25.116>or <00:42:25.395>anything <00:42:25.676>to <00:42:25.955>run <00:42:26.236>that.

720
00:42:29.676 --> 00:42:30.656
<00:42:29.676>Just <00:42:29.970>a <00:42:30.264>simple <00:42:30.558>binary,

721
00:42:31.556 --> 00:42:31.816
but

722
00:42:33.036 --> 00:42:34.836
<00:42:33.036>optimized <00:42:33.316>for <00:42:33.596>your <00:42:33.876>machine. <00:42:34.156>So <00:42:34.436>it's

723
00:42:36.316 --> 00:42:39.436
AMD

724
00:42:40.076 --> 00:42:43.936
<00:42:40.076>processor, <00:42:40.216>I <00:42:40.356>think. <00:42:40.496>If <00:42:40.636>you <00:42:40.776>got <00:42:40.916>a <00:42:41.056>Mac <00:42:41.196>with <00:42:41.336>an <00:42:41.476>ARM,

725
00:42:44.656 --> 00:42:46.036
<00:42:44.656>it's <00:42:44.833>not <00:42:45.010>going <00:42:45.188>to <00:42:45.365>run <00:42:45.543>on <00:42:45.720>your <00:42:45.898>machine.

726
00:42:46.076 --> 00:42:48.896
<00:42:46.076>Then <00:42:46.231>you <00:42:46.387>have <00:42:46.542>to <00:42:46.698>do <00:42:46.853>the <00:42:47.009>native <00:42:47.164>image <00:42:47.320>generation <00:42:47.476>yourself.

727
00:42:51.436 --> 00:42:53.096
<00:42:51.436>But <00:42:51.786>so <00:42:52.136>far, <00:42:52.486>so <00:42:52.836>good.

728
00:42:54.188 --> 00:42:56.808
<00:42:54.188>We <00:42:54.295>can <00:42:54.403>actually <00:42:54.511>make <00:42:54.618>it <00:42:54.726>quicker. <00:42:54.834>We <00:42:54.941>don't <00:42:55.049>need <00:42:55.157>JDK <00:42:55.264>to <00:42:55.372>run <00:42:55.480>it <00:42:55.588>anymore.

729
00:42:58.368 --> 00:43:01.828
<00:42:58.368>But <00:42:58.601>we <00:42:58.834>could <00:42:59.067>also <00:42:59.301>install <00:42:59.534>it <00:42:59.768>locally.

730
00:43:04.588 --> 00:43:08.388
<00:43:04.588>And <00:43:04.763>for <00:43:04.938>that, <00:43:05.113>we <00:43:05.288>have <00:43:05.463>the <00:43:05.638>JBang <00:43:05.813>app <00:43:05.988>install

731
00:43:08.468 --> 00:43:11.918
<00:43:08.468>command. <00:43:08.667>I <00:43:08.868>have <00:43:09.067>to <00:43:09.268>use <00:43:09.468>force <00:43:09.667>because <00:43:09.868>I

732
00:43:11.968 --> 00:43:13.447
<00:43:11.968>already <00:43:12.300>did <00:43:12.633>it <00:43:12.966>once <00:43:13.299>before.

733
00:43:14.788 --> 00:43:17.287
<00:43:14.788>Then <00:43:14.988>we <00:43:15.188>give <00:43:15.388>the <00:43:15.588>name <00:43:15.788>cat <00:43:15.988>fact <00:43:16.188>and

734
00:43:19.148 --> 00:43:20.888
<00:43:19.148>the <00:43:19.498>actual <00:43:19.848>script <00:43:20.198>to <00:43:20.548>execute.

735
00:43:23.348 --> 00:43:27.168
<00:43:23.348>And <00:43:23.475>with <00:43:23.602>that, <00:43:23.729>we <00:43:23.857>can <00:43:23.984>install <00:43:24.111>our <00:43:24.238>script <00:43:24.366>globally <00:43:24.493>and <00:43:24.620>now <00:43:24.748>call

736
00:43:27.208 --> 00:43:30.068
<00:43:27.208>it <00:43:27.408>with <00:43:27.608>the <00:43:27.808>name <00:43:28.008>cat <00:43:28.208>fact <00:43:28.408>from <00:43:28.608>anywhere.

737
00:43:30.868 --> 00:43:31.628
<00:43:30.868>So <00:43:31.096>let's <00:43:31.324>do <00:43:31.552>that.

738
00:43:32.828 --> 00:43:36.708
<00:43:32.828>And <00:43:32.983>I'll <00:43:33.139>just <00:43:33.294>go <00:43:33.450>here, <00:43:33.605>which <00:43:33.761>is <00:43:33.916>obviously <00:43:34.072>somewhere <00:43:34.228>else.

739
00:43:37.588 --> 00:43:39.108
<00:43:37.588>And <00:43:38.044>say <00:43:38.500>cat <00:43:38.956>fact.

740
00:43:40.568 --> 00:43:44.168
<00:43:40.568>And <00:43:40.768>now <00:43:40.968>our <00:43:41.168>cat <00:43:41.368>fact <00:43:41.568>application <00:43:41.768>starts <00:43:41.968>up.

741
00:43:49.228 --> 00:43:49.468
So,

742
00:43:52.668 --> 00:43:53.548
<00:43:52.668>let's <00:43:52.826>sum <00:43:52.984>it <00:43:53.143>up <00:43:53.301>a <00:43:53.460>little.

743
00:43:55.668 --> 00:43:57.218
<00:43:55.668>We <00:43:55.947>wrote <00:43:56.226>a <00:43:56.505>nice <00:43:56.784>GUI <00:43:57.063>application,

744
00:44:00.568 --> 00:44:04.068
<00:44:00.568>which <00:44:00.723>actually <00:44:00.879>works <00:44:01.034>pretty <00:44:01.190>well <00:44:01.345>in <00:44:01.501>Java <00:44:01.656>with <00:44:01.812>using <00:44:01.968>Tamarin.

745
00:44:05.348 --> 00:44:05.628
But

746
00:44:07.088 --> 00:44:10.908
<00:44:07.088>to <00:44:07.215>sum <00:44:07.342>it <00:44:07.469>all <00:44:07.597>up <00:44:07.724>into <00:44:07.851>one, <00:44:07.978>Java <00:44:08.106>is <00:44:08.233>actually <00:44:08.360>great <00:44:08.488>for

747
00:44:10.948 --> 00:44:11.428
scripting.

748
00:44:14.888 --> 00:44:18.868
<00:44:14.888>The <00:44:15.004>stuff <00:44:15.121>we <00:44:15.238>heard, <00:44:15.354>that <00:44:15.471>it's <00:44:15.587>verbose, <00:44:15.704>it <00:44:15.821>has <00:44:15.938>boilerplate, <00:44:16.054>it <00:44:16.171>needs <00:44:16.288>ceremony,

749
00:44:19.868 --> 00:44:22.928
<00:44:19.868>I <00:44:19.995>think <00:44:20.122>it's <00:44:20.249>a <00:44:20.377>thing <00:44:20.504>of <00:44:20.631>the <00:44:20.758>past. <00:44:20.886>You <00:44:21.013>might <00:44:21.140>still <00:44:21.268>come

750
00:44:24.948 --> 00:44:28.288
<00:44:24.948>over <00:44:25.087>it <00:44:25.228>when <00:44:25.368>you <00:44:25.508>develop <00:44:25.647>in <00:44:25.788>Java, <00:44:25.928>but <00:44:26.067>it's <00:44:26.208>mostly <00:44:26.348>older

751
00:44:28.298 --> 00:44:30.948
<00:44:28.298>applications. <00:44:28.764>With <00:44:29.231>modern <00:44:29.698>Java,

752
00:44:32.128 --> 00:44:35.348
<00:44:32.128>in <00:44:32.303>my <00:44:32.478>opinion, <00:44:32.653>Java <00:44:32.828>is <00:44:33.003>a <00:44:33.178>great <00:44:33.353>scripting <00:44:33.528>language.

753
00:44:36.288 --> 00:44:39.668
<00:44:36.288>You <00:44:36.404>can <00:44:36.521>use <00:44:36.638>it <00:44:36.754>for <00:44:36.871>fooling <00:44:36.988>around <00:44:37.104>with <00:44:37.221>scripts, <00:44:37.338>just <00:44:37.454>trying <00:44:37.571>stuff <00:44:37.688>out,

754
00:44:41.028 --> 00:44:44.548
<00:44:41.028>some <00:44:41.203>one-off <00:44:41.377>scripts <00:44:41.553>or <00:44:41.727>reusable <00:44:41.903>scripts <00:44:42.078>like <00:44:42.252>we <00:44:42.428>did.

755
00:44:45.968 --> 00:44:49.108
<00:44:45.968>You <00:44:46.167>can <00:44:46.368>write <00:44:46.567>CLI <00:44:46.768>applications. <00:44:46.968>We've <00:44:47.167>seen <00:44:47.368>that.

756
00:44:49.708 --> 00:44:51.078
<00:44:49.708>Actually, <00:44:50.324>GUI <00:44:50.941>applications

757
00:44:54.468 --> 00:44:58.148
<00:44:54.468>are <00:44:54.667>simple <00:44:54.868>to <00:44:55.067>write. <00:44:55.268>It's <00:44:55.468>not <00:44:55.667>really <00:44:55.868>complicated.

758
00:44:59.688 --> 00:45:03.567
<00:44:59.688>But <00:44:59.815>the <00:44:59.942>only <00:45:00.069>disadvantage <00:45:00.197>I <00:45:00.324>actually <00:45:00.451>see <00:45:00.578>is <00:45:00.706>compared <00:45:00.833>to, <00:45:00.960>for <00:45:01.088>example,

759
00:45:03.648 --> 00:45:07.408
<00:45:03.648>Python, <00:45:03.803>Java <00:45:03.959>has <00:45:04.114>a <00:45:04.270>smaller <00:45:04.425>standard <00:45:04.581>library, <00:45:04.736>so <00:45:04.892>you <00:45:05.048>might

760
00:45:07.508 --> 00:45:08.588
<00:45:07.508>need <00:45:07.994>dependencies <00:45:08.480>sooner.

761
00:45:10.448 --> 00:45:13.368
<00:45:10.448>But <00:45:10.728>the <00:45:11.008>ecosystem <00:45:11.288>totally <00:45:11.567>compensates <00:45:11.848>it,

762
00:45:14.588 --> 00:45:16.108
<00:45:14.588>because <00:45:15.044>tools <00:45:15.500>like <00:45:15.956>JBang

763
00:45:17.268 --> 00:45:18.348
<00:45:17.268>are <00:45:17.754>just <00:45:18.240>amazing

764
00:45:19.548 --> 00:45:22.848
<00:45:19.548>and <00:45:19.687>totally <00:45:19.828>make <00:45:19.968>up <00:45:20.107>for <00:45:20.247>it. <00:45:20.388>So <00:45:20.528>give <00:45:20.667>it <00:45:20.808>a <00:45:20.948>try.

765
00:45:25.548 --> 00:45:25.908
<00:45:25.548>In <00:45:25.710>the <00:45:25.872>end,

766
00:45:26.948 --> 00:45:29.948
<00:45:26.948>I <00:45:27.147>got <00:45:27.348>some <00:45:27.548>resources, <00:45:27.748>which <00:45:27.948>are <00:45:28.147>my <00:45:28.348>slides.

767
00:45:30.628 --> 00:45:33.848
<00:45:30.628>And <00:45:30.735>also, <00:45:30.843>if <00:45:30.951>you <00:45:31.058>want <00:45:31.166>to <00:45:31.274>try <00:45:31.381>out <00:45:31.489>the <00:45:31.597>demo <00:45:31.704>code, <00:45:31.812>it's <00:45:31.920>on <00:45:32.028>GitHub.

768
00:45:34.588 --> 00:45:37.228
<00:45:34.588>And <00:45:34.728>if <00:45:34.868>you <00:45:35.008>want <00:45:35.148>to <00:45:35.288>read <00:45:35.428>something <00:45:35.568>about <00:45:35.708>it <00:45:35.848>a <00:45:35.988>little,

769
00:45:38.408 --> 00:45:39.988
<00:45:38.408>just <00:45:38.583>take <00:45:38.758>the <00:45:38.933>slides <00:45:39.107>and <00:45:39.283>click <00:45:39.458>on <00:45:39.633>the <00:45:39.808>link.

770
00:45:41.428 --> 00:45:44.888
<00:45:41.428>There's <00:45:41.583>some <00:45:41.739>really <00:45:41.894>nice <00:45:42.050>guys <00:45:42.205>that <00:45:42.361>have <00:45:42.516>written <00:45:42.672>a <00:45:42.828>few

771
00:45:44.948 --> 00:45:45.508
articles

772
00:45:46.428 --> 00:45:49.028
<00:45:46.428>into <00:45:46.661>that <00:45:46.894>direction, <00:45:47.127>like <00:45:47.361>scripting <00:45:47.594>with <00:45:47.828>Java.

773
00:45:51.208 --> 00:45:55.128
<00:45:51.208>And <00:45:51.408>then <00:45:51.608>I'll <00:45:51.808>just <00:45:52.008>say <00:45:52.208>thanks. <00:45:52.408>Asking <00:45:52.608>questions

774
00:45:55.368 --> 00:45:56.808
<00:45:55.368>is <00:45:55.627>a <00:45:55.886>little <00:45:56.145>complicated <00:45:56.404>on <00:45:56.663>video,

775
00:45:57.788 --> 00:46:01.628
<00:45:57.788>but <00:45:57.904>you <00:45:58.021>can <00:45:58.138>do <00:45:58.254>it <00:45:58.371>by <00:45:58.488>just <00:45:58.604>writing <00:45:58.721>me <00:45:58.838>an <00:45:58.954>email <00:45:59.071>or <00:45:59.188>just

776
00:46:02.468 --> 00:46:05.328
<00:46:02.468>sending <00:46:02.623>me <00:46:02.779>a <00:46:02.934>message <00:46:03.090>on <00:46:03.245>BlueSky <00:46:03.401>or <00:46:03.556>something <00:46:03.712>like <00:46:03.868>that.

777
00:46:06.548 --> 00:46:10.328
<00:46:06.548>I'll <00:46:06.687>make <00:46:06.828>sure <00:46:06.968>to <00:46:07.107>respond <00:46:07.247>to <00:46:07.388>that, <00:46:07.528>so <00:46:07.667>just <00:46:07.808>don't <00:46:07.948>hesitate.

778
00:46:10.868 --> 00:46:11.148
<00:46:10.868>And <00:46:11.120>yeah,

779
00:46:12.248 --> 00:46:15.968
<00:46:12.248>thanks <00:46:12.375>for <00:46:12.502>watching, <00:46:12.629>and <00:46:12.757>I <00:46:12.884>hope <00:46:13.011>you <00:46:13.138>learned <00:46:13.266>something, <00:46:13.393>not <00:46:13.520>just <00:46:13.648>about

780
00:46:16.008 --> 00:46:17.768
<00:46:16.008>cats, <00:46:16.241>but <00:46:16.474>also <00:46:16.707>about <00:46:16.941>scripting <00:46:17.174>with <00:46:17.408>Java.