[User] Please transcribe this text

[Assistant] Users.views has no attribute login view. Alright, it looks like, uh, I called this function login request. It should actually be called login view. And I'll also need a function called logout view.


[User] Please transcribe this text

[Assistant] But I haven't implemented that yet, so I'll just go ahead and say pass for now, but I'll come back to that later to implement the logout view.


[User] Please transcribe this text

[Assistant] Alright, so it looks like my web server is running now. And before I actually go to the login page, let me first go back to the admin page and actually just create some users. I can go to users and then add. And let's add a user. Uh, the username will be like Harry, for example. And we'll go ahead and give Harry a password.


[User] Please transcribe this text

[Assistant] And we'll go ahead and save and add another. Let's add maybe Ron as well. Uh, go ahead and add him. We'll go ahead and save that.


[User] Please transcribe this text

[Assistant] And these users, they can have additional information associated with them. I can give Ron a name, like Ron Weasley, ronweasley.example.com, this is his email address. There are a bunch of default fields that Django gives you for manipulating users, and you can take these users and go ahead and add to those fields if I want to, giving them a first name, last name, email address, and what not.


[User] Please transcribe this text

[Assistant] And you can also customize these fields as well if you'd like to add custom fields that you would like to keep track of with regards to your individual users. And I will go ahead and log out from Django admin now because I don't need it anymore.


[User] Please transcribe this text

[Assistant] But now, if I go to slash users, I'm not authenticated. So what I see is a login form that just looks like this, a place for me to type in a username and a password. And of course I could type in like Harry's username and password, but I haven't yet implemented the processing of that data yet. So let's go ahead and do that now. We'll go ahead and go back to views.py.


[User] Please transcribe this text

[Assistant] In the login view, there are two ways the login view function could be called. One is via the get request method, meaning just show me the login form, and one is via post, submit data to the login form as well. So if the request method is post,


[User] Please transcribe this text

[Assistant] Well then, let me first get the username, which will be inside of the post data in a field called username. And let me get the password, which will be in a field in the request.post inside of password.


[User] Please transcribe this text

[Assistant] And now what I'd like to do is try to authenticate this user.


[User] Please transcribe this text

[Assistant] And how do I go about doing that? Well, it turns out there are a couple of functions that Django has given to me that I can import. So from Django.contrib.auth, auth for authentication, I'm going to import three functions we're ultimately going to use. One is authenticate, that checks if username and password are correct. One is called login. One is called logout.


[User] Please transcribe this text

[Assistant] And I can now use those functions inside of this login view here. After I've gotten the username and password, I'd like to authenticate the user, check if the username and password are correct. So I'll go ahead and say user is equal to authenticate request


[User] Please transcribe this text

[Assistant] Username is the username, password equals password. And so authenticate is a function, just takes the request, takes a username, takes a password, and if the username and password are valid, they give me back who the user actually is. And as long as the user is not none,


[User] Please transcribe this text

[Assistant] That means the authentication was successful and I can go ahead and log the user in. How do I log the user in? I use the login function that Django gives me. Logging in with this request, this user.


[User] Please transcribe this text

[Assistant] And now I can go ahead and redirect them, HTTP response redirect the user back to the index route, back to the original route that the user started out as. And so that's if the user is not none, if the authentication was successful. But otherwise, if the authentication failed,


[User] Please transcribe this text

[Assistant] What should I do? Well, let me go ahead and render the same


[User] Please transcribe this text

[Assistant] Users login page again, but let me add some additional context. Uh, the context will be a message that says invalid credentials.


[User] Please transcribe this text

[Assistant] And now inside of login.html, I can just add some logic that says if there's a message, then go ahead and display that message inside of a div.


[User] Please transcribe this text

[Assistant] And then end if to end that. So if there is a message, we'll see the message printed, otherwise we won't see it at all.


[User] Please transcribe this text

[Assistant] So now if I go ahead and refresh the login page, nothing seems to have changed, but let's say I type in a username that doesn't exist, Hermione, and some password, and I log in, well then I get this error message. Invalid credentials, we were not able to log the user in.


[User] Please transcribe this text

[Assistant] So what happens if we do successfully log in? Well then the user is going to be taken to this index route.


[User] Please transcribe this text

[Assistant] And it looks like now we need to finish off this index route. What does the index route do? Well, let's go ahead and return render a template called users slash user dot html and inside of user dot html.


[User] Please transcribe this text

[Assistant] We'll go ahead and display some information about the user. We'll still extend user slash layout, because we're going to use the same basic layout. But in the body of this page, the information I want to show is I want to say like,


[User] Please transcribe this text

[Assistant] Welcome, and then like Harry, or welcome Ron, or whoever the user happens to be.


[User] Please transcribe this text

[Assistant] And it turns out inside of Django templates, I have access to the request that was used to make this HTTP request, which means I also have access to request.user, who is the user associated with that request. And if the user has a first name, I can access request.user.firstname.


[User] Please transcribe this text

[Assistant] And in addition to that, I can display other information, maybe like their username is request.user.username, and maybe their email address is request.user.email. And so I can show the user information about them, such that if like Harry logs in, for example, I sign in as Harry, sign in with Harry's credentials, click log in.


[User] Please transcribe this text

[Assistant] Well then, Harry sees a page that says, welcome Harry. Harry is logged in. They are request.user. And using that information, we can access first name, username, and email as well, just by accessing properties of request.user.


[User] Please transcribe this text

[Assistant] Now last thing we need to add, which still doesn't yet exist, is a way to actually log the user out. And it turns out that just as Django has a login function, Django also has a logout function that handles logout for us, so we don't need to implement it ourselves. So all our logout view needs to do is make a call to this logout function.


[User] Please transcribe this text

[Assistant] With a message of logged out to indicate that the user has now been logged out.


[User] Please transcribe this text

[Assistant] So now when Harry goes back to Harry's page, Harry sees a URL that says logout.


[User] Please transcribe this text

[Assistant] If Harry clicks logout, Harry gets logged out, is brought back to this page, because now request.user.isAuthenticated is going to be false. There is no authenticated user, and so they now see just the default login page. And if now Ron were to log in, for example, using Ron's username and Ron's password,


[User] Please transcribe this text

[Assistant] Logging in, then Ron now sees information associated with him as well.


[User] Please transcribe this text

[Assistant] And also a built-in user authentication system, a system that allows us to very quickly enable users to be able to log in, log out,


[User] Please transcribe this text

[Assistant] From our web application as well. So all of this are features that just helps to make it so that we can very quickly take advantage of things like SQL and models and migrations to build dynamic, interesting web applications with data to back them up.


[User] Please transcribe this text

[Assistant] Okay, welcome back everyone to Web Programming with Python and JavaScript. And today we turn our attention to the second of the main programming languages that we'll be looking at in this class, in particular JavaScript. And to get an understanding for why it is that JavaScript is actually helpful, let's go back and revisit this diagram of what communication over the internet will generally look like.


[User] Please transcribe this text

[Assistant] Oftentimes we'll have a user, otherwise known as the client, using their computer on their web browser, whether that's Chrome or Safari or some other web browser, that sends an HTTP request, a web request, to some sort of web server. That server then processes that request and then returns some sort of response that comes back to the client.


[User] Please transcribe this text

[Assistant] Thus far, all of the code that we've written, the Python web application code running in a Django web application for example, has all been code that runs on some sort of server.


[User] Please transcribe this text

[Assistant] What JavaScript is going to enable us to do is to begin to write client side code. JavaScript is going to allow us to write code that actually runs inside of the user's web browser on the client.


[User] Please transcribe this text

[Assistant] And this can be useful for a number of reasons. One, if there's computation that we want to do, but we don't need to go out and reach out to a server in order to do so, we can do the computation potentially faster just by running the code exclusively on the client.


[User] Please transcribe this text

[Assistant] JavaScript is going to give us the ability to directly manipulate the DOM, where again the DOM is the document object model, that tree-like hierarchy that represents the web page that the user happens to be looking at. So JavaScript will enable us to write code that directly manipulates the content on the web page, and we'll see how that can be quite powerful very soon.


[User] Please transcribe this text

[Assistant] So how do we then use JavaScript inside of a web page in order to add some code, add some programming logic to a web page? Well, so far we've already seen HTML, the language we use to describe the structure of a web page, where an HTML page just describes the structure of a page in terms of nested tags.


[User] Please transcribe this text

[Assistant] We had those head tags at the top of the page, the body tags that describe the structure of the page, and then additional tags that could be nested within those. And in order to add JavaScript to a web page, it's as simple as including some script tags that are often located inside of the HTML page itself.


[User] Please transcribe this text

[Assistant] When we use these script tags, we're telling the browser that anything in between these script tags should be interpreted in this case as JavaScript code that the web browser is then going to execute.


[User] Please transcribe this text

[Assistant] So our very first program, for example, might just look like a line of code inside of the script tags, something like this, where alert, for example, is the name of a function, a function that's going to produce an alert.


[User] Please transcribe this text

[Assistant] And then, just as with functions in Python, functions in JavaScript can take arguments. So in between these parentheses, we have an argument, something like the string, hello world, the text that we would like to display to the user.


[User] Please transcribe this text

[Assistant] So let's go ahead and give this a try and see how we can actually use this code to write JavaScript that is going to run inside of the user's web browser.


[User] Please transcribe this text

[Assistant] The same basic HTML structure that we've already seen before, where I have a head section that has a title and then a body that maybe just says hello, for example. And so now what I'd like to do


[User] Please transcribe this text

[Assistant] Is add a little bit of JavaScript to this webpage. So in the head section of my webpage, I'm going to go ahead and add a script tag.


[User] Please transcribe this text

[Assistant] We're in between these script tags now. I can write JavaScript code, code that is going to be written in JavaScript that will run inside of the web browser when the user actually opens up this page. And for now, I'll just say alert.


[User] Please transcribe this text

[Assistant] And then, hello world. It turns out in JavaScript you can use either single quotation marks or double quotation marks in order to represent strings. I'll generally use single quotation marks here just by convention.


[User] Please transcribe this text

[Assistant] So here I'm running a function called alert that's going to display an alert, something like hello world to the user, and that's going to be inside of the script tags of this HTML page.


[User] Please transcribe this text

[Assistant] So now, if I want to actually open the page up, I can open hello.html, or you could just visit it inside of your web browser, whether it's Chrome or something else.


[User] Please transcribe this text

[Assistant] And now at the top of the page, what you'll notice is that I get a little bit of an alert, some interaction where it says this page says hello world and gives me an option to like press a button, for example, like hello, like the OK button that'll say, all right, dismiss the alert.


[User] Please transcribe this text

[Assistant] And this is our very first example of JavaScript. We have a function called alert built into JavaScript for our web browser. And our web browser knows that when we call the alert function, the browser should display an alert message that looks a little something like that. And if I click the OK button to dismiss the alert, then we go ahead and get back the original page that I had from the beginning.


[User] Please transcribe this text

[Assistant] And so now we can begin to imagine that using this ability to programmatically display alerts that we can add additional features to our applications as well.


[User] Please transcribe this text

[Assistant] And one big area where JavaScript can be quite powerful is with event-driven programming. And what event-driven programming is all about is thinking about things that happen on the web in terms of events that happen.


[User] Please transcribe this text

[Assistant] What are some examples of events? Events are things like the user clicks on a button or the user selects something from a drop down list or the user scrolls through a list or submits a form. Anything the user does can generally be thought of as an event.


[User] Please transcribe this text

[Assistant] So let's go ahead and give that a try. I'll go ahead and now, instead of just saying alert hello world, let me put this alert inside of a function. And to create a function in JavaScript, you just use the keyword function.


[User] Please transcribe this text

[Assistant] Followed by the name of the function. I'll call the function hello, for example. And then in parentheses, any inputs that function takes. This hello function is not going to take any input, so I'll just use an empty set of parentheses. And then inside of curly braces, I include any of the code that I want to run in this function.


[User] Please transcribe this text

[Assistant] And so what I've done here now is create a function called hello and then inside of the curly braces I've defined the body of the function. What code should run when I run the hello function and what the hello function should do is it should display an alert that in this case says hello world.


[User] Please transcribe this text

[Assistant] So now what I'd like to do is get this function to run when something happens on the page. For example, when a user clicks on a button. So to do that, the first thing I'll need to do is actually create a button. So add a button that just says, like, click here, for example. So now if I refresh this page, I now see


[User] Please transcribe this text

[Assistant] That I have hello, and I also have this button that says click here, but when I click here, like nothing happens. I'm clicking the click here button, but it's not changing anything because I haven't yet said what should happen when the user does click on this button. And so one way we could do this is by adding an attribute to this HTML element.


[User] Please transcribe this text

[Assistant] What this is going to do is it's going to add an on click handler to this button. It's going to say what should happen when the user clicks on this button and I'm going to set the on click attribute equal to


[User] Please transcribe this text

[Assistant] Running the function hello. And in order to run a function in JavaScript, just as you ran a function with Python, you use the name of the function.


[User] Please transcribe this text

[Assistant] Followed by a set of parentheses to say go ahead and actually run this function. Using those parentheses calls the function, another word for running the function. And the fact that there's nothing in between the parentheses means we're not providing anything as input to the hello function. Though if the hello function did take inputs, we could certainly add that in between the parentheses.


[User] Please transcribe this text

[Assistant] So now, I've tied the two pieces of this page together. I have a button that says click here, and I've added an onClick handler that says that when you click on the button, you should run the hello function.


[User] Please transcribe this text

[Assistant] And then up above I've defined the hello function to say what should the hello function do? Well, when the function is called, we're going to display an alert that in this case says hello world. So now we should be able to refresh the page.


[User] Please transcribe this text

[Assistant] We still see the same thing, at least initially, where it just says hello and a button that tells me to click here. But now, if I go ahead and click the button that says click here,


[User] Please transcribe this text

[Assistant] Well then I get the alert that says, this page says, hello world.


[User] Please transcribe this text

[Assistant] So this now appears to give us a fair amount of power, and much as in other programming languages, languages like Python or other languages you might have worked with,


[User] Please transcribe this text

[Assistant] JavaScript has all these same types of language features. So far, we've seen data types, things like a string, but we also have other data types that we'll take a look at soon too. We've seen functions, some functions that are built into JavaScript, like the alert function, and other functions that we can write for ourselves, functions like hello.


[User] Please transcribe this text

[Assistant] But we also have the ability to include things like variables inside of our program as well. So what might that look like?


[User] Please transcribe this text

[Assistant] I'll go ahead and create a new file that we'll call counter.html.


[User] Please transcribe this text

[Assistant] And counter is going to have some of the similar code to hello, so I'll just go ahead and copy it for now. But I'll clear out the script section, change the title from hello to counter. And now...


[User] Please transcribe this text

[Assistant] Inside, I'll get rid of the button. Or actually, I'll keep the button. But instead of saying click here, the button is going to say count. I'd like to create a program that just counts for me, from 0 to 1 to 2, 3, 4, so on and so forth.


[User] Please transcribe this text

[Assistant] And now, in order to do that, in order to have some way of counting repeatedly 0, 1, 2, 3, 4, 5, I'm going to need to have some sort of variable inside of my program. Something that is keeping track of data, like the number that I currently have counted to.


[User] Please transcribe this text

[Assistant] So in order to do that in JavaScript, I can say something like, let counter equal zero.


[User] Please transcribe this text

[Assistant] This is the way in JavaScript that I define a new variable. I first say let counter, meaning let there be a new variable called counter, and I'm going to initially set the value of counter equal to the number zero.


[User] Please transcribe this text

[Assistant] And now when I click on the button, instead of running the hello function, I'm going to go ahead and run the count function, which doesn't exist yet, but I'll now write it. I'll define a function called count. And what the count function is going to do is it is going to first


[User] Please transcribe this text

[Assistant] Increment the value of counter. And a number of ways I could do that. One is by saying counter equals counter.


[User] Please transcribe this text

[Assistant] Plus one to say go ahead and reset the value of counter to whatever counter is plus one.


[User] Please transcribe this text

[Assistant] And there are a couple of shorthand notations for this. I could equivalently say counter plus equals one to say add one to the counter. Or in the case of adding one, JavaScript, much like languages like C if you've seen them before, support notation like this. Counter plus plus, which just means take the value of counter and increment it. Add one to it. So I'll add one to the value of counter. And then I'll just display an alert.


[User] Please transcribe this text

[Assistant] That has whatever the current value of counter happens to be.


[User] Please transcribe this text

[Assistant] And so I've incremented the value of counter and then displayed an alert that shows me what's contained inside of counter. And so now...


[User] Please transcribe this text

[Assistant] If I go ahead and not go to hello.html, but to counter.html instead, I now see that I still see a button that says count. And if I click on that button, I get an alert that this time says 1. We've incremented the value of counter from 0 to 1. The alert now says 1, and I can press OK. If I press count again, the count now goes to 2.


[User] Please transcribe this text

[Assistant] Press OK, press count again, it goes to 3. And every time I click count, it is going to increment the value of the variable counter inside of my JavaScript web page. And then it's going to display an alert that is going to contain the value of that variable.


[User] Please transcribe this text

[Assistant] So using alerts now, we're able to manipulate, we can inside of functions manipulate the values of variables and then display alerts that show the contents of those variables.


[User] Please transcribe this text

[Assistant] But ultimately, when users are interacting with the page, it's going to be fairly annoying if the only way that we have to interact with the user is via displaying these alerts. The equivalent of like printing something out except instead of printing it to a terminal, we're printing it via an alert that appears on the screen.


[User] Please transcribe this text

[Assistant] What would be more interesting and more powerful and much more useful in the context of a web page is if we could programmatically update the website, change something about the web page the user is actually seeing, changing the content that happens to be on the page. And turns out JavaScript is going to enable us to do that as well because JavaScript allows us to manipulate the DOM.


[User] Please transcribe this text

[Assistant] Document object model that represents all of the elements that happen to be on that page.


[User] Please transcribe this text

[Assistant] So to do that, let's go ahead and return to hello.html. This again was this web page that just said hello and gave me a button where if I clicked on that button it would display an alert that said hello world. Now what I'd like to do is instead of having the hello function


[User] Please transcribe this text

[Assistant] Display an alert. I'd like to have it manipulate something on the page. And what might I want it to manipulate? Well, inside the body of the page, I here have this heading, this heading that just says hello, for example, which is inside of an h1 element. And what I might like to do is actually change that element.


[User] Please transcribe this text

[Assistant] How can I do that? Well, it turns out that in JavaScript we have access to a function called document dot query selector.


[User] Please transcribe this text

[Assistant] And what document dot query selector is going to do is it is going to give us the ability to look through an HTML page and extract an element out of that page so that we can manipulate that HTML element using JavaScript code. And so if I want to select like an H1 element, I can say document dot query selector.


[User] Please transcribe this text

[Assistant] And then as the argument, the input to document.querySelector, I'll go ahead and say each one.


[User] Please transcribe this text

[Assistant] Meaning go through the page, find me an h1 element. And querySelector is only going to return one element. So if they're multiple, it's going to return the first thing it finds. But here we only have one h1 element, so it's okay. I'm going to say look through this document, try and find an h1 element.


[User] Please transcribe this text

[Assistant] Well, right now, initially, when we first load the page, we have an H1, a big heading at the top that just says hello.


[User] Please transcribe this text

[Assistant] And now when this hello function is called, which is called when this button is clicked on, because it has an onclick attribute that is equal to hello, calling the hello function.


[User] Please transcribe this text

[Assistant] What the hello function is going to do is it's going to say document.querySelectorH1, find me the H1 element, that will return this element right here, the JavaScript representation of this HTML element that is just an H1 whose HTML inside of it says hello.


[User] Please transcribe this text

[Assistant] And if I want to change that HTML, I can do that by modifying the inner HTML property.


[User] Please transcribe this text

[Assistant] Every science fiction writer has a story about a time when the future arrived too soon.


[User] Please transcribe this text

[Assistant] I have a lot of those stories. Like, OK, for example, years ago, I was writing a story where the government starts using drones to kill people.


[User] Please transcribe this text

[Assistant] I thought that this was a really intense, futuristic idea, but by the time the story was published, the government was already using drones to kill people.


[User] Please transcribe this text

[Assistant] Our world is changing so fast, and there's a kind of accelerating feedback loop where technological change and social change feed on each other. When I was a kid in the 1980s, we knew what the future was going to look like.


[User] Please transcribe this text

[Assistant] It was going to be neon megacities and flying vehicles. But now, nobody knows what the world is going to look like, even in just a couple years.


[User] Please transcribe this text

[Assistant] To think about the future, to dream about the future, to write about the future.


[User] Please transcribe this text

[Assistant] Uhm, I found it really liberating and fun to do that. It's a way of vaccinating yourself against the worst possible case of future shock. It's also a source of empowerment, because you cannot prepare for something that you haven't already visualized. But there's something that you need to know. You don't predict the future. You imagine the future.


[User] Please transcribe this text

[Assistant] So as a science fiction writer whose stories often take place years or even centuries from now, I've found that people are really hungry for visions of the future that are both colorful and lived in.


[User] Please transcribe this text

[Assistant] I found that research on its own is not enough to get me there. Instead, I use a mixture of active dreaming


[User] Please transcribe this text

[Assistant] Responded in the past to huge changes and upheavals and transformations, and I pair that with an attention to detail, because the details are where we live.


[User] Please transcribe this text

[Assistant] We tell the story of our world through the tools we create and the spaces that we live in. And at this point, it's helpful to know a couple of terms that science fiction writers use all of the time. Future history and second-order effects.


[User] Please transcribe this text

[Assistant] Meanwhile, a second-order effect is basically


[User] Please transcribe this text

[Assistant] The kind of thing that happens after the consequences of a new technology or a huge change, there's a saying, often attributed to writer and editor,


[User] Please transcribe this text

[Assistant] Frederick Paul that a good science fiction story should predict not just the invention of the automobile, but also the traffic jam.


[User] Please transcribe this text

[Assistant] And speaking of traffic jams, I spent a lot of time trying to picture the city of the future.


[User] Please transcribe this text

[Assistant] What's it like? What's it made of? Who's it for? Uhm, I try to picture a green city with vertical farms and structures that are partially grown rather than built. And walkways instead of streets because nobody gets around by car anymore.


[User] Please transcribe this text

[Assistant] Urban futurism, design porn and technological speculation. And then I go back and I ...


[User] Please transcribe this text

[Assistant] Uhm, you know, what do they smell? What do they touch? What's it like to fall in love inside a smart city? What do you see when you look at your window, and does it depend on, you know, how the Windows software interacts with your mood?


[User] Please transcribe this text

[Assistant] Uhm, and finally I asked myself how a future brilliant city would ensure that nobody is homeless and nobody slips through the cracks.


[User] Please transcribe this text

[Assistant] They bear the scars and ornaments of


[User] Please transcribe this text

[Assistant] Wars, migrations, economic booms, cultural awakenings. A future city should have monuments, yeah, but it should also have layers of past architecture, repurposed buildings and all of the signs of how we got to this place. And then there's second-order effects.


[User] Please transcribe this text

[Assistant] Speaking of eating, what kind of sewer system does the city of the future have? It's a trick question. There are no sewers. There's something incredibly bizarre about the current system we have in the United States, where your waste gets flushed into a tunnel to be mixed with rainwater and often dumped into the ocean. Not to mention toilet paper.


[User] Please transcribe this text

[Assistant] So how does the history of the future, all of that trial and error, lead to a better way to go to the bathroom?


[User] Please transcribe this text

[Assistant] There are companies right now who are experimenting with a kind of cleaning wand that can substitute for toilet paper using compressed air or sanitizing sprays to clean you off, but what if those things looked more like flowers than technology?


[User] Please transcribe this text

[Assistant] Uhm, what if your toilet could analyze your waste and let you know if your microbiome might need a little tune-up?


[User] Please transcribe this text

[Assistant] And I got really carried away imagining the bars, restaurants, cafes that you could only find your way inside if you had the correct augmented reality hardware. But again,


[User] Please transcribe this text

[Assistant] That we're in a noisy sports bar, and I think we're in a highbrow salon with a string quartet talking about Baudrillard.


[User] Please transcribe this text

[Assistant] But then I think about the conversations that I've had with people who work on AI, and what I always hear from them is that the smarter AI gets, the better it is at making connections. So maybe ...


[User] Please transcribe this text

[Assistant] The social media of the future will be better. Maybe it'll help us to form healthier, less destructive relationships. Maybe we'll have devices that enable togetherness and serendipity. I really hope so.


[User] Please transcribe this text

[Assistant] Uhm, and you know, I like to think that if strong AI ever really exists, they'll probably enjoy our weird relationship drama the same way that you and I love to obsess about the real housewives of wherever.


[User] Please transcribe this text

[Assistant] And finally, there's medicine. I mean, I think a lot about how developments in genetic medicine


[User] Please transcribe this text

[Assistant] Could improve outcomes for people with cancer or dementia and maybe one day your hundredth birthday will be


[User] Please transcribe this text

[Assistant] Just another milestone on the way to another two or three decades of healthy, active life. Maybe the toilet of the future that I mentioned will improve health outcomes for a lot of people, including people in parts of the world where they don't have these complicated sewer systems that I mentioned.


[User] Please transcribe this text

[Assistant] But also, as a transgender person, I like to think


[User] Please transcribe this text

[Assistant] What if we make advances in understanding the endocrine system that improve the options for trans people the same way that hormones and surgeries expanded the options for the previous generation?


[User] Please transcribe this text

[Assistant] But the truth is, it's not going to be either of those things. It's going to be in the middle. It's going to be both. It's going to be everything. The one thing we do know is that the future is going to be incredibly weird.


[User] Please transcribe this text

[Assistant] Think about how weird the early 21st century would appear to someone from the early 20th. And you know, there's a kind of logical fallacy that we all have, where we expect the future to be an extension of the present. Like people in the 1980s thought that the Soviet Union would still be around today.


[User] Please transcribe this text

[Assistant] The future is going to be much weirder than we could possibly dream of, but we can try. And I know that there are going to be scary, scary things.


[User] Please transcribe this text

[Assistant] But there's also going to be wonders and saving graces. And the first step to finding your way forward is to let your imagination run free. Thank you.


[User] Please transcribe this text

[Assistant] Shannon hands me the gift box and I'm shaking.


[User] Please transcribe this text

[Assistant] And had other horrifying injuries to her body, which the police will not disclose.


[User] Please transcribe this text

[Assistant] The lurking threat of the ripper is very real. Those who live in the areas where he's struck are in constant fear.


[User] Please transcribe this text

[Assistant] Maureen Long is the first of the Ripper's victims to survive.


[User] Please transcribe this text

[Assistant] Imagine anything else more than getting an apron today and uhm, I wanna be standing where these guys are.


[User] Please transcribe this text

[Assistant] I got my love from baking from my grandma because uhm, she would make gingerbread cookies. 100 grams?


[User] Please transcribe this text

[Assistant] When I was nine years old, that's when we were kind of playing around with baking. But when I hit 15, that's when I believed that, you know, I wanted to do this as a full-time career. I would read books about cooking, watch videos, and then I just couldn't stop. Baking became my passion, and uhm, I just love it.


[User] Please transcribe this text

[Assistant] I like to have that elegant style to it. Something that you look at it and you know, oof, this is gonna taste good.


[User] Please transcribe this text

[Assistant] I would sacrifice every single opportunity just to be the winner.


[User] Please transcribe this text

[Assistant] It's time to pour the glaze. I'm racing inside. But I just gotta do it.


[User] Please transcribe this text

[Assistant] This apron means the world to me.


[User] Please transcribe this text

[Assistant] Body identified as that of 28 year old Irene Richardson.


[User] Please transcribe this text

[Assistant] In her own ground floor flat in Bradford, the body of 33-year-old Patricia Atkins.


[User] Please transcribe this text

[Assistant] She was the fourth woman to be murdered in a radius of 10 miles within the last 18 months. And I asked Detective Chief Superintendent John Domell whether he thought there was any connection between her death and the other three unsolved murders. Brutal murder, wasn't it?


[User] Please transcribe this text

[Assistant] As 250 detectives continue their inquiries today in Keithley, Bradford and Leeds, local feeling isn't hard to gauge.


[User] Please transcribe this text

[Assistant] I think there's every possibility that he will. The big question is when and where.


[User] Please transcribe this text

[Assistant] My fear every Sunday morning when the telephone rings is, uh, are we in business again?


[User] Please transcribe this text

[Assistant] I'm about to meet Matt, George and Gary and I'm just so excited. I hope I don't get...


[User] Please transcribe this text

[Assistant] Too nervous. It's a dream come true. This is it.


[User] Please transcribe this text

[Assistant] I'm making a mandarin nougat, so with a mandarin granita, a crumb and a beetroot caramel.


[User] Please transcribe this text

[Assistant] I always research stuff and in my spare time I spend a lot of time practicing recipes and practicing my plating skills.


[User] Please transcribe this text

[Assistant] It's quite artistic. The B-trick harm was quite vibrant because I've splatted on the plate and have like elements everywhere.


[User] Please transcribe this text

[Assistant] Yeah, Andy, one of my inspirations. Who are your other heroes?


[User] Please transcribe this text

[Assistant] Uhm, in, from MasterChef, like, Julie. She's a massive inspiration for me.


[User] Please transcribe this text

[Assistant] The idea is for it to be like a bit messy but neat.


[User] Please transcribe this text

[Assistant] So, this is my Mandarin Riga.


[User] Please transcribe this text

[Assistant] And then this is the beetroot caramel that you see me make?


[User] Please transcribe this text

[Assistant] And then, these are the garnishes, the thyme flowers and the thyme leaves. Taste a bit.


[User] Please transcribe this text

[Assistant] Hello. Good morning, how you going? Good, thank you. Craig, nice to meet you. Most people see real estate agents as a bit like car salesmen. Let's go have a look through.


[User] Please transcribe this text

[Assistant] I've got my dish down-packed, I've got all my elements. I'm very confident now. I'm cooking pistachio nut and parmesan crusted lamb cutlets with some sweet potato rosti and a red wine jus.


[User] Please transcribe this text

[Assistant] I'm cooking this dish because I grew up with a country background in South Australia. We always had Sunday night roasts. It's a real sort of sentimental dish to me.


[User] Please transcribe this text

[Assistant] Alright, Jew's perfect, they're perfect, this is a ready to go I reckon.


[User] Please transcribe this text

[Assistant] I am a real estate agent, but I'm finding that I really want to get into the food and into the kitchen. What have you cooked?


[User] Please transcribe this text

[Assistant] I've cooked a parmesan and pistachio crusted lamb cutlets with a pea puree and then a sweet potato rosti with caramelised leeks. Okay. And a red wine jus.


[User] Please transcribe this text

[Assistant] Uhm, so the nerves got a little bit into me today, but it's the dish that from the heart and I'm one who's actually gonna be in there. I'm gonna give it all my best, make sure I don't let you guys down and make sure I achieve high and deliver the results that you guys are looking for. And I'm just willing to give it a go. I'm just waiting for the sort of breaks for it to happen.


[User] Please transcribe this text

[Assistant] Uhm, so it's the dish that's from the heart and I'm one who's actually gonna be in there, I'm gonna give it all my best and make sure I don't let you guys down and make sure I achieve high and deliver the results that you guys are looking for. And I'm just willing to learn, willing to give it a go, uhm, just waiting for the sort of breaks for it to happen.


[User] Please transcribe this text

[Assistant] Little bit more perfection needed on my signature dish. Little bit more cooking with my lamb. Just now back to the drawing board. So you'll see me again shortly next year.


[User] Please transcribe this text

[Assistant] He's very technical, you know, temperatures are measured and he's working really calmly.


[User] Please transcribe this text

[Assistant] I've wanted to apply for years and I've just been too nervous. I've looked at the application form a few years in a row now, but I've never gone through with it. I think I just lacked a bit of self-confidence.


[User] Please transcribe this text

[Assistant] I'm not normally the kind of person that puts myself out there in the spotlight. So I think all this time I've just told myself that's not really something I can do.


[User] Please transcribe this text

[Assistant] But when I cook, that's honestly where I feel like I can be myself.


[User] Please transcribe this text

[Assistant] If I can turn that into something that I do full time, it's amazing.


[User] Please transcribe this text

[Assistant] I'm Tashi, I'm from Adelaide, I'm a prison officer, and I'm here to change my life!


[User] Please transcribe this text

[Assistant] I'm cooking Chicken Rendang with Coconut Rice and Pineapple Aca with Apam Jala.


[User] Please transcribe this text

[Assistant] I work with a very great team every Friday. Usually I'll cook simple breakfast for them. Simple dish, but they call it, I have the magic touch.


[User] Please transcribe this text

[Assistant] What I love about cooking is once I come back from work, whatever stress I have, I don't think about it. Hey guys, your salmon.


[User] Please transcribe this text

[Assistant] Have you done everything? You've cooked everything? No, I'm gonna cook the roti jala for you guys. Yeah, great. Now? Yeah, come on then. Crack on.


[User] Please transcribe this text

[Assistant] I'm a prison officer. I've been in law enforcement for the last 20 odd years.


[User] Please transcribe this text

[Assistant] Cooking is like, uh, a daily thing for me. I come back from work, everyday I cook. For my kids, for my family. I love Adelene. And when I come into the kitchen at home, I feel that. Love it.


[User] Please transcribe this text

[Assistant] Have a nice holiday. Mr and Mrs Boggess, come into the office.


[User] Please transcribe this text

[Assistant] So, Mr and Mrs Boggess are going to have a wonderful holiday, are they? What do you think? Let's see, shall we? It's now two weeks later.


[User] Please transcribe this text

[Assistant] In her auntie An Mei's home, Jing Mei reluctantly takes her seat at the eastern corner of the Ma Jiang table. At the north, south, and west corners are her aunties, longtime members of the Joy Luck Club.


[User] Please transcribe this text

[Assistant] This group of immigrant families comes together weekly to trade gossip, feast on wonton and sweet cha shao and play mahjong.


[User] Please transcribe this text

[Assistant] However, the club's founder, Jin Mei's mother, Su Yuan, has recently passed away. At first, Jin Mei struggles to fill her place at the table, but when her aunties reveal a deeply buried secret about Su Yuan's life, Jin Mei realizes she still has a lot to learn about her mother and herself.


[User] Please transcribe this text

[Assistant] In Amy Tan's 1989 debut novel, The Joy Luck Club, this gathering at the mahjong table is the point of departure for a series of interconnected vignettes.


[User] Please transcribe this text

[Assistant] The book itself is loosely structured to imitate the format of the Chinese game. Just as mahjong is played over four rounds, with at least four hands each, the book is divided into four parts, each with four chapters.


[User] Please transcribe this text

[Assistant] These stories take the reader through war zones and villages of rural China and into modern marriages and tense gatherings around the dinner table.


[User] Please transcribe this text

[Assistant] They touch upon themes of survival and loss, love and the lack of it, ambitions and their unsatisfied reality.


[User] Please transcribe this text

[Assistant] In one, Auntie Ling plots an escape from the hostile family of her promised husband, ultimately leading to her arrival in America.


[User] Please transcribe this text

[Assistant] In another, the Shue family's all-American day at the beach turns dire when Rose is overwhelmed by the responsibility her mother assigns to her.


[User] Please transcribe this text

[Assistant] The resulting tragedy traumatizes the family for years to come


[User] Please transcribe this text

[Assistant] These tales illustrate the common divides that can form between generations and cultures, especially in immigrant families.


[User] Please transcribe this text

[Assistant] The mothers have all experienced great hardships during their lives in China, and they've worked tirelessly to give their children better opportunities in America.


[User] Please transcribe this text

[Assistant] But their daughters feel weighed down by their parents' unfulfilled hopes and high expectations.


[User] Please transcribe this text

[Assistant] Jing Mei feels this pressure as she plays mahjong with her mother's friends. She worries.


[User] Please transcribe this text

[Assistant] In me, they see their own daughters just as ignorant, just as unmindful of all the truths and hopes they have brought to America.


[User] Please transcribe this text

[Assistant] Time and again, the mothers strive to remind their daughters of their history and heritage. Meanwhile, their daughters struggle to reconcile their mother's perception of them with who they really are.


[User] Please transcribe this text

[Assistant] Why doesn't my mother understand? Others respond.


[User] Please transcribe this text

[Assistant] In her interrogation of these questions, Tan speaks to anxieties that plague many immigrants who often feel both alienated from their homeland and disconnected from their adopted country.


[User] Please transcribe this text

[Assistant] But by weaving the tales of these four mothers and daughters together,


[User] Please transcribe this text

[Assistant] Tan makes it clear that Jin Mei and her peers find strength to tackle their present-day problems through the values their mothers passed on to them.


[User] Please transcribe this text

[Assistant] When The Joy Luck Club was first published, Tan expected minimal success. But against her predictions, the book was a massive critical and commercial achievement.


[User] Please transcribe this text

[Assistant] Today, these characters still captivate readers worldwide. Not only for the way they speak to Chinese American and immigrant experiences, but also for uncovering a deeper truth. The need to be seen and understood by the ones you love.


[User] Please transcribe this text

[Assistant] Watch The Chinese Myth of the White Snake, an epic tale of deception, courage, and above all, love.


[User] Please transcribe this text

[Assistant] Turn it down, it's too high. Brett started pan frying his salmon.


[User] Please transcribe this text

[Assistant] I know he wants his skin really crispy, but if it's overcooked, that could send him home.


[User] Please transcribe this text

[Assistant] Side of the div, uh, in addition to that. So a number of different elements, some of which are located inside of other elements. And what I'd like to do is be very precise about how I style these pages.


[User] Please transcribe this text

[Assistant] What SAS is going to allow us to do is it lets us write a SAS file that looks a little something like this. Let's take a look at what it's doing.


[User] Please transcribe this text

[Assistant] It's saying for the entire div, I would like to give that div a font size of 18 pixels.


[User] Please transcribe this text

[Assistant] And then, what CSS normally doesn't allow us to do, but we can do now using the power of SAS, is say, for any paragraphs that are inside of that div, go ahead and give those paragraphs a color of blue.


[User] Please transcribe this text

[Assistant] And for any unordered lists that are inside of the div, give those unordered lists a color of green. By nesting these CSS selectors inside of others, we've been able to get across the idea that I only want to style the paragraph if it is inside of a div.


[User] Please transcribe this text

[Assistant] And this is just a little bit of a nicer, cleaner syntax for doing some of these more complex styling tasks that might come up.


[User] Please transcribe this text

[Assistant] So what does this actually look like if I like take this SCSS file and turn it into normal CSS? What is the result going to be? Well, let's take a look. We can try it out.


[User] Please transcribe this text

[Assistant] By, let me go into my nesting folder, where all these files are located.


[User] Please transcribe this text

[Assistant] And then we're using the same descendant selector notation that we saw before, where all the paragraphs inside of divs should be colored blue, all the unordered lists inside of a div should be colored green. And this certainly works, and we could have just written this CSS from the beginning, but it can be a little bit cleaner, a little bit easier to read.


[User] Please transcribe this text

[Assistant] To use SAS in order to really say, uh, paragraphs inside of divs should be structured this way, unordered lists are styled in some other way, and using this nesting approach just makes it often easier to take a look at this SCSS page and really understand how all of the different style code interacts with each other.


[User] Please transcribe this text

[Assistant] We might see something that looks a little something like this. The paragraph inside the div and the list inside of the div, those both get changes to the way that they've been styled. Uhm, but unlike them, these paragraphs outside of the div and the list that is also outside of the div, those get styled a little bit differently.


[User] Please transcribe this text

[Assistant] So two features now we've seen inside of SAS. We've first seen the ability to have variables to make sure we're not repeating ourselves in many places throughout the code. And now we've seen the ability to nest CSS selectors inside of each other by taking advantage of SAS.


[User] Please transcribe this text

[Assistant] And finally, we'll take a look at one last feature that SAS is going to give us, and that is something called inheritance. If we have certain CSS selectors that are related to other CSS selectors, but that are maybe adding some additional information. And in this case, I'm actually going to show you the finished product first. So let's go into


[User] Please transcribe this text

[Assistant] Inheritance and let me open up inheritance.html.


[User] Please transcribe this text

[Assistant] And here you see I've tried to almost implement bootstrap style alert messages in HTML. I have a success message up at the top, a warning message, and then an error message. And each of these messages, you'll notice, are styled differently. In particular, they're each a different color.


[User] Please transcribe this text

[Assistant] But despite that, they share a lot in common. They share a common border, they share a common font, they share a common size, and many other properties are all shared between these elements. There are just some things that are a little bit different about them.


[User] Please transcribe this text

[Assistant] I could have written three different CSS selectors to deal with all of these cases, but there might be some repetition there.


[User] Please transcribe this text

[Assistant] So here's what I can do by taking advantage of the features that SAS gives me.


[User] Please transcribe this text

[Assistant] Let me go ahead and look at inheritance.scss to look at the code for doing this. And it looks a little bit cryptic at first, but here's what I've defined.


[User] Please transcribe this text

[Assistant] I've here defined using a percent sign that this is what a generic message is going to be. Something that I can extend later to add additional information to.


[User] Please transcribe this text

[Assistant] All of the messages, whether they be success messages or danger messages or warning messages, they're all gonna have the same font, they're all gonna have the same border, they're all gonna have the same padding and margin spacing around and outside of it. But each of the specific messages are going to be slightly different. How are they different? Well, let's take a look down here.


[User] Please transcribe this text

[Assistant] Anything with a class of success, I'm going to say extends this message. And by extends this message, what I mean is that anything with a class of success is going to inherit all of these CSS properties. The font, the border, the padding, and the margin.


[User] Please transcribe this text

[Assistant] But it's going to add additional information to it. In particular, we're going to add a color. We're going to say that for success messages, the background color is going to be green.


[User] Please transcribe this text

[Assistant] I've extended the basics of what a message is, but said that this message in particular has some additional style that we're going to assign to it as well.


[User] Please transcribe this text

[Assistant] And the other two messages behave in very similar ways. My warning message extends the message, but instead says the background color should be orange.


[User] Please transcribe this text

[Assistant] And finally the error message also extends the message, but this time gives us a background color of red instead. So now when you compile this all together,


[User] Please transcribe this text

[Assistant] Into inheritance.css, which I compiled in advance.


[User] Please transcribe this text

[Assistant] This is what this is ultimately going to look like. It translates what I've written into saying, alright, success and warning and errors should have all of these properties.


[User] Please transcribe this text

[Assistant] But success should also have this background color. Warning should have this background color. Error should have this background color. So again, we could have written this CSS. There's nothing that SAS does that we couldn't have written ourselves using CSS.


[User] Please transcribe this text

[Assistant] This task will just make it a little bit easier to do many of the same things. So we can write things in a little bit of a nicer syntax by saying the success message inherits from the message but adds a background color and likewise the warning and error messages do the same thing.


[User] Please transcribe this text

[Assistant] Uhm, but in a simpler syntax and a bit of a nicer syntax such that later we can let the computer take the SAS code and compile it into CSS instead.


[User] Please transcribe this text

[Assistant] And so those now are some of the fundamentals of what we've seen in building web programs using HTML and CSS.


[User] Please transcribe this text

[Assistant] We've seen how we can use HTML to describe the structure of our webpage, deciding what's going to show up where on the page. And then we looked at CSS and how CSS can then be used to style our webpage in various different ways, adding custom styling like colors and layouts, but also thinking about things like responsive design.


[User] Please transcribe this text

[Assistant] Like what happens on a mobile screen or on a tablet and making sure that our web pages look good on those screens too.


[User] Please transcribe this text

[Assistant] And then finally, we took a look at SAS, an extension to CSS that adds a number of additional features. Features like variables and nesting and inheritance that make it even easier for us to be able to write style that we can apply to our webpages.


[User] Please transcribe this text

[Assistant] So last time we took a look at two languages, HTML and CSS, both of which can be used to design web pages. HTML we used in order to describe the structure of web pages to decide what content we want in the layout of the page. And then CSS we used to describe the style of the page, what color we wanted things, how much space we wanted around things as well.


[User] Please transcribe this text

[Assistant] Today we're going to turn our attention to a tool that we can use as we begin to develop these web applications. And in particular, we're going to be looking at a tool called Git.


[User] Please transcribe this text

[Assistant] And what Git is, is it is a version control tool, not specific to web programs necessarily, but that we're going to use as we begin to develop bigger and more sophisticated web applications over the course of this term.


[User] Please transcribe this text

[Assistant] So what is Git going to enable us to do? Well, it's going to do a couple of things. First and foremost, what Git is, it is a command line tool that's going to allow us to first keep track of changes that we make to code. So once upon a time, the first time I was starting to develop web applications, I remember


[User] Please transcribe this text

[Assistant] So what Git is going to enable us to do is to keep track of changes that we make to our code. So we might create a file initially, save that version of it, but over time, as we make changes, add to it, remove things from it,


[User] Please transcribe this text

[Assistant] We can save snapshots, so to speak, of various different parts of our code at different points in time, such that we can quickly and easily reference all of those changes that we've made to that code.


[User] Please transcribe this text

[Assistant] Additionally, Git is going to make it easy for us to synchronize code between different people. In larger scale web applications, it's rarely just one person who's working on the entire application. Usually you're working with a coworker or multiple coworkers all on the same application and all at the same time.


[User] Please transcribe this text

[Assistant] And one definitely tricky part of this process is figuring out how to synchronize your work between different people. If I make a change on my part of the web application, I want to make sure that my colleagues are also able to see those changes and get access to the latest changes that I've made. And then I want to be able to get access to the latest changes that the people I'm working with have made too.


[User] Please transcribe this text

[Assistant] So we need some way to keep everything in sync, and Git is going to enable us to do that.


[User] Please transcribe this text

[Assistant] What we're going to effectively have is one version of the code stored in what we're going to call a repository somewhere online. And both I and someone I'm working with, a partner for example, might both be able to get access to that exact same repository, those same files in the same state.


[User] Please transcribe this text

[Assistant] And if ever I and the other person make changes to those files, we can each make changes to those files and then synchronize them back up, pushing them back up to the server, so to speak, so that the server will have the most recent, most up to date version of this code.


[User] Please transcribe this text

[Assistant] Then after that, after we've both pushed our changes up to the server, then we can both pull changes from the server, so to speak, in order to get access to the latest version of the code so that no matter what, so long as I've been working on the same project that my partner has, we can use Git to synchronize our work so that I have access to my colleague's most recent changes and vice versa.


[User] Please transcribe this text

[Assistant] Git also enables us to do a number of other things. For example, Git allows us to test changes to our code without removing access to the original.


[User] Please transcribe this text

[Assistant] So for example, you might imagine that as I'm working on writing a program, I might want to try making some changes, but I'm not sure if they're quite going to work. So I want to test those changes, but I don't want to lose access to my original working version of the program just in case something goes wrong.


[User] Please transcribe this text

[Assistant] So what Git enables us to do is it lets us make changes to code on a separate branch, so to speak, such that later, once we're happy and satisfied with the changes, we can merge those changes back into the original version of our code, being able to test those changes before we're really sure that they're the ones that we want to make.


[User] Please transcribe this text

[Assistant] Finally, one powerful feature that Git gives us access to is the ability to revert back to old versions of our code.


[User] Please transcribe this text

[Assistant] So you might imagine in a situation where I've been working on some code and I realized that actually what I'm doing right now isn't what I want. Git enables us to say, you know what, this most recent change isn't something that I wanted. I would like to revert back to a previous version of the code instead. And Git makes it very easy to go back to those previous versions.


[User] Please transcribe this text

[Assistant] So the goal for today is going to be to learn how to use this tool, to learn the various different git commands that will be quite popular and quite common as you go about working on web applications or really any other code related project because version control really allows a number of useful features that are practical as you begin to work on larger and larger projects.


[User] Please transcribe this text

[Assistant] But ultimately, as we begin working on these Git projects, they need to be stored somewhere online, such that we're able to download them from anywhere, such that me and a partner can both be working on the same files and the same code. And so in order to do that, we need to host our Git code somewhere. And there are a number of different websites that can do this. But one of the most popular is a website known as GitHub.


[User] Please transcribe this text

[Assistant] So we're gonna host this code online on a website called GitHub. And then on our computer, we'll be able to access these GitHub repositories and manipulate those repositories by changing the files that are within.


[User] Please transcribe this text

[Assistant] So let's go ahead and take a look at github and see how we can go ahead and create our very first github repository.


[User] Please transcribe this text

[Assistant] If you don't already have a GitHub account, you can create one by going to github.com and signing up for an account for free. And I'll now go to github.com slash new.


[User] Please transcribe this text

[Assistant] GitHub.com slash new is the page I go to if I want to create a new GitHub repository. And so let's take a look at what I need to do in order to create a repository.


[User] Please transcribe this text

[Assistant] The first thing I need to do is give my repository a name.


[User] Please transcribe this text

[Assistant] So in this case, I'm just gonna call the repository hello. You can give it any name you want so long as that name doesn't collide with other repository names that you already have.


[User] Please transcribe this text

[Assistant] GitHub optionally lets me provide a description for this repository. I'll just say web programming with Python and JavaScript.


[User] Please transcribe this text

[Assistant] And then GitHub gives me the choice. Do I want this to be a public repository such that anyone can see the repository, not everyone can necessarily make changes to it?


[User] Please transcribe this text

[Assistant] But it's publicly available if anyone wants to download my code and try it out. Public means that anyone can access it. Or private meaning by default only I can see this repository, but I can choose if I would like other people to be able to see it as well and I can select which individuals. For now, I'll go ahead and make this repository public.


[User] Please transcribe this text

[Assistant] And I'll go down here and click on the green create repository button in order to make this new repository.


[User] Please transcribe this text

[Assistant] So I click the Create Repository button, and here it is. This is the GitHub's repository page. And right now you'll notice that there's a lot of instructions here, but there are no files. Because right now when I first created my first Git repository, I got an empty repository with nothing in it.


[User] Please transcribe this text

[Assistant] So what I'd like to do now is somehow download this repository onto my own computer such that I can add, say, an HTML file that contains some HTML that I want to keep track of using Git. So how am I going to do that?


[User] Please transcribe this text

[Assistant] Get clone is a command that we can run in order to take a repository from the internet and download it onto our own computer.


[User] Please transcribe this text

[Assistant] So you'll need to have git installed onto your computer. You can install it on any Mac or PC or Linux machine. And once you do, what you're going to do is on your computer in the terminal, you'll run git clone followed by the URL of the git repository that you're trying to download.


[User] Please transcribe this text

[Assistant] So you might imagine that here's your computer over here. And up here is some server where a Git repository is located. GitHub, for example, is one such server, but there are others as well. And up there is the repository that potentially has files or maybe other folders with other files that contain the contents of the repository that you care about downloading.


[User] Please transcribe this text

[Assistant] So if I run git clone, followed by the URL of the repository I want, the effect of that is that the repository and all of its contents get downloaded onto my computer, such that I on my computer now have a copy of everything that was originally inside of that git repository.


[User] Please transcribe this text

[Assistant] So now, now that we know how to clone a repository, let's actually try it. We've just created a repository using GitHub. And now let me go into my terminal and actually try to clone this repository so that I have a copy of it on my computer and I can begin to make some changes to it. So, I'll go into my terminal now.


[User] Please transcribe this text

[Assistant] And I'll go into my lecture one directory. And the first thing that I'm going to need is I'm going to need the URL of the Git repository. So if I go back into GitHub.


[User] Please transcribe this text

[Assistant] What you'll notice is that it gives me an HTTPS link in order to download my Git repository. So there are a couple of different ways that I can use to clone my repository of ways to authenticate myself. One is using HTTPS, which will eventually involve like a username and password that I'll have to type in in order to prove to Git that these are my GitHub credentials.


[User] Please transcribe this text

[Assistant] Alternatively, if familiar with SSH, and this is another method of authentication, you can give GitHub your public SSH key in order to authenticate as well, but no need to worry about that if you're not as familiar with that technology.


[User] Please transcribe this text

[Assistant] The key here is that this URL is the GitHub URL that corresponds to my repository. So I'm going to copy that URL.


[User] Please transcribe this text

[Assistant] And then inside of my terminal, I'll type git clone.


[User] Please transcribe this text

[Assistant] And then I'll just paste in the URL that I would like to clone that contains that repository.


[User] Please transcribe this text

[Assistant] I'll go ahead and press return. It says I'm cloning into a directory called hello.


[User] Please transcribe this text

[Assistant] And then it's saying, you appear to have cloned an empty repository. It's saying that's a warning. But that's okay, because I know that I've cloned an empty repository, because the repository is brand new.


[User] Please transcribe this text

[Assistant] And now I can type the command ls in my terminal. The ls command in the terminal stands for list. And effectively what it's going to do is list all of the files that are currently inside of this directory. All the files and folders that are inside of my lecture one directory. Where directory is just a fancy name for folder.


[User] Please transcribe this text

[Assistant] So I'll type ls, and I see that alright, I now have a folder called hello inside of my lecture one directory, which I didn't have before.


[User] Please transcribe this text

[Assistant] I'll go ahead and move into this hello directory. In order to change into a directory or folder, you can use the CD command. CD stands for change directory. And so if I type CD hello,


[User] Please transcribe this text

[Assistant] I will now move myself into the hello directory.


[User] Please transcribe this text

[Assistant] And if I type ls, you'll see that there's nothing inside of this hello directory right now, because again, this repository was empty. I cloned it and there was nothing in it.


[User] Please transcribe this text

[Assistant] So now I'd like to actually put something in this repository. The repository is only useful if I'm keeping track of my code and keeping track of the changes that I make to that code. So I'll go ahead and actually try now to add some code to the repository.


[User] Please transcribe this text

[Assistant] The first thing I'll do is create a new file. And we could create a new file just by opening up a text editor. But on the terminal, there's actually a command for creating a new file called touch.


[User] Please transcribe this text

[Assistant] And what that's going to do is create a new file called hello.html. And if I type ls, I can see that indeed I do have a file called hello.html now inside of my hello directory. Let me now open up.


[User] Please transcribe this text

[Assistant] This directory in the hello.html file inside of a text editor. Again, I'm using VS code. And let me now add just some text to hello.html. I'll just add a simple HTML page. Same thing we've seen before, where I give it a header, a title will be hello, and inside the body of the page will be hello world.


[User] Please transcribe this text

[Assistant] Same HTML page we've seen a number of times now, uh, now just now inside of this repository.


[User] Please transcribe this text

[Assistant] Of course, I haven't yet made any saving to this repository. I haven't said that I want to save these changes to the repository. And the repository isn't keeping track of every single character I write. I need to tell Git that this is a state of my current files that I would like to keep track of, something that I would like to save.


[User] Please transcribe this text

[Assistant] And in the world of Git, we call those save points commits. When I say I am making a commit, I mean I would like to save the current state of all of the files and folders and other assets that exist inside of the repository and basically take a snapshot of their current position such that later I might be able to refer back to them. But in order to do that, there are actually a couple of steps.


[User] Please transcribe this text

[Assistant] So if, for example, I keep working on this file and I'd like to tell git that I'd like to track it, I can run a command like git add followed by the name of the file, like foo.py or .html or whatever file it happens to be.


[User] Please transcribe this text

[Assistant] And then git will display a message saying that alright, now we have added foo.py, uh, this is now a file that will be saved the next time I make a commit.


[User] Please transcribe this text

[Assistant] So why are these two separate steps? Well, one reason you might imagine is that if I'm working on a lot of different files, say I'm working on 10 different files and there are only three that I'm happy with, three that I want to save,


[User] Please transcribe this text

[Assistant] I don't want to just say save and have everything be saved in a commit. I might want to say that you know what, these are the only three files that I actually want to save right now and the other ones I'm still working on.


[User] Please transcribe this text

[Assistant] So Git gives us that ability to have the separation, to say, let me explicitly say that I want to track this file the next time I save, the next time I make a commit, and not all of the files, for example. Though there are shortcuts we can use if we do want to add all of the files, and we'll see those in a moment as well.


[User] Please transcribe this text

[Assistant] So let's go ahead and try that. We'll go back to our repository where I've created this hello.html file. And now what I'd like to do is say that I would like to add the hello.html file to my git repository. So inside of my terminal.


[User] Please transcribe this text

[Assistant] And you'll notice that so far nothing seems to have happened because so far I haven't yet saved anything. I've just said that I would like to add hello dot html.


[User] Please transcribe this text

[Assistant] As a file that the next time I say save, the next time I commit my repository, it is going to keep track of the changes I have now made to hello.html.


[User] Please transcribe this text

[Assistant] So how do I actually make a commit? How do I actually say save the state of these files? Well, that's going to be one more git command, which is known as git commit. When I say git commit, I am going to tell my git repository that I would like to save a snapshot of the current state of the repository, keeping track of any of the changes that have been made to files that I've added using git add. And the way we run it is by running git commit.


[User] Please transcribe this text

[Assistant] Followed by dash M, and then in quotation marks, a message. And this message is known as a commit message. And what it is, is it a description in English, or whatever your language is, of


[User] Please transcribe this text

[Assistant] What changes you've made in this most recent commit? Because over time, as you work on a big project, you're probably going to make lots of commits as you make lots of changes to your program. You'll commit and commit again after each new addition you make to the project.


[User] Please transcribe this text

[Assistant] And you might want to refer back to a previous commit, but it's only valuable to do so if you can identify in which commit you made a particular change, for example.


[User] Please transcribe this text

[Assistant] So by providing some English message, just some note to yourself, such that later you can refer back to all your commit messages and know that all right, at this point in time, in this commit, this is the change that I made. That can just make it easier to keep track of all the changes that you've made to a particular Git repository.


[User] Please transcribe this text

[Assistant] So let's try and actually make a commit now and see how that's actually going to work. So we've already added the file as by running git add to say add the hello dot html file as one to keep track of. But now when we're happy with it and we could make additional changes to the file if we want to, I can go back into the terminal and now say git commit and then dash m.


[User] Please transcribe this text

[Assistant] And then I can specify the commit message, some English description of what it is that I did in this most recent commit. And what I did was I, uhm, added the hello.html file.


[User] Please transcribe this text

[Assistant] So I'm just gonna say I added the hello.html file. That was the change I made in this most recent commit. I'll go ahead and press return. And here's what it's telling me.


[User] Please transcribe this text

[Assistant] So git keeps track of changes in terms of how many lines have been added or inserted and how many lines have been deleted or removed. And in this case, it's telling me there have been nine insertions to one file because previously the file didn't exist. And now a file that has nine lines does exist. And now I have saved hello.html to this git repository.


[User] Please transcribe this text

[Assistant] So now you might imagine if I go back to my git repository on github's website and refresh it, that maybe I'll see that hello.html file, but I refresh.


[User] Please transcribe this text

[Assistant] And alright, nothing happened, nothing changed. I don't see my hello.html file.


[User] Please transcribe this text

[Assistant] And that's because there's one final step here I'm missing before my changes are going to be reflected online.


[User] Please transcribe this text

[Assistant] Recall that when I ran the git clone step in order to clone the repository from GitHub, GitHub had a version of the repository and I ran git clone to download a copy of that repository onto my own computer.


[User] Please transcribe this text

[Assistant] If I want to push those changes up to GitHub, then I'm gonna need some additional commands. And in fact, we can see what's currently going on inside of my repository using a command called git status. And what git status will do is it'll tell us what's currently happening inside of my repository.


[User] Please transcribe this text

[Assistant] So for example, if I were to in this current state run the command git status, then git is going to report back to me and tell me.


[User] Please transcribe this text

[Assistant] That I'm currently on branch master, more on branches later.


[User] Please transcribe this text

[Assistant] So this is a long-winded way of saying that my local version of the repository, the version of the repository on my computer, is ahead


[User] Please transcribe this text

[Assistant] Of the origin version of the repository, the version of the repository that's up on github,


[User] Please transcribe this text

[Assistant] By one commit. That I have one commit that the origin, github, does not have. And it's helpfully telling me I can use the command git push to publish your local commits. Git push is a command that I can use in order to say I would like to take my changes and actually push them up to the server, push them up to github so that they're reflected there.


[User] Please transcribe this text

[Assistant] So after we've checked our current status with git status, we can use the command git push to say that now whatever changes that I've made when I run git push, those changes


[User] Please transcribe this text

[Assistant] Get pushed up to GitHub so GitHub has access to all of the commits that I have now made.


[User] Please transcribe this text

[Assistant] So let's try those two commands now. git status to see what's currently going on inside of my repository and then git push to say I would like to now push those changes to GitHub so that the online version of the repository has the same contents as the local version on my own computer.


[User] Please transcribe this text

[Assistant] Alright, so in my terminal now, I can run git status, and I see that I am on branchmaster, same as before. It's a slightly different message because there's nothing currently inside the repository.


[User] Please transcribe this text

[Assistant] But the key here is that now I can run the command git push to say take all of the changes that I have made to my repository and go ahead and push them up to github.


[User] Please transcribe this text

[Assistant] So I'll type git push and what's going to happen is going to compress all the information and it's going to push it up to GitHub to this URL. And now if I go back to GitHub's website, github.com slash my repository and refresh the page,


[User] Please transcribe this text

[Assistant] I'll see that I do actually now see something different. And so this is what GitHub's user interface actually looks like. It gives me a few pieces of information. It's telling me, for example, that there's one commit currently made to the repository, that's the one I just made, that is on one branch. So far I've only created one branch, the default one, but we'll see how to create more branches later.


[User] Please transcribe this text

[Assistant] And in particular, down below, you'll see the files that currently exist inside of this repository. That right now I have this hello.html file, which is the one that I pushed.


[User] Please transcribe this text

[Assistant] And in particular next to it is the commit message. The message from the most recent time that I touched this file, which is in particular telling me that I added the hello.html file in the most recent commit that affected hello.html.


[User] Please transcribe this text

[Assistant] And if I were not, I did not click on hello.html to actually see what's inside of it, I would see the same content that I wrote in that file before.


[User] Please transcribe this text

[Assistant] I see Doctype HTML and then the Hello World page that we've seen a couple of times now. So I made the change on my own computer and I've now pushed them up to GitHub so they're now inside of this repository that's now public such that anyone else, if they wanted to collaborate on this project, could take this URL, clone it to their own computer, and make their own changes locally as well.


[User] Please transcribe this text

[Assistant] And so now we can explore how we might be able to make additional changes to this webpage as well. So if, for example, I wanted to add a heading to this webpage, for instance, I might at the top of the body say something like, in an h1 tag, uh, welcome to my website.


[User] Please transcribe this text

[Assistant] And now if I, you know, just for good measure, open up hello.html, see what it looks like. This is what my web page now looks like.


[User] Please transcribe this text

[Assistant] And now I've made changes to my hello.html file, changes that have not yet been saved. And I can tell that if I run git status. Git status is your go-to for telling you what's currently going on inside of your repository.


[User] Please transcribe this text

[Assistant] So here we see changes not staged for commit, which is a fancy way of saying files that have been changed, but I haven't said I would like to keep track of them in the next commit. It's telling me that I've modified hello.html, but it's not something that Git is currently going to keep track of the next time I make a save.


[User] Please transcribe this text

[Assistant] So if I want to save hello.html when I commit for the next time, then I'll first need to run git add hello.html and then I could run git commit.


[User] Please transcribe this text

[Assistant] There's actually a bit of a shorthand here. If you want to add all of the files that have been changed and commit at the same time, the shorthand is git commit-am. Remember before we just used dash m to say specify a message.


[User] Please transcribe this text

[Assistant] Dash AM means git commit all of the files that have been changed, A for all, and also provide a message. So you can combine the git add step and git commit step into just a single step by saying I'd like to commit all of the files that I've changed, and then I'll provide a message. What exactly did I change? I added a heading.


[User] Please transcribe this text

[Assistant] I'll go ahead and press return. It's kept track of the fact that I have now changed one file with one insertion. All I did was add one new line to that file.


[User] Please transcribe this text

[Assistant] And now if I run git status, it's going to tell me I'm on branch master and I am ahead of origin master, origin master being the version on github by one commit that I have this add a heading commit. But right now on github, if I refresh this page,


[User] Please transcribe this text

[Assistant] It's still showing the old version of that page.


[User] Please transcribe this text

[Assistant] In order to take my changes that I've made on my computer and make sure they're updated on GitHub, I can just run git push to say push those changes up to GitHub. And once that's done, I can now refresh the page on GitHub and I'll now see that GitHub now has the latest version of my program as well. It now has this h1 that says welcome to my website.


[User] Please transcribe this text

[Assistant] So that's git push now, the ability for me to say I would like to take the changes that I have made to my repository and push them up to some remote server, the remote server on GitHub, for example.


[User] Please transcribe this text

[Assistant] But we can also go in the opposite way. You might imagine that maybe the version that's up on GitHub is more recent than the version that I have on my computer. And in that case, I would like to download the latest version of the repository that currently exists on GitHub.


[User] Please transcribe this text

[Assistant] And in order to do that, we can use a command called git pull. How does that work? Well when I run git pull,


[User] Please transcribe this text

[Assistant] What's going to happen is the opposite of what git push did. Well, git push took my changes on my computer and pushed them up to github.


[User] Please transcribe this text

[Assistant] Git pull will say take the changes that currently exist on GitHub and go ahead and pull the most recent changes down so that I and my local version of the repository have access to the latest version of all of the code that is currently on GitHub.


[User] Please transcribe this text

[Assistant] And we can demonstrate this, for example, if I go back and take a look at GitHub's website itself, because on GitHub, I actually have the ability to edit files using GitHub's interface.


[User] Please transcribe this text

[Assistant] So I'm gonna simulate, like, someone else working on this project, for example. Maybe someone else added a second heading. So they add an h2, uh, that says just hello, for example.


[User] Please transcribe this text

[Assistant] And then they can provide a commit message. This is sort of a graphical equivalent to the dash M and then a message that we provided before. They can say added H2 and then commit.


[User] Please transcribe this text

[Assistant] So this is another way to edit a Git repository is by literally editing it inside of GitHub's interface. So GitHub allows you to just edit a file and then add or modify any of the lines there.


[User] Please transcribe this text

[Assistant] So now the version on GitHub is actually different from the version that we have on our computer. But if we look at hello.html here, I only see the h1 and I don't see the h2 that was just added because it's a more recent commit that I don't yet have access to. But if I want to download that commit, then what I can say is inside my terminal, I can say git pull in order to download it.


[User] Please transcribe this text

[Assistant] And alright, it's updated one file, it's made some changes, and so now, if I go back to the file, you'll notice that automatically, I now have the latest version of the file. I now have this H2 that says hello, because I've pulled the latest version of the file down from GitHub.


[User] Please transcribe this text

[Assistant] So via a combination of git push and git pull, I can make changes to my code, push them up to GitHub, and also get access to the latest version of code that already is on GitHub.


[User] Please transcribe this text

[Assistant] But as we do this, you might imagine that we could run into some sort of problem. In particular, we might run into a problem if I've been making changes to my code and someone else working on my same project has also been making changes to the code. What happens if we both make changes to the same part of the code?


[User] Please transcribe this text

[Assistant] And then try to sync up our work together. What's going to happen?


[User] Please transcribe this text

[Assistant] Well, we're gonna run into some sort of conflict because I've made changes to the same line that my colleague has been making changes to. And that type of conflict is called a merge conflict.


[User] Please transcribe this text

[Assistant] That when trying to merge my changes with the changes that someone else has made, we run into a situation where suddenly Git doesn't know what to do. There are two different sets of changes and we need to figure out how to resolve them and what to do when we run into this sort of conflict.


[User] Please transcribe this text

[Assistant] It's generally gonna happen if I try and pull in or merge in some changes from elsewhere. So let's say I run git pull.


[User] Please transcribe this text

[Assistant] But there's some conflicting commit, something that is online that conflicts with my current version of the repository.


[User] Please transcribe this text

[Assistant] What I'll get is a message like this, some conflict, saying merge conflicts in some file have failed, you need to fix the conflicts and then commit the results.


[User] Please transcribe this text

[Assistant] So what might those conflicts look like? Well, generally the file is going to look a little something like this. Git is automatically going to add some metadata to the file to describe the things that it can't quite figure out. And it's a lot of cryptic looking information, but we can distill it down into a couple of key parts.


[User] Please transcribe this text

[Assistant] Everything in between these arrows at the top and the equal signs here are your changes, the changes I have made on my version of the repository that are somehow conflicting with some other changes.


[User] Please transcribe this text

[Assistant] Everything between these equal signs and these arrows down here are the remote changes. The changes from GitHub that I'm trying to pull in that somehow are conflicting with what I've currently been working on.


[User] Please transcribe this text

[Assistant] And then this sequence of numbers and characters here is the hash of the conflicting commit.


[User] Please transcribe this text

[Assistant] So every commit gets a hash, just some sequence of, uh, numbers and characters that is likely to be unique, uh, that helps to identify any particular commit and Git will automatically generate a hash every time you make a commit. And we'll see in a moment how you can look at all of those possible commits.


[User] Please transcribe this text

[Assistant] But here, git is just helpfully telling us this is the commit that is causing the conflict, just for our own reference.


[User] Please transcribe this text

[Assistant] In order to address this merge conflict, the way we do it is we first need to remove all of these merge conflict markers that exist in the text file.


[User] Please transcribe this text

[Assistant] And decide what we want, what we want as the resolution of the conflict. So maybe I want to keep my version of the changes. Maybe I want to keep the remote version of the changes, the changes that were already on GitHub, for example.


[User] Please transcribe this text

[Assistant] Or maybe I want to combine them in some intelligent way. I the programmer get to make that decision. I get to look at my version and the conflicting version and decide how I want to resolve that conflict.


[User] Please transcribe this text

[Assistant] I'll remove any of the blank lines and then commit the changes to say, this is what I want the merged version of this program to look like.


[User] Please transcribe this text

[Assistant] So let's now take a look at an example of a merge conflict in action to see how one might arise and how we might actually go going about dealing with a merge conflict should it happen. So I on my computer now.


[User] Please transcribe this text

[Assistant] I'm going to make a change to this page. I'm going to say add a second exclamation point. One exclamation point wasn't enough. I'll add in a second exclamation point to this h1. And I'll go ahead and commit those changes. I'll say git commit-am add exclamation point.


[User] Please transcribe this text

[Assistant] And I'll go ahead and commit those changes. I saved this new version of the program, but I'm not going to push the code yet.


[User] Please transcribe this text

[Assistant] Instead, what I'm going to do is simulating someone else working on the same file. Maybe someone else on GitHub has decided, you know what, for this h1,


[User] Please transcribe this text

[Assistant] What we'd really like to do is add some style to it with some inline style by saying let's give it a color of blue, for example. So they've added some CSS.


[User] Please transcribe this text

[Assistant] We'll go ahead and write a commit message. What did they do? They added some style and we'll commit those changes.


[User] Please transcribe this text

[Assistant] And now what we've created is what is going to be a merge conflict. That someone else on GitHub has made a change to this line, changing the color to blue of this particular h1 tag, for example.


[User] Please transcribe this text

[Assistant] And I, meanwhile, have also made a change to the same line, adding an exclamation point. And Git entirely operates in terms of like adding lines and removing lines, given that we both made changes to the same line, Git is going to have a very hard time figuring out what to do in this scenario. So here in my terminal,


[User] Please transcribe this text

[Assistant] I'll go ahead and run git pull, because I want to pull in those latest changes. And when I do, I'll see that alright, I get this message. Conflict, there was a merge conflict in hello.html. The automatic merge failed, because normally git will try to merge files automatically if it can, but sometimes it can't. So now,


[User] Please transcribe this text

[Assistant] I need to fix the conflicts and then commit the results. So let's go ahead and look at what's inside of hello.html.


[User] Please transcribe this text

[Assistant] But you'll notice all of these arrows and then all of these equal signs. And in between, here is my version of this line of code. The line of code with the extra exclamation point at the end of it.


[User] Please transcribe this text

[Assistant] Down below, here is the remote conflicting version of the same code, the version that was modified on GitHub that I am now trying to pull in.


[User] Please transcribe this text

[Assistant] This is the version that says we want style color blue inside of the inline style for this particular h1 element.


[User] Please transcribe this text

[Assistant] Well, in this particular case, I might like to resolve this conflict by just taking the best of both worlds. If the person on github wanted to add a style attribute to this h1 element and I wanted the extra exclamation point, I can do both. I can go ahead


[User] Please transcribe this text

[Assistant] And just add an extra exclamation point and then get rid of my version and then also get rid of these commit markers. So go ahead and remove those.


[User] Please transcribe this text

[Assistant] I basically modify the file until I'm satisfied with it. Until I think that, alright, this is the way I wanted to resolve the conflict.


[User] Please transcribe this text

[Assistant] One person added color, one person added punctuation. The way to resolve it in this case is just use both of them. But here is where some human intuition comes in. The human programmer doesn't need to look at this file and figure out how exactly do we want to resolve this conflict? How do we want to figure out how to take these different changes and merge them all together?


[User] Please transcribe this text

[Assistant] But once we're satisfied with it, we can go ahead and commit the results. I can say git commit, dash AM, fix merge conflict.


[User] Please transcribe this text

[Assistant] And alright, we fixed the merge conflict. And now, if I push those results back up to GitHub,


[User] Please transcribe this text

[Assistant] When that is done and I refresh the page, I now see the updated line of code on GitHub with the H1 that has both the inline styling and the extra punctuation because I've resolved the merge conflict and then I've pushed that information back up to GitHub as well.


[User] Please transcribe this text

[Assistant] The first of which is git log. Git log is useful if you ever need to keep track of all of the changes that you've made to your code. You want to keep track of all of the commits that have been made in this particular repository. All you need to do is run the command git log and git will spit out a bunch of messages that look like this describing each of your commits.


[User] Please transcribe this text

[Assistant] For each commit, it'll tell you what the commit hash is, such that you can reference it more easily. It'll tell you who made the commit, it will tell you the date on which that commit was made, and it will also tell you the commit message.


[User] Please transcribe this text

[Assistant] So if you need to very quickly look back and see, you know, on what day was this feature added or who added this part to the webpage, you can just look through the git log, find the commit in question, and then you'll know which commit it happened to be.