[Script Info] Title: [Events] Format: Layer, Start, End, Style, Name, MarginL, MarginR, MarginV, Effect, Text Dialogue: 0,0:00:00.62,0:00:05.04,Default,,0000,0000,0000,,all right everyone let's get started Dialogue: 0,0:00:03.12,0:00:07.65,Default,,0000,0000,0000,,with the next lecture so today we're Dialogue: 0,0:00:05.04,0:00:09.75,Default,,0000,0000,0000,,gonna that tackle the topic of meta Dialogue: 0,0:00:07.65,0:00:11.70,Default,,0000,0000,0000,,programming and this title is a little Dialogue: 0,0:00:09.75,0:00:13.59,Default,,0000,0000,0000,,weird it's not entirely clear what we Dialogue: 0,0:00:11.70,0:00:14.97,Default,,0000,0000,0000,,mean by meta programming we couldn't Dialogue: 0,0:00:13.59,0:00:17.13,Default,,0000,0000,0000,,really come up with a better name for Dialogue: 0,0:00:14.97,0:00:20.76,Default,,0000,0000,0000,,this lecture because this lecture is Dialogue: 0,0:00:17.13,0:00:22.26,Default,,0000,0000,0000,,about the processes that surround the Dialogue: 0,0:00:20.76,0:00:24.69,Default,,0000,0000,0000,,work that you do when working with Dialogue: 0,0:00:22.26,0:00:27.51,Default,,0000,0000,0000,,software it is not about programming Dialogue: 0,0:00:24.69,0:00:30.54,Default,,0000,0000,0000,,itself necessarily but about the process Dialogue: 0,0:00:27.51,0:00:33.84,Default,,0000,0000,0000,,this can be things like how your system Dialogue: 0,0:00:30.54,0:00:35.94,Default,,0000,0000,0000,,is built how it's tested how you add Dialogue: 0,0:00:33.84,0:00:37.41,Default,,0000,0000,0000,,dependencies to your software that sort Dialogue: 0,0:00:35.94,0:00:39.72,Default,,0000,0000,0000,,of stuff that becomes really relevant Dialogue: 0,0:00:37.41,0:00:42.42,Default,,0000,0000,0000,,when you build larger pieces of software Dialogue: 0,0:00:39.72,0:00:44.12,Default,,0000,0000,0000,,but they're not really programming in Dialogue: 0,0:00:42.42,0:00:46.47,Default,,0000,0000,0000,,and of themselves Dialogue: 0,0:00:44.12,0:00:49.08,Default,,0000,0000,0000,,so the first thing we're going to talk Dialogue: 0,0:00:46.47,0:00:51.72,Default,,0000,0000,0000,,about in this lecture is the notion of Dialogue: 0,0:00:49.08,0:00:53.79,Default,,0000,0000,0000,,build systems so how many of you have Dialogue: 0,0:00:51.72,0:00:59.40,Default,,0000,0000,0000,,used a build system before or know what Dialogue: 0,0:00:53.79,0:01:01.80,Default,,0000,0000,0000,,it is okay so about 1/2 of you so for Dialogue: 0,0:00:59.40,0:01:04.95,Default,,0000,0000,0000,,the rest of you the the central idea Dialogue: 0,0:01:01.80,0:01:07.32,Default,,0000,0000,0000,,behind a build system is that you're Dialogue: 0,0:01:04.95,0:01:09.51,Default,,0000,0000,0000,,writing a paper you're writing software Dialogue: 0,0:01:07.32,0:01:12.09,Default,,0000,0000,0000,,you're like working on a class whatever Dialogue: 0,0:01:09.51,0:01:14.01,Default,,0000,0000,0000,,it might be and you have a bunch of Dialogue: 0,0:01:12.09,0:01:15.81,Default,,0000,0000,0000,,commands that you like either written Dialogue: 0,0:01:14.01,0:01:17.52,Default,,0000,0000,0000,,down in your shell history or you wrote Dialogue: 0,0:01:15.81,0:01:19.05,Default,,0000,0000,0000,,them down in a document somewhere that Dialogue: 0,0:01:17.52,0:01:20.76,Default,,0000,0000,0000,,you know you have to run if you want to Dialogue: 0,0:01:19.05,0:01:22.59,Default,,0000,0000,0000,,do a particular thing so for example Dialogue: 0,0:01:20.76,0:01:23.82,Default,,0000,0000,0000,,like there are a sequence of commands so Dialogue: 0,0:01:22.59,0:01:27.48,Default,,0000,0000,0000,,you need to run in order to build your Dialogue: 0,0:01:23.82,0:01:29.34,Default,,0000,0000,0000,,paper or build your thesis or just to Dialogue: 0,0:01:27.48,0:01:32.94,Default,,0000,0000,0000,,run the tests for whatever class you're Dialogue: 0,0:01:29.34,0:01:35.07,Default,,0000,0000,0000,,currently in and a build system sort of Dialogue: 0,0:01:32.94,0:01:37.65,Default,,0000,0000,0000,,idea is that you want to encode these Dialogue: 0,0:01:35.07,0:01:40.38,Default,,0000,0000,0000,,rules for what commands to run in order Dialogue: 0,0:01:37.65,0:01:43.56,Default,,0000,0000,0000,,to build particular targets into a tool Dialogue: 0,0:01:40.38,0:01:45.21,Default,,0000,0000,0000,,that can do it for you and in particular Dialogue: 0,0:01:43.56,0:01:47.25,Default,,0000,0000,0000,,you're going to teach this tool about Dialogue: 0,0:01:45.21,0:01:51.09,Default,,0000,0000,0000,,the dependencies between those different Dialogue: 0,0:01:47.25,0:01:54.30,Default,,0000,0000,0000,,artifacts that you might build there are Dialogue: 0,0:01:51.09,0:01:56.58,Default,,0000,0000,0000,,a lot of different types of tools of Dialogue: 0,0:01:54.30,0:01:57.84,Default,,0000,0000,0000,,this kind and many of them are built for Dialogue: 0,0:01:56.58,0:02:00.29,Default,,0000,0000,0000,,particular purposes particularly Dialogue: 0,0:01:57.84,0:02:02.40,Default,,0000,0000,0000,,languages some of them are built for Dialogue: 0,0:02:00.29,0:02:04.35,Default,,0000,0000,0000,,building like papers some of them are Dialogue: 0,0:02:02.40,0:02:06.12,Default,,0000,0000,0000,,built for building software some of them Dialogue: 0,0:02:04.35,0:02:09.99,Default,,0000,0000,0000,,are built for particularly programming Dialogue: 0,0:02:06.12,0:02:13.14,Default,,0000,0000,0000,,languages like Java or some some tools Dialogue: 0,0:02:09.99,0:02:15.63,Default,,0000,0000,0000,,even have built in tools for for builds Dialogue: 0,0:02:13.14,0:02:17.34,Default,,0000,0000,0000,,so NPM for example you might be aware if Dialogue: 0,0:02:15.63,0:02:19.25,Default,,0000,0000,0000,,you've done Nodejs development has a Dialogue: 0,0:02:17.34,0:02:21.42,Default,,0000,0000,0000,,bunch of built-in tools for doing Dialogue: 0,0:02:19.25,0:02:23.28,Default,,0000,0000,0000,,tracking of dependencies and building Dialogue: 0,0:02:21.42,0:02:25.23,Default,,0000,0000,0000,,them and building all of the dependent Dialogue: 0,0:02:23.28,0:02:27.24,Default,,0000,0000,0000,,stuff of your software but more Dialogue: 0,0:02:25.23,0:02:29.55,Default,,0000,0000,0000,,generally these are known as build Dialogue: 0,0:02:27.24,0:02:32.76,Default,,0000,0000,0000,,systems and at their core they all Dialogue: 0,0:02:29.55,0:02:35.70,Default,,0000,0000,0000,,function in a very similar way and that Dialogue: 0,0:02:32.76,0:02:37.47,Default,,0000,0000,0000,,is you have a number of targets these Dialogue: 0,0:02:35.70,0:02:41.13,Default,,0000,0000,0000,,are the things that you want to build Dialogue: 0,0:02:37.47,0:02:42.45,Default,,0000,0000,0000,,these are things like paper dot PDF but Dialogue: 0,0:02:41.13,0:02:45.18,Default,,0000,0000,0000,,they can also be more abstract things Dialogue: 0,0:02:42.45,0:02:47.25,Default,,0000,0000,0000,,like run the test suite or build the Dialogue: 0,0:02:45.18,0:02:49.23,Default,,0000,0000,0000,,binary for this program then you have a Dialogue: 0,0:02:47.25,0:02:51.12,Default,,0000,0000,0000,,bunch of dependencies and dependencies Dialogue: 0,0:02:49.23,0:02:53.04,Default,,0000,0000,0000,,are things that need to be built in Dialogue: 0,0:02:51.12,0:02:55.71,Default,,0000,0000,0000,,order for this thing to be built and Dialogue: 0,0:02:53.04,0:02:57.63,Default,,0000,0000,0000,,then you have rules that define how do Dialogue: 0,0:02:55.71,0:03:00.84,Default,,0000,0000,0000,,you go from a complete list of Dialogue: 0,0:02:57.63,0:03:02.82,Default,,0000,0000,0000,,dependencies to the given target so an Dialogue: 0,0:03:00.84,0:03:05.37,Default,,0000,0000,0000,,example of this might be in order to Dialogue: 0,0:03:02.82,0:03:08.91,Default,,0000,0000,0000,,build my paper dot PDF I need a bunch of Dialogue: 0,0:03:05.37,0:03:10.74,Default,,0000,0000,0000,,like plot images they're gonna go into Dialogue: 0,0:03:08.91,0:03:12.75,Default,,0000,0000,0000,,the paper so they need to be built but Dialogue: 0,0:03:10.74,0:03:15.21,Default,,0000,0000,0000,,then once they have been built how do i Dialogue: 0,0:03:12.75,0:03:16.86,Default,,0000,0000,0000,,construct the paper given those files so Dialogue: 0,0:03:15.21,0:03:18.33,Default,,0000,0000,0000,,that is what a rule is it's a sequence Dialogue: 0,0:03:16.86,0:03:21.45,Default,,0000,0000,0000,,of command so you run to get from one to Dialogue: 0,0:03:18.33,0:03:24.21,Default,,0000,0000,0000,,the other how you encode these rules Dialogue: 0,0:03:21.45,0:03:25.65,Default,,0000,0000,0000,,differs between different tools in this Dialogue: 0,0:03:24.21,0:03:28.80,Default,,0000,0000,0000,,particular class we're gonna focus on a Dialogue: 0,0:03:25.65,0:03:31.20,Default,,0000,0000,0000,,tool called make make is a tool that you Dialogue: 0,0:03:28.80,0:03:33.42,Default,,0000,0000,0000,,will find on almost any system that you Dialogue: 0,0:03:31.20,0:03:35.70,Default,,0000,0000,0000,,log in today like it'll be on Mac OS Dialogue: 0,0:03:33.42,0:03:38.31,Default,,0000,0000,0000,,it'll be on basically every Linux and Dialogue: 0,0:03:35.70,0:03:41.01,Default,,0000,0000,0000,,BSD system and you can pretty easily get Dialogue: 0,0:03:38.31,0:03:43.05,Default,,0000,0000,0000,,it on Windows um it's not great for very Dialogue: 0,0:03:41.01,0:03:45.03,Default,,0000,0000,0000,,complex software but it works really Dialogue: 0,0:03:43.05,0:03:49.50,Default,,0000,0000,0000,,well for anything that's sort of simple Dialogue: 0,0:03:45.03,0:03:51.54,Default,,0000,0000,0000,,to medium complexity now when you run Dialogue: 0,0:03:49.50,0:03:53.40,Default,,0000,0000,0000,,make to make user command you can run on Dialogue: 0,0:03:51.54,0:03:56.31,Default,,0000,0000,0000,,the command line and when you type make Dialogue: 0,0:03:53.40,0:03:58.71,Default,,0000,0000,0000,,and this is an empty directory if I type Dialogue: 0,0:03:56.31,0:04:02.40,Default,,0000,0000,0000,,make it just has no target specified and Dialogue: 0,0:03:58.71,0:04:03.57,Default,,0000,0000,0000,,no make file found stop and so it Dialogue: 0,0:04:02.40,0:04:06.42,Default,,0000,0000,0000,,helpfully tells you that it stopped Dialogue: 0,0:04:03.57,0:04:09.36,Default,,0000,0000,0000,,running but also tells you that no make Dialogue: 0,0:04:06.42,0:04:11.34,Default,,0000,0000,0000,,file was found make will look for a file Dialogue: 0,0:04:09.36,0:04:13.05,Default,,0000,0000,0000,,literally called make file in the Dialogue: 0,0:04:11.34,0:04:14.94,Default,,0000,0000,0000,,current directory and that is where you Dialogue: 0,0:04:13.05,0:04:18.45,Default,,0000,0000,0000,,encode these targets dependencies and Dialogue: 0,0:04:14.94,0:04:19.50,Default,,0000,0000,0000,,rules so let's try to write one let's Dialogue: 0,0:04:18.45,0:04:22.05,Default,,0000,0000,0000,,imagine that I'm writing this Dialogue: 0,0:04:19.50,0:04:23.94,Default,,0000,0000,0000,,hypothetical paper and so I'm gonna make Dialogue: 0,0:04:22.05,0:04:26.49,Default,,0000,0000,0000,,a make file and then this make file I'm Dialogue: 0,0:04:23.94,0:04:27.96,Default,,0000,0000,0000,,going to say that my paper dog PDF the Dialogue: 0,0:04:26.49,0:04:30.87,Default,,0000,0000,0000,,hands-on that's what the : here Dialogue: 0,0:04:27.96,0:04:35.82,Default,,0000,0000,0000,,indicates paper dot text was going to be Dialogue: 0,0:04:30.87,0:04:40.08,Default,,0000,0000,0000,,a little attack file and plot data dot Dialogue: 0,0:04:35.82,0:04:42.90,Default,,0000,0000,0000,,PNG and the command in order to build Dialogue: 0,0:04:40.08,0:04:46.26,Default,,0000,0000,0000,,this is going to be PDF latex of paper Dialogue: 0,0:04:42.90,0:04:47.55,Default,,0000,0000,0000,,dot Tex so for those of you who are not Dialogue: 0,0:04:46.26,0:04:50.07,Default,,0000,0000,0000,,familiar with this particular way of Dialogue: 0,0:04:47.55,0:04:53.10,Default,,0000,0000,0000,,building documents the tech is a really Dialogue: 0,0:04:50.07,0:04:56.43,Default,,0000,0000,0000,,handy programming language for documents Dialogue: 0,0:04:53.10,0:04:57.96,Default,,0000,0000,0000,,it's a really ugly language and it's a Dialogue: 0,0:04:56.43,0:05:01.23,Default,,0000,0000,0000,,pain to work with but it produces pretty Dialogue: 0,0:04:57.96,0:05:05.12,Default,,0000,0000,0000,,nice documents and the tool you use to Dialogue: 0,0:05:01.23,0:05:08.52,Default,,0000,0000,0000,,go from a tech file to PDF is PDF latex Dialogue: 0,0:05:05.12,0:05:12.30,Default,,0000,0000,0000,,and here I'm saying that I also depend Dialogue: 0,0:05:08.52,0:05:14.46,Default,,0000,0000,0000,,on this plot plot data PNG that's gonna Dialogue: 0,0:05:12.30,0:05:16.71,Default,,0000,0000,0000,,be included in my document and what I'm Dialogue: 0,0:05:14.46,0:05:19.35,Default,,0000,0000,0000,,really saying here is if either of those Dialogue: 0,0:05:16.71,0:05:22.02,Default,,0000,0000,0000,,two dependencies change I want you to Dialogue: 0,0:05:19.35,0:05:23.85,Default,,0000,0000,0000,,build paper PDF they both need to be Dialogue: 0,0:05:22.02,0:05:26.43,Default,,0000,0000,0000,,present and should they ever change I Dialogue: 0,0:05:23.85,0:05:28.23,Default,,0000,0000,0000,,wanted to rebuild it but I haven't Dialogue: 0,0:05:26.43,0:05:30.60,Default,,0000,0000,0000,,really told it how to generate this plot Dialogue: 0,0:05:28.23,0:05:31.86,Default,,0000,0000,0000,,data PNG so I might want to rule for Dialogue: 0,0:05:30.60,0:05:34.02,Default,,0000,0000,0000,,that as well Dialogue: 0,0:05:31.86,0:05:35.82,Default,,0000,0000,0000,,so I'm gonna define another target here Dialogue: 0,0:05:34.02,0:05:41.67,Default,,0000,0000,0000,,and it's gonna be it's gonna look like Dialogue: 0,0:05:35.82,0:05:45.36,Default,,0000,0000,0000,,this plot - % & % means and make is any Dialogue: 0,0:05:41.67,0:05:46.89,Default,,0000,0000,0000,,string sort of a wildcard pattern but Dialogue: 0,0:05:45.36,0:05:49.74,Default,,0000,0000,0000,,the cool thing is a you go and repeat Dialogue: 0,0:05:46.89,0:05:53.01,Default,,0000,0000,0000,,this pattern in the dependencies so I Dialogue: 0,0:05:49.74,0:05:59.10,Default,,0000,0000,0000,,can say that plot - % dot PNG is going Dialogue: 0,0:05:53.01,0:06:02.09,Default,,0000,0000,0000,,to depend on % dott data or debt that is Dialogue: 0,0:05:59.10,0:06:05.13,Default,,0000,0000,0000,,a common sort of suffix for data files Dialogue: 0,0:06:02.09,0:06:07.02,Default,,0000,0000,0000,,and it's also going to depend on some Dialogue: 0,0:06:05.13,0:06:09.06,Default,,0000,0000,0000,,script that's gonna actually plot this Dialogue: 0,0:06:07.02,0:06:09.54,Default,,0000,0000,0000,,for me and the rules for to go from one Dialogue: 0,0:06:09.06,0:06:11.37,Default,,0000,0000,0000,,to the other Dialogue: 0,0:06:09.54,0:06:13.20,Default,,0000,0000,0000,,these can be multiple lines but in my Dialogue: 0,0:06:11.37,0:06:15.54,Default,,0000,0000,0000,,particular case they're just one line Dialogue: 0,0:06:13.20,0:06:21.42,Default,,0000,0000,0000,,I'm gonna explain what this is in a Dialogue: 0,0:06:15.54,0:06:23.66,Default,,0000,0000,0000,,little second alright so here we're Dialogue: 0,0:06:21.42,0:06:26.28,Default,,0000,0000,0000,,gonna say that in order to go from a Dialogue: 0,0:06:23.66,0:06:29.13,Default,,0000,0000,0000,,wildcard dot dot file that matches the Dialogue: 0,0:06:26.28,0:06:32.94,Default,,0000,0000,0000,,wildcard in the target and a plot dot Dialogue: 0,0:06:29.13,0:06:34.44,Default,,0000,0000,0000,,python file run the python file with - i Dialogue: 0,0:06:32.94,0:06:36.33,Default,,0000,0000,0000,,which is going to be like the way we Dialogue: 0,0:06:34.44,0:06:37.98,Default,,0000,0000,0000,,take the mark what the input is in our Dialogue: 0,0:06:36.33,0:06:40.01,Default,,0000,0000,0000,,python file I'll show it to you later Dialogue: 0,0:06:37.98,0:06:42.17,Default,,0000,0000,0000,,dollarz star Dialogue: 0,0:06:40.01,0:06:45.05,Default,,0000,0000,0000,,is a special variable that is defined Dialogue: 0,0:06:42.17,0:06:47.81,Default,,0000,0000,0000,,for you and make file rules that matches Dialogue: 0,0:06:45.05,0:06:50.69,Default,,0000,0000,0000,,whatever the percentile was so if I do Dialogue: 0,0:06:47.81,0:06:53.24,Default,,0000,0000,0000,,plot to PNG then it's going to look for Dialogue: 0,0:06:50.69,0:06:55.55,Default,,0000,0000,0000,,food dot that and it dollars stars can Dialogue: 0,0:06:53.24,0:06:57.29,Default,,0000,0000,0000,,expand to foo so this will produce the Dialogue: 0,0:06:55.55,0:06:59.78,Default,,0000,0000,0000,,same file name as the one we matched Dialogue: 0,0:06:57.29,0:07:01.07,Default,,0000,0000,0000,,here and dollar act as a special Dialogue: 0,0:06:59.78,0:07:04.96,Default,,0000,0000,0000,,variable that means the name of the Dialogue: 0,0:07:01.07,0:07:07.37,Default,,0000,0000,0000,,target right so the output file and Dialogue: 0,0:07:04.96,0:07:09.17,Default,,0000,0000,0000,,hopefully what plotter py will do is Dialogue: 0,0:07:07.37,0:07:11.90,Default,,0000,0000,0000,,that it will take whatever the data is Dialogue: 0,0:07:09.17,0:07:14.09,Default,,0000,0000,0000,,here it will produce a PNG somehow and Dialogue: 0,0:07:11.90,0:07:18.11,Default,,0000,0000,0000,,it will write it into the file indicated Dialogue: 0,0:07:14.09,0:07:19.70,Default,,0000,0000,0000,,by the dollar at all right so now we Dialogue: 0,0:07:18.11,0:07:21.32,Default,,0000,0000,0000,,have a make file let's see what happens Dialogue: 0,0:07:19.70,0:07:23.48,Default,,0000,0000,0000,,if the only file in this directory is Dialogue: 0,0:07:21.32,0:07:25.70,Default,,0000,0000,0000,,the make file and we run make one says Dialogue: 0,0:07:23.48,0:07:29.84,Default,,0000,0000,0000,,no rule to make target paper dot tex Dialogue: 0,0:07:25.70,0:07:32.63,Default,,0000,0000,0000,,needed by paper dot PDF stop so what Dialogue: 0,0:07:29.84,0:07:35.12,Default,,0000,0000,0000,,it's saying here is first of all it Dialogue: 0,0:07:32.63,0:07:37.58,Default,,0000,0000,0000,,looked at the first rule of our file the Dialogue: 0,0:07:35.12,0:07:39.26,Default,,0000,0000,0000,,first target and when you give make no Dialogue: 0,0:07:37.58,0:07:41.06,Default,,0000,0000,0000,,arguments it tries to build whatever the Dialogue: 0,0:07:39.26,0:07:43.31,Default,,0000,0000,0000,,first target is this is known as the Dialogue: 0,0:07:41.06,0:07:45.68,Default,,0000,0000,0000,,default goal so in this case it tried to Dialogue: 0,0:07:43.31,0:07:47.51,Default,,0000,0000,0000,,helpfully build paper dot PDF for us and Dialogue: 0,0:07:45.68,0:07:49.88,Default,,0000,0000,0000,,then it looked up the dependencies and Dialogue: 0,0:07:47.51,0:07:53.09,Default,,0000,0000,0000,,it said well in order to build paper dot Dialogue: 0,0:07:49.88,0:07:56.09,Default,,0000,0000,0000,,PDF I need paper Tex and I need this PNG Dialogue: 0,0:07:53.09,0:07:58.70,Default,,0000,0000,0000,,file and I can't find paper dot X and I Dialogue: 0,0:07:56.09,0:08:00.95,Default,,0000,0000,0000,,don't have a rule for generating paper Dialogue: 0,0:07:58.70,0:08:04.12,Default,,0000,0000,0000,,dot X and therefore I'm gonna exit this Dialogue: 0,0:08:00.95,0:08:04.12,Default,,0000,0000,0000,,isn't nothing more I can do Dialogue: 0,0:08:04.81,0:08:10.10,Default,,0000,0000,0000,,so let's try to make some files here Dialogue: 0,0:08:07.43,0:08:13.94,Default,,0000,0000,0000,,let's just make like an empty paper dot Dialogue: 0,0:08:10.10,0:08:15.95,Default,,0000,0000,0000,,X and then type make so now it says no Dialogue: 0,0:08:13.94,0:08:18.20,Default,,0000,0000,0000,,rule to make target plot data dot PNG Dialogue: 0,0:08:15.95,0:08:20.12,Default,,0000,0000,0000,,needed by paper to PDF right so now it's Dialogue: 0,0:08:18.20,0:08:21.35,Default,,0000,0000,0000,,it knows that it has one dependency but Dialogue: 0,0:08:20.12,0:08:24.32,Default,,0000,0000,0000,,it doesn't know how to get the other one Dialogue: 0,0:08:21.35,0:08:26.21,Default,,0000,0000,0000,,it knows it as a target that matches but Dialogue: 0,0:08:24.32,0:08:29.14,Default,,0000,0000,0000,,it can't actually find its dependencies Dialogue: 0,0:08:26.21,0:08:31.91,Default,,0000,0000,0000,,and so it ends up doing nothing at all Dialogue: 0,0:08:29.14,0:08:35.78,Default,,0000,0000,0000,,it still still needs us to generate this Dialogue: 0,0:08:31.91,0:08:37.76,Default,,0000,0000,0000,,PNG for the input for the PNG so let's Dialogue: 0,0:08:35.78,0:08:42.74,Default,,0000,0000,0000,,actually put some useful stuff into Dialogue: 0,0:08:37.76,0:08:48.17,Default,,0000,0000,0000,,these files let's say that luckily I Dialogue: 0,0:08:42.74,0:08:50.33,Default,,0000,0000,0000,,have one from earlier plot da py to here Dialogue: 0,0:08:48.17,0:08:52.22,Default,,0000,0000,0000,,so let's so good well this text file is Dialogue: 0,0:08:50.33,0:08:53.39,Default,,0000,0000,0000,,this is what text looks like it's not Dialogue: 0,0:08:52.22,0:08:55.43,Default,,0000,0000,0000,,very pretty but Dialogue: 0,0:08:53.39,0:08:57.20,Default,,0000,0000,0000,,see I'm defining an empty document I'm Dialogue: 0,0:08:55.43,0:08:59.81,Default,,0000,0000,0000,,going to include graphics which is the Dialogue: 0,0:08:57.20,0:09:01.85,Default,,0000,0000,0000,,way you include a an image file I'm Dialogue: 0,0:08:59.81,0:09:04.07,Default,,0000,0000,0000,,going to include plot data dot PNG and Dialogue: 0,0:09:01.85,0:09:06.11,Default,,0000,0000,0000,,this is of course why we want a Dialogue: 0,0:09:04.07,0:09:10.13,Default,,0000,0000,0000,,dependency of peda paper dot PDF to be Dialogue: 0,0:09:06.11,0:09:12.71,Default,,0000,0000,0000,,the PNG file plot the py is also not Dialogue: 0,0:09:10.13,0:09:15.38,Default,,0000,0000,0000,,very interesting it just part imports a Dialogue: 0,0:09:12.71,0:09:19.01,Default,,0000,0000,0000,,bunch libraries it parses the - ion - Oh Dialogue: 0,0:09:15.38,0:09:22.88,Default,,0000,0000,0000,,arguments it loads data from the I Dialogue: 0,0:09:19.01,0:09:24.71,Default,,0000,0000,0000,,argument it uses library called Dialogue: 0,0:09:22.88,0:09:27.53,Default,,0000,0000,0000,,matplotlib which is very handy for just Dialogue: 0,0:09:24.71,0:09:30.38,Default,,0000,0000,0000,,quickly plotting data and it's gonna Dialogue: 0,0:09:27.53,0:09:32.99,Default,,0000,0000,0000,,plot the first column of the data as X's Dialogue: 0,0:09:30.38,0:09:34.64,Default,,0000,0000,0000,,and the second column of the data as Y's Dialogue: 0,0:09:32.99,0:09:37.10,Default,,0000,0000,0000,,so we're just going to have a data file Dialogue: 0,0:09:34.64,0:09:39.83,Default,,0000,0000,0000,,that's two columns x and y on every line Dialogue: 0,0:09:37.10,0:09:46.88,Default,,0000,0000,0000,,and then it saves that as a figure into Dialogue: 0,0:09:39.83,0:09:49.52,Default,,0000,0000,0000,,whatever the given - oh value is okay so Dialogue: 0,0:09:46.88,0:09:53.57,Default,,0000,0000,0000,,we need a data file that's going to be Dialogue: 0,0:09:49.52,0:09:55.97,Default,,0000,0000,0000,,data dot because we want plot data dot Dialogue: 0,0:09:53.57,0:09:58.31,Default,,0000,0000,0000,,PNG and our rules said that the way you Dialogue: 0,0:09:55.97,0:10:00.29,Default,,0000,0000,0000,,go from that pattern to the dot file the Dialogue: 0,0:09:58.31,0:10:03.17,Default,,0000,0000,0000,,dot that file is just by whatever Dialogue: 0,0:10:00.29,0:10:05.54,Default,,0000,0000,0000,,follows plot so if we want plot - data Dialogue: 0,0:10:03.17,0:10:07.61,Default,,0000,0000,0000,,then we want data dot that and then this Dialogue: 0,0:10:05.54,0:10:09.05,Default,,0000,0000,0000,,file we're just gonna put in some linear Dialogue: 0,0:10:07.61,0:10:13.97,Default,,0000,0000,0000,,coordinates because why not Dialogue: 0,0:10:09.05,0:10:19.63,Default,,0000,0000,0000,,that's not linear all right and now what Dialogue: 0,0:10:13.97,0:10:23.98,Default,,0000,0000,0000,,happens if we're gonna make well mmm Dialogue: 0,0:10:19.63,0:10:28.64,Default,,0000,0000,0000,,okay so what just happened well make Dialogue: 0,0:10:23.98,0:10:32.09,Default,,0000,0000,0000,,first ran plata py with the correct Dialogue: 0,0:10:28.64,0:10:35.00,Default,,0000,0000,0000,,files to generate the PNG file and then Dialogue: 0,0:10:32.09,0:10:36.32,Default,,0000,0000,0000,,it ran PDF latex paper dot text and all Dialogue: 0,0:10:35.00,0:10:38.54,Default,,0000,0000,0000,,the stuff we see below is is the output Dialogue: 0,0:10:36.32,0:10:40.22,Default,,0000,0000,0000,,from that tool if you wanted to we Dialogue: 0,0:10:38.54,0:10:42.17,Default,,0000,0000,0000,,silence the effort from this tools we Dialogue: 0,0:10:40.22,0:10:44.18,Default,,0000,0000,0000,,don't have to like have it mess with all Dialogue: 0,0:10:42.17,0:10:45.47,Default,,0000,0000,0000,,our output but in general you notice Dialogue: 0,0:10:44.18,0:10:47.51,Default,,0000,0000,0000,,that it ran the two commands then it Dialogue: 0,0:10:45.47,0:10:50.24,Default,,0000,0000,0000,,write the random perhaps unsurprisingly Dialogue: 0,0:10:47.51,0:10:51.71,Default,,0000,0000,0000,,in the right order and if we now do LS Dialogue: 0,0:10:50.24,0:10:52.97,Default,,0000,0000,0000,,in the current directory we see that we Dialogue: 0,0:10:51.71,0:10:56.90,Default,,0000,0000,0000,,have a bunch of files that were Dialogue: 0,0:10:52.97,0:10:59.15,Default,,0000,0000,0000,,generated by PDF latex but in particular Dialogue: 0,0:10:56.90,0:11:01.61,Default,,0000,0000,0000,,we have the PNG file which was generated Dialogue: 0,0:10:59.15,0:11:04.37,Default,,0000,0000,0000,,and we have the paper dot PDF and if we Dialogue: 0,0:11:01.61,0:11:05.84,Default,,0000,0000,0000,,open the paper - a PDF file we see that Dialogue: 0,0:11:04.37,0:11:06.81,Default,,0000,0000,0000,,it has one image which has the straight Dialogue: 0,0:11:05.84,0:11:08.67,Default,,0000,0000,0000,,line Dialogue: 0,0:11:06.81,0:11:10.83,Default,,0000,0000,0000,,perhaps in and of itself not a very Dialogue: 0,0:11:08.67,0:11:13.47,Default,,0000,0000,0000,,surprising or interesting result but Dialogue: 0,0:11:10.83,0:11:16.53,Default,,0000,0000,0000,,where this gets really handy is I can do Dialogue: 0,0:11:13.47,0:11:19.11,Default,,0000,0000,0000,,things like if I type make again make Dialogue: 0,0:11:16.53,0:11:21.93,Default,,0000,0000,0000,,just says paper dot PDF is up to date it Dialogue: 0,0:11:19.11,0:11:23.88,Default,,0000,0000,0000,,does no work whenever you run make it Dialogue: 0,0:11:21.93,0:11:25.71,Default,,0000,0000,0000,,tries to do the minimal amount of work Dialogue: 0,0:11:23.88,0:11:28.44,Default,,0000,0000,0000,,in order to produce whatever you ask it Dialogue: 0,0:11:25.71,0:11:30.30,Default,,0000,0000,0000,,to produce in this case none of the Dialogue: 0,0:11:28.44,0:11:32.49,Default,,0000,0000,0000,,dependencies have changed so there's no Dialogue: 0,0:11:30.30,0:11:36.66,Default,,0000,0000,0000,,reason to rebuild the paper or to Dialogue: 0,0:11:32.49,0:11:39.54,Default,,0000,0000,0000,,rebuild the plot if I now let's say I'm Dialogue: 0,0:11:36.66,0:11:44.76,Default,,0000,0000,0000,,gonna edit paper dog texts I'm gonna add Dialogue: 0,0:11:39.54,0:11:47.43,Default,,0000,0000,0000,,hello here an hour and make then if we Dialogue: 0,0:11:44.76,0:11:49.29,Default,,0000,0000,0000,,scroll up we'll see it didn't run plot Dialogue: 0,0:11:47.43,0:11:51.18,Default,,0000,0000,0000,,op py again because I didn't need to Dialogue: 0,0:11:49.29,0:11:53.43,Default,,0000,0000,0000,,none of the dependencies change but it Dialogue: 0,0:11:51.18,0:11:56.63,Default,,0000,0000,0000,,did run PDF latex again and indeed if we Dialogue: 0,0:11:53.43,0:11:59.28,Default,,0000,0000,0000,,open the paper analysis hello over there Dialogue: 0,0:11:56.63,0:12:02.31,Default,,0000,0000,0000,,on the other hand if I were to change Dialogue: 0,0:11:59.28,0:12:07.29,Default,,0000,0000,0000,,say the data file and make this point 8 Dialogue: 0,0:12:02.31,0:12:09.21,Default,,0000,0000,0000,,an hour and make then now it plots again Dialogue: 0,0:12:07.29,0:12:10.98,Default,,0000,0000,0000,,because the data changed and it Dialogue: 0,0:12:09.21,0:12:13.86,Default,,0000,0000,0000,,regenerates the PDF because the plot Dialogue: 0,0:12:10.98,0:12:17.13,Default,,0000,0000,0000,,changed and indeed the paper turns out Dialogue: 0,0:12:13.86,0:12:18.99,Default,,0000,0000,0000,,the way we expected it to so that's not Dialogue: 0,0:12:17.13,0:12:21.72,Default,,0000,0000,0000,,to say that this particular pipeline is Dialogue: 0,0:12:18.99,0:12:23.78,Default,,0000,0000,0000,,very interesting because it's not it's Dialogue: 0,0:12:21.72,0:12:26.85,Default,,0000,0000,0000,,only true very very straightforward Dialogue: 0,0:12:23.78,0:12:28.53,Default,,0000,0000,0000,,targets and rules but this can come in Dialogue: 0,0:12:26.85,0:12:30.63,Default,,0000,0000,0000,,really handy when you start building Dialogue: 0,0:12:28.53,0:12:32.43,Default,,0000,0000,0000,,larger pieces of software or there might Dialogue: 0,0:12:30.63,0:12:34.98,Default,,0000,0000,0000,,be dependencies you might even imagine Dialogue: 0,0:12:32.43,0:12:37.56,Default,,0000,0000,0000,,that if you're writing a paper one of Dialogue: 0,0:12:34.98,0:12:40.23,Default,,0000,0000,0000,,your targets might be producing this Dialogue: 0,0:12:37.56,0:12:41.52,Default,,0000,0000,0000,,data file in the first place right so Dialogue: 0,0:12:40.23,0:12:45.27,Default,,0000,0000,0000,,one of the makefile Dialogue: 0,0:12:41.52,0:12:48.24,Default,,0000,0000,0000,,targets might be run my experiment right Dialogue: 0,0:12:45.27,0:12:50.49,Default,,0000,0000,0000,,run my benchmark and stick the the data Dialogue: 0,0:12:48.24,0:12:52.95,Default,,0000,0000,0000,,points that come out into this file and Dialogue: 0,0:12:50.49,0:12:54.51,Default,,0000,0000,0000,,then plot the results and then and then Dialogue: 0,0:12:52.95,0:12:57.60,Default,,0000,0000,0000,,and then and then all the way until you Dialogue: 0,0:12:54.51,0:12:59.58,Default,,0000,0000,0000,,end up with a final paper and what's Dialogue: 0,0:12:57.60,0:13:00.81,Default,,0000,0000,0000,,nice about this is first of all you Dialogue: 0,0:12:59.58,0:13:02.28,Default,,0000,0000,0000,,don't have to remember all the commands Dialogue: 0,0:13:00.81,0:13:05.25,Default,,0000,0000,0000,,to run you don't have to write them down Dialogue: 0,0:13:02.28,0:13:08.00,Default,,0000,0000,0000,,anywhere but also the tool takes care of Dialogue: 0,0:13:05.25,0:13:10.41,Default,,0000,0000,0000,,doing the minimal amount of work needed Dialogue: 0,0:13:08.00,0:13:12.39,Default,,0000,0000,0000,,often you'll find things like they'll be Dialogue: 0,0:13:10.41,0:13:14.61,Default,,0000,0000,0000,,too there'll be sub commands to make Dialogue: 0,0:13:12.39,0:13:15.99,Default,,0000,0000,0000,,like make tests right which is going to Dialogue: 0,0:13:14.61,0:13:19.38,Default,,0000,0000,0000,,compile your entire piece of software Dialogue: 0,0:13:15.99,0:13:20.64,Default,,0000,0000,0000,,and also run the tests there might be Dialogue: 0,0:13:19.38,0:13:23.19,Default,,0000,0000,0000,,things like make release Dialogue: 0,0:13:20.64,0:13:25.35,Default,,0000,0000,0000,,which builds it with optimizations Dialogue: 0,0:13:23.19,0:13:27.75,Default,,0000,0000,0000,,turned on and creates a tarball and Dialogue: 0,0:13:25.35,0:13:29.46,Default,,0000,0000,0000,,uploads that somewhere right so it's Dialogue: 0,0:13:27.75,0:13:31.23,Default,,0000,0000,0000,,gonna do the whole pipeline for you the Dialogue: 0,0:13:29.46,0:13:33.21,Default,,0000,0000,0000,,idea is to reduce the effort that you Dialogue: 0,0:13:31.23,0:13:40.32,Default,,0000,0000,0000,,have to do as any part of your build Dialogue: 0,0:13:33.21,0:13:43.08,Default,,0000,0000,0000,,process now what we saw here was a very Dialogue: 0,0:13:40.32,0:13:45.12,Default,,0000,0000,0000,,straightforward example of dependencies Dialogue: 0,0:13:43.08,0:13:47.01,Default,,0000,0000,0000,,right so we saw here that you could Dialogue: 0,0:13:45.12,0:13:48.54,Default,,0000,0000,0000,,declare files as dependencies but you Dialogue: 0,0:13:47.01,0:13:50.31,Default,,0000,0000,0000,,Kosar declare sort of transitive Dialogue: 0,0:13:48.54,0:13:51.72,Default,,0000,0000,0000,,dependencies right I depend on this Dialogue: 0,0:13:50.31,0:13:54.14,Default,,0000,0000,0000,,thing which is generated by this other Dialogue: 0,0:13:51.72,0:13:56.82,Default,,0000,0000,0000,,target very often when you work with Dialogue: 0,0:13:54.14,0:14:00.30,Default,,0000,0000,0000,,dependencies in the in the larger area Dialogue: 0,0:13:56.82,0:14:01.89,Default,,0000,0000,0000,,of software you'll find that your your Dialogue: 0,0:14:00.30,0:14:04.14,Default,,0000,0000,0000,,system ends up having many different Dialogue: 0,0:14:01.89,0:14:06.36,Default,,0000,0000,0000,,types of dependencies some of these are Dialogue: 0,0:14:04.14,0:14:09.33,Default,,0000,0000,0000,,files like we saw here some of them are Dialogue: 0,0:14:06.36,0:14:11.31,Default,,0000,0000,0000,,programs right like this sort of Dialogue: 0,0:14:09.33,0:14:13.83,Default,,0000,0000,0000,,implicitly depends on Python being Dialogue: 0,0:14:11.31,0:14:15.75,Default,,0000,0000,0000,,installed on my machine some of it might Dialogue: 0,0:14:13.83,0:14:18.27,Default,,0000,0000,0000,,be libraries right you might depend on Dialogue: 0,0:14:15.75,0:14:20.07,Default,,0000,0000,0000,,something like matplotlib which we Dialogue: 0,0:14:18.27,0:14:22.47,Default,,0000,0000,0000,,depend on here some of them might be Dialogue: 0,0:14:20.07,0:14:25.34,Default,,0000,0000,0000,,system libraries like open SSL or open Dialogue: 0,0:14:22.47,0:14:28.80,Default,,0000,0000,0000,,SSH or like low-level crypto libraries Dialogue: 0,0:14:25.34,0:14:30.75,Default,,0000,0000,0000,,and you don't necessarily declare all of Dialogue: 0,0:14:28.80,0:14:32.61,Default,,0000,0000,0000,,them very often there's sort of an an Dialogue: 0,0:14:30.75,0:14:35.28,Default,,0000,0000,0000,,assumption about what is installed on Dialogue: 0,0:14:32.61,0:14:37.56,Default,,0000,0000,0000,,the given system what you'll find is Dialogue: 0,0:14:35.28,0:14:39.18,Default,,0000,0000,0000,,that for most places where you have Dialogue: 0,0:14:37.56,0:14:41.55,Default,,0000,0000,0000,,dependencies there are tools for Dialogue: 0,0:14:39.18,0:14:44.13,Default,,0000,0000,0000,,managing those dependencies for you and Dialogue: 0,0:14:41.55,0:14:45.69,Default,,0000,0000,0000,,very often these systems you might Dialogue: 0,0:14:44.13,0:14:49.05,Default,,0000,0000,0000,,depend on are stored in what are known Dialogue: 0,0:14:45.69,0:14:52.05,Default,,0000,0000,0000,,as repositories so repository is just a Dialogue: 0,0:14:49.05,0:14:55.26,Default,,0000,0000,0000,,collection of things usually related Dialogue: 0,0:14:52.05,0:14:57.21,Default,,0000,0000,0000,,that you can install that's basically Dialogue: 0,0:14:55.26,0:14:58.47,Default,,0000,0000,0000,,all a repository is and you might be Dialogue: 0,0:14:57.21,0:15:00.93,Default,,0000,0000,0000,,familiar with some of them already Dialogue: 0,0:14:58.47,0:15:03.18,Default,,0000,0000,0000,,right so some examples of repositories Dialogue: 0,0:15:00.93,0:15:05.94,Default,,0000,0000,0000,,are pi PI which is a well-known Dialogue: 0,0:15:03.18,0:15:08.37,Default,,0000,0000,0000,,repository for Python packages rubygems Dialogue: 0,0:15:05.94,0:15:11.34,Default,,0000,0000,0000,,which is similar for ruby crates or io Dialogue: 0,0:15:08.37,0:15:13.89,Default,,0000,0000,0000,,for rust NPM for nodejs Dialogue: 0,0:15:11.34,0:15:15.87,Default,,0000,0000,0000,,but other things the repositories too Dialogue: 0,0:15:13.89,0:15:19.35,Default,,0000,0000,0000,,right like there are positives for Dialogue: 0,0:15:15.87,0:15:22.02,Default,,0000,0000,0000,,cryptographic keys like key base there Dialogue: 0,0:15:19.35,0:15:24.15,Default,,0000,0000,0000,,are repositories for system installed Dialogue: 0,0:15:22.02,0:15:27.24,Default,,0000,0000,0000,,packages like if you ever use the apt Dialogue: 0,0:15:24.15,0:15:28.80,Default,,0000,0000,0000,,tool in Ubuntu or in Debian you are Dialogue: 0,0:15:27.24,0:15:30.81,Default,,0000,0000,0000,,interacting with a package repository Dialogue: 0,0:15:28.80,0:15:32.97,Default,,0000,0000,0000,,where people who have written like Dialogue: 0,0:15:30.81,0:15:34.67,Default,,0000,0000,0000,,programs and libraries upload them so Dialogue: 0,0:15:32.97,0:15:37.74,Default,,0000,0000,0000,,that you can then install them Dialogue: 0,0:15:34.67,0:15:40.20,Default,,0000,0000,0000,,similarly you might have repositories Dialogue: 0,0:15:37.74,0:15:42.03,Default,,0000,0000,0000,,are entirely open right so the Ubuntu Dialogue: 0,0:15:40.20,0:15:44.82,Default,,0000,0000,0000,,repositories for example are usually Dialogue: 0,0:15:42.03,0:15:46.38,Default,,0000,0000,0000,,provided by the Ubuntu developers but in Dialogue: 0,0:15:44.82,0:15:47.43,Default,,0000,0000,0000,,Arch Linux there might there is Dialogue: 0,0:15:46.38,0:15:49.59,Default,,0000,0000,0000,,something called the arch user Dialogue: 0,0:15:47.43,0:15:51.78,Default,,0000,0000,0000,,repository where users can just share Dialogue: 0,0:15:49.59,0:15:53.37,Default,,0000,0000,0000,,their own libraries and their own Dialogue: 0,0:15:51.78,0:15:55.44,Default,,0000,0000,0000,,packages themselves. Very often, Dialogue: 0,0:15:53.37,0:15:58.26,Default,,0000,0000,0000,,repositories are either sort of managed Dialogue: 0,0:15:55.44,0:15:59.79,Default,,0000,0000,0000,,or they are just entirely open and you Dialogue: 0,0:15:58.26,0:16:01.98,Default,,0000,0000,0000,,should often be aware of this because if Dialogue: 0,0:15:59.79,0:16:04.05,Default,,0000,0000,0000,,you're using an entirely open repository Dialogue: 0,0:16:01.98,0:16:05.67,Default,,0000,0000,0000,,maybe the security guarantees you get Dialogue: 0,0:16:04.05,0:16:09.06,Default,,0000,0000,0000,,from that are less than what you get in Dialogue: 0,0:16:05.67,0:16:10.95,Default,,0000,0000,0000,,a controlled repository one thing you'll Dialogue: 0,0:16:09.06,0:16:13.79,Default,,0000,0000,0000,,notice if you start using repositories Dialogue: 0,0:16:10.95,0:16:17.04,Default,,0000,0000,0000,,is a very often software is versioned Dialogue: 0,0:16:13.79,0:16:18.18,Default,,0000,0000,0000,,and what I mean by version well you Dialogue: 0,0:16:17.04,0:16:20.19,Default,,0000,0000,0000,,might have seen this for stuff like Dialogue: 0,0:16:18.18,0:16:24.66,Default,,0000,0000,0000,,browsers right where there might be Dialogue: 0,0:16:20.19,0:16:33.60,Default,,0000,0000,0000,,something like starting like Chrome Dialogue: 0,0:16:24.66,0:16:38.43,Default,,0000,0000,0000,,version 64 dot zero dot two zero one 903 Dialogue: 0,0:16:33.60,0:16:44.16,Default,,0000,0000,0000,,24 right this is a version number it Dialogue: 0,0:16:38.43,0:16:45.99,Default,,0000,0000,0000,,might there's a dot here this is one Dialogue: 0,0:16:44.16,0:16:50.40,Default,,0000,0000,0000,,kind of version number. But, sometimes, if Dialogue: 0,0:16:45.99,0:16:52.08,Default,,0000,0000,0000,,you start, I don't know, like Photoshop or Dialogue: 0,0:16:50.40,0:16:54.35,Default,,0000,0000,0000,,you start any other tool, there might be Dialogue: 0,0:16:52.08,0:16:58.17,Default,,0000,0000,0000,,other kind of versions that are, like, Dialogue: 0,0:16:54.35,0:16:59.94,Default,,0000,0000,0000,,8.1 dot seven right these version Dialogue: 0,0:16:58.17,0:17:01.47,Default,,0000,0000,0000,,numbers are usually numerical but not Dialogue: 0,0:16:59.94,0:17:03.18,Default,,0000,0000,0000,,always sometimes they have hashes in Dialogue: 0,0:17:01.47,0:17:05.01,Default,,0000,0000,0000,,them for example to refer to git commits Dialogue: 0,0:17:03.18,0:17:07.29,Default,,0000,0000,0000,,but you might wonder why do we have Dialogue: 0,0:17:05.01,0:17:08.73,Default,,0000,0000,0000,,these why is it even important that you Dialogue: 0,0:17:07.29,0:17:11.43,Default,,0000,0000,0000,,add a number to software that you Dialogue: 0,0:17:08.73,0:17:15.96,Default,,0000,0000,0000,,release the primary reason for this is Dialogue: 0,0:17:11.43,0:17:19.11,Default,,0000,0000,0000,,because it enables me to know whether my Dialogue: 0,0:17:15.96,0:17:21.30,Default,,0000,0000,0000,,software would break imagine that I have Dialogue: 0,0:17:19.11,0:17:25.32,Default,,0000,0000,0000,,a dependency on a library that Jose has Dialogue: 0,0:17:21.30,0:17:26.64,Default,,0000,0000,0000,,written right and Jose is constantly Dialogue: 0,0:17:25.32,0:17:28.35,Default,,0000,0000,0000,,doing changes to his library because he Dialogue: 0,0:17:26.64,0:17:29.91,Default,,0000,0000,0000,,wants to make it better and he decides Dialogue: 0,0:17:28.35,0:17:32.13,Default,,0000,0000,0000,,that one of the functions that his Dialogue: 0,0:17:29.91,0:17:35.25,Default,,0000,0000,0000,,library exposes has a bad name so he Dialogue: 0,0:17:32.13,0:17:38.82,Default,,0000,0000,0000,,renames it my software suddenly stops Dialogue: 0,0:17:35.25,0:17:40.56,Default,,0000,0000,0000,,working right because I my library calls Dialogue: 0,0:17:38.82,0:17:43.02,Default,,0000,0000,0000,,a function on Jose's library but that Dialogue: 0,0:17:40.56,0:17:44.67,Default,,0000,0000,0000,,function no longer exists depending on Dialogue: 0,0:17:43.02,0:17:48.24,Default,,0000,0000,0000,,which version people have installed of Dialogue: 0,0:17:44.67,0:17:50.25,Default,,0000,0000,0000,,Jose's library versions helps Dialogue: 0,0:17:48.24,0:17:52.50,Default,,0000,0000,0000,,because I can say I depend on this Dialogue: 0,0:17:50.25,0:17:54.72,Default,,0000,0000,0000,,version of Jose's library and there has Dialogue: 0,0:17:52.50,0:17:58.23,Default,,0000,0000,0000,,to be some rules around what is Jose Dialogue: 0,0:17:54.72,0:18:00.30,Default,,0000,0000,0000,,allowed to do within a given version if Dialogue: 0,0:17:58.23,0:18:02.34,Default,,0000,0000,0000,,he makes a change that I can no longer Dialogue: 0,0:18:00.30,0:18:03.90,Default,,0000,0000,0000,,rely on his version has to change in Dialogue: 0,0:18:02.34,0:18:06.75,Default,,0000,0000,0000,,some way Dialogue: 0,0:18:03.90,0:18:09.78,Default,,0000,0000,0000,,there are many thoughts on exactly how Dialogue: 0,0:18:06.75,0:18:11.73,Default,,0000,0000,0000,,this should work like what are the rules Dialogue: 0,0:18:09.78,0:18:14.46,Default,,0000,0000,0000,,for publishing new versions how do they Dialogue: 0,0:18:11.73,0:18:17.97,Default,,0000,0000,0000,,change the version numbers um some of Dialogue: 0,0:18:14.46,0:18:19.71,Default,,0000,0000,0000,,them are just dictated by time so for Dialogue: 0,0:18:17.97,0:18:22.02,Default,,0000,0000,0000,,example if you look at browsers they Dialogue: 0,0:18:19.71,0:18:24.33,Default,,0000,0000,0000,,very often have time versions that look Dialogue: 0,0:18:22.02,0:18:26.13,Default,,0000,0000,0000,,like this they have a version number on Dialogue: 0,0:18:24.33,0:18:28.53,Default,,0000,0000,0000,,the far left that's just like which Dialogue: 0,0:18:26.13,0:18:30.41,Default,,0000,0000,0000,,release and then they have sort of an Dialogue: 0,0:18:28.53,0:18:32.85,Default,,0000,0000,0000,,incremental number that is usually zero Dialogue: 0,0:18:30.41,0:18:37.20,Default,,0000,0000,0000,,and then they have a date at the end Dialogue: 0,0:18:32.85,0:18:40.23,Default,,0000,0000,0000,,right so this is March 24th 2019 for Dialogue: 0,0:18:37.20,0:18:44.67,Default,,0000,0000,0000,,some reason and usually that will Dialogue: 0,0:18:40.23,0:18:48.09,Default,,0000,0000,0000,,indicate that this is version 64 of Dialogue: 0,0:18:44.67,0:18:50.55,Default,,0000,0000,0000,,Firefox from this date and then if they Dialogue: 0,0:18:48.09,0:18:51.96,Default,,0000,0000,0000,,release sort of patches or hot fixes for Dialogue: 0,0:18:50.55,0:18:54.18,Default,,0000,0000,0000,,security bugs they might increment the Dialogue: 0,0:18:51.96,0:18:58.80,Default,,0000,0000,0000,,date but keep the version of the at the Dialogue: 0,0:18:54.18,0:19:01.05,Default,,0000,0000,0000,,left the same and people have strong Dialogue: 0,0:18:58.80,0:19:03.18,Default,,0000,0000,0000,,strong opinions on exactly what the Dialogue: 0,0:19:01.05,0:19:05.43,Default,,0000,0000,0000,,scheme should be and you sort of depend Dialogue: 0,0:19:03.18,0:19:08.07,Default,,0000,0000,0000,,on knowing what schemes other people use Dialogue: 0,0:19:05.43,0:19:09.69,Default,,0000,0000,0000,,right if I don't know what scheme Jose Dialogue: 0,0:19:08.07,0:19:11.73,Default,,0000,0000,0000,,is using for changing his versions Dialogue: 0,0:19:09.69,0:19:14.43,Default,,0000,0000,0000,,maybe I just have to say you have to run Dialogue: 0,0:19:11.73,0:19:17.55,Default,,0000,0000,0000,,like eight one seven of Jose's software Dialogue: 0,0:19:14.43,0:19:19.23,Default,,0000,0000,0000,,otherwise I cannot build my software but Dialogue: 0,0:19:17.55,0:19:21.69,Default,,0000,0000,0000,,this is a problem, too, right? Dialogue: 0,0:19:19.23,0:19:23.61,Default,,0000,0000,0000,,Imagine that, Jose, as a responsible Dialogue: 0,0:19:21.69,0:19:26.88,Default,,0000,0000,0000,,developer of his library, and he finds Dialogue: 0,0:19:23.61,0:19:29.19,Default,,0000,0000,0000,,the security bug and he fixes it but it Dialogue: 0,0:19:26.88,0:19:31.26,Default,,0000,0000,0000,,doesn't change the external interfaces Dialogue: 0,0:19:29.19,0:19:34.08,Default,,0000,0000,0000,,library no functions changed no types Dialogue: 0,0:19:31.26,0:19:37.14,Default,,0000,0000,0000,,change then I want people to be building Dialogue: 0,0:19:34.08,0:19:39.42,Default,,0000,0000,0000,,my software with his new version and it Dialogue: 0,0:19:37.14,0:19:40.83,Default,,0000,0000,0000,,just so happens that building mine works Dialogue: 0,0:19:39.42,0:19:42.63,Default,,0000,0000,0000,,just fine with his new version because Dialogue: 0,0:19:40.83,0:19:47.34,Default,,0000,0000,0000,,that particular version didn't change Dialogue: 0,0:19:42.63,0:19:48.75,Default,,0000,0000,0000,,anything I depended on so one attempted Dialogue: 0,0:19:47.34,0:19:51.27,Default,,0000,0000,0000,,solution to this is something called Dialogue: 0,0:19:48.75,0:19:53.40,Default,,0000,0000,0000,,semantic versioning. So, in semantic Dialogue: 0,0:19:51.27,0:19:55.35,Default,,0000,0000,0000,,versioning, we give each of the numbers Dialogue: 0,0:19:53.40,0:19:57.48,Default,,0000,0000,0000,,separated by dots in a version number, a Dialogue: 0,0:19:55.35,0:19:59.70,Default,,0000,0000,0000,,particular meaning. And, we give a Dialogue: 0,0:19:57.48,0:20:01.00,Default,,0000,0000,0000,,contract for when you have to increment Dialogue: 0,0:19:59.70,0:20:06.73,Default,,0000,0000,0000,,the different numbers Dialogue: 0,0:20:01.00,0:20:14.91,Default,,0000,0000,0000,,in particular in semantic versioning we Dialogue: 0,0:20:06.73,0:20:20.26,Default,,0000,0000,0000,,call this the major version we call this Dialogue: 0,0:20:14.91,0:20:25.75,Default,,0000,0000,0000,,the minor version and we call this the Dialogue: 0,0:20:20.26,0:20:29.58,Default,,0000,0000,0000,,patch version and the rules around this Dialogue: 0,0:20:25.75,0:20:33.25,Default,,0000,0000,0000,,are as follows if you make a change to Dialogue: 0,0:20:29.58,0:20:35.53,Default,,0000,0000,0000,,whatever your software is and and the Dialogue: 0,0:20:33.25,0:20:38.14,Default,,0000,0000,0000,,change you made is entirely backwards Dialogue: 0,0:20:35.53,0:20:40.69,Default,,0000,0000,0000,,compatible right like it does not add Dialogue: 0,0:20:38.14,0:20:43.57,Default,,0000,0000,0000,,anything it does not remove anything it Dialogue: 0,0:20:40.69,0:20:47.29,Default,,0000,0000,0000,,does not rename anything externally it Dialogue: 0,0:20:43.57,0:20:49.75,Default,,0000,0000,0000,,is as if nothing changed then you only Dialogue: 0,0:20:47.29,0:20:52.00,Default,,0000,0000,0000,,increment the patch number nothing else Dialogue: 0,0:20:49.75,0:20:54.85,Default,,0000,0000,0000,,so usually security fixes for example Dialogue: 0,0:20:52.00,0:20:58.30,Default,,0000,0000,0000,,will increment the patch number if you Dialogue: 0,0:20:54.85,0:20:59.35,Default,,0000,0000,0000,,add something to your library I'm just Dialogue: 0,0:20:58.30,0:21:01.09,Default,,0000,0000,0000,,gonna call them libraries because Dialogue: 0,0:20:59.35,0:21:03.94,Default,,0000,0000,0000,,usually libraries are the things where Dialogue: 0,0:21:01.09,0:21:05.59,Default,,0000,0000,0000,,this matters so for a library if you add Dialogue: 0,0:21:03.94,0:21:07.93,Default,,0000,0000,0000,,something to the library you increment Dialogue: 0,0:21:05.59,0:21:11.14,Default,,0000,0000,0000,,the minor version and you set the patch Dialogue: 0,0:21:07.93,0:21:13.48,Default,,0000,0000,0000,,to zero so in this case if we were to do Dialogue: 0,0:21:11.14,0:21:15.55,Default,,0000,0000,0000,,a minor release the next minor release Dialogue: 0,0:21:13.48,0:21:19.03,Default,,0000,0000,0000,,version number would be eight to zero Dialogue: 0,0:21:15.55,0:21:22.51,Default,,0000,0000,0000,,and the reason we do this is because I Dialogue: 0,0:21:19.03,0:21:26.26,Default,,0000,0000,0000,,might have a dependency on a feature the Dialogue: 0,0:21:22.51,0:21:28.39,Default,,0000,0000,0000,,josè added in a 2-0 which means you Dialogue: 0,0:21:26.26,0:21:30.43,Default,,0000,0000,0000,,can't build my software with eight one Dialogue: 0,0:21:28.39,0:21:32.92,Default,,0000,0000,0000,,seven that would not be okay Dialogue: 0,0:21:30.43,0:21:34.33,Default,,0000,0000,0000,,even though if you if I had written it Dialogue: 0,0:21:32.92,0:21:36.54,Default,,0000,0000,0000,,towards eight one seven you could run it Dialogue: 0,0:21:34.33,0:21:38.62,Default,,0000,0000,0000,,with a 2-0 the reverse is not true Dialogue: 0,0:21:36.54,0:21:42.31,Default,,0000,0000,0000,,because it might not have been added yet Dialogue: 0,0:21:38.62,0:21:43.84,Default,,0000,0000,0000,,and then finally the major version you Dialogue: 0,0:21:42.31,0:21:48.58,Default,,0000,0000,0000,,increment if you make a backwards Dialogue: 0,0:21:43.84,0:21:50.80,Default,,0000,0000,0000,,incompatible change where if my software Dialogue: 0,0:21:48.58,0:21:52.96,Default,,0000,0000,0000,,used to work with whatever version you Dialogue: 0,0:21:50.80,0:21:54.40,Default,,0000,0000,0000,,had and then you make a change that Dialogue: 0,0:21:52.96,0:21:56.53,Default,,0000,0000,0000,,means that my software might no longer Dialogue: 0,0:21:54.40,0:21:58.48,Default,,0000,0000,0000,,work such as removing a function or Dialogue: 0,0:21:56.53,0:22:00.70,Default,,0000,0000,0000,,renaming it then you increment the major Dialogue: 0,0:21:58.48,0:22:02.89,Default,,0000,0000,0000,,version and set minor and patch to zero Dialogue: 0,0:22:00.70,0:22:07.18,Default,,0000,0000,0000,,so the next major version here would be Dialogue: 0,0:22:02.89,0:22:09.82,Default,,0000,0000,0000,,nine zero zero taken together these Dialogue: 0,0:22:07.18,0:22:11.74,Default,,0000,0000,0000,,allow us to do really nice things when Dialogue: 0,0:22:09.82,0:22:14.05,Default,,0000,0000,0000,,setting what our dependencies are in Dialogue: 0,0:22:11.74,0:22:15.82,Default,,0000,0000,0000,,particular if I depend on a Dialogue: 0,0:22:14.05,0:22:18.37,Default,,0000,0000,0000,,particular version of someone's library Dialogue: 0,0:22:15.82,0:22:20.59,Default,,0000,0000,0000,,rather than saying it has to be exactly Dialogue: 0,0:22:18.37,0:22:23.28,Default,,0000,0000,0000,,this version what I'm really saying is Dialogue: 0,0:22:20.59,0:22:27.79,Default,,0000,0000,0000,,it has to be the same major version and Dialogue: 0,0:22:23.28,0:22:30.70,Default,,0000,0000,0000,,at least the same minor version and the Dialogue: 0,0:22:27.79,0:22:32.61,Default,,0000,0000,0000,,patch can be whatever this means that if Dialogue: 0,0:22:30.70,0:22:36.13,Default,,0000,0000,0000,,I have a dependency on Jose software Dialogue: 0,0:22:32.61,0:22:39.25,Default,,0000,0000,0000,,then any later release that is still Dialogue: 0,0:22:36.13,0:22:42.09,Default,,0000,0000,0000,,within the same major is fine that Dialogue: 0,0:22:39.25,0:22:45.06,Default,,0000,0000,0000,,includes keep in mind an earlier version Dialogue: 0,0:22:42.09,0:22:47.26,Default,,0000,0000,0000,,assuming that the minor is the same Dialogue: 0,0:22:45.06,0:22:49.21,Default,,0000,0000,0000,,imagine that you are saw on some older Dialogue: 0,0:22:47.26,0:22:52.06,Default,,0000,0000,0000,,computer that has like version eight one Dialogue: 0,0:22:49.21,0:22:53.83,Default,,0000,0000,0000,,three in theory my software should work Dialogue: 0,0:22:52.06,0:22:56.53,Default,,0000,0000,0000,,just fine with eight one three as well Dialogue: 0,0:22:53.83,0:22:58.03,Default,,0000,0000,0000,,it might have whatever bug the Jose Dialogue: 0,0:22:56.53,0:23:00.16,Default,,0000,0000,0000,,fixed in between like whatever security Dialogue: 0,0:22:58.03,0:23:02.32,Default,,0000,0000,0000,,issue but this has the nice property Dialogue: 0,0:23:00.16,0:23:03.73,Default,,0000,0000,0000,,that now you can share dependencies Dialogue: 0,0:23:02.32,0:23:05.68,Default,,0000,0000,0000,,between many different pieces of Dialogue: 0,0:23:03.73,0:23:08.95,Default,,0000,0000,0000,,software on your machine if you have Dialogue: 0,0:23:05.68,0:23:10.57,Default,,0000,0000,0000,,version eight-30 installed and there are Dialogue: 0,0:23:08.95,0:23:12.16,Default,,0000,0000,0000,,bunch of different software that like Dialogue: 0,0:23:10.57,0:23:14.26,Default,,0000,0000,0000,,one requires eight one seven one Dialogue: 0,0:23:12.16,0:23:16.72,Default,,0000,0000,0000,,requires eight two four one requires Dialogue: 0,0:23:14.26,0:23:18.28,Default,,0000,0000,0000,,eight zero one all of them can use the Dialogue: 0,0:23:16.72,0:23:23.14,Default,,0000,0000,0000,,same version of that dependencies you Dialogue: 0,0:23:18.28,0:23:26.86,Default,,0000,0000,0000,,only needed installed once one of the Dialogue: 0,0:23:23.14,0:23:28.78,Default,,0000,0000,0000,,most common or one of the most familiar Dialogue: 0,0:23:26.86,0:23:30.52,Default,,0000,0000,0000,,perhaps examples of this kind of Dialogue: 0,0:23:28.78,0:23:33.46,Default,,0000,0000,0000,,semantic versioning is if you look at Dialogue: 0,0:23:30.52,0:23:35.71,Default,,0000,0000,0000,,the Python versioning so many of you may Dialogue: 0,0:23:33.46,0:23:38.29,Default,,0000,0000,0000,,have come across this where python 3 and Dialogue: 0,0:23:35.71,0:23:40.15,Default,,0000,0000,0000,,python 2 are not compatible with one Dialogue: 0,0:23:38.29,0:23:43.33,Default,,0000,0000,0000,,another they're not backwards compatible Dialogue: 0,0:23:40.15,0:23:46.33,Default,,0000,0000,0000,,if you write code in Python 2 you try to Dialogue: 0,0:23:43.33,0:23:48.25,Default,,0000,0000,0000,,run in Python 3 it might not work there Dialogue: 0,0:23:46.33,0:23:51.21,Default,,0000,0000,0000,,are some cases where it will but that is Dialogue: 0,0:23:48.25,0:23:53.38,Default,,0000,0000,0000,,more accidental than anything else and Dialogue: 0,0:23:51.21,0:23:56.29,Default,,0000,0000,0000,,Python actually follows semantic Dialogue: 0,0:23:53.38,0:23:59.02,Default,,0000,0000,0000,,versioning at least mostly and so if you Dialogue: 0,0:23:56.29,0:24:02.38,Default,,0000,0000,0000,,write software that runs on Python 3.5 Dialogue: 0,0:23:59.02,0:24:05.05,Default,,0000,0000,0000,,then it should also work in 3.6 3.7 and Dialogue: 0,0:24:02.38,0:24:07.48,Default,,0000,0000,0000,,3.8 it will not necessarily work in Dialogue: 0,0:24:05.05,0:24:10.30,Default,,0000,0000,0000,,Python 4 although that will hopefully be Dialogue: 0,0:24:07.48,0:24:13.63,Default,,0000,0000,0000,,a long time away but if you write code Dialogue: 0,0:24:10.30,0:24:17.59,Default,,0000,0000,0000,,for Python 3.5 it will it will possibly Dialogue: 0,0:24:13.63,0:24:19.57,Default,,0000,0000,0000,,not run on Python 3.4 so one thing you Dialogue: 0,0:24:17.59,0:24:21.91,Default,,0000,0000,0000,,will see many software projects do is Dialogue: 0,0:24:19.57,0:24:23.68,Default,,0000,0000,0000,,they try to bring the version Dialogue: 0,0:24:21.91,0:24:26.61,Default,,0000,0000,0000,,requirements they have as low as Dialogue: 0,0:24:23.68,0:24:29.52,Default,,0000,0000,0000,,possible if you can depend on major Dialogue: 0,0:24:26.61,0:24:31.44,Default,,0000,0000,0000,,and then minor in patch zero zero that Dialogue: 0,0:24:29.52,0:24:33.99,Default,,0000,0000,0000,,is the best possible dependency you can Dialogue: 0,0:24:31.44,0:24:36.21,Default,,0000,0000,0000,,have because it is completely liberal as Dialogue: 0,0:24:33.99,0:24:38.16,Default,,0000,0000,0000,,to which version of that major you're Dialogue: 0,0:24:36.21,0:24:39.72,Default,,0000,0000,0000,,depending on sometimes this is hard Dialogue: 0,0:24:38.16,0:24:41.76,Default,,0000,0000,0000,,right sometimes you genuinely need a Dialogue: 0,0:24:39.72,0:24:43.59,Default,,0000,0000,0000,,feature that was added but the lower you Dialogue: 0,0:24:41.76,0:24:47.87,Default,,0000,0000,0000,,can get the better it is for those who Dialogue: 0,0:24:43.59,0:24:47.87,Default,,0000,0000,0000,,want to depend on your software in turn Dialogue: 0,0:24:48.68,0:24:52.71,Default,,0000,0000,0000,,when working with these sort of Dialogue: 0,0:24:50.82,0:24:55.02,Default,,0000,0000,0000,,dependency management systems or in with Dialogue: 0,0:24:52.71,0:24:57.66,Default,,0000,0000,0000,,versioning in general you'll often come Dialogue: 0,0:24:55.02,0:24:59.73,Default,,0000,0000,0000,,across this notion of lock files you Dialogue: 0,0:24:57.66,0:25:01.38,Default,,0000,0000,0000,,might have seen this where like you try Dialogue: 0,0:24:59.73,0:25:04.14,Default,,0000,0000,0000,,to do something and it says like cannot Dialogue: 0,0:25:01.38,0:25:06.48,Default,,0000,0000,0000,,reconcile versions or you get an error Dialogue: 0,0:25:04.14,0:25:08.97,Default,,0000,0000,0000,,like lock file already exists these are Dialogue: 0,0:25:06.48,0:25:11.16,Default,,0000,0000,0000,,often somewhat different topics but in Dialogue: 0,0:25:08.97,0:25:12.99,Default,,0000,0000,0000,,general the notion of a lock file is to Dialogue: 0,0:25:11.16,0:25:16.23,Default,,0000,0000,0000,,make sure that you don't accidentally Dialogue: 0,0:25:12.99,0:25:18.54,Default,,0000,0000,0000,,update something the lock file at its Dialogue: 0,0:25:16.23,0:25:20.31,Default,,0000,0000,0000,,core is really just a list of your Dialogue: 0,0:25:18.54,0:25:23.34,Default,,0000,0000,0000,,dependencies and which version of them Dialogue: 0,0:25:20.31,0:25:25.11,Default,,0000,0000,0000,,you are currently using right so my Dialogue: 0,0:25:23.34,0:25:27.42,Default,,0000,0000,0000,,version string might be eight one seven Dialogue: 0,0:25:25.11,0:25:30.29,Default,,0000,0000,0000,,and the latest version like on the Dialogue: 0,0:25:27.42,0:25:32.88,Default,,0000,0000,0000,,internet somewhere might be a three zero Dialogue: 0,0:25:30.29,0:25:34.77,Default,,0000,0000,0000,,but whatever is installed on my system Dialogue: 0,0:25:32.88,0:25:36.15,Default,,0000,0000,0000,,is not necessarily one of those two it Dialogue: 0,0:25:34.77,0:25:39.03,Default,,0000,0000,0000,,might be like eight two four or Dialogue: 0,0:25:36.15,0:25:42.03,Default,,0000,0000,0000,,something like that and the lock file Dialogue: 0,0:25:39.03,0:25:45.18,Default,,0000,0000,0000,,will then say dependency josè version Dialogue: 0,0:25:42.03,0:25:48.39,Default,,0000,0000,0000,,eight to four and the reason you want to Dialogue: 0,0:25:45.18,0:25:51.48,Default,,0000,0000,0000,,lock file there can be many one of them Dialogue: 0,0:25:48.39,0:25:55.11,Default,,0000,0000,0000,,is that you might want your builds to be Dialogue: 0,0:25:51.48,0:25:57.81,Default,,0000,0000,0000,,fast if every single time you try to Dialogue: 0,0:25:55.11,0:25:59.16,Default,,0000,0000,0000,,build your project whatever tool you Dialogue: 0,0:25:57.81,0:26:01.14,Default,,0000,0000,0000,,were using download the latest version Dialogue: 0,0:25:59.16,0:26:02.97,Default,,0000,0000,0000,,and then compile it and then compile Dialogue: 0,0:26:01.14,0:26:04.95,Default,,0000,0000,0000,,your thing you might wait for a really Dialogue: 0,0:26:02.97,0:26:06.60,Default,,0000,0000,0000,,long time each time depending on the Dialogue: 0,0:26:04.95,0:26:09.87,Default,,0000,0000,0000,,release cycle of your dependencies if Dialogue: 0,0:26:06.60,0:26:10.47,Default,,0000,0000,0000,,you use a lock file then unless the Dialogue: 0,0:26:09.87,0:26:12.03,Default,,0000,0000,0000,,version Dialogue: 0,0:26:10.47,0:26:14.01,Default,,0000,0000,0000,,unless you've updated the version in Dialogue: 0,0:26:12.03,0:26:15.96,Default,,0000,0000,0000,,your lock file it'll just use whatever Dialogue: 0,0:26:14.01,0:26:19.08,Default,,0000,0000,0000,,it built previously for that dependency Dialogue: 0,0:26:15.96,0:26:21.75,Default,,0000,0000,0000,,and your sort of development cycle can Dialogue: 0,0:26:19.08,0:26:24.98,Default,,0000,0000,0000,,be a lot faster another reason to use Dialogue: 0,0:26:21.75,0:26:27.48,Default,,0000,0000,0000,,lock files is to get reproducible builds Dialogue: 0,0:26:24.98,0:26:29.76,Default,,0000,0000,0000,,imagine that I produce some kind of Dialogue: 0,0:26:27.48,0:26:32.88,Default,,0000,0000,0000,,security related software and I very Dialogue: 0,0:26:29.76,0:26:35.22,Default,,0000,0000,0000,,carefully audited my dependencies and I Dialogue: 0,0:26:32.88,0:26:38.88,Default,,0000,0000,0000,,produce like a signed binary of like Dialogue: 0,0:26:35.22,0:26:39.64,Default,,0000,0000,0000,,here is thus like a sworn statement for Dialogue: 0,0:26:38.88,0:26:43.00,Default,,0000,0000,0000,,me that this Dialogue: 0,0:26:39.64,0:26:45.82,Default,,0000,0000,0000,,version is secure if I didn't include a Dialogue: 0,0:26:43.00,0:26:48.10,Default,,0000,0000,0000,,lock file then by the time someone else Dialogue: 0,0:26:45.82,0:26:49.72,Default,,0000,0000,0000,,installs my program they might get a Dialogue: 0,0:26:48.10,0:26:51.31,Default,,0000,0000,0000,,later version of their pendency and Dialogue: 0,0:26:49.72,0:26:53.53,Default,,0000,0000,0000,,maybe that later version as I've been Dialogue: 0,0:26:51.31,0:26:55.30,Default,,0000,0000,0000,,hacked somehow or just has some other Dialogue: 0,0:26:53.53,0:26:58.18,Default,,0000,0000,0000,,security vulnerability that I haven't Dialogue: 0,0:26:55.30,0:27:00.64,Default,,0000,0000,0000,,had a chance to look at yet right and a Dialogue: 0,0:26:58.18,0:27:03.49,Default,,0000,0000,0000,,lock file basically allows me to freeze Dialogue: 0,0:27:00.64,0:27:06.70,Default,,0000,0000,0000,,the ecosystem as of this version that I Dialogue: 0,0:27:03.49,0:27:08.83,Default,,0000,0000,0000,,have checked the extreme version of this Dialogue: 0,0:27:06.70,0:27:11.14,Default,,0000,0000,0000,,is something called ven during when you Dialogue: 0,0:27:08.83,0:27:13.63,Default,,0000,0000,0000,,vendor your dependencies it really just Dialogue: 0,0:27:11.14,0:27:15.52,Default,,0000,0000,0000,,mean you copy/paste of them ven during Dialogue: 0,0:27:13.63,0:27:18.45,Default,,0000,0000,0000,,means take whatever dependency you care Dialogue: 0,0:27:15.52,0:27:21.94,Default,,0000,0000,0000,,about and copy it into your project Dialogue: 0,0:27:18.45,0:27:24.22,Default,,0000,0000,0000,,because that way you are entirely sure Dialogue: 0,0:27:21.94,0:27:26.41,Default,,0000,0000,0000,,that you will get that version of that Dialogue: 0,0:27:24.22,0:27:28.03,Default,,0000,0000,0000,,dependency it also means that you can Dialogue: 0,0:27:26.41,0:27:29.98,Default,,0000,0000,0000,,like make modifications to it on your Dialogue: 0,0:27:28.03,0:27:31.96,Default,,0000,0000,0000,,own but it has the downsides that now Dialogue: 0,0:27:29.98,0:27:34.54,Default,,0000,0000,0000,,you no longer get these benefits of Dialogue: 0,0:27:31.96,0:27:36.34,Default,,0000,0000,0000,,versioning right you no longer have the Dialogue: 0,0:27:34.54,0:27:38.74,Default,,0000,0000,0000,,advantage that if there are newer Dialogue: 0,0:27:36.34,0:27:40.54,Default,,0000,0000,0000,,releases of that software your users Dialogue: 0,0:27:38.74,0:27:42.37,Default,,0000,0000,0000,,might get them automatically like for Dialogue: 0,0:27:40.54,0:27:49.18,Default,,0000,0000,0000,,example when Hosea fixes his security Dialogue: 0,0:27:42.37,0:27:51.52,Default,,0000,0000,0000,,issues not that he has any of course one Dialogue: 0,0:27:49.18,0:27:53.56,Default,,0000,0000,0000,,thing you'll notice is that when talking Dialogue: 0,0:27:51.52,0:27:56.26,Default,,0000,0000,0000,,about this I've been talking about sort Dialogue: 0,0:27:53.56,0:27:59.08,Default,,0000,0000,0000,,of bigger processes around your systems Dialogue: 0,0:27:56.26,0:28:01.00,Default,,0000,0000,0000,,these are things like testing they're Dialogue: 0,0:27:59.08,0:28:02.19,Default,,0000,0000,0000,,things like checking your dependency Dialogue: 0,0:28:01.00,0:28:04.39,Default,,0000,0000,0000,,versions Dialogue: 0,0:28:02.19,0:28:07.15,Default,,0000,0000,0000,,they're also things are just setting up Dialogue: 0,0:28:04.39,0:28:09.16,Default,,0000,0000,0000,,build systems and often you don't just Dialogue: 0,0:28:07.15,0:28:11.32,Default,,0000,0000,0000,,want a local build system you want to Dialogue: 0,0:28:09.16,0:28:13.45,Default,,0000,0000,0000,,build process that includes other types Dialogue: 0,0:28:11.32,0:28:15.31,Default,,0000,0000,0000,,of systems or you want them to run even Dialogue: 0,0:28:13.45,0:28:18.25,Default,,0000,0000,0000,,when your computer is not necessarily on Dialogue: 0,0:28:15.31,0:28:20.08,Default,,0000,0000,0000,,and this is why as you start working a Dialogue: 0,0:28:18.25,0:28:22.54,Default,,0000,0000,0000,,larger and larger project you will see Dialogue: 0,0:28:20.08,0:28:24.58,Default,,0000,0000,0000,,people use this idea of continuous Dialogue: 0,0:28:22.54,0:28:29.05,Default,,0000,0000,0000,,integration and continuous integration Dialogue: 0,0:28:24.58,0:28:32.05,Default,,0000,0000,0000,,systems are essentially a cloud build Dialogue: 0,0:28:29.05,0:28:33.61,Default,,0000,0000,0000,,system the idea is that you have your Dialogue: 0,0:28:32.05,0:28:36.40,Default,,0000,0000,0000,,project stored on the internet somewhere Dialogue: 0,0:28:33.61,0:28:39.46,Default,,0000,0000,0000,,and you have set it up with some kind of Dialogue: 0,0:28:36.40,0:28:41.62,Default,,0000,0000,0000,,service that is running an ongoing thing Dialogue: 0,0:28:39.46,0:28:44.14,Default,,0000,0000,0000,,you for your project whatever it might Dialogue: 0,0:28:41.62,0:28:45.84,Default,,0000,0000,0000,,be and continuous integration can be all Dialogue: 0,0:28:44.14,0:28:48.25,Default,,0000,0000,0000,,sorts of stuff it can be stuff like Dialogue: 0,0:28:45.84,0:28:50.14,Default,,0000,0000,0000,,releasing your library to pi PI Dialogue: 0,0:28:48.25,0:28:52.63,Default,,0000,0000,0000,,automatically whenever you push to a Dialogue: 0,0:28:50.14,0:28:53.44,Default,,0000,0000,0000,,particular branch it could be things Dialogue: 0,0:28:52.63,0:28:55.27,Default,,0000,0000,0000,,like Dialogue: 0,0:28:53.44,0:28:57.72,Default,,0000,0000,0000,,run your test suite whenever someone Dialogue: 0,0:28:55.27,0:29:00.70,Default,,0000,0000,0000,,submits a pull request or it could be Dialogue: 0,0:28:57.72,0:29:02.86,Default,,0000,0000,0000,,check your code style every time you Dialogue: 0,0:29:00.70,0:29:04.36,Default,,0000,0000,0000,,commit there all sorts of things you Dialogue: 0,0:29:02.86,0:29:06.34,Default,,0000,0000,0000,,could do with continuous integration and Dialogue: 0,0:29:04.36,0:29:08.23,Default,,0000,0000,0000,,the easiest way to think about them is Dialogue: 0,0:29:06.34,0:29:10.93,Default,,0000,0000,0000,,that they're sort of event triggered Dialogue: 0,0:29:08.23,0:29:12.85,Default,,0000,0000,0000,,actions so whenever a particular event Dialogue: 0,0:29:10.93,0:29:14.74,Default,,0000,0000,0000,,happens for your a possibly for your Dialogue: 0,0:29:12.85,0:29:17.20,Default,,0000,0000,0000,,project a particular action takes place Dialogue: 0,0:29:14.74,0:29:20.35,Default,,0000,0000,0000,,where the action is usually some kind of Dialogue: 0,0:29:17.20,0:29:21.52,Default,,0000,0000,0000,,script some sequence of programs they're Dialogue: 0,0:29:20.35,0:29:27.25,Default,,0000,0000,0000,,gonna be invoked and they're gonna do Dialogue: 0,0:29:21.52,0:29:29.74,Default,,0000,0000,0000,,something this is really an umbrella Dialogue: 0,0:29:27.25,0:29:32.29,Default,,0000,0000,0000,,term that encapsulate a lot of different Dialogue: 0,0:29:29.74,0:29:33.97,Default,,0000,0000,0000,,types of services so some continuous Dialogue: 0,0:29:32.29,0:29:38.01,Default,,0000,0000,0000,,integration services are very general Dialogue: 0,0:29:33.97,0:29:42.76,Default,,0000,0000,0000,,things like Travis CI or Azure pipelines Dialogue: 0,0:29:38.01,0:29:45.64,Default,,0000,0000,0000,,or github actions are all very broad CI Dialogue: 0,0:29:42.76,0:29:47.83,Default,,0000,0000,0000,,platforms they're built to let you write Dialogue: 0,0:29:45.64,0:29:50.95,Default,,0000,0000,0000,,what you want to happen whenever any Dialogue: 0,0:29:47.83,0:29:53.41,Default,,0000,0000,0000,,event that you define happens very broad Dialogue: 0,0:29:50.95,0:29:56.40,Default,,0000,0000,0000,,systems there are some more specialized Dialogue: 0,0:29:53.41,0:29:59.44,Default,,0000,0000,0000,,systems that deal with things like Dialogue: 0,0:29:56.40,0:30:02.02,Default,,0000,0000,0000,,continuous integration coverage testing Dialogue: 0,0:29:59.44,0:30:03.88,Default,,0000,0000,0000,,so like annotate your code and show you Dialogue: 0,0:30:02.02,0:30:05.56,Default,,0000,0000,0000,,have no tests that test this piece of Dialogue: 0,0:30:03.88,0:30:07.42,Default,,0000,0000,0000,,code and they're built only for that Dialogue: 0,0:30:05.56,0:30:10.99,Default,,0000,0000,0000,,purpose or they're built only for Dialogue: 0,0:30:07.42,0:30:13.48,Default,,0000,0000,0000,,testing browser-based libraries or Dialogue: 0,0:30:10.99,0:30:15.49,Default,,0000,0000,0000,,something like that and so often you can Dialogue: 0,0:30:13.48,0:30:17.11,Default,,0000,0000,0000,,find CI tools that are built for the Dialogue: 0,0:30:15.49,0:30:18.40,Default,,0000,0000,0000,,particular project you're working on or Dialogue: 0,0:30:17.11,0:30:20.68,Default,,0000,0000,0000,,you can use one of these broader Dialogue: 0,0:30:18.40,0:30:22.30,Default,,0000,0000,0000,,providers and one thing that's nice is Dialogue: 0,0:30:20.68,0:30:24.19,Default,,0000,0000,0000,,that many of them are actually free Dialogue: 0,0:30:22.30,0:30:25.63,Default,,0000,0000,0000,,especially for open source software or Dialogue: 0,0:30:24.19,0:30:30.16,Default,,0000,0000,0000,,if you're a student you can often get Dialogue: 0,0:30:25.63,0:30:32.65,Default,,0000,0000,0000,,them for free as well in general the way Dialogue: 0,0:30:30.16,0:30:35.71,Default,,0000,0000,0000,,you use the CI system is that you add a Dialogue: 0,0:30:32.65,0:30:37.78,Default,,0000,0000,0000,,file to your repository and this file is Dialogue: 0,0:30:35.71,0:30:39.73,Default,,0000,0000,0000,,often known as a recipe and what the Dialogue: 0,0:30:37.78,0:30:41.98,Default,,0000,0000,0000,,recipe specifies is this sort of Dialogue: 0,0:30:39.73,0:30:44.53,Default,,0000,0000,0000,,dependency cycle again sort of what we Dialogue: 0,0:30:41.98,0:30:46.66,Default,,0000,0000,0000,,saw with make files it's not quite the Dialogue: 0,0:30:44.53,0:30:49.30,Default,,0000,0000,0000,,same the events instead of being files Dialogue: 0,0:30:46.66,0:30:51.61,Default,,0000,0000,0000,,might be something like when someone Dialogue: 0,0:30:49.30,0:30:54.79,Default,,0000,0000,0000,,pushes a commit or when a commit Dialogue: 0,0:30:51.61,0:30:57.12,Default,,0000,0000,0000,,contains a particular message or when Dialogue: 0,0:30:54.79,0:31:00.79,Default,,0000,0000,0000,,someone submits a pull request or Dialogue: 0,0:30:57.12,0:31:02.56,Default,,0000,0000,0000,,continuously write one example of a Dialogue: 0,0:31:00.79,0:31:04.42,Default,,0000,0000,0000,,continuous integration service that's Dialogue: 0,0:31:02.56,0:31:05.92,Default,,0000,0000,0000,,not tied to any particular change to Dialogue: 0,0:31:04.42,0:31:06.53,Default,,0000,0000,0000,,your code is something called the Dialogue: 0,0:31:05.92,0:31:09.20,Default,,0000,0000,0000,,dependable Dialogue: 0,0:31:06.53,0:31:10.88,Default,,0000,0000,0000,,you can find this on github and the Dialogue: 0,0:31:09.20,0:31:13.52,Default,,0000,0000,0000,,dependent bots is something that you Dialogue: 0,0:31:10.88,0:31:15.71,Default,,0000,0000,0000,,hook up to your your repository and it Dialogue: 0,0:31:13.52,0:31:17.75,Default,,0000,0000,0000,,will just scan whether there are newer Dialogue: 0,0:31:15.71,0:31:20.42,Default,,0000,0000,0000,,versions available of your dependencies Dialogue: 0,0:31:17.75,0:31:23.27,Default,,0000,0000,0000,,that you're not using so for example if Dialogue: 0,0:31:20.42,0:31:24.83,Default,,0000,0000,0000,,I was depending on eight one seven and I Dialogue: 0,0:31:23.27,0:31:27.05,Default,,0000,0000,0000,,had a lock file that locked it to eight Dialogue: 0,0:31:24.83,0:31:29.24,Default,,0000,0000,0000,,two four and then eight three zero is Dialogue: 0,0:31:27.05,0:31:30.92,Default,,0000,0000,0000,,released the dependable will go you Dialogue: 0,0:31:29.24,0:31:31.94,Default,,0000,0000,0000,,should update your log file and then Dialogue: 0,0:31:30.92,0:31:34.52,Default,,0000,0000,0000,,submit the pull request to your Dialogue: 0,0:31:31.94,0:31:36.05,Default,,0000,0000,0000,,repository with that update this is a Dialogue: 0,0:31:34.52,0:31:38.30,Default,,0000,0000,0000,,continuous integration service it's not Dialogue: 0,0:31:36.05,0:31:43.10,Default,,0000,0000,0000,,tied to me changing anything but to the Dialogue: 0,0:31:38.30,0:31:46.13,Default,,0000,0000,0000,,ecosystem at large changing often these Dialogue: 0,0:31:43.10,0:31:48.92,Default,,0000,0000,0000,,CI systems integrate the back into your Dialogue: 0,0:31:46.13,0:31:50.78,Default,,0000,0000,0000,,project as well so very often these CI Dialogue: 0,0:31:48.92,0:31:57.11,Default,,0000,0000,0000,,services will provide things like little Dialogue: 0,0:31:50.78,0:31:59.99,Default,,0000,0000,0000,,badges so let me give an example so for Dialogue: 0,0:31:57.11,0:32:01.40,Default,,0000,0000,0000,,example here's a project I've worked on Dialogue: 0,0:31:59.99,0:32:04.70,Default,,0000,0000,0000,,recently that has continuous integration Dialogue: 0,0:32:01.40,0:32:09.29,Default,,0000,0000,0000,,set up so this project you'll notice Dialogue: 0,0:32:04.70,0:32:13.61,Default,,0000,0000,0000,,it's readme if I can zoom in here with Dialogue: 0,0:32:09.29,0:32:17.57,Default,,0000,0000,0000,,that chrome bean nope nope that's much Dialogue: 0,0:32:13.61,0:32:19.79,Default,,0000,0000,0000,,larger than I wanted here you'll see Dialogue: 0,0:32:17.57,0:32:22.31,Default,,0000,0000,0000,,that at the top of the the repositories Dialogue: 0,0:32:19.79,0:32:24.59,Default,,0000,0000,0000,,page they're a bunch of these badges and Dialogue: 0,0:32:22.31,0:32:26.03,Default,,0000,0000,0000,,they display very various types of Dialogue: 0,0:32:24.59,0:32:27.92,Default,,0000,0000,0000,,information you'll notice that I have Dialogue: 0,0:32:26.03,0:32:30.02,Default,,0000,0000,0000,,dependable running right so the Dialogue: 0,0:32:27.92,0:32:31.73,Default,,0000,0000,0000,,dependencies are currently up to date it Dialogue: 0,0:32:30.02,0:32:33.29,Default,,0000,0000,0000,,tells me about whether the test suite is Dialogue: 0,0:32:31.73,0:32:36.14,Default,,0000,0000,0000,,currently passing on the master branch Dialogue: 0,0:32:33.29,0:32:39.77,Default,,0000,0000,0000,,it tells me how much of the code is Dialogue: 0,0:32:36.14,0:32:41.33,Default,,0000,0000,0000,,coverage by tests and it tells me what Dialogue: 0,0:32:39.77,0:32:43.40,Default,,0000,0000,0000,,is the latest version of this library Dialogue: 0,0:32:41.33,0:32:44.90,Default,,0000,0000,0000,,and what is the latest version of the Dialogue: 0,0:32:43.40,0:32:47.69,Default,,0000,0000,0000,,documentation of the library that's Dialogue: 0,0:32:44.90,0:32:50.03,Default,,0000,0000,0000,,available online and all of these are Dialogue: 0,0:32:47.69,0:32:52.22,Default,,0000,0000,0000,,managed by various continues continuous Dialogue: 0,0:32:50.03,0:32:54.41,Default,,0000,0000,0000,,integration services another example Dialogue: 0,0:32:52.22,0:32:56.45,Default,,0000,0000,0000,,that some of you might find useful or Dialogue: 0,0:32:54.41,0:33:00.89,Default,,0000,0000,0000,,might even be familiar with is the Dialogue: 0,0:32:56.45,0:33:03.14,Default,,0000,0000,0000,,notion of github pages so github pages Dialogue: 0,0:33:00.89,0:33:06.38,Default,,0000,0000,0000,,is a really nice service the github Dialogue: 0,0:33:03.14,0:33:13.52,Default,,0000,0000,0000,,provides which lets you set up a CI Dialogue: 0,0:33:06.38,0:33:16.85,Default,,0000,0000,0000,,action that builds your repository as a Dialogue: 0,0:33:13.52,0:33:19.35,Default,,0000,0000,0000,,blog essentially it's it runs a static Dialogue: 0,0:33:16.85,0:33:21.93,Default,,0000,0000,0000,,site generator called Jekyll Dialogue: 0,0:33:19.35,0:33:24.51,Default,,0000,0000,0000,,and Jeckle just takes a bunch of Dialogue: 0,0:33:21.93,0:33:27.78,Default,,0000,0000,0000,,markdown files and then produces a Dialogue: 0,0:33:24.51,0:33:29.88,Default,,0000,0000,0000,,complete website and that as a part of Dialogue: 0,0:33:27.78,0:33:31.65,Default,,0000,0000,0000,,get up pages they will also upload that Dialogue: 0,0:33:29.88,0:33:35.13,Default,,0000,0000,0000,,to get up servers and make it available Dialogue: 0,0:33:31.65,0:33:36.54,Default,,0000,0000,0000,,at a particular domain and this is Dialogue: 0,0:33:35.13,0:33:39.33,Default,,0000,0000,0000,,actually how the class website works Dialogue: 0,0:33:36.54,0:33:41.79,Default,,0000,0000,0000,,class website is not a bunch of like Dialogue: 0,0:33:39.33,0:33:47.55,Default,,0000,0000,0000,,HTML pages that we manage instead Dialogue: 0,0:33:41.79,0:33:49.76,Default,,0000,0000,0000,,there's a repository missing semester so Dialogue: 0,0:33:47.55,0:33:53.55,Default,,0000,0000,0000,,if you look at the missing semester Dialogue: 0,0:33:49.76,0:33:58.35,Default,,0000,0000,0000,,repository you will see if i zoom out a Dialogue: 0,0:33:53.55,0:34:01.65,Default,,0000,0000,0000,,little here that this just has a bunch Dialogue: 0,0:33:58.35,0:34:07.86,Default,,0000,0000,0000,,of markdown files right it has saket Dialogue: 0,0:34:01.65,0:34:10.56,Default,,0000,0000,0000,,20/20 metaprogramming md so this is the Dialogue: 0,0:34:07.86,0:34:14.19,Default,,0000,0000,0000,,if I go to raw here this is the raw Dialogue: 0,0:34:10.56,0:34:15.81,Default,,0000,0000,0000,,markdown for today's lecture so this is Dialogue: 0,0:34:14.19,0:34:18.57,Default,,0000,0000,0000,,the way that I write the lecture notes Dialogue: 0,0:34:15.81,0:34:21.39,Default,,0000,0000,0000,,and then I commit that to the repository Dialogue: 0,0:34:18.57,0:34:24.60,Default,,0000,0000,0000,,we have and I push it and whenever a Dialogue: 0,0:34:21.39,0:34:27.57,Default,,0000,0000,0000,,push happens the github pages CI is Dialogue: 0,0:34:24.60,0:34:32.25,Default,,0000,0000,0000,,gonna run the build script for github Dialogue: 0,0:34:27.57,0:34:34.47,Default,,0000,0000,0000,,pages and produces the website for our Dialogue: 0,0:34:32.25,0:34:37.59,Default,,0000,0000,0000,,class without me having to do any Dialogue: 0,0:34:34.47,0:34:47.13,Default,,0000,0000,0000,,additional steps to make that happen and Dialogue: 0,0:34:37.59,0:34:49.11,Default,,0000,0000,0000,,so yeah sorry good yeah so so Jekyll Dialogue: 0,0:34:47.13,0:34:54.54,Default,,0000,0000,0000,,it's using a tool called Jekyll which is Dialogue: 0,0:34:49.11,0:34:56.12,Default,,0000,0000,0000,,a tool that takes a directory structure Dialogue: 0,0:34:54.54,0:34:58.83,Default,,0000,0000,0000,,that contains markdown files and Dialogue: 0,0:34:56.12,0:35:01.71,Default,,0000,0000,0000,,produces a website it produces like HTML Dialogue: 0,0:34:58.83,0:35:04.08,Default,,0000,0000,0000,,files and then as a part of the action Dialogue: 0,0:35:01.71,0:35:06.27,Default,,0000,0000,0000,,it takes those files and uploads them to Dialogue: 0,0:35:04.08,0:35:08.43,Default,,0000,0000,0000,,github servers add a particular domain Dialogue: 0,0:35:06.27,0:35:12.09,Default,,0000,0000,0000,,and usually that's the domain under like Dialogue: 0,0:35:08.43,0:35:14.67,Default,,0000,0000,0000,,github I oh that they control and then I Dialogue: 0,0:35:12.09,0:35:23.85,Default,,0000,0000,0000,,have set missing semester to point to Dialogue: 0,0:35:14.67,0:35:26.94,Default,,0000,0000,0000,,the github domain I want to give you one Dialogue: 0,0:35:23.85,0:35:29.01,Default,,0000,0000,0000,,aside on testing because it's something Dialogue: 0,0:35:26.94,0:35:30.96,Default,,0000,0000,0000,,that many of you may be familiar with Dialogue: 0,0:35:29.01,0:35:32.67,Default,,0000,0000,0000,,from before right you have a rough idea Dialogue: 0,0:35:30.96,0:35:34.68,Default,,0000,0000,0000,,of what testing is you Dialogue: 0,0:35:32.67,0:35:37.44,Default,,0000,0000,0000,,run the test before you've seen a test Dialogue: 0,0:35:34.68,0:35:38.88,Default,,0000,0000,0000,,fail you know like the basics of it or Dialogue: 0,0:35:37.44,0:35:43.17,Default,,0000,0000,0000,,maybe you've never seen a test fail in Dialogue: 0,0:35:38.88,0:35:45.06,Default,,0000,0000,0000,,case congratulations but as you as you Dialogue: 0,0:35:43.17,0:35:47.91,Default,,0000,0000,0000,,get to more advanced projects though Dialogue: 0,0:35:45.06,0:35:50.31,Default,,0000,0000,0000,,you'll find that people have a lot of Dialogue: 0,0:35:47.91,0:35:53.25,Default,,0000,0000,0000,,terminology around testing and testing Dialogue: 0,0:35:50.31,0:35:55.11,Default,,0000,0000,0000,,is a pretty like deep subject that you Dialogue: 0,0:35:53.25,0:35:56.91,Default,,0000,0000,0000,,could spend many many hours trying to Dialogue: 0,0:35:55.11,0:35:57.84,Default,,0000,0000,0000,,understand the ins and outs of and I'm Dialogue: 0,0:35:56.91,0:35:59.67,Default,,0000,0000,0000,,not going to go through it in Dialogue: 0,0:35:57.84,0:36:01.50,Default,,0000,0000,0000,,excruciating detail but there are a Dialogue: 0,0:35:59.67,0:36:04.08,Default,,0000,0000,0000,,couple of words that I think it's useful Dialogue: 0,0:36:01.50,0:36:06.48,Default,,0000,0000,0000,,to know what mean and the first of these Dialogue: 0,0:36:04.08,0:36:09.15,Default,,0000,0000,0000,,is a test suite so a test suite is a Dialogue: 0,0:36:06.48,0:36:11.91,Default,,0000,0000,0000,,very straightforward name for all of the Dialogue: 0,0:36:09.15,0:36:13.95,Default,,0000,0000,0000,,tests in a program it's really just a Dialogue: 0,0:36:11.91,0:36:16.73,Default,,0000,0000,0000,,suite of tests it's a large collection Dialogue: 0,0:36:13.95,0:36:20.01,Default,,0000,0000,0000,,of tests that usually are run as a unit Dialogue: 0,0:36:16.73,0:36:22.98,Default,,0000,0000,0000,,and there are different types of tests Dialogue: 0,0:36:20.01,0:36:24.72,Default,,0000,0000,0000,,that often make up a test suite the Dialogue: 0,0:36:22.98,0:36:27.93,Default,,0000,0000,0000,,first of these is what's known as a unit Dialogue: 0,0:36:24.72,0:36:31.17,Default,,0000,0000,0000,,test a unit test is a often usually Dialogue: 0,0:36:27.93,0:36:34.74,Default,,0000,0000,0000,,fairly small test of self-contained Dialogue: 0,0:36:31.17,0:36:37.08,Default,,0000,0000,0000,,tests the tests a single feature what Dialogue: 0,0:36:34.74,0:36:39.21,Default,,0000,0000,0000,,exactly a feature might mean is a little Dialogue: 0,0:36:37.08,0:36:41.04,Default,,0000,0000,0000,,bit up to the project but the idea is Dialogue: 0,0:36:39.21,0:36:44.85,Default,,0000,0000,0000,,that should be sort of a micro test that Dialogue: 0,0:36:41.04,0:36:46.29,Default,,0000,0000,0000,,only tests a very particular thing then Dialogue: 0,0:36:44.85,0:36:48.90,Default,,0000,0000,0000,,you have the larger tests that are known Dialogue: 0,0:36:46.29,0:36:50.55,Default,,0000,0000,0000,,as integration tests integration tests Dialogue: 0,0:36:48.90,0:36:54.36,Default,,0000,0000,0000,,try to test the interaction between Dialogue: 0,0:36:50.55,0:36:57.36,Default,,0000,0000,0000,,different subsystems of a program so Dialogue: 0,0:36:54.36,0:37:00.27,Default,,0000,0000,0000,,this might be something like an example Dialogue: 0,0:36:57.36,0:37:03.39,Default,,0000,0000,0000,,of a unit test might be if you're Dialogue: 0,0:37:00.27,0:37:06.36,Default,,0000,0000,0000,,writing an HTML parser to the unit test Dialogue: 0,0:37:03.39,0:37:09.93,Default,,0000,0000,0000,,might be test that it can parse an HTML Dialogue: 0,0:37:06.36,0:37:13.68,Default,,0000,0000,0000,,tag an integration test might be here's Dialogue: 0,0:37:09.93,0:37:14.64,Default,,0000,0000,0000,,an HTML document parse it right so that Dialogue: 0,0:37:13.68,0:37:15.75,Default,,0000,0000,0000,,is going to be the interview the Dialogue: 0,0:37:14.64,0:37:19.68,Default,,0000,0000,0000,,integration of multiple of the Dialogue: 0,0:37:15.75,0:37:22.59,Default,,0000,0000,0000,,subsystems of the parser you also have a Dialogue: 0,0:37:19.68,0:37:25.17,Default,,0000,0000,0000,,notion of regression tests regression Dialogue: 0,0:37:22.59,0:37:28.05,Default,,0000,0000,0000,,tests are tests that test things that Dialogue: 0,0:37:25.17,0:37:31.08,Default,,0000,0000,0000,,were broken in the past so imagine that Dialogue: 0,0:37:28.05,0:37:33.36,Default,,0000,0000,0000,,someone submits some kind of issue to Dialogue: 0,0:37:31.08,0:37:38.82,Default,,0000,0000,0000,,you and says your library breaks if I Dialogue: 0,0:37:33.36,0:37:40.71,Default,,0000,0000,0000,,give it a marquee tag and that makes you Dialogue: 0,0:37:38.82,0:37:43.04,Default,,0000,0000,0000,,sad so you want to fix it so you fix Dialogue: 0,0:37:40.71,0:37:45.87,Default,,0000,0000,0000,,your parser to now support marquee tags Dialogue: 0,0:37:43.04,0:37:46.59,Default,,0000,0000,0000,,but then you want to add a test to your Dialogue: 0,0:37:45.87,0:37:48.48,Default,,0000,0000,0000,,test suite Dialogue: 0,0:37:46.59,0:37:51.21,Default,,0000,0000,0000,,the checks that you can parse marquee Dialogue: 0,0:37:48.48,0:37:53.25,Default,,0000,0000,0000,,tags the reason for this is so that in Dialogue: 0,0:37:51.21,0:37:56.52,Default,,0000,0000,0000,,the future you don't accidentally Dialogue: 0,0:37:53.25,0:37:58.29,Default,,0000,0000,0000,,reintroduce that bug. So that is what Dialogue: 0,0:37:56.52,0:37:59.67,Default,,0000,0000,0000,,a regression tests are for and over time Dialogue: 0,0:37:58.29,0:38:01.32,Default,,0000,0000,0000,,your project is gonna build up more and Dialogue: 0,0:37:59.67,0:38:02.64,Default,,0000,0000,0000,,more of these, and they're nice because Dialogue: 0,0:38:01.32,0:38:07.32,Default,,0000,0000,0000,,they prevent your project from Dialogue: 0,0:38:02.64,0:38:10.08,Default,,0000,0000,0000,,regressing to earlier bugs. The last one Dialogue: 0,0:38:07.32,0:38:15.81,Default,,0000,0000,0000,,I want to mention is a concept called Dialogue: 0,0:38:10.08,0:38:18.00,Default,,0000,0000,0000,,mocking. So mocking is the idea of being Dialogue: 0,0:38:15.81,0:38:20.61,Default,,0000,0000,0000,,able to replace parts of your system Dialogue: 0,0:38:18.00,0:38:26.19,Default,,0000,0000,0000,,with a sort of dummy version of itself Dialogue: 0,0:38:20.61,0:38:29.01,Default,,0000,0000,0000,,that behaves in a way that you control. A Dialogue: 0,0:38:26.19,0:38:33.06,Default,,0000,0000,0000,,common example of this is you're writing Dialogue: 0,0:38:29.01,0:38:36.15,Default,,0000,0000,0000,,something that does, oh I don't know, file Dialogue: 0,0:38:33.06,0:38:37.17,Default,,0000,0000,0000,,copying over SSH. Right? This is a tool Dialogue: 0,0:38:36.15,0:38:40.11,Default,,0000,0000,0000,,that you've written that does file Dialogue: 0,0:38:37.17,0:38:42.06,Default,,0000,0000,0000,,copying over SSH there are many things Dialogue: 0,0:38:40.11,0:38:43.11,Default,,0000,0000,0000,,you might want to mock here. For example, Dialogue: 0,0:38:42.06,0:38:44.70,Default,,0000,0000,0000,,when running your test suite you Dialogue: 0,0:38:43.11,0:38:47.04,Default,,0000,0000,0000,,probably don't actually care that Dialogue: 0,0:38:44.70,0:38:49.38,Default,,0000,0000,0000,,there's a network there. Right? You don't Dialogue: 0,0:38:47.04,0:38:51.06,Default,,0000,0000,0000,,need to have to like set up TCP ports Dialogue: 0,0:38:49.38,0:38:53.61,Default,,0000,0000,0000,,and stuff, so instead you're gonna mock Dialogue: 0,0:38:51.06,0:38:55.68,Default,,0000,0000,0000,,the network. The way this usually works Dialogue: 0,0:38:53.61,0:38:57.66,Default,,0000,0000,0000,,is that, somewhere in your library, you Dialogue: 0,0:38:55.68,0:38:59.67,Default,,0000,0000,0000,,have something that like opens a Dialogue: 0,0:38:57.66,0:39:01.59,Default,,0000,0000,0000,,connection, or reads from the connection, Dialogue: 0,0:38:59.67,0:39:03.33,Default,,0000,0000,0000,,or writes to the connection, and you're Dialogue: 0,0:39:01.59,0:39:05.70,Default,,0000,0000,0000,,gonna overwrite those functions Dialogue: 0,0:39:03.33,0:39:07.53,Default,,0000,0000,0000,,internally in your library with Dialogue: 0,0:39:05.70,0:39:09.69,Default,,0000,0000,0000,,functions that you've written just for Dialogue: 0,0:39:07.53,0:39:11.91,Default,,0000,0000,0000,,the purposes of testing, where the read Dialogue: 0,0:39:09.69,0:39:13.59,Default,,0000,0000,0000,,function just like returns the data, and Dialogue: 0,0:39:11.91,0:39:15.23,Default,,0000,0000,0000,,the write function just drops the data Dialogue: 0,0:39:13.59,0:39:17.64,Default,,0000,0000,0000,,on the floor, or something like that. Dialogue: 0,0:39:15.23,0:39:20.01,Default,,0000,0000,0000,,Similarly, you can write a mocking Dialogue: 0,0:39:17.64,0:39:21.18,Default,,0000,0000,0000,,function for the SSH functionality. You Dialogue: 0,0:39:20.01,0:39:22.47,Default,,0000,0000,0000,,could write something that does not Dialogue: 0,0:39:21.18,0:39:24.78,Default,,0000,0000,0000,,actually do encryption, it doesn't talk Dialogue: 0,0:39:22.47,0:39:26.55,Default,,0000,0000,0000,,to the network: it just like takes bytes Dialogue: 0,0:39:24.78,0:39:28.56,Default,,0000,0000,0000,,in here and just magically they pop out Dialogue: 0,0:39:26.55,0:39:30.39,Default,,0000,0000,0000,,the other side, and you can ignore Dialogue: 0,0:39:28.56,0:39:32.22,Default,,0000,0000,0000,,everything that's between, because for Dialogue: 0,0:39:30.39,0:39:34.29,Default,,0000,0000,0000,,the purpose of copying a file, if you Dialogue: 0,0:39:32.22,0:39:36.78,Default,,0000,0000,0000,,just wanted to test that functionality, Dialogue: 0,0:39:34.29,0:39:40.74,Default,,0000,0000,0000,,the stuff below doesn't matter for that Dialogue: 0,0:39:36.78,0:39:43.02,Default,,0000,0000,0000,,test, and you might mock it away. Usually, Dialogue: 0,0:39:40.74,0:39:44.40,Default,,0000,0000,0000,,in any given language, there are tools Dialogue: 0,0:39:43.02,0:39:49.59,Default,,0000,0000,0000,,that let you build these kind of mocking Dialogue: 0,0:39:44.40,0:39:51.48,Default,,0000,0000,0000,,abstractions pretty easily. That is the Dialogue: 0,0:39:49.59,0:39:53.82,Default,,0000,0000,0000,,end of what I wanted to talk about Dialogue: 0,0:39:51.48,0:39:56.31,Default,,0000,0000,0000,,metaprogramming, but this is a very, very Dialogue: 0,0:39:53.82,0:39:58.95,Default,,0000,0000,0000,,broad subject. Things like continuous Dialogue: 0,0:39:56.31,0:39:59.74,Default,,0000,0000,0000,,integration, build systems, there are so Dialogue: 0,0:39:58.95,0:40:01.96,Default,,0000,0000,0000,,many out there Dialogue: 0,0:39:59.74,0:40:03.94,Default,,0000,0000,0000,,that can let you do so many interesting Dialogue: 0,0:40:01.96,0:40:05.47,Default,,0000,0000,0000,,things with your projects, so I highly Dialogue: 0,0:40:03.94,0:40:11.23,Default,,0000,0000,0000,,recommend that you start looking into it Dialogue: 0,0:40:05.47,0:40:12.97,Default,,0000,0000,0000,,a little. The exercises are sort of all Dialogue: 0,0:40:11.23,0:40:16.03,Default,,0000,0000,0000,,over the place, and I mean that in a good Dialogue: 0,0:40:12.97,0:40:17.97,Default,,0000,0000,0000,,way. They're intended to try to just show Dialogue: 0,0:40:16.03,0:40:20.77,Default,,0000,0000,0000,,you the kind of possibilities that exist Dialogue: 0,0:40:17.97,0:40:22.99,Default,,0000,0000,0000,,for build working with these kind of Dialogue: 0,0:40:20.77,0:40:25.72,Default,,0000,0000,0000,,processes so for example the last Dialogue: 0,0:40:22.99,0:40:28.05,Default,,0000,0000,0000,,exercise has you write one of these Dialogue: 0,0:40:25.72,0:40:31.30,Default,,0000,0000,0000,,continuous integration actions yourself Dialogue: 0,0:40:28.05,0:40:33.85,Default,,0000,0000,0000,,where it you decide what the event be Dialogue: 0,0:40:31.30,0:40:35.98,Default,,0000,0000,0000,,and you decide what the action be but Dialogue: 0,0:40:33.85,0:40:37.24,Default,,0000,0000,0000,,try to actually build one and this can Dialogue: 0,0:40:35.98,0:40:39.76,Default,,0000,0000,0000,,be something that you might find useful Dialogue: 0,0:40:37.24,0:40:42.97,Default,,0000,0000,0000,,in your project the example I given the Dialogue: 0,0:40:39.76,0:40:45.64,Default,,0000,0000,0000,,exercises is try to build an action that Dialogue: 0,0:40:42.97,0:40:46.87,Default,,0000,0000,0000,,runs like right good or pro Slynt one of Dialogue: 0,0:40:45.64,0:40:49.69,Default,,0000,0000,0000,,the linters result for the english Dialogue: 0,0:40:46.87,0:40:52.33,Default,,0000,0000,0000,,language on your repository and if you Dialogue: 0,0:40:49.69,0:40:56.02,Default,,0000,0000,0000,,do like we could enable that for the Dialogue: 0,0:40:52.33,0:40:57.82,Default,,0000,0000,0000,,class repository so that our lecture Dialogue: 0,0:40:56.02,0:41:00.34,Default,,0000,0000,0000,,notes are actually well written right Dialogue: 0,0:40:57.82,0:41:01.45,Default,,0000,0000,0000,,and this is one other thing that's nice Dialogue: 0,0:41:00.34,0:41:04.42,Default,,0000,0000,0000,,about this kind of continuous Dialogue: 0,0:41:01.45,0:41:06.19,Default,,0000,0000,0000,,integration testing is that you can Dialogue: 0,0:41:04.42,0:41:08.56,Default,,0000,0000,0000,,collaborate between projects if you Dialogue: 0,0:41:06.19,0:41:09.91,Default,,0000,0000,0000,,write one I can use it in my project and Dialogue: 0,0:41:08.56,0:41:11.68,Default,,0000,0000,0000,,there's a really handy feature where you Dialogue: 0,0:41:09.91,0:41:15.46,Default,,0000,0000,0000,,can build this ecosystem of improving Dialogue: 0,0:41:11.68,0:41:32.59,Default,,0000,0000,0000,,everything any questions about any of Dialogue: 0,0:41:15.46,0:41:35.83,Default,,0000,0000,0000,,the stuff we record today yeah so the Dialogue: 0,0:41:32.59,0:41:38.44,Default,,0000,0000,0000,,question is why do we have both make and Dialogue: 0,0:41:35.83,0:41:41.23,Default,,0000,0000,0000,,see make what do they do and is there a Dialogue: 0,0:41:38.44,0:41:44.77,Default,,0000,0000,0000,,reason for them to talk together so so Dialogue: 0,0:41:41.23,0:41:46.84,Default,,0000,0000,0000,,see make I don't actually know what the Dialogue: 0,0:41:44.77,0:41:49.63,Default,,0000,0000,0000,,tagline for C make is anymore but it's Dialogue: 0,0:41:46.84,0:41:54.51,Default,,0000,0000,0000,,sort of like a better make for C as the Dialogue: 0,0:41:49.63,0:41:57.28,Default,,0000,0000,0000,,name implies C make generally Dialogue: 0,0:41:54.51,0:41:58.66,Default,,0000,0000,0000,,understands the layout of C projects a Dialogue: 0,0:41:57.28,0:42:01.60,Default,,0000,0000,0000,,little bit better than make Falls do Dialogue: 0,0:41:58.66,0:42:03.55,Default,,0000,0000,0000,,they're sort of built to try to parse Dialogue: 0,0:42:01.60,0:42:04.87,Default,,0000,0000,0000,,out what the structure of your Dialogue: 0,0:42:03.55,0:42:06.64,Default,,0000,0000,0000,,dependencies are what the rules from Dialogue: 0,0:42:04.87,0:42:08.20,Default,,0000,0000,0000,,going to one to the other is it also Dialogue: 0,0:42:06.64,0:42:11.47,Default,,0000,0000,0000,,integrates a little bit nicer with Dialogue: 0,0:42:08.20,0:42:12.83,Default,,0000,0000,0000,,things like system libraries so C may Dialogue: 0,0:42:11.47,0:42:14.57,Default,,0000,0000,0000,,can do things like detect Dialogue: 0,0:42:12.83,0:42:16.16,Default,,0000,0000,0000,,given libraries available on your Dialogue: 0,0:42:14.57,0:42:17.93,Default,,0000,0000,0000,,computer or if it's available at Dialogue: 0,0:42:16.16,0:42:20.33,Default,,0000,0000,0000,,multiple different paths it tries to Dialogue: 0,0:42:17.93,0:42:22.25,Default,,0000,0000,0000,,find which of those paths it's present Dialogue: 0,0:42:20.33,0:42:24.23,Default,,0000,0000,0000,,on on this system and then link it Dialogue: 0,0:42:22.25,0:42:27.71,Default,,0000,0000,0000,,appropriately so see make is a little Dialogue: 0,0:42:24.23,0:42:29.78,Default,,0000,0000,0000,,bit smarter than make is make will only Dialogue: 0,0:42:27.71,0:42:31.52,Default,,0000,0000,0000,,do whatever you put in the make file not Dialogue: 0,0:42:29.78,0:42:33.56,Default,,0000,0000,0000,,entirely true there are things called Dialogue: 0,0:42:31.52,0:42:35.93,Default,,0000,0000,0000,,implicit rules that are like built-in Dialogue: 0,0:42:33.56,0:42:37.100,Default,,0000,0000,0000,,rules in make but they're pretty dumb Dialogue: 0,0:42:35.93,0:42:40.76,Default,,0000,0000,0000,,whereas emic tries to be able to be a Dialogue: 0,0:42:37.100,0:42:43.06,Default,,0000,0000,0000,,larger build system that is opinionated Dialogue: 0,0:42:40.76,0:42:46.22,Default,,0000,0000,0000,,by default to work for C projects Dialogue: 0,0:42:43.06,0:42:49.76,Default,,0000,0000,0000,,similarly there's a tool called maven so Dialogue: 0,0:42:46.22,0:42:52.04,Default,,0000,0000,0000,,maven and ant which is another project Dialogue: 0,0:42:49.76,0:42:54.77,Default,,0000,0000,0000,,they are both built for Java projects Dialogue: 0,0:42:52.04,0:42:56.48,Default,,0000,0000,0000,,they understand how Java code interacts Dialogue: 0,0:42:54.77,0:42:59.08,Default,,0000,0000,0000,,with one another how you structure Java Dialogue: 0,0:42:56.48,0:43:02.09,Default,,0000,0000,0000,,programs and they're built for that task Dialogue: 0,0:42:59.08,0:43:05.18,Default,,0000,0000,0000,,very often at least when I use make I Dialogue: 0,0:43:02.09,0:43:07.55,Default,,0000,0000,0000,,use make sort of at the top and then Dialogue: 0,0:43:05.18,0:43:09.26,Default,,0000,0000,0000,,make my call other tools that build Dialogue: 0,0:43:07.55,0:43:11.87,Default,,0000,0000,0000,,whatever subsystem they know how to Dialogue: 0,0:43:09.26,0:43:14.72,Default,,0000,0000,0000,,build right like my make file might call Dialogue: 0,0:43:11.87,0:43:16.28,Default,,0000,0000,0000,,cargo to build a rust program and then Dialogue: 0,0:43:14.72,0:43:18.68,Default,,0000,0000,0000,,call see make to build some like see Dialogue: 0,0:43:16.28,0:43:21.41,Default,,0000,0000,0000,,dependency of that but then at the top Dialogue: 0,0:43:18.68,0:43:23.24,Default,,0000,0000,0000,,like I'm gonna do some stuff at the end Dialogue: 0,0:43:21.41,0:43:24.98,Default,,0000,0000,0000,,after the programs have built and that Dialogue: 0,0:43:23.24,0:43:27.20,Default,,0000,0000,0000,,might just be like run a benchmark which Dialogue: 0,0:43:24.98,0:43:28.91,Default,,0000,0000,0000,,is in the rust code and then like plot Dialogue: 0,0:43:27.20,0:43:31.16,Default,,0000,0000,0000,,it using the C code or something like Dialogue: 0,0:43:28.91,0:43:33.76,Default,,0000,0000,0000,,that right so for me make you sort of Dialogue: 0,0:43:31.16,0:43:36.17,Default,,0000,0000,0000,,the glue at the top that I might write Dialogue: 0,0:43:33.76,0:43:40.82,Default,,0000,0000,0000,,usually if your make file gets very Dialogue: 0,0:43:36.17,0:43:42.38,Default,,0000,0000,0000,,large there's a better tool would you'll Dialogue: 0,0:43:40.82,0:43:45.05,Default,,0000,0000,0000,,find it like big companies for example Dialogue: 0,0:43:42.38,0:43:47.81,Default,,0000,0000,0000,,is they often have one build system that Dialogue: 0,0:43:45.05,0:43:49.40,Default,,0000,0000,0000,,manages all of their software so if you Dialogue: 0,0:43:47.81,0:43:51.98,Default,,0000,0000,0000,,look at Google for example they have Dialogue: 0,0:43:49.40,0:43:54.20,Default,,0000,0000,0000,,this open source system called basil and Dialogue: 0,0:43:51.98,0:43:57.38,Default,,0000,0000,0000,,I don't think Google literally uses Dialogue: 0,0:43:54.20,0:43:59.63,Default,,0000,0000,0000,,basil inside of Google but it's sort of Dialogue: 0,0:43:57.38,0:44:02.18,Default,,0000,0000,0000,,based on what they use internally and it Dialogue: 0,0:43:59.63,0:44:04.63,Default,,0000,0000,0000,,really just its intended to manage the Dialogue: 0,0:44:02.18,0:44:09.44,Default,,0000,0000,0000,,entire build of everything Google has Dialogue: 0,0:44:04.63,0:44:11.51,Default,,0000,0000,0000,,and basil in particular is built to be I Dialogue: 0,0:44:09.44,0:44:13.67,Default,,0000,0000,0000,,think they call it like a polyglot build Dialogue: 0,0:44:11.51,0:44:15.77,Default,,0000,0000,0000,,framework so the idea is that it works Dialogue: 0,0:44:13.67,0:44:17.66,Default,,0000,0000,0000,,for many different languages there's Dialogue: 0,0:44:15.77,0:44:19.70,Default,,0000,0000,0000,,like an implement there's a module for Dialogue: 0,0:44:17.66,0:44:21.26,Default,,0000,0000,0000,,basil for this language and that Dialogue: 0,0:44:19.70,0:44:23.54,Default,,0000,0000,0000,,language in that language but they all Dialogue: 0,0:44:21.26,0:44:26.09,Default,,0000,0000,0000,,integrate with the same basil framework Dialogue: 0,0:44:23.54,0:44:27.77,Default,,0000,0000,0000,,which then knows how to integrate Dialogue: 0,0:44:26.09,0:44:33.22,Default,,0000,0000,0000,,dependencies between different libraries Dialogue: 0,0:44:27.77,0:44:33.22,Default,,0000,0000,0000,,and different languages get a question Dialogue: 0,0:44:39.34,0:44:42.11,Default,,0000,0000,0000,,sure Dialogue: 0,0:44:40.79,0:44:48.01,Default,,0000,0000,0000,,so when you say expressions you mean the Dialogue: 0,0:44:42.11,0:44:48.01,Default,,0000,0000,0000,,things in this file or yeah so these are Dialogue: 0,0:44:48.70,0:44:56.86,Default,,0000,0000,0000,,so make files are their own language Dialogue: 0,0:44:52.54,0:45:00.20,Default,,0000,0000,0000,,they are it's a pretty weird language Dialogue: 0,0:44:56.86,0:45:02.75,Default,,0000,0000,0000,,like it has a lot of weird exceptions in Dialogue: 0,0:45:00.20,0:45:04.40,Default,,0000,0000,0000,,many ways it's weird just like bash is Dialogue: 0,0:45:02.75,0:45:06.17,Default,,0000,0000,0000,,weird but in different ways which is Dialogue: 0,0:45:04.40,0:45:08.45,Default,,0000,0000,0000,,even worse like when you're writing a Dialogue: 0,0:45:06.17,0:45:09.89,Default,,0000,0000,0000,,make file you sort of you can sort of Dialogue: 0,0:45:08.45,0:45:11.06,Default,,0000,0000,0000,,think like you're writing bash but Dialogue: 0,0:45:09.89,0:45:13.79,Default,,0000,0000,0000,,you're not because it's broken in Dialogue: 0,0:45:11.06,0:45:16.73,Default,,0000,0000,0000,,different ways but but it is its own Dialogue: 0,0:45:13.79,0:45:20.00,Default,,0000,0000,0000,,language and the way that make files are Dialogue: 0,0:45:16.73,0:45:21.29,Default,,0000,0000,0000,,generally structured is that you have a Dialogue: 0,0:45:20.00,0:45:25.46,Default,,0000,0000,0000,,sequence of I think they call them Dialogue: 0,0:45:21.29,0:45:28.94,Default,,0000,0000,0000,,directives so every like the this thing Dialogue: 0,0:45:25.46,0:45:31.88,Default,,0000,0000,0000,,oops this thing is a directive and this Dialogue: 0,0:45:28.94,0:45:34.13,Default,,0000,0000,0000,,is a directive and every directive has a Dialogue: 0,0:45:31.88,0:45:35.87,Default,,0000,0000,0000,,colon somewhere and everything to the Dialogue: 0,0:45:34.13,0:45:38.17,Default,,0000,0000,0000,,left of the colon is a target and Dialogue: 0,0:45:35.87,0:45:42.86,Default,,0000,0000,0000,,everything to the right of the colon is Dialogue: 0,0:45:38.17,0:45:45.56,Default,,0000,0000,0000,,right of the colon is a dependency and Dialogue: 0,0:45:42.86,0:45:49.13,Default,,0000,0000,0000,,then all of the lines below that line Dialogue: 0,0:45:45.56,0:45:51.86,Default,,0000,0000,0000,,are the sequence of operations known as Dialogue: 0,0:45:49.13,0:45:53.09,Default,,0000,0000,0000,,the rules for once you have the Dialogue: 0,0:45:51.86,0:45:55.40,Default,,0000,0000,0000,,dependencies how do you build these Dialogue: 0,0:45:53.09,0:45:58.64,Default,,0000,0000,0000,,targets notice that make is very Dialogue: 0,0:45:55.40,0:46:01.34,Default,,0000,0000,0000,,particular that you must use a tab to Dialogue: 0,0:45:58.64,0:46:04.01,Default,,0000,0000,0000,,indent the rules if you do not make will Dialogue: 0,0:46:01.34,0:46:06.25,Default,,0000,0000,0000,,not work if they must be tabs they Dialogue: 0,0:46:04.01,0:46:08.27,Default,,0000,0000,0000,,cannot be four eight spaces must be tabs Dialogue: 0,0:46:06.25,0:46:10.49,Default,,0000,0000,0000,,and like you can have multiple Dialogue: 0,0:46:08.27,0:46:12.98,Default,,0000,0000,0000,,operations here I like I can do echo Dialogue: 0,0:46:10.49,0:46:16.07,Default,,0000,0000,0000,,hello or whatever and then they would Dialogue: 0,0:46:12.98,0:46:18.23,Default,,0000,0000,0000,,first run this and then run this there's Dialogue: 0,0:46:16.07,0:46:20.33,Default,,0000,0000,0000,,a there's an exercise for today's Dialogue: 0,0:46:18.23,0:46:22.70,Default,,0000,0000,0000,,lecture that has you try to extend this Dialogue: 0,0:46:20.33,0:46:24.08,Default,,0000,0000,0000,,make file with a couple of other targets Dialogue: 0,0:46:22.70,0:46:26.23,Default,,0000,0000,0000,,that you might find interesting that Dialogue: 0,0:46:24.08,0:46:30.02,Default,,0000,0000,0000,,goes into a little bit more detail Dialogue: 0,0:46:26.23,0:46:33.38,Default,,0000,0000,0000,,there's also some ability to execute Dialogue: 0,0:46:30.02,0:46:35.51,Default,,0000,0000,0000,,external commands to like determine what Dialogue: 0,0:46:33.38,0:46:37.58,Default,,0000,0000,0000,,the dependencies might be if your Dialogue: 0,0:46:35.51,0:46:39.68,Default,,0000,0000,0000,,dependencies are not like a static list Dialogue: 0,0:46:37.58,0:46:41.66,Default,,0000,0000,0000,,of files but it's a little limited Dialogue: 0,0:46:39.68,0:46:43.88,Default,,0000,0000,0000,,usually once you've started needing that Dialogue: 0,0:46:41.66,0:46:59.54,Default,,0000,0000,0000,,sort of stuff you might want to move to Dialogue: 0,0:46:43.88,0:47:06.41,Default,,0000,0000,0000,,a more advanced build system yeah so the Dialogue: 0,0:46:59.54,0:47:09.35,Default,,0000,0000,0000,,question is what happens if I have let's Dialogue: 0,0:47:06.41,0:47:14.00,Default,,0000,0000,0000,,say that I have library a and library B Dialogue: 0,0:47:09.35,0:47:18.65,Default,,0000,0000,0000,,and they both depend on library see but Dialogue: 0,0:47:14.00,0:47:25.40,Default,,0000,0000,0000,,library a depends on like 4.0.1 and Dialogue: 0,0:47:18.65,0:47:27.23,Default,,0000,0000,0000,,library B depends on 3 dot 4 dot 7 so Dialogue: 0,0:47:25.40,0:47:29.21,Default,,0000,0000,0000,,they both depend on C and so ideally Dialogue: 0,0:47:27.23,0:47:31.85,Default,,0000,0000,0000,,we'd like to reuse see but they depend Dialogue: 0,0:47:29.21,0:47:34.76,Default,,0000,0000,0000,,on different major versions of C what do Dialogue: 0,0:47:31.85,0:47:37.61,Default,,0000,0000,0000,,we do well what happens in this case Dialogue: 0,0:47:34.76,0:47:39.17,Default,,0000,0000,0000,,depends entirely on the system that Dialogue: 0,0:47:37.61,0:47:42.11,Default,,0000,0000,0000,,you're using the language that you're Dialogue: 0,0:47:39.17,0:47:44.21,Default,,0000,0000,0000,,using in some cases the tool would just Dialogue: 0,0:47:42.11,0:47:45.74,Default,,0000,0000,0000,,be like well I'll just pick for which Dialogue: 0,0:47:44.21,0:47:48.89,Default,,0000,0000,0000,,sort of implies that they're not really Dialogue: 0,0:47:45.74,0:47:52.18,Default,,0000,0000,0000,,using semantic versioning in some cases Dialogue: 0,0:47:48.89,0:47:54.65,Default,,0000,0000,0000,,the tool will say this is not possible Dialogue: 0,0:47:52.18,0:47:57.92,Default,,0000,0000,0000,,like if you do this it's an error and Dialogue: 0,0:47:54.65,0:48:00.17,Default,,0000,0000,0000,,the tool will tell you you either need Dialogue: 0,0:47:57.92,0:48:02.84,Default,,0000,0000,0000,,to upgrade be like have B use a newer Dialogue: 0,0:48:00.17,0:48:04.66,Default,,0000,0000,0000,,version of C or you need to downgrade a Dialogue: 0,0:48:02.84,0:48:08.21,Default,,0000,0000,0000,,you do not get to do this and Dialogue: 0,0:48:04.66,0:48:11.75,Default,,0000,0000,0000,,compilation will fail some tools are Dialogue: 0,0:48:08.21,0:48:15.74,Default,,0000,0000,0000,,gonna build two versions of C and then Dialogue: 0,0:48:11.75,0:48:18.80,Default,,0000,0000,0000,,like when it builds a it will use the Dialogue: 0,0:48:15.74,0:48:20.27,Default,,0000,0000,0000,,major four version of C and when it Dialogue: 0,0:48:18.80,0:48:23.21,Default,,0000,0000,0000,,builds B will use the major three Dialogue: 0,0:48:20.27,0:48:25.58,Default,,0000,0000,0000,,version of C one thing you end up with Dialogue: 0,0:48:23.21,0:48:28.07,Default,,0000,0000,0000,,is really weird conditions here were Dialogue: 0,0:48:25.58,0:48:29.60,Default,,0000,0000,0000,,like if C has dependencies then now you Dialogue: 0,0:48:28.07,0:48:32.63,Default,,0000,0000,0000,,have to build all of C's dependencies Dialogue: 0,0:48:29.60,0:48:35.27,Default,,0000,0000,0000,,twice to 1 for 3 and 1 for 4 and maybe Dialogue: 0,0:48:32.63,0:48:36.89,Default,,0000,0000,0000,,they share and maybe they don't you can Dialogue: 0,0:48:35.27,0:48:43.24,Default,,0000,0000,0000,,end up in particularly weird situations Dialogue: 0,0:48:36.89,0:48:43.24,Default,,0000,0000,0000,,if imagine that the library see like Dialogue: 0,0:48:44.59,0:48:48.04,Default,,0000,0000,0000,,imagine that Dialogue: 0,0:48:48.77,0:48:55.59,Default,,0000,0000,0000,,library see like rights to a file like Dialogue: 0,0:48:52.89,0:48:58.29,Default,,0000,0000,0000,,rights to some like file on disk some Dialogue: 0,0:48:55.59,0:49:01.47,Default,,0000,0000,0000,,cache stuff if you run your application Dialogue: 0,0:48:58.29,0:49:04.38,Default,,0000,0000,0000,,now and like a does something to call Dialogue: 0,0:49:01.47,0:49:07.29,Default,,0000,0000,0000,,like C dot save and B to something like Dialogue: 0,0:49:04.38,0:49:08.55,Default,,0000,0000,0000,,C adult load then suddenly your your Dialogue: 0,0:49:07.29,0:49:10.32,Default,,0000,0000,0000,,application of the bottom is not going Dialogue: 0,0:49:08.55,0:49:11.46,Default,,0000,0000,0000,,to work because the format is different Dialogue: 0,0:49:10.32,0:49:13.08,Default,,0000,0000,0000,,right Dialogue: 0,0:49:11.46,0:49:15.57,Default,,0000,0000,0000,,so these situations are often very Dialogue: 0,0:49:13.08,0:49:17.70,Default,,0000,0000,0000,,problematic and and most tools that Dialogue: 0,0:49:15.57,0:49:19.50,Default,,0000,0000,0000,,support semantic versioning will reject Dialogue: 0,0:49:17.70,0:49:21.57,Default,,0000,0000,0000,,this kind of configuration for exactly Dialogue: 0,0:49:19.50,0:49:27.09,Default,,0000,0000,0000,,that reason but it's so easy to shoot Dialogue: 0,0:49:21.57,0:49:30.18,Default,,0000,0000,0000,,yourself in the foot all right we will Dialogue: 0,0:49:27.09,0:49:31.56,Default,,0000,0000,0000,,see you again tomorrow for security keep Dialogue: 0,0:49:30.18,0:49:34.08,Default,,0000,0000,0000,,in mind again if you haven't done the Dialogue: 0,0:49:31.56,0:49:36.24,Default,,0000,0000,0000,,survey the question I care the most Dialogue: 0,0:49:34.08,0:49:38.22,Default,,0000,0000,0000,,about in the survey is what you would Dialogue: 0,0:49:36.24,0:49:40.47,Default,,0000,0000,0000,,like us to cover in the last two Dialogue: 0,0:49:38.22,0:49:42.87,Default,,0000,0000,0000,,lectures so the last two lectures are Dialogue: 0,0:49:40.47,0:49:45.45,Default,,0000,0000,0000,,for you to choose what you want us to Dialogue: 0,0:49:42.87,0:49:47.25,Default,,0000,0000,0000,,talk about and to give any questions you Dialogue: 0,0:49:45.45,0:49:50.19,Default,,0000,0000,0000,,want us to answer so please like add Dialogue: 0,0:49:47.25,0:49:52.40,Default,,0000,0000,0000,,that if you can and that's it see you Dialogue: 0,0:49:50.19,0:49:52.40,Default,,0000,0000,0000,,tomorrow