1 00:00:00,000 --> 00:00:02,928 [MUSIC PLAYING] 2 00:00:02,928 --> 00:00:04,817 3 00:00:04,817 --> 00:00:07,150 DOUG LLOYD: All right, so welcome to the portion of CS50 4 00:00:07,150 --> 00:00:10,150 where we're going to begin to do transition our coding away from scratch 5 00:00:10,150 --> 00:00:11,950 and we're going to start programming in c. 6 00:00:11,950 --> 00:00:15,060 In order to do that, we need to have a terminal-based environment where 7 00:00:15,060 --> 00:00:17,890 we can write commands at the command line, write our code, 8 00:00:17,890 --> 00:00:19,630 compile it, and execute it. 9 00:00:19,630 --> 00:00:23,080 The platform that we provide in CS50 is called CS50 IDE. 10 00:00:23,080 --> 00:00:25,150 And it's entirely a cloud-based infrastructure 11 00:00:25,150 --> 00:00:29,230 that uses an implementation of Ubuntu, which is one flavor of the Linux 12 00:00:29,230 --> 00:00:30,140 operating system. 13 00:00:30,140 --> 00:00:32,056 The advantage here is it is cloud-based, which 14 00:00:32,056 --> 00:00:34,630 means that you can start your work on one computer, 15 00:00:34,630 --> 00:00:38,950 save, head home, switch to a different computer, use a friend's computer, 16 00:00:38,950 --> 00:00:41,860 and all your work is saved remotely in the cloud. 17 00:00:41,860 --> 00:00:43,990 To get started, what I want to do is walk you 18 00:00:43,990 --> 00:00:47,140 through how to set up your CS50 IDE the very first time 19 00:00:47,140 --> 00:00:49,482 and walk you through some of the features that it has. 20 00:00:49,482 --> 00:00:51,607 So all you need to do to get started with your CS50 21 00:00:51,607 --> 00:00:54,310 IDE is head to a web browser. 22 00:00:54,310 --> 00:00:57,974 And in the URL, just type in cs50.io. 23 00:00:57,974 --> 00:00:59,140 And just give that a second. 24 00:00:59,140 --> 00:01:02,530 You'll be prompted to log in using CS50 ID. 25 00:01:02,530 --> 00:01:06,910 The options that you'll probably use are either Edx, Harvard, or Yale. 26 00:01:06,910 --> 00:01:09,250 So if you have an Edx account, you'd use the Edx logins. 27 00:01:09,250 --> 00:01:11,720 If you have a Harvard credentials, you'd use Harvard. 28 00:01:11,720 --> 00:01:13,594 If you have Yale credentials, you'd use Yale. 29 00:01:13,594 --> 00:01:16,570 So I'm going to set up with Harvard credentials, hit Submit. 30 00:01:16,570 --> 00:01:19,189 And you would enter your username and password here. 31 00:01:19,189 --> 00:01:22,480 And the very first time, if you haven't done this before, what it's going to do 32 00:01:22,480 --> 00:01:26,740 is create for you a brand new environment, pre-configured, ready 33 00:01:26,740 --> 00:01:32,260 to go, using CS50 IDE's framework within Cloud9. 34 00:01:32,260 --> 00:01:35,890 Now, I already have an implementation of CS50 IDE, 35 00:01:35,890 --> 00:01:40,110 but I'm going to show you how to create another one using a different method. 36 00:01:40,110 --> 00:01:43,550 So alternatively, if you already have a CS50 IDE workspace and you want to, 37 00:01:43,550 --> 00:01:46,383 for example, create another one, which is what I'm going to do here, 38 00:01:46,383 --> 00:01:49,960 or for example, the cs50.io log in somehow didn't work, 39 00:01:49,960 --> 00:01:52,930 you can also create new workspaces from your Cloud9 dashboard. 40 00:01:52,930 --> 00:01:54,680 I'm going to show you how to do that here. 41 00:01:54,680 --> 00:01:57,130 So what I did was I logged on to my IDE. 42 00:01:57,130 --> 00:02:00,730 And in the File menu, I just chose dashboard to bring me to the screen 43 00:02:00,730 --> 00:02:02,027 that you're seeing here. 44 00:02:02,027 --> 00:02:04,360 Then what I wanted to do is just create a new workspace, 45 00:02:04,360 --> 00:02:06,760 which I can do just by hovering over this button here. 46 00:02:06,760 --> 00:02:09,135 And then it's going to ask me to provide some parameters. 47 00:02:09,135 --> 00:02:11,890 So my workspace name, lets call it demo. 48 00:02:11,890 --> 00:02:15,757 A short description of it, demo for CS50 IDE. 49 00:02:15,757 --> 00:02:18,340 Now in general, particularly if this is your first work space, 50 00:02:18,340 --> 00:02:20,890 you're actually going to want to choose private here. 51 00:02:20,890 --> 00:02:22,360 The way that this is set up, though, is that you're 52 00:02:22,360 --> 00:02:23,890 restricted to one private workspace. 53 00:02:23,890 --> 00:02:25,919 And I already have one in my example here. 54 00:02:25,919 --> 00:02:28,960 So I'm going to choose public because I don't really have another option. 55 00:02:28,960 --> 00:02:32,110 But if this is your first workspace that you're using for CS50 IDE, 56 00:02:32,110 --> 00:02:35,639 you do want to create a private workspace if you can. 57 00:02:35,639 --> 00:02:37,930 And then at the bottom there, it gives you some options 58 00:02:37,930 --> 00:02:39,600 for different templates you can use. 59 00:02:39,600 --> 00:02:42,315 So this is not just restricted, necessarily, to CS50. 60 00:02:42,315 --> 00:02:44,440 But there is a CS50 template right here at the end, 61 00:02:44,440 --> 00:02:46,650 with happy cat, Harvard CS50. 62 00:02:46,650 --> 00:02:49,040 And I can just hit Create Workspace. 63 00:02:49,040 --> 00:02:51,541 Now, depending on how old your system is and the speed 64 00:02:51,541 --> 00:02:54,790 of your internet connection, this could take anywhere from a couple of seconds 65 00:02:54,790 --> 00:02:56,834 to maybe one or two minutes. 66 00:02:56,834 --> 00:02:58,750 So after about 45 seconds or so on my machine, 67 00:02:58,750 --> 00:03:02,266 I was brought to this screen, which is basically the CS50 IDE, what 68 00:03:02,266 --> 00:03:05,140 it looks like by default. The first thing you're going to want to do, 69 00:03:05,140 --> 00:03:07,570 again, one more time sensitive step here, 70 00:03:07,570 --> 00:03:11,260 is as soon as you visit your IDE for the first time, 71 00:03:11,260 --> 00:03:13,390 or generally when you're visiting it as you go, 72 00:03:13,390 --> 00:03:15,348 you're generally going to want to check to see, 73 00:03:15,348 --> 00:03:18,130 make sure that you have the most up to date version of CS50 IDE. 74 00:03:18,130 --> 00:03:21,320 We occasionally will push updates to change some formatting things 75 00:03:21,320 --> 00:03:24,736 or to include some distribution, or sample code, or staff solutions. 76 00:03:24,736 --> 00:03:26,110 And those are pushed via updates. 77 00:03:26,110 --> 00:03:29,530 So you're going to want to, first, go to the terminal at the bottom 78 00:03:29,530 --> 00:03:32,560 here and type in the command update 50. 79 00:03:32,560 --> 00:03:33,730 And then hit Enter. 80 00:03:33,730 --> 00:03:36,790 And again, this will take about, possibly, about a minute or so, 81 00:03:36,790 --> 00:03:38,270 depending on the speed of your internet connection. 82 00:03:38,270 --> 00:03:41,269 And what it's going to do is go through and download all of the packages 83 00:03:41,269 --> 00:03:44,650 and make sure that your system is fully up to date. 84 00:03:44,650 --> 00:03:46,750 So again, after about a minute or so, I'm 85 00:03:46,750 --> 00:03:48,880 notified that the update has completed and I'm 86 00:03:48,880 --> 00:03:50,964 prompted to close and reopen all terminal windows. 87 00:03:50,964 --> 00:03:52,380 So I'll just do that really quick. 88 00:03:52,380 --> 00:03:54,040 I'll just close to this terminal. 89 00:03:54,040 --> 00:03:55,240 Confirming. 90 00:03:55,240 --> 00:03:58,450 And I will reopen a new terminal here. 91 00:03:58,450 --> 00:03:59,700 And now we are good to go. 92 00:03:59,700 --> 00:04:02,720 So our CS50 IDE has three main areas. 93 00:04:02,720 --> 00:04:05,440 At the bottom, you've already seen me working here in blue. 94 00:04:05,440 --> 00:04:08,080 This sort of light bluish color is my terminal. 95 00:04:08,080 --> 00:04:10,060 These windows are also resizable, so I can make 96 00:04:10,060 --> 00:04:11,740 this bigger or smaller if I would like. 97 00:04:11,740 --> 00:04:14,530 I'm going to keep it right about here for now. 98 00:04:14,530 --> 00:04:16,990 On the left over here is my file tree. 99 00:04:16,990 --> 00:04:21,070 As I add files and folders to my workspace, this will become larger 100 00:04:21,070 --> 00:04:25,781 and I'll be able to navigate this using just a GUI interface, 101 00:04:25,781 --> 00:04:28,780 being able to double click on files, double click on folders, as opposed 102 00:04:28,780 --> 00:04:30,730 to just having to do everything at the terminal window. 103 00:04:30,730 --> 00:04:33,436 Although as you become more acquainted with the Linux commands, 104 00:04:33,436 --> 00:04:35,560 you may want to just use the terminal window anyway 105 00:04:35,560 --> 00:04:37,540 because you may find it faster. 106 00:04:37,540 --> 00:04:40,609 And then at the top here is my main workspace, sort of area. 107 00:04:40,609 --> 00:04:43,400 This is where when I'm opening files, where I'll see my source code 108 00:04:43,400 --> 00:04:45,370 and can edit it. 109 00:04:45,370 --> 00:04:48,190 And this is where the bulk of your work will take place 110 00:04:48,190 --> 00:04:49,650 when you're writing code. 111 00:04:49,650 --> 00:04:52,840 I'm going to show you how easy it is to create a file in CS50 IDE. 112 00:04:52,840 --> 00:04:55,000 There's a little icon here with a plus. 113 00:04:55,000 --> 00:04:56,480 All I have to do is click on that. 114 00:04:56,480 --> 00:04:58,420 I'm asked if I want a new file or a new terminal. 115 00:04:58,420 --> 00:05:00,740 As you can see, I actually could put terminals at the top if I wanted to, 116 00:05:00,740 --> 00:05:01,720 generally not a good idea. 117 00:05:01,720 --> 00:05:03,095 I already have one at the bottom. 118 00:05:03,095 --> 00:05:05,170 So I'm just going to create a new file. 119 00:05:05,170 --> 00:05:06,420 Doesn't have a name right now. 120 00:05:06,420 --> 00:05:08,836 You can see it created something for me called Untitled 1, 121 00:05:08,836 --> 00:05:09,884 but that's all right. 122 00:05:09,884 --> 00:05:12,300 And let's just quickly write a little Hello World program. 123 00:05:12,300 --> 00:05:14,790 So first I need to pound include standard I/O, which 124 00:05:14,790 --> 00:05:17,250 is where the print f function lives. 125 00:05:17,250 --> 00:05:20,080 We're going to need that to be able to print that out later. 126 00:05:20,080 --> 00:05:20,790 Int main void. 127 00:05:20,790 --> 00:05:23,400 128 00:05:23,400 --> 00:05:27,230 And I'll tab in here and just print f, hello world. 129 00:05:27,230 --> 00:05:31,510 A little backslash character, close curly brace. 130 00:05:31,510 --> 00:05:33,630 Now nothing like syntax highlighted for me. 131 00:05:33,630 --> 00:05:36,754 Maybe you're familiar with this if you've used other editors before. 132 00:05:36,754 --> 00:05:39,420 And the reason for that is that I haven't given this file a file 133 00:05:39,420 --> 00:05:43,860 extension or a name yet, so the IDE doesn't know what type of file it is. 134 00:05:43,860 --> 00:05:47,400 If I try and hit Save, so Control S on a Windows machine, 135 00:05:47,400 --> 00:05:50,580 Command S on an Apple machine, then I'm prompted 136 00:05:50,580 --> 00:05:52,310 what file do I want to say this as. 137 00:05:52,310 --> 00:05:55,680 We'll save it as hello.c, it as a C program after all. 138 00:05:55,680 --> 00:05:56,575 Hit save. 139 00:05:56,575 --> 00:05:58,950 Now notice that actually now that it knows it's a C file, 140 00:05:58,950 --> 00:06:01,260 it's going to syntax highlight it just like a c file. 141 00:06:01,260 --> 00:06:07,890 So my pound include, my string there is in green, my keywords are in blue, 142 00:06:07,890 --> 00:06:09,180 and we're ready to go. 143 00:06:09,180 --> 00:06:11,370 So I've saved this file as hello.c. 144 00:06:11,370 --> 00:06:14,230 Now you may recall that in order to execute our programs, 145 00:06:14,230 --> 00:06:16,080 we don't just run the source code, we have 146 00:06:16,080 --> 00:06:20,250 to compile them from the source code into a binary file. 147 00:06:20,250 --> 00:06:21,839 And we do that using make. 148 00:06:21,839 --> 00:06:23,380 So we can go down to the bottom here. 149 00:06:23,380 --> 00:06:26,590 And I can type make hello. 150 00:06:26,590 --> 00:06:28,350 Hit Enter. 151 00:06:28,350 --> 00:06:31,650 So then some cryptic clang string ran for me. 152 00:06:31,650 --> 00:06:36,480 And then I can just type ./hello and I'm told hello world at the bottom there. 153 00:06:36,480 --> 00:06:41,700 So that was how easy it was to get our first program set up. 154 00:06:41,700 --> 00:06:44,010 What else can we do here? 155 00:06:44,010 --> 00:06:45,820 There's a lot of menu options at the top. 156 00:06:45,820 --> 00:06:47,820 Let's take a look at some of those really quick, 157 00:06:47,820 --> 00:06:51,810 so you're pretty standard CS50 IDE, which has a menu there. 158 00:06:51,810 --> 00:06:54,270 Files for opening and saving files and so on. 159 00:06:54,270 --> 00:06:58,770 One that you might definitely use is in this View tab. 160 00:06:58,770 --> 00:07:01,629 There's a less comfortable option, which can abstract or hide away 161 00:07:01,629 --> 00:07:02,670 some of the menu options. 162 00:07:02,670 --> 00:07:04,336 You notice some stuff disappeared there. 163 00:07:04,336 --> 00:07:06,690 My screen got a little bit bigger. 164 00:07:06,690 --> 00:07:08,940 I'm going to keep it in more comfortable mode for now, 165 00:07:08,940 --> 00:07:10,981 but this just hides away some of the menu options 166 00:07:10,981 --> 00:07:13,500 that you might not use quite as frequently. 167 00:07:13,500 --> 00:07:16,220 Another option that I personally really like, when I'm coding, 168 00:07:16,220 --> 00:07:17,970 I actually like to be in night mode, which 169 00:07:17,970 --> 00:07:19,428 looks a little something like this. 170 00:07:19,428 --> 00:07:21,070 So it inverts all of my colors. 171 00:07:21,070 --> 00:07:25,734 I like to program on a dark background typing light colored text. 172 00:07:25,734 --> 00:07:27,150 But you might prefer the opposite. 173 00:07:27,150 --> 00:07:29,740 I'm going to keep it as day view for purposes of this video. 174 00:07:29,740 --> 00:07:30,960 But know that that is an option. 175 00:07:30,960 --> 00:07:33,090 And there are other options as well you can do with themes. 176 00:07:33,090 --> 00:07:35,160 There are many, many different types of options 177 00:07:35,160 --> 00:07:37,350 here that you could use instead. 178 00:07:37,350 --> 00:07:41,917 So let me just quickly put this back into day mode. 179 00:07:41,917 --> 00:07:45,250 And then one that is going to be useful, and I'm going to use it from this point 180 00:07:45,250 --> 00:07:47,304 forward in this video, is presentation mode. 181 00:07:47,304 --> 00:07:50,470 And presentation mode you would use when you're giving a presentation, which 182 00:07:50,470 --> 00:07:51,429 is what I'm doing here. 183 00:07:51,429 --> 00:07:53,178 And you'll see what it does is it actually 184 00:07:53,178 --> 00:07:54,860 makes the text a little bit bigger. 185 00:07:54,860 --> 00:07:58,924 It gets rid of some of the details in the corner there at the top right. 186 00:07:58,924 --> 00:08:01,840 I'll take this off again for a second to show you some of those things 187 00:08:01,840 --> 00:08:04,120 briefly near the end of the video. 188 00:08:04,120 --> 00:08:09,490 But it's a useful tool when you want to show your code a little more-- 189 00:08:09,490 --> 00:08:11,650 in a larger font size, to have your terminal window 190 00:08:11,650 --> 00:08:14,350 have a larger font size, so that people can read it a little more easily. 191 00:08:14,350 --> 00:08:17,016 And hopefully now you can read it a little more easily because I 192 00:08:17,016 --> 00:08:20,562 put the IDE into presentation mode. 193 00:08:20,562 --> 00:08:22,520 There are a couple of other ways to open files, 194 00:08:22,520 --> 00:08:26,559 though, besides just clicking on the plus icon at the top. 195 00:08:26,559 --> 00:08:28,850 So really quickly I'm going to clear my terminal, which 196 00:08:28,850 --> 00:08:33,530 I do by typing control L. And it just kind of makes everything go away. 197 00:08:33,530 --> 00:08:37,789 And I'm going to try and open a file using the Cloud9 file opening 198 00:08:37,789 --> 00:08:39,890 command, which is known as C9 open. 199 00:08:39,890 --> 00:08:43,336 So I'm going to try and C9 open hello2.c, for example. 200 00:08:43,336 --> 00:08:46,460 Now you notice what it did there is it created a new tab for me at the top. 201 00:08:46,460 --> 00:08:48,260 And it already now has a name. 202 00:08:48,260 --> 00:08:54,560 So unlike before, where I had an untitled tab, now I have-- 203 00:08:54,560 --> 00:08:56,420 now I have the-- 204 00:08:56,420 --> 00:08:57,815 tab has a name in it. 205 00:08:57,815 --> 00:09:00,440 And we're going to write a really similar program to the one we 206 00:09:00,440 --> 00:09:02,004 did before, with one little twist. 207 00:09:02,004 --> 00:09:03,920 We're still going to include standard I/O. Now 208 00:09:03,920 --> 00:09:06,070 we're going to include CS50.h as well. 209 00:09:06,070 --> 00:09:10,670 CS50.h is a header file that contains some user input functions that 210 00:09:10,670 --> 00:09:14,130 are quite handy for this example. 211 00:09:14,130 --> 00:09:15,050 Int main void. 212 00:09:15,050 --> 00:09:18,910 Now notice, unlike before, now that this file knows that I'm working in C, 213 00:09:18,910 --> 00:09:20,060 you may have caught this. 214 00:09:20,060 --> 00:09:21,770 I'll go back and do it again. 215 00:09:21,770 --> 00:09:26,025 When I was writing the original hello, when I typed the open curly brace, 216 00:09:26,025 --> 00:09:29,150 it didn't do anything for me because it didn't know I was writing a c file. 217 00:09:29,150 --> 00:09:32,240 When I do it here and I hit Enter, notice it actually gives me 218 00:09:32,240 --> 00:09:34,460 a corresponding close brace already. 219 00:09:34,460 --> 00:09:38,030 This will also be done for for loops, while loops, if blocks, 220 00:09:38,030 --> 00:09:41,240 and so on, where it will automatically, if you open a parenthesis 221 00:09:41,240 --> 00:09:44,459 or open a curly brace, it will correspondingly close it for you 222 00:09:44,459 --> 00:09:47,000 so you don't have to go through the process of typing it out. 223 00:09:47,000 --> 00:09:49,670 It's not a huge deal but a lot of modern editors do this for you 224 00:09:49,670 --> 00:09:52,187 because it makes your life a little more convenient. 225 00:09:52,187 --> 00:09:54,020 So this time what we're going to do is we're 226 00:09:54,020 --> 00:09:59,420 going to have a variable where we're going to capture the user's name 227 00:09:59,420 --> 00:10:01,520 and we're going to print their name out. 228 00:10:01,520 --> 00:10:05,970 So I'm first going to prompt them by saying, enter your name. 229 00:10:05,970 --> 00:10:09,430 Then I'm going to have a variable of type string called 230 00:10:09,430 --> 00:10:15,730 name that is going to be used to capture user input using get string. 231 00:10:15,730 --> 00:10:18,140 And then instead of printing out hello world, 232 00:10:18,140 --> 00:10:22,540 what I want to print out is hello %s, where %s is eventually going to be 233 00:10:22,540 --> 00:10:24,610 plugged in with someone's name. 234 00:10:24,610 --> 00:10:29,830 So %s exclamation point, and we're going to plug in whatever we just got there. 235 00:10:29,830 --> 00:10:32,770 So let's go ahead and try and compile this into a-- 236 00:10:32,770 --> 00:10:33,956 wait a minute, what's this? 237 00:10:33,956 --> 00:10:35,830 So this is kind of a useful feature, as well. 238 00:10:35,830 --> 00:10:37,621 If you forget to-- remember that you're not 239 00:10:37,621 --> 00:10:41,680 going to be able to compile a program if you haven't saved the file. 240 00:10:41,680 --> 00:10:45,940 And what that was a little warning to me that if I left my code editor window 241 00:10:45,940 --> 00:10:49,960 and I switched, but I haven't saved any of this file yet. 242 00:10:49,960 --> 00:10:52,940 And I have that little red dot in the tab corner as well to remind you. 243 00:10:52,940 --> 00:10:54,856 So that's just a little pop up reminder that's 244 00:10:54,856 --> 00:10:57,670 useful that's part of a CS50 IDE feature that just reminds you, 245 00:10:57,670 --> 00:11:02,470 oh right, before I go, I need to hit Save S, Control S, and save my file. 246 00:11:02,470 --> 00:11:04,900 So I'll do that here. 247 00:11:04,900 --> 00:11:08,440 Now I can make hello2, because this file is called hello2.c 248 00:11:08,440 --> 00:11:10,270 so I want to make hello2. 249 00:11:10,270 --> 00:11:12,850 Clear my terminal really quick again and run hello2. 250 00:11:12,850 --> 00:11:17,560 251 00:11:17,560 --> 00:11:22,872 So that's my second program now that I've written in CS50 IDE. 252 00:11:22,872 --> 00:11:24,580 All right, so what I'm going to do now is 253 00:11:24,580 --> 00:11:27,464 I'm going to turn presentation mode off really briefly, again, 254 00:11:27,464 --> 00:11:29,380 so I can show you some of the features that go 255 00:11:29,380 --> 00:11:31,510 around the perimeter of your IDE area. 256 00:11:31,510 --> 00:11:34,990 But you're pretty much familiar now with the basics here. 257 00:11:34,990 --> 00:11:38,200 We have our file tree, which now has our two files, 258 00:11:38,200 --> 00:11:41,090 two .c files and our two source files-- 259 00:11:41,090 --> 00:11:42,970 or excuse me, our two binary files. 260 00:11:42,970 --> 00:11:46,570 We have our terminal area at the bottom and we have our code editing main area, 261 00:11:46,570 --> 00:11:48,089 sort of, at top right. 262 00:11:48,089 --> 00:11:50,630 So I'm going to go ahead and turn presentation back off again 263 00:11:50,630 --> 00:11:54,270 and show you some of these things around the edge. 264 00:11:54,270 --> 00:11:57,020 So this CS50 IDE menu contains some things 265 00:11:57,020 --> 00:11:59,780 that will be mostly useful for you towards the end of the class, 266 00:11:59,780 --> 00:12:02,162 in particular, PHP, my admin, and web server, 267 00:12:02,162 --> 00:12:04,870 which will come in handy for the later portions of the class when 268 00:12:04,870 --> 00:12:07,100 we're doing some web-based programming. 269 00:12:07,100 --> 00:12:11,581 You'll be able to figure out your PHP SQL password, username, and stuff here. 270 00:12:11,581 --> 00:12:14,330 And to be able to check any websites that you have created and are 271 00:12:14,330 --> 00:12:17,820 running by going to web server here. 272 00:12:17,820 --> 00:12:21,070 File has the basics if you've ever used like a Microsoft Word type thing where 273 00:12:21,070 --> 00:12:25,060 you can create files, open them, close them, save, and so on, pretty much all 274 00:12:25,060 --> 00:12:26,980 of those things are there. 275 00:12:26,980 --> 00:12:31,090 If you have any keyboard preferences, you can alter them in the Edit menu. 276 00:12:31,090 --> 00:12:33,640 View, again, has a lot of aesthetics changing things, 277 00:12:33,640 --> 00:12:35,980 for example, the presentation mode, the night mode, 278 00:12:35,980 --> 00:12:37,563 where you can set the way things look. 279 00:12:37,563 --> 00:12:39,430 You want to do that here. 280 00:12:39,430 --> 00:12:41,230 Go, Tools, Window, and Support you probably 281 00:12:41,230 --> 00:12:43,740 will not use quite as frequently. 282 00:12:43,740 --> 00:12:45,824 At the top here is the version number of CS50 IDE. 283 00:12:45,824 --> 00:12:48,239 Don't worry if your version number is different than mine. 284 00:12:48,239 --> 00:12:51,700 At the time we're recording this in May of 2017, we're at version 98. 285 00:12:51,700 --> 00:12:54,789 But if the aesthetics of things change a little bit here and there, 286 00:12:54,789 --> 00:12:56,080 totally nothing to worry about. 287 00:12:56,080 --> 00:12:58,240 It just lets you know what your version number is. 288 00:12:58,240 --> 00:13:00,830 Here is the memory CPU and disk area. 289 00:13:00,830 --> 00:13:04,515 It lets you know if you have too much data saved in your IDE. 290 00:13:04,515 --> 00:13:05,890 Right now, I have plenty of room. 291 00:13:05,890 --> 00:13:09,850 I'm only using 153 megabytes of 5,000 or so. 292 00:13:09,850 --> 00:13:10,880 So I'm in no danger. 293 00:13:10,880 --> 00:13:13,504 But if you write a lot of code and you eventually fill this up, 294 00:13:13,504 --> 00:13:16,990 this is still a cloud-based hard drive, but it is a hard drive nonetheless 295 00:13:16,990 --> 00:13:20,590 that you're using, so you have a limited amount of space. 296 00:13:20,590 --> 00:13:22,920 You have here the Share icon. 297 00:13:22,920 --> 00:13:26,320 So the share icon can be really useful if you're 298 00:13:26,320 --> 00:13:29,650 stuck and need to get some help, perhaps from a teacher, or a colleague, 299 00:13:29,650 --> 00:13:30,820 or a friend. 300 00:13:30,820 --> 00:13:34,262 You can actually share your workspace and give others read and read 301 00:13:34,262 --> 00:13:35,720 and write access to your workspace. 302 00:13:35,720 --> 00:13:38,760 If you click on the Share icon, you're popped up with awesome information 303 00:13:38,760 --> 00:13:39,259 here. 304 00:13:39,259 --> 00:13:42,160 Here is the information for this demonstration workspace. 305 00:13:42,160 --> 00:13:44,700 And if I know somebody's username-- 306 00:13:44,700 --> 00:13:47,890 and you can tell, for example, that mine is Lloyd1 because that 307 00:13:47,890 --> 00:13:49,960 appears repeatedly in the URLs here. 308 00:13:49,960 --> 00:13:53,136 If you know somebody's Cloud9 CS50 IDE username, 309 00:13:53,136 --> 00:13:54,760 you can type that here and invite them. 310 00:13:54,760 --> 00:13:58,930 And they'll get a link to be able to access your workspace for read access 311 00:13:58,930 --> 00:14:02,170 or read and write access if you want to be able to collaborate remotely. 312 00:14:02,170 --> 00:14:04,339 It's a very useful feature. 313 00:14:04,339 --> 00:14:06,380 Once you are collaborating with someone remotely, 314 00:14:06,380 --> 00:14:08,849 you can usually collaborate tab here on the right. 315 00:14:08,849 --> 00:14:10,640 And what this will do is this will actually 316 00:14:10,640 --> 00:14:12,470 allow you to have a group chat. 317 00:14:12,470 --> 00:14:15,110 So I'm not collaborating with anybody right now, 318 00:14:15,110 --> 00:14:18,290 but I could write hello, for example, or have any message of any kind 319 00:14:18,290 --> 00:14:19,480 to any of my collaborators. 320 00:14:19,480 --> 00:14:22,730 And if they were also currently viewing my workspace, they would see the chat. 321 00:14:22,730 --> 00:14:24,180 They'd be able to participate. 322 00:14:24,180 --> 00:14:28,250 And so for example, if I was getting some debugging help from a friend, 323 00:14:28,250 --> 00:14:30,800 we could have a chat here on the window on the right 324 00:14:30,800 --> 00:14:34,430 and be able to help me figure out what's wrong with my code just to the left 325 00:14:34,430 --> 00:14:36,090 there. 326 00:14:36,090 --> 00:14:39,790 If you write more complex programs, the outline tab might be more useful. 327 00:14:39,790 --> 00:14:43,020 So really quickly, I'm just going to create a dummy function that 328 00:14:43,020 --> 00:14:44,920 does nothing at all. 329 00:14:44,920 --> 00:14:48,270 But when I do, notice that now I have gotten 330 00:14:48,270 --> 00:14:50,522 this little extra item in my outline. 331 00:14:50,522 --> 00:14:52,230 And if I click on the different portions, 332 00:14:52,230 --> 00:14:54,063 it will jump me to that section of the code. 333 00:14:54,063 --> 00:14:56,160 So as my files get really, really big, and maybe I 334 00:14:56,160 --> 00:14:58,770 want to scroll quickly through them, I can use the outline tab 335 00:14:58,770 --> 00:15:01,410 to jump to different functions in my programs. 336 00:15:01,410 --> 00:15:02,850 That's also pretty useful. 337 00:15:02,850 --> 00:15:05,220 And then finally, here on the right, is the debugger. 338 00:15:05,220 --> 00:15:10,490 And we're going to cover that in a separate video on debugging shortly. 339 00:15:10,490 --> 00:15:12,510 But know that all these features and more, 340 00:15:12,510 --> 00:15:15,184 if you dig into some of the other things around the perimeter 341 00:15:15,184 --> 00:15:17,850 or dig into some of those menus at the top, are available to you 342 00:15:17,850 --> 00:15:21,090 in the CS50 IDE, trying to make your experience getting 343 00:15:21,090 --> 00:15:26,440 started writing code in a text-based programming language a little better. 344 00:15:26,440 --> 00:15:29,100 I'm Doug Lloyd, this is CS50. 345 00:15:29,100 --> 00:15:30,710