All right everyone, thanks for coming in. This is the missing semester of your CES education. At least that's what we chose to call the class. If you're not here for this class, then you're in the wrong room. We will be here for about an hour, just to set your expectations. And I wanna talk to you a little bit first about why we're doing this class. So this class stems out of an observation that Anish and Jose and I have made while TAing various classes at MIT. Which is that basically all of us computer scientists, we know that computers are great at doing these repetitive tasks and automating things. But we often fail to realize that there are lots of tools that can make our own development processes better. We can be a lot more efficient about how we use our computers because we can use the computer as a tool for ourselves, not just for building websites or software, those sorts of things. And this class is an attempt to address this, is an attempt to show you some of the tools that you can use to great effect in your day-to-day, in your research and in your studies. And it's going to be a class where we want you to teach you both how to make the most of the tools that you already know, but also hopefully teach you about some tools that you don't know from before and how to combine those tools to produce more powerful things than you think you might be able to do with what you know today. The class is going to be structured as a series of 11 one-hour lectures, and each one is going to cover a particular topic. You can see the website, which is also listed there, for the list of lecture topics and what date we'll do each one. They will mostly be independent, and so you can sort of show up for the ones that you're interested in, but we will sort of assume that you've been following along so that as we get to later lectures, I'm not going to be teaching you bash all over again, for example. We are also going to post both the lecture notes and recordings of the lectures online. Exactly when we do that, we haven't established yet, but it will be after the lectures. Obviously, the videos have to be posted after. The class is going to be run by me, John, and Anish sitting over there, and Jose, who is not currently here, but will be holding tomorrow's lecture. And keep in mind that we're trying to cover a lot of ground over the course of just 11 one-hour lectures, and so we will be moving relatively rapidly, but please do stop us if there's anything where you feel like you're not following along, if you feel like there's something you wish we would spend more time on, just let us know, please interrupt us with questions, and also after each lecture, we're going to hold office hours on the ninth floor of Building 32, the State Center, the Computer Science Building. So if you show up in the ninth floor lounge there in the Gates Tower, then you can come and try some of the exercises that we give for each lecture, or just ask us other questions about things we've talked about in lecture or other things about using your computer efficiently. Due to the limited time that we have available, we're not going to be able to cover all tools in full detail. And so what we'll try to do is highlight interesting tools and interesting ways to use them. We won't necessarily dig into the deep details about how all of it works or more elaborate use cases, but if you have questions about them, please come ask us about that too. Many of these tools are tools that we have used for years, and we might be able to point you to additional interesting things you can do with them. So take advantage of the fact that we're here. This class is going to, I don't want to say ramp up quickly, but what's going to happen over the course of this particular lecture is that we'll cover many of the basics that we assume that you will know for the rest of the semester, things like how to use your shell and your terminal, and I'll explain what those are to those of you who are not familiar with them, and then we'll pretty quickly ramp up into more advanced tools and how to use them. You can already see from the lecture notes the kind of topics that we're going to be covering. And so that brings us to today's lecture, in which we are going to cover the shell. And the shell is going to be one of the primary ways that you interact with your computer once you want to do more things than what the sort of visual interfaces you might be used to allow you to do. The visual interfaces are sort of limited in what they allow you to do because you can only do the things that there are buttons for, sliders for, input fields for. Often these textual tools are built to be both composable with one another, but also to have tons of different ways to combine them or ways to program and automate them. And that is why in this class we will be focusing on these command line or text-based tools. And the shell is the place that you will do most of this work. So for those of you who are not familiar with the shell, most platforms provide some kind of shell. On Windows, this is often PowerShell, but there are also other shells available on Windows. On Linux, you will find tons of terminals. These are Windows that allow you to display shells. And you also find many different types of shells. The most common of which is Bash, or the born again shell. Because it's such a common shell, it is the one we're primarily gonna be covering in these lectures. If you're on macOS, you will probably also have Bash, maybe an older version of it if you open the terminal app. And so if you wanna follow along on any of these platforms, feel free, but keep in mind that most of this is gonna be sort of Linux centric in terms of how we teach it, even though most of these tools work on all the platforms. If you want to install a terminal on a shell and you don't know how to do it, well, we're happy to show you at Office Hours. Or it's usually very easy to just Google like your platform plus terminal and you will get one. Now, when you open a terminal, you get something that looks a little bit like this. So it will usually have just a single line at the top. And this is what's known as the shell prompt. You can see that my shell prompt looks like this. It has my username, the name of the machine that I'm on, the current path I'm on. And we will talk about paths a little bit later. And then it's really just sort of blinking there, asking me for input. And this is the shell prompt where you tell the shell what you want it to do. And you can customize this prompt a lot. And when you open it on your machine, it might not look exactly like this. It might look something like this if you've configured it a little, or it might look all sorts of different ways. We won't go too much into customizing your shell in this particular lecture, we'll do that later. Here, we're just gonna talk about how do you use this shell to do useful things? And this is sort of the main textual interface you have to your computers through this shell. On the shell prompt, you get to write commands. And commands can be relatively straightforward things. Usually it'll be something like executing programs with arguments. What does that look like? Well, one program we can execute is the date program. We just type date to present her, and then it will show you unsurprisingly the date and time. You can also execute a program with arguments. This is one way to modify the behavior of the program. So for example, there's a program called echo, and echo just prints out the arguments you give it. And arguments are just white space separated things that follow the program name. So we can say hello, and then it will print hello back. Perhaps not terribly surprising, but this is the very basics of arguments. One thing that you'll notice is that I said that arguments are separated by white space, and you might wonder, well, what if I want an argument that's multiple words? You can also quote things. So you can do things like echo, hello, space, world. And now the echo program receives one argument that contains the string hello world with a space. You can also use single quotes for this, and the difference between single quotes and double quotes we'll get back to when we talk about bash scripting. You can also just escape single characters. So for example, hello, world. This will also work just fine. All of these rules about how you escape and how you parse and quote various arguments and variables will cover a little bit later.  Just keep in mind at least that space is separate arguments. So if you want to do something like make a directory called myphotos, you can't just type like make directory myphotos. It will create two directories, one called my and one called photos, and that is probably not what you want. Now, one thing you might ask is, how does the shell know what these programs are? When I type date or when I type echo, how does it know what these programs are supposed to do? And the answer to this is your program, your computer has a bunch of built-in programs that comes with the machine. Just like your machine might chip with the terminal app or it might chip with Windows Explorer or it might chip with some kind of browser. It also ships with a bunch of terminal-centric applications and these are stored on your file system and your shell has a way to determine where a program is located. It basically has a way to search for programs. It does this through something called an invariant environment variable. An environment variable is a variable like you might be used to for programming languages. It turns out that the shell and the born-again shell in particular is really a programming language. This prompt that you're given here is not just able to run a program with arguments, you can also do things like while loops, for loops, conditionals. All of these, you can define functions, you can have variables and all of these things you can do in the shell. We'll cover a lot of that in the next lecture on shell scripting. For now though, let's just look at this particular environment variable. Environment variables are things that are set whenever you start your shell. They're not things you have to set every time you run your shell.  What is your username? And there's also one that's critical for this particular purpose, which is the path variable. So if I echo out dollar path, this is gonna show me all of the paths on my machine that the shell will search for programs. You'll notice that this is a list that is colon separated. It might be kind of long and hard to read. But the essentials is that bash, whenever you type the name of a program, is gonna search through this list of paths on your machine and it's gonna look in each directory for a program or a file whose name matches the command you try to run. So in my case, when I try to run data echo, it's gonna walk through these one at a time until it finds one that contains a program called data echo and then it's gonna run it. If we wanna know which one it actually runs, there's a command called which, which let's us do that. So I can type which echo and it will tell me that if I were to run a program called echo, I would run this one. It's worth pausing here to talk about what paths are.  On Linux and on Mac OS, these paths are separated by slashes, forward slashes. So you'll see here that this is in the root directory, so the slash at the very beginning indicates that this is starting from the top of the file system. Then look inside the directory called usr, then look inside the directory bin and then look for the file called echo. On Windows, paths like this are usually separated by back slashes instead and where on Linux and Mac OS, everything lives under the root namespace. So all paths start with a slash or all absolute paths. On Windows, there is one root for every partition. So you might have seen things like C colon backslash or D colon backslash. So Windows has separate sort of file system path hierarchies for each drive that you have. Whereas on Linux and Mac OS, these are all mounted under one namespace. You'll notice that I said the word absolute path and you might not know what that means. So absolute paths are paths that fully determine the location of a file. So in this case, this is saying, this is talking only about a specific echo file and it's giving you the full path to that file. But there are also things known as relative paths. So a relative path is relative to where you currently are. And so the way we find out where we currently are is you can type PWD for present working directory. Present? Print working directory. So if I type PWD, it will print out the current path that I'm in, right? So currently I'm in the home directory under the root and then John under that and then Dev under that, et cetera. From here, I can then choose to change my current working directory. And all relative paths are relative to the current working directory, which is basically where you currently are. In this case, for example, I can do CD slash home. CD is change directory. This is the way that I change what my current working directory is. In this case, I changed to home and you'll see my shell prompt change to say that I am now in home. It just gives me the name of the last segment of the path, but you can also configure your terminal to give you the full path whenever you're anywhere. And now if I type PWD again, it will tell me I'm in slash home. There are also a couple of special directories that exist. There is dot and dot dot. Dot means the current directory. Dot dot means the parent directory. So this is a way that you can easily navigate around the system. For example, here, if I type CD dot dot, it will tell me that I am now in slash. So I'm now in the root of the file system. I was in slash home, now I'm in slash. And indeed, if I type PWD, it will do that right thing. And I can also then use relative paths to go down into the file system. So I can do CD dot slash home. And this is gonna CD into the home directory under the current directory. So this will bring me back to slash home. If I now tried CD dot slash home again, it will say there's no such directory because there is no home directory under the current directory I'm on, which I changed by doing CD. And I can sort of CD all the way back to the place that I was using relative paths. And I can also do things like dot dot dot dot dot. To get back to somewhere deep in my file system, this happens to be all the way back to the root. So here there's a bin directory. And under bin, there's an echo file. And so then I can do world and that runs the echo program under bin. So this is a way that you can construct paths to arbitrarily traverse your file system. Sometimes you want absolute paths and sometimes you want relative ones. Usually you wanna use whichever one is shorter. But if you want to, for example, run a program or write a program that runs the program, like echo or date, and you want it to be run from anywhere, you either want to just give the name of the program, like date or echo, and let the shell use the path to figure out where it is, or you wanna give it absolute path. Because if you gave a relative path, then if I ran it in my home directory and you ran it in some other directory, it might work for me, but not for you. In general, when we run a program, it is going to be operating on the current working directory, at least by default, unless we give it any other arguments. And this is really handy because it means that often we don't have to give full paths for things. We can just use the name of files in the directory that we're currently in. One thing that's really useful is to figure out what is in the current directory we're in. So we already saw PWD, which prints where you currently are. There's a command called LS, which will show you, it will list the files in the current directory. So if I type LS here, this is all the files in the current directory, right? And this is a handy way to just quickly navigate through the file system. You'll see that if I sort of CD dot dot and then do LS, it'll show me the files in that directory instead. But with LS, I can also give it LS dot dot. Like I can give it a path and then it will LS that file instead of the one that I'm currently in or LS that directory. And you can see this if I go all the way to the root as well, right? Root has different files. One handy trick you might not know about here is there are two other special things you can do. One is the tilde character, this character brings you to your home directory. So tilde always expands to the home directory and you can do relative paths to it. So I can do tilde slash dev slash pedos classes missing semester. And now I'm there because tilde expanded to slash home slash john. There is also for CD in particular a really handy argument you can give, which is dash. If you do CD dash, it will CD to the directory you were previously in. So if I do CD dash, I go back to root. If I do CD dash again, I go back to missing semester. So this is a handy way if you wanna toggle between two different directories. In the case of LS or in the case of CD, there might be arguments that you don't know about, right? Currently we haven't really been doing anything except giving paths but how do you even discover that you can give a path to LS in the first place? Well, most programs take what are known as arguments like flags and options. These are things that usually start with a dash. One of the handy is one of these is dash dash help. Most programs implement this. And if you run, for example, LS dash help, it'll helpfully print out a bunch of information about that command. And you'll see here that it says the usage is LS and you can give some number of options and you can give some number of files. The way to read that usage line is triple dot means like zero or one or more and the square bracket means optional. So in this case, there's an optional number of options and there's an optional number of files. And you'll see that it says what the program does and also specifies a number of different types of flags and options you can give. Usually we call things that are single dash and a single letter, a flag or anything that doesn't take a value of flag and anything that does take a value and option. So for example, dash A and dash dash all are both flags and dash C or dash dash color is an option. One thing you'll see under here if you scroll down far enough is the dash L flag. That's unhelpful. The dash L flag. The dash L flag uses a long listing format. Not that that's particularly helpful in and of itself but let's see what it actually does. So if I do LS dash L, it still prints the files in the current directory but it gives me a lot more information about those files. And this is something you'll find yourself using quite a lot because the additional information it gives you is often quite handy. Let's look at what some of that information is. Ah. So first of all the D at the beginning of some of these entries indicate that something is a directory. So the underscore data entry here for example is a directory whereas 404.html is not a directory, it's a file. The following letters after that indicate the permissions that are set for that file. So this like we saw earlier I might not be able to open a given file or I might not be able to CD into a given directory and this is all dictated by the permissions on that particular file or directory. The way to read these is that the first group of three are the permissions that are set for the owner of the file. All of these files you'll see are owned by me. The second group of three characters is for the permissions for the group that owns this file. In this case all of these files are also owned by the John group. And a final group of three is a list of the permissions for everyone else. So anyone who's not a user owner or a group owner. This directory is perhaps kind of boring because all of the things are owned by me. But if we do something like CD to slash and do ls-l you'll see that here all of them are owned by root. We'll get back to what the root user is. But here you'll see some of the permissions are a little bit more interesting. The groups of three are read, write and execute. What these mean differs for files and for directories. For files it's pretty straightforward. If you have read permissions on a file then you can read its contents. If you have write permissions on a file then you can save the file. You can add more to it or you can replace it entirely. And if you have execute the xbit on a file then you're allowed to execute that file. So if we do ls-l in slash bin, that's unhelpful, in user bin you'll see that all of them have the execute bit set even for people who are not the owner of the file. And this is because the echo program for example we want everyone on the computer to be able to execute. There's no reason to say only certain users can run echo. That doesn't really make any sense. For directories though these permissions are a little bit different. So read translates to are you allowed to see which files are inside this directory? So think of read as list for a directory. Are you allowed to list its contents? Write for a directory is whether you are allowed to rename, create or remove files within that directory. So it's still kind of write but notice that this means that if you have write permissions on a file but you do not have write permissions on its directory you cannot delete the file. You can empty it but you cannot delete it because that would require writing to the directory itself. And finally execute on directories is something that trips people up a lot. Execute on a directory is what's known as search and that's not terribly helpful a name but what that means is are you allowed to enter this directory? If you want to get to a file, if you want to open it or read it or write it, whatever you wanna do basically to CD into a directory you must have the execute permission on all parent directories of that directory and the directory itself. So for example, for me to access a file inside slash user slash bin such as user bin echo, I must have execute on root, I must have execute on user and I must have execute on bin. If I do not have all those execute bits I will not be allowed to access that file because I won't be able to enter the directories along the way. There are a number of other bits that you might come across like you might see S's or T's in these lists, you might see L's, those we can talk about in office hours if you're curious, they will mostly not matter for anything you will do in this class but they are handy to know about. So if you're curious about them look them up on your own or come ask us in office hours. There are some other programs that are handy to know about, oh sorry, there's one more thing I should mention if you just have a dash it means you do not have that permission, right? So if it says for example, R-X it means that you have read and execute but you do not have write. There are some other handy programs to know about at this point. One of them is move or the MV command. So if I CD back to missing semester here, MV lets me rename a file and rename here takes two paths. It takes the old path and the new path. This means that move lets you both rename a file like if you change the name of the file but not the directory or it lets you move a file to a completely different directory. You give the path to the current file and the path to where you want that file to be and that can change its location and its name. So for example, I can move .files.md to be foo.md unhelpfully, right? And similarly, I can move it back. There's also the CP command, the CP or copy is very similar. It lets you copy a file. CP also takes two arguments. It takes the path that you wanna copy from and the path you wanna copy to. And these are full paths. So I could use this, for example, to say I want to copy .files.md to ..foo.md. Sure, foo.md. And now if I do LS.dot, you'll see that there's a foo.md file in that directory. So CP as well take two paths that does not have to be in the same directory. And similarly, there's the RM command which lets you remove a file and there too you can give paths. In this case, I'm removing ..slash food. You should be aware for removing especially on Linux, removal is by default not recursive. So you cannot remove a directory using RM. You can pass the dash R flag which lets you do a recursive remove and then give a path that you want to remove and it will remove everything below it. There is also the RMdir command which lets you remove a directory but it only lets you remove that directory if it is empty.  And the final little command that's handy to use is makedir which lets you create a new directory. And as we talked about before, you don't want to do something like this because it will create two directories for you. One called my and one called photos. If you actually want to create a directory like this you would either escape the space or quote the string. If you ever want more information about how any command basically on these platforms work there's a really handy command for that as well. There is the program called man for manual pages. This program takes as an argument the name of another program and gives you its manual page. So for example, we could do man LS and this shows us a manual page for LS. You'll notice that in the case of LS it is fairly similar to what we got with LS dash dash help but it's a little easier to navigate and a little easier to read. Usually towards the bottom, you will also get examples, information about who wrote it, where you can find more information and that sort of stuff. One thing that can be confusing sometimes at least until a recent version where they added this string at the bottom where it says queue to quit. It did not use to say this. You press queue to quit this program. It can be really hard to quit it if you do not know that.  So far, we've only talked about programs in isolation but where much of the power of the shell really comes through is once you start combining different programs, right? So rather than just like running CD, running LS, et cetera, you might want to chain multiple programs together. You might want to interact with files and have files operate in between programs. And the way we can do this is using this notion of streams that the shell gives us. Every program by default has, I'm gonna simplify a little and say two primary streams. It has an input stream and an output stream. By default, the input stream is your keyboard. Basically, the input stream is your terminal and whatever you type into your terminal is gonna end up into the program. And it has a default output stream which is whenever the program prints something, it's gonna print to that stream. And by default, that is also your terminal. This is why when I type echo hello, it gets printed back to my terminal. But the shell gives you a way to rewire these streams, to change where the input and output of a program are pointed. The most straightforward way you do this is using the angle bracket signs. So you can write something like this or you can write something like this. The left angle bracket indicates rewire the input for this program to be the contents of this file. And the end angle bracket means rewire the output of the preceding program into this file. So let's look at an example of what that would look like. If I do echo hello, I can say I want that context, the content to be stored in a file called hello.txt. And because I gave, this is a relative path, right? This will construct a file in the current directory called hello.txt. And at least in theory, its contents should be the word hello. So if I run this, notice that nothing got printed to my output. The previous time when I ran echo hello, it printed hello, now that hello has gone into a file called hello.txt. And I can verify this by using the program called cat. So cat prints the contents of a file. So I can do cat hello.txt and there it shows me hello. But cat is also something that supports this kind of wiring. So I can say cat, which by default just prints its input. It just duplicates its input to its output. I can say I want you to take your input from hello.txt. What will happen in this case is that the shell is gonna open hello.txt, take its contents and set that to be the input of cat and then cat is gonna just print that to its output, which since I haven't rewired it, it's just gonna be my terminal. So this will just print hello to the output. And I can use both of these at the same time. So for example, if I wanna copy a file and I don't wanna use the CP command for some reason, I can do this. And in this case, I'm telling the cat program nothing at all. I'm just saying, do your normal thing. The cat program does not know anything about this redirection, but I'm telling the shell to use hello.txt as the input for cat and to write anything that cat prints to hello to.txt. Again, this prints nothing to my terminal, but if I cat hello to.txt, I get the output as I would have expected, which is a copy of the original file. There is also a double end bracket, which is append instead of just overwrite. So you'll notice that if I do cat hello.txt to hello to.txt again, and then I cat hello to.txt, it still just contains hello, even though it already contained hello. If I switch that to instead be a double end bracket, it means append, and if I now cat that file, it has hello twice. These are pretty straightforward. They're usually just ways to interact with files, but where it gets really interesting is an additional operator the shell gives you called the pipe character. So pipe is just a vertical bar, and what pipe means is take the output of the program to the left, and make it the input of the program to the right. So what does this look like? Well, let's take the example of ls slash, or ls dash l slash.  Let's say that I only wanted the last line of this output. Well, there's a command called tail, and tail prints the last n lines of its input, and I can do dash n one. So this is a flag called n. You can also use dash dash lines if you wanna use it as a longer option. But in this case, this is saying just print the last line. And I can wire these together. So I can say ls dash l slash pipe tail dash n one. And notice here that ls does not know about tail, and tail does not know about ls. They are different programs and have never been programmed to be compatible with one another. All they know how to do is read from input and write to output. And then the pipe is what wires them together. And in this particular case, I'm saying I want the output of ls to be the input to tail, and that I want the output of tail to just go to my terminal, because I haven't rewired it. I could also rewire this to say I want the output to go to ls.text. And in this case, if I cat ls.text, I would get the appropriate output. And it turns out you can do some really neat things with this. We're gonna cover this a lot more in the data wrangling lecture that will be in, I think, four days or something on the kind of fancy stuff you can do when you start building more advanced pipelines. One, to give you one example, we can do something like curl dash dash head, silent Google.com. So just to show you what that looks like, this gives me all the HTTP headers for accessing Google.com. And I can pipe that to grep dash ignore case or just dash I if I want, content length. So this is gonna print the content length header, grep is a program that we'll talk about later that lets you search in an input stream for a given keyword. We can pipe that through, say, the cut command, which takes a delimiter, set that to be space, and I want the second field. And this prints just the content length. This is sort of a silly example, right? Like this just lets you extract the content length in bytes of Google.com from the command line. It is not a very useful thing to do, but you can see how by chaining these together, you can achieve a bunch of really interesting text manipulation effects. And it turns out pipes are not just for textual data. You can do this for things like images as well. You can have a program that manipulates a binary image on its input and writes a binary image to its output. And you can change them together in this way. And we'll talk about some of those kinds of examples later on too. You can even do this for video if you want. You can stream, this is for example, a great way if you have a Chromecast at home. You can stream a video file like this. By having the last program in your pipe be a Chromecast send program. So you stream a video file into it and it streams over HTTP to your Chromecast. We'll talk a lot more about this in the data wrangling lecture, but there's one more thing that I wanted to talk to you about sort of how to use the terminal in a more interesting and perhaps more powerful way that you might be used to. And this is perhaps even gonna be interesting for the ones of you who feel like you're already comfortable with the terminal. But first we need to cover an important topic when it comes to Linux systems and macOS systems in particular which is the notion of the root user. The root user is sort of like the administrator user on Windows and it has user ID zero. The root user is special because it is allowed to do whatever it wants on your system. Even if a file is like not readable by anyone or if it's not writable by anyone root can still access that file. Root is sort of a super user that gets to do whatever they want. And most of the time you will not be operating as the super user, you will not be root.  But every now and again you want to do something that requires that you are root. Usually for these cases you will use a program called sudo, S-U-D-O. Or do as su and su in this case is super user. So this is a way to do the following thing as the super user.  Where might you need something like this? Well, there is a special, there are many special file system on your computer but in particular there's one called sysfs. If you cd to slash sys, this is a whole new world. This file system are not actually files on your computer. Instead these are various kernel parameters. So the kernel is like basically the core of your computer. This is a way for you to access various kernel parameters through what looks like a file system. You'll see here that if I cd into class, for example, it has directories for a bunch of different types of devices that I can interact with or various cues I can access or all sorts of weird knobs internally. And because we're exposed as files, it means that we can also use all the tools we've been using so far in order to manipulate them. One example of this is if you go into sys class backlight. So this backlight directory lets you configure the backlight on your laptop if you have one. So I can cd into Intel backlight. This is an Intel laptop. Inside here you'll see there's a file called brightness and I can cat the brightness. This is the current brightness of my screen. But not only that, I can modify this too in order to change the brightness of my screen. So you might think that I could do, let's see what the max brightness is here. Okay, so it's currently set to the max brightness. You might imagine that I could do something like, if I do echo, let's do half or something. Echo 500 to brightness. If I do this, it says permission denied. I'm not allowed to modify brightness because basically in order to change things on the kernel, you need to be the administrator. And you might imagine that the way to solve this is to write pseudo echo 500. But I still get a permission denied error. But why is that? It's because as I mentioned before, these redirections of input and output is not something the programs know about. When we piped LS into tail, tail did not know about LS and LS did not know about tail. The pipe and the redirection was set up by the shell. So in this case, what's happening is I'm telling my shell, run the program pseudo with the arguments echo and 500 and send its output to the file called brightness. But the shell is what is opening the brightness file. It is not the pseudo program. So in this case, the shell, which is running as me, tries to open the brightness file for writing and it's not allowed to do that. And therefore, I get a permission denied error. You might have seen this if you search for something, end up on Stack Overflow and it tells just run this command and you'll see that it does something like, they give you instructions like one, two, sys, what's an example, net IPv4 forward, for example. This is something you may have seen if you're setting up a firewall. And this command is intended to work because this little pound symbol indicates run this as root. This is something that is very rarely explained, but that is what the pound symbol means. You'll see on my prompt there's a dollar symbol instead and the dollar indicates you are not running as root. So the question is, how do I get around this? Well, I could switch into a root terminal. So one way to do this is to run sudo su. Sudo su is saying, run the following command as root and su is a complicated command that effectively gets you a shell as the super user. So if I do this type of password, then now you'll see that the username at the beginning changed from john to root and the prompt changed from a dollar to a pound. If I now echo into that file, if I do echo 500 to brightness, my screen got a little dimmer, but you can't see it. You just have to trust me. And now I didn't get an error. And this is because the shell is now running as root. It is not running as john and the root user is allowed to open this file. But given our knowledge that we have of the terminal now, there's actually a way for us to do this without having to drop to a root shell. And that is as follows. Let's, I guess, restore it to 1060. So do you see why this is different? Here I'm telling my shell to run the echo 1060 command, which is gonna echo 1060, and I'm telling it to run the sudo t brightness command. And I'm telling you to send the output of echo into sudo t. In order to understand this, you need to know what the t command does. The t command takes its input and writes it to a file, but also to standard out. So t is a convenient way if you have, say, a log file that you want to send to a file to store for later, but you also want to see it yourself. Then you can pipe it through t, give it the name of a file, and it will write whatever its input is, both to that file and to your screen. And here I'm taking advantage of that program. I'm saying run t as root and have t write into the brightness file. And so in this case, the t program, which is what is opening the brightness file, is running as root, and so it is allowed to do this. If I run this, it will now, again, you can't see, but the brightness has now been turned on by a laptop, and I don't get any errors, and I never had to drop into a root shell and run commands there, which can often be somewhat dangerous. If you want to explore this file system a little bit more, there's a lot of interesting stuff in here. If you just sort of start browsing around, you can find all sorts of fun things. So for example, we noticed that there was a fun brightness command here. I wonder what other kinds of brightness I can set. So I can use the find command, which we'll also talk about in a coming lecture. I want to look at any file whose name is a little like brightness in the current directory. That's unhelpful. Maybe they're not files. Did I misspell brightness? Why is it being annoying? Apparently it does not want to search for brightness for me. Oh well. Luckily for you, I know of one already. Handy that. There is a sub directory called LEDs, and LEDs have brightness too. What kind of LEDs are there? Ooh, lots of things. For example, the scroll lock LED.  Basically, no one knows what it means anymore. No one really uses it for anything. It's mostly just a dead key and also a dead LED. What if you wanted to configure it so that every time you get email, your scroll lock LED lights up? Because there's no other reason why it would light up. Well, if we see you into this particular directory, there's a brightness place, and it's set to zero. Well, what happens if I write one into it? You probably should not just be writing random numbers into random files in this directory because you are affecting your kernel directly, like look up what the files do. In this particular case, I have worn safety goggles and I have done my research. So now, you can't tell, but on my keyboard, the scroll lock LED is now lit. So now, if I wrote a program that did some checking of mail and stuff, I could have it at the end, run a program that echoes one into this file, and now I have a way for my LED to my keyboard to indicate when I have new email. At this point, you should know roughly your way around the terminal, around the shell, and know enough to accomplish at least basic tasks. At least in theory now, you shouldn't need to use like point and click interfaces to find files anymore. There's one remaining trick you might need, and that is the ability to open a file. So far, I've only really given you ways to find files, but one thing you should know about is, amazing semester, xdg-open. This will probably only work on Linux. On Mac OS, I think it's just called open. On Windows, who knows, xdg-open, you give the name of a file and it will open it in the appropriate program. So if you open, if you do xdg-open an HTML file, it will open your browser and open that file. And once you have that program, in theory, you should no longer need to open like a finder window ever again. You might want to for other reasons, but in theory, you can accomplish it all using the tools that we've learned today. This might all seem relatively basic for some of you, but as I mentioned, this is sort of the ramp up period of now we all know how the shell works, and a lot of what we'll be doing in future lectures is using this knowledge to do really interesting things using the shell. That sort of, this is learning the interface that we're going to be using, and so it's important we all know it. We're gonna talk a lot more in the next lecture about how to automate tasks like this, how to write scripts that run a bunch of programs for you, and how to do things like conditionals and loops and stuff in your terminal, and do things like run a program until it fails, which can be handy in classes where you wanna run something until your test suite fails, for example. So that's the topic for next week's lecture. Did you have a question? Yeah, just related to what you've been demoing in the Sys Directory, that presumably will only work if you're doorbooting into Linux, not if you're running Windows subsystems Linux. That is a good question. I don't know whether the Windows subsystem for Linux will expose a Sys file system. If it does, it probably only exposes a very small number of things. It might, because there are, I don't know, check it out. One thing you'll see is the lecture notes for this lecture are already online, and at the very bottom of the file, there are a bunch of exercises. Some of them are relatively easy, some of them are a little bit harder, and what we encourage you to do is to take a stab at going through them. If you know this stuff already, it should go really quickly. If you don't, it might teach you a bunch of things that you might not realize you didn't know, and for the office hours that we're gonna do right after this lecture, we will happily help you get through all of those, or if there are other commands you learn in the process, you wanna know how to use more efficiently. And then in next lecture, which is tomorrow, we'll basically be assuming that you know the kind of stuff that the exercise is going to teach you. There's also an email address on the website where you can send us questions if you think of something like after the office hours are finished. Are there any questions before we end today? No? No? All right, well, we will have office hours on the ninth floor of the Gates Building of Building 32 in like five minutes. Sweet, see you there. Hello.


If you have, you know being around one can make you feel like your soul is being sucked dry until there's nothing left. Sanderson's sister style. Sometimes we brush off this draining feeling and even change how we act to please the narcissist because we love them and in hopes it placates them. It may seem harmless, making one or two tiny changes but those little tweaks can take big chips out of you and who you are. Let's take a look at five ways narcissistic abuse changes who you are. According to science. Number one, literal brain damage. Our brains are the most intricate and delicate of puzzles. When one part of our brain is stimulated or changed, other parts need to adjust to compensate.  In our article, long-term narcissistic abuse can cause brain damage, author, educator and researcher Kim Said explains that both the amygdala and the hippocampus are both negatively impacted by being a victim of narcissistic abuse. The amygdala, which controls our life functions and fight or flight response and get to a point where it's constantly on meaning you constantly feel on edge. Your hippocampus, which is crucial for short-term memory can decrease in function the more you're exposed to narcissistic abuse. This means they can gas let you even easier than before.  Number two, unknowingly, becoming part of the cycle. If you see a young child screaming in a store, you might think to yourself, ah, they can't tell their parents what's wrong. But what if you see a teenager doing the same thing? Do you still have the same thought? Chances are your thoughts shift to what were you taught as a kid? Emily Labetut of Southern University Law Review wrote in her article on the effects of narcissistic abuse that a healthy interpersonal relationship is where the individual can see the situation from their perspective, as well as someone else's perspective. However, if your parent was a narcissist, they only saw things from their own eyes because only they are important. In 2021, this idea was proven by University of Amsterdam researchers in a study monitoring children of narcissistic parents, both on and off social media. Unless the child makes a conscious decision to stay off social media and or act differently, they're more likely to become a narcissist themselves. That's a fun idea. But if Cinderella became just like her step-sisters, ugh, let's move on. Number three, forced agreeableness. We've all heard of Pavlov and his dog. Humans are the same and can be conditioned. If you are used to being around a narcissist and them getting mad at certain conversations or actions, this can condition you to act and speak in certain ways. In Ahmed Pub's Health Science Journal, Rivka Edery, Psi D explains that a child with parents that are authoritative, rejecting, and traumatic towards the child can grow up with certain learned or conditioned personality traits, such as introversion, kindness, and agreeableness. Now we're not saying that introversion, kindness, and agreeableness are bad qualities. However, they can be negative when you act this way to stay out of a narcissist's crosshairs. Number four, PTSD for narcissistic abuse. Abuse comes in all shapes and sizes. When you're experiencing narcissistic abuse consistently, it's possible that you can develop a sort of post-traumatic stress response. This response is called narcissistic abuse syndrome or narcissistic victim syndrome. Registered psychologist, registered social worker, and writer, Shirley Porter, lists the symptoms of narcissistic abuse syndrome as confusion, fear, guilt, shame, low self-esteem, and reduced self-confidence. So the longer you're around a narcissist and their abuse, the more at-risk you are for developing these thoughts and feelings. Remember, you are loved and important, even if a narcissist is telling you otherwise. Please reach out to a mental health professional if you've experienced narcissistic abuse. And number five, changes to your self-esteem. Have you ever had a day where you're feeling amazing?  These days may not happen as often in the presence of a narcissist. In 2018, a different group of researchers from the University of Amsterdam did a study on narcissistic leaders and their followers. They found that the lower the follower's self-esteem, the more abusive they perceived their leader. Due to the follower's low self-esteem and consistent negativity from the leader, the follower begins to do more seeking the leader's approval. Almost a carrot on a stick that the follower never obtains. This ultimately resulted in reduced performance and higher rates of burnout. Narcissistic abuse is like erosion. You may not see a change immediately, but over time, you can see the drastic difference. Have you ever experienced narcissistic abuse? Did you see any changes in yourself after a while of being around that garbage? Let us know your story in the comments below. We have more videos on signs of narcissistic abuse here if you wanna learn more. As always, keep an eye on Cy for more Psych2Go content and thanks so much for watching.


Thank you everyone for joining this workshop. This is the home stretch before dinner. So I really appreciate your time and attention. I know people are starting to flag. Looking forward to dinner, I am too. But I promise you this will be a very hands-on workshop facilitation. So if you're not really ready for that, just stand by. I'm just pre-warning you. My name is Jules. I'm from Singapore, the first time in your beautiful country. So thank you for the warm welcome. You may know of my more famous colleague, Mr Dave Snowden. Yes, one of the founders of the Canevan framework, whom Carl referenced just now. He's taking a photo of me. No doubt to show Dave later. So I'm here representing our company and I was invited to both give a talk on Saturday, but first to run a workshop. Usually it's the other way around. You talk first and then you run a workshop. But the more I thought about it, actually this would be quite cool because Carl just came from talking about unwrapping the air door present. So now I'm going to take you to the future, but backwards. So this is quite intriguing because who wouldn't love the superpower to be able to predict the future? Just a show of hands. Who would love that? Okay, anyone who tells you they can is lying. I'm just going to drop the bomb now. They are lying. However, as human beings, we have the ability to look at our present, our current state of anything, any topic, whether it's agile of our societies or of the world at large. We live in very interesting times. I must say geopolitically, I think everyone can agree, but we're not going to get into that. We're going to focus on agile. How can we make sense of our current state so that we can start to imagine and plan a range of possible futures? And everyone has the idea of what they would like their future to be. There's no two ways about it. You will not find two people who have the exact same vision of the future and that's actually okay. As human beings who come into organizations, to form organizations, we deal with a lot of differing perspectives. This heterogeneity is actually a great thing. It actually gives us so many diverse perspectives that we can draw on, and this future backwards is one of our most popular methods because it allows anyone at any level to participate in creating all these futures. So the first slide was actually Welcome Check-In, which I did mention about dinner. And I will actually give you more of the theory later because this method actually comes from the field of futures and foresight, which a lot of governments use in scenario planning to try to understand how they can plan for the future of their community, their societies, and their countries. So I will give the theory later because I would like you to start getting active and just jump into the workshop method. So the very first thing you need to do is to make sure you all have posted notes of a yellowish or orangeish tinge. Great. And also just some advance notice that the way we do complex facilitation is a lot more light touch than usual facilitation. I won't be hovering at every table. The discussions are meant to flow freely. The only thing is for this first step is that we need consensus at the table before you start writing things down. That's why you have a lot of discussion before you commit something to paper. So for that reason you can see only one marker at each table. There are a lot of pencils, but please don't use pencils because you won't be able to see anything you write on the posted notes after that. The first thing you will do is to look at the topic we've chosen. In this case describe the current state of agile. It is deliberately quite broad because we don't want to constrain the discussions that you have. Everyone should have the yellowish, orangeish color. And we would like you to discuss it before writing down descriptions of the current state of affairs in agile. And this is in your experience and background as an agile practitioner, as a coach, or someone just new to it, whatever your background is. That is less important than the discussions you're going to have. One description that I'm just going to throw out is a bit cheeky but I will reference it again on Saturday. Personally I would describe the current state of agile as having different religious adherence. We've reached a stage in agile's maturity, what, 20 plus years now since the agile manifesto, where human behavior has started to amass and we start to see all these different behaviors show up in agile as well. Now this is my personal description. If I were working in a group we need to discuss that before we start to write it down on the posted notes. And for the current state, CS, of whatever topic you're working on, you can have multiple descriptions of the current state. So you may have at the end of 15 minutes or so, which is the time box for this part of the workshop method, you may have 10, 15 different posted notes describing the current state of agile. And there's no right or wrong. We just want everyone to voice their opinions to discuss and then to commit it down to paper. And whatever your orientation is on the table facing, looking forward at yourselves, you should start to cluster all these yellow posted notes towards the top right of your table as you're looking at it. Is the instruction clear for the next 15 minutes? Any questions? Great. Proceed. I will set a timer and I will move around to answer any questions that you might have. As a studio, software, so the competition can be very strong. Actually, I rather than having this awesome, soft and strong, right, it always be that much. This is the number of exports. Okay, this is my agile, my favorite of agile. Yes. I don't have to go big though. Move forward. Everybody is coming to me. One more question. For this step of the workshop method, by now you should have four to five of these posted notes. If not, you can start committing them to paper. Four? Four minutes, okay, good. Okay, let's think of one positive. Okay, two more minutes. Doing a time check. You should start to have a little cluster of posted notes. It's actually great energy. Okay, I think we can stop the timer. Okay, I hope everyone remembered to write with marker pens. Otherwise we won't be able to see anything in the photos we take later of your timelines. I love the energy everyone is discussing. Great, okay, and you have it oriented somewhere towards the top right of your table. Okay, next step. And our lovely volunteers will distribute the next color, which is a bit, yes, great. It's a bit washed out on this PowerPoint, but it should be a pink-reddish color. Okay, excellent. And I can see by now that most groups have self-organized and more or less nominated or self-nominated ascribe. Too bad you're going to be the spokesperson later. No, just kidding. No, no, no, no, no. You will go around and see each other tables and what they have done. Don't worry, I won't do that to you. Okay, next step. Now, this is actually the most interesting step to me of this method. And by the way, this method, like all the methods of the Canevan company is open source. If you're a facilitator, you're welcome to go online and take all these methods and use it in your own organization or practice, just to put it out there. All these slides will be available as well. We want you to think, based on the current state that your table has described. Okay. Sorry. Is this better? We would like you to think of the next of the key event that came immediately before this current state. And this is a historical event. It has to be rooted in something that actually happened. I'll give you an example, not from Agile, when we've run this with societies and governments and in some cases over a two-day workshop. So that's how long this method can be if you do a full-scale, long-range workshop. One group actually took historical events all the way back to the Civil War in the U.S. So this is just to say that this is how far it can go back, but don't worry, we are not going back that far. I would say it's a good constraint for today. Maybe don't go back more than 30 or 40 years. I'm not sure if we'll have enough time in 20 minutes to cover that, but the most important thing about constructing this timeline is that we're doing it backwards. Most people tend to go one step at a time and they try to find reasons and cause an effect, but this method is deliberately taking you out of that by making you construct your timeline one step backwards at a time. And because I'm not Snowden, what I won't do is take people out and remove them amongst groups if we catch them trying to go forwards instead. It's a very, very human tendency to want to think of, oh, something happened in 1991. Okay, let's construct our timeline that way. No, actually asking you to think, okay, we're in 2023 of March. What is the most recent event that happened that has led to this current state that we have described? So that is why... Oops, sorry. We are constructing your timeline this way, not that way. And again, as with this method, the group is meant to discuss it, come to a consensus and then write down that key event. It's not everyone writing their key events and then deciding it, discuss it first and then commit it to paper and then move your key events backwards one step at a time. So maybe we can go back to the 1980s or so I would say for today. We have about 20 minutes. This tends to be one of the longer parts of the workshop method, but time will fly by because you find yourself in very, very heated discussion. Okay, we're going to set a timer for 20 minutes. Any questions before that about this instruction? No, no, one event at a time. So normally we say, oh, if we start at 1990, these are the things that happened that lead up to 2023, but no, we're forcing you to take a step backwards, move back one step at a time. All interruption, but I think that was remiss of me. The question came out from a table. It's not just a historical event in the organization or an agile, it can also be a world historical event. Just to give you one example, COVID-19, the most recent and at a foremost of our minds. It's to wrap up this step. Your future backwards frame should start to look like that. With the key events going backwards, connected to the current state. So five more minutes to wrap this up. Then we move on to the next step. This is very natural. Okay. You can, you can. Okay. How are we doing? Great. Yes. I love the energy and the discussions. Out of interest, how many were Googling dates or just fact checking? Yeah. Love it. Love it. Always happens. It's great. How many did anyone get as far back as Ada Lovelace or Charles Babbage? No. Okay. No. Not yet. Okay. Great. Exactly. So sometimes the history doesn't go that far back just to make a point. Okay. So we're moving from historical events to our imaginations. So this is the really fun part of this method. Every single time I run it, this is why I love to run this method. Every single time I run it, once I say, okay, go, your time starts now, the entire room full of conversations talking. And this is why. So I'll volunteer to distribute the next color, which will be a bluish color that we can find. Now, interestingly, at the beginning, in the early days of developing this method, we used the terms heaven and hell, which I then pushed back on and said that it's a very Western Christian Anglo-Saxon conception of utopia, dystopia, or what I like to call impossibly good futures or impossibly bad futures. Okay. An impossibly good or impossibly bad. And I also said, well, you know, in Buddhism, there are many circles of hell. There are many courts of hell.  So I prefer nowadays to use utopia or dystopia if it's culturally understandable by the audience or impossibly good or impossibly bad. So this is what we're getting you to do in the next step. Discuss, think about and discuss what is an impossibly good future state of agile. Okay. And then you can think maybe 20 years from now, but the timeframe is less important than thinking about what would be an impossibly good future or the utopia of agile. Okay. And just focus on describing that state in blue. You should have blue posted pads. And you have about 15 minutes to do that. Your time starts now. And let your imagination take you while nothing is beyond imagination at this point. Have we let our imaginations run wild? Yes? Good. Good. Okay. So on your tables, your future backwards timeline should start to look like this, the rough shape of it. Okay. As with the historical event timeline backwards from the current state, your next step is to discuss and agree on the key events working backwards from your ideal future. Okay. Again, all down to your imagination. All right. Sorry. It should be... Well, we only have a few colors this time around. So it should be the same pink color. You should still have some pink posted notes left. Use the pink posted pads to construct your fictional timeline backwards from your ideal future. Okay. Great. Okay. Start. Okay. I'm just checking that you all have enough pink posted notes. Our volunteers will come by with more if you don't. And just one moment of your attention, please, as you construct your fictional timeline, it connects to your real timeline. So when you construct your fictional timeline backwards from the ideal state, it needs to connect to one event on your real timeline. Yes. How can it connect? That's the thing. That's what I'm wondering. Yes. So you're constructing a fictional... one event at a time, and one of those fictional events, you're going to connect it here. And this is the imagination part. Okay? Mm-hmm. Yeah. These are the past events. Okay. This is the future. Yes. This one, we just leave it for now. We're not going to touch this. Yeah. We have to connect with one of these historical events from the timeline backwards. No, no, no. Yeah. Yeah. But as with this step, you're supposed to work one step backwards. You are not supposed to choose one of these ever. Yeah. That's right. Yes. Yeah. Yeah. Yeah. Yeah. Yeah. Mm-hmm. Mm-hmm. Mm-hmm. Yes. Yes. And I was going to go around the tables as well, but not as an instructor. Okay. So I have gone around to all the tables to give you that trump card or that act of God, which you can use if you want to. So your timeline should start to look like this. You should be joining up the fictional key events back to an event of your choosing in the real timeline. And you may or may not use that act of God. It does double checking. I covered all the tables. Okay. So about two to three more minutes to complete this step. And then we'll move on to the next one. On to the next step. And I realize that people are starting to get hungry, perhaps, or you're very deep in discussion. So that's also a good sign. Now, the next step is basically a repeat of what you did for utopia. So I'm going to give, you know the steps. I'm going to give you what you need. But what we're going to do now is to describe your impossibly bad future.  Think of all the worst things that could happen. Doomsday, go for it. And as with your utopian timeline, you're allowed one of these acts of God, another one of these acts of God, but you don't have to use it. And again, create that fictional timeline backwards, right? So describe the impossibly bad future, and then create the fictional timeline backwards that connects to a real event in your historical timeline. Okay. And about 10 to 15 minutes for that. Okay. About five to seven minutes, your timeline should start to look like what you see on the screen. Are you still thinking about being pessimistic and create, it's done. Perfect. Okay. Just checking in with the other groups as well. Time, let me know. But more or less, you should have what we see on screen. Yeah, the colors were unfortunately arbitrary. Okay. I'm going to release you very, very soon. Love it. People are still discussing. That's awesome. I actually take it as a personal sign of failure if people suddenly stop talking and look at me. But if they continue discussing, it means that the flow of conversation is very good on your table. Okay. Actually, the next step that we normally do is to get each table or each group to get up and move around to other tables to see what the other groups have done and to notice what's similar, what's different, what surprised you. But I'm going to save this for at the end so that you can trickle out naturally to go find some food if you're hungry. But now, as promised, I wanted to give you an idea for why we have this method in the first place because this method, the future backwards, comes from the world of futures and foresight. It's a technique that usually governments, but increasingly now organizations, use to try to do scenario planning. Very traditionally, you do scenario planning. In this case, I'm just going to skip to the relevant slide. So this is what I would have you do now normally. I want you to do that at the end instead. This is the description of the method. And I actually wanted to hold back from putting this all up in front because usually then people start to question and ask questions about it. I wanted you to go straight into discussing and creating your timeline. Working backwards actually forces us to stop and think. It's very natural and I noticed this very often. Personally, I fall into it as well. Some groups were compiling events and then deciding where they wanted to go forward. It's a very human tendency. It's part of our bias, but it's fine. I just wanted to disrupt that pattern and put it in the workshop setting. The other thing that this group also mentioned is that utopia and dystopia may be more likely than we think. Why do this? Why think of impossibly bad future? Well, it could be closer than you think. You could fall into it and not even realize that you do. So this is also sort of like a situational awareness, risk management technique where you can say, okay, what are we not being aware of? And what can people imagine that is a very, very bad future? Now, this method is very often used in conflict resolution. But how we do it is that we actually know the audience beforehand. We maximize for group think. So whether people know each other or they come from the same department, interestingly, when we use it, emerges in acquisitions. If you're from the acquired company, you form your tables. And then the acquiring company form other tables. What we're actually trying to do is to allow each group to have their say. Each group has the right to construct their own current state and to have it be seen by others. How we actually help with conflict resolution is for everyone to go around and see different perspectives. We're not forcing different perspectives from the outset on other people. We're allowing people to have their say, to construct their own timeline, and then hopefully very naturally go around and see what others are thinking. And that is often a better way to get people to see different perspectives than forcing it on them from the outset. And very typically, as I said, we use this when we work with government, with civil society. We have used it on very sensitive topics, like geopolitical topics as well. And it's actually a great way for different groups to voice their opinions and then to come together to see what can be achieved. So agile is hopefully less contentious. I don't know too much about it. I don't get into political battles on that. But this is just to take a method that we can use in such vastly different settings, whether in geopolitical settings or in agile or in your organizations. And if nothing else, it's a great way to get different groups of people together to come to see different perspectives. So any questions on that? I just wanted to leave you with this bonus slide to compare and contrast. There is forecasting, backcasting, and sidecasting in the world of futures and foresight. And people, yes, people actually do make a living from this, usually consulting for governments. Very traditionally, you do forecasting, right? Whether you do it for revenue projections, for forecasting, same with these future scenarios. And I will also say no one can accurately predict the future. We can only get a glimpse of it based on our present, but no one can actually predict the future. Then, of course, we try to say, okay, maybe we need to stop being so linear, stop trying to find cause and effect. So we try backcasting, but actually it's much better for you to cast on each side to see what's happening around you, that situational awareness that was mentioned earlier, so that you know how to proceed. Okay, what is the next possible step that you can take towards that future? Okay, that's it for this workshop method. I hope you found it interesting and helpful. All this material will be available on the portal, or if you just Google for the future backwards, you'll find all of that online as well. If there's no other questions, please feel free to look at the other groups, what they have done just, you know, from walking around. I can see some similarities already, but also very different views. And after that, you will, I think it's pretty much dinner time. So thank you, everyone. Hope you enjoyed it.


Inflammation in the brain is also known as encephalitis. This condition can have a variety of medical causes. It can also occur with inflammation of the spinal cord and the membrane covering the brain. This condition is known as meningitis. Both encephalitis and meningitis are serious conditions that must be addressed quickly to avoid fatal consequences.  While most cats do not develop any adverse conditions that affect his brain, some can develop inflammation that can be serious or even life-threatening. Symptoms of brain inflammation in cats. The symptoms of brain inflammation in cats can vary, depending on the cause of the condition. Some other factors such as the age of the cat and overall health can affect the symptoms associated with encephalitis. The following is a list of some of the most common symptoms associated with encephalitis in domestic cats. Changes in behavior. Disorientation. Seizures. Fever. Telling of the head. Circling movements. Sudden lack of coordination. Depression. Facial paralysis. Lack of consciousness. Small pupils. Uneven pupils. Pain in the spine. Types are. Encephalitis and. Meningitis or inflammation of the spinal cord, often associated with encephalitis. Infections, including bacterial, viral, fungal, and protozoal infections. These infections may reach the central nervous system via the sinuses, the inner ear, the vertebrae, or traumatic injuries. Many diseases other than encephalitis can cause focal neurologic signs whereas multifocal brain disease is most often associated with encephalitis. If the neurologic abnormalities are focal, other diseases such as stroke or brain tumor must be ruled out. Most animals with encephalitis will develop neurologic abnormalities over a short period of time. Although less common, we have seen animals with clinical signs of encephalitis for months before referral. Viral infections. A viral infection, such as feline immunodeficiency syndrome, feline infectious peritonitis, or even rabies can cause encephalitis. Most public health departments require all cats, regardless of indoor slash outdoor status, to be vaccinated for rabies. There is a vaccine for five but most vets don't vaccinate cats for it. This is partly because the risk of contracting it is low, as the primary mode of transmission is through bite wounds. It is also partly because a cat that's vaccinated for five will subsequently test positive despite not actually having the illness. FIP is caused by a feline specific virus. Similar to five, there is a vaccine that has been developed for FIP but, just like five, it is not normally utilized. This is because studies have shown that the efficacy of this vaccine is variable, if effective at all. As such, the American Association of Feline Practitioners does not currently recommend it as a core vaccine for cats. Bacterial infections. Bacterial infections, whether they be aerobic, one that requires oxygen, or anaerobic, one that can thrive without oxygen, can cause encephalitis in your cat. Fungal infections. Fungal infections, such as those caused by Cryptococcus neophormins and Blastomyces dermatidides, can also cause encephalitis. Parasitic infections. Things like Toxoplasmosis, caused by the protozole parasite Toxoplasma gondii, may lead to encephalitis. Other causes. Your cat doesn't need to contract anything infectious to develop encephalitis, though. Other causes include immune-mediated disorders as well as iopathic, meaning a cause is never pinpointed, and cephalitis. Hello. This video is sponsored by Beemix Pets. Are you looking for high quality cat collars at an affordable cost? Check out, BeemixPets.com. Use coupon code KittenLife, to get 20% off. Diagnosis. You will need to give your veterinarian a thorough history of your cat's health, including the onset and nature of the symptoms, and possible incidents that might have precipitated the unusual behaviors or complications. He or she will then perform a complete physical examination as well as a biochemistry profile, urinalysis, and complete blood count, the results of which will depend on the underlying cause of the encephalitis. If your cat has an infection, the complete blood count may show an increased number of white blood cells. Viral infections, meanwhile, may decrease the number of lymphocytes, a type of white cells, also known as lymphopenia. An abnormal reduction in platelets, small cells used in blood clotting, is a good indicator of thrombocytopenia. To confirm lung involvement and related complications, your veterinarian may employ chest x-rays, while MRIs and CT scans are used to evaluate the brain involvement in detail. Your veterinarian may also collect a sample of cerebrospinal fluid, CSF, which is then sent to a laboratory for cultures. This is necessary for definitive diagnosis and to determine the severity of the problem. If culture assays are unsuccessful, a brain tissue sample may be necessary to confirm the diagnosis, but this is an expensive procedure. Treatment of brain inflammation in cats. The treatment for brain inflammation in cats depends on the cause of the condition. Cats with immune-mediated encephalitis are often treated with medications such as corticosteroids. These medications can alter the immune system and reduce inflammation in the brain in some cats. If infection is the cause of brain inflammation, doctors often treat it with antibiotics. Fungal infections are typically treated with antifungal medications to reduce symptoms. In many cases, doctors must use a variety of medications and treatments to control brain inflammation. Since it can be a life-threatening condition, prompt diagnosis and treatment is key to your cat's recovery. Your cat may need life-saving treatments such as four fluids and medications to stabilize his condition. Recovery of brain inflammation in cats.  In some cases, antibiotics or antifungal medications are all that is needed to restore good health, and cats may return to normal in 2-8 weeks. However, this may not be the case if your cat has suffered severe neurological damage or the infection was very serious. The overall prognosis depends on the condition that caused the brain inflammation to occur in your cat. Your veterinarian may need to see your cat for ongoing treatment. Your cat's recovery will depend on you keeping these appointments and working with your doctor to keep him healthy. Many veterinarians recommend special diets for cats, depending on the cause of his condition. It is important to follow his recommendations and report any changes in your cat's behavior or condition after discharge. If your cat's condition cannot be treated or is very advanced, palliative care may be necessary to keep him comfortable. Your veterinarian may prescribe medications to reduce symptoms and keep him comfortable. In very severe cases, euthanasia may be recommended. This is the most humane way to eliminate the suffering of your cat if he has an untreatable underlying condition causing brain inflammation to occur. Living in management. With proper treatment and care, symptoms gradually improve within 2-8 weeks. However, the overall prognosis depends on the underlying cause of the condition. For example, in some cats, symptoms may reappear once treatment is discontinued. In such instances, a second round of treatment or long-term treatment may be required to save the cat's life. Your veterinarian will schedule regular follow-up exams to evaluate the effectiveness of the treatment and the cat's state of health. He or she may even recommend a new diet for the cat, especially if it is frequently vomiting or severely depressed. If you enjoyed this video, kindly press the like button. Also don't forget to subscribe with notifications on, so that you don't miss out on videos like this. Thank you for watching.