You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: hello/index.md
+21-31Lines changed: 21 additions & 31 deletions
Original file line number
Diff line number
Diff line change
@@ -14,52 +14,31 @@ Here's your first C program:
14
14
You have seen it in lecture, and now you're ready to try running it yourself.
15
15
16
16
17
-
## Getting your own IDE
17
+
## Dive into your development environment
18
18
19
-
The CS50 IDE is an online environment in which you can write code, compile your programs and debug those using built-in tools. Use the following steps to request your personal IDE account.
19
+
Go to your Terminal. You should find that its "prompt" resembles the below.
20
20
21
-
- Create an account on [GitHub](https://github.com/join). This website is used by software developers around the world to collaborate. In later courses, you might use the website directly to put your own programs on! However, for this course, we just use GitHub's login mechanism to allow you access to a few other websites created by Harvard's CS50 team.
21
+
jharvard@somewhere ~ %
22
22
23
-
- Head to [ide.cs50.io](https://ide.cs50.io/) and log into CS50 IDE using the GitHub account that you created. If all is well, you should then be informed that CS50 IDE (aka Cloud9, the software that underlies CS50 IDE) is "creating your workspace" and "creating your container," which might take a moment. You should eventually see your workspace. If not, take it up with the support staff right away!
23
+
Click inside of that terminal window and then type (on Mac OS):
24
24
25
+
mkdir ~/Documents/problems
25
26
26
-
## Dive into the IDE
27
-
28
-
Head to [ide.cs50.io](https://ide.cs50.io/) and click "Sign in with GitHub" to access. Once your IDE loads, you should see that (by default) it's divided into three parts. Toward the top of CS50 IDE is your "text editor", where you'll write all of your programs. Toward the bottom of is a "terminal window" (light blue, by default), a command-line interface (CLI) that allows you to explore your workspace's files and directories, compile code, run programs, and even install new software. And on the left is your "file browser", which shows you all of the files and folders currently in your IDE.
29
-
30
-
Start by clicking inside your terminal window. You should find that its "prompt" resembles the below.
31
-
32
-
~/ $
33
-
34
-
Click inside of that terminal window and then type
35
-
36
-
mkdir ~/problems
37
-
38
-
followed by Enter in order to make a directory (i.e., folder) called `problems` inside of your home directory. You should see in the file list on the left that your first folder has been created. We call it `problems` so it can contain all programs that you write for the course.
27
+
followed by Enter in order to make a directory (i.e., folder) called `problems` inside of your Documents directory.
39
28
40
29
Here on out, to execute (i.e., run) a command means to type it into a terminal window and then hit Enter. Commands are "case-sensitive," so be sure not to type in uppercase when you mean lowercase or vice versa.
41
30
42
31
Now execute
43
32
44
-
cd ~/problems/
33
+
cd ~/Documents/problems/
45
34
46
35
to move yourself into (i.e., open) that directory. Your prompt should now resemble the below.
47
36
48
-
~/problems/ $
37
+
problems %
49
38
50
39
If not, retrace your steps and see if you can determine where you went wrong.
51
40
52
-
Now execute
53
-
54
-
mkdir ~/problems/hello
55
-
56
-
to create a new directory called `hello` inside of your `problems` directory. Then execute
57
-
58
-
cd ~/problems/hello
59
-
60
-
to move yourself into that directory.
61
-
62
-
Now, point to the File menu and choose New. This will open a new editor with a blank "Untitled1" file in it. First thing to do is to give it a name and save it into your new directory. Press **CTRL-S** or **Cmd-S** to open the file dialog. For **Filename**, type `hello.c`. Then below, choose (click) the `problems` and then `hello` folder that you just created and click on **Save**.
41
+
Now, open Atom, point to the File menu and choose New. This will open a new editor with a blank "Untitled1" file in it. First thing to do is to give it a name and save it into your new directory. Press **CTRL-S** or **Cmd-S** to open the file dialog. For **Filename**, type `hello.c`. Then below, choose (click) the `Documents`, then the `problems` folder that you just created and click on **Save**.
63
42
64
43
In your new file, type the C code for "Hello, World" as seen above. Save it once more.
65
44
@@ -111,7 +90,18 @@ Hello there again!
111
90
112
91
## Making things easier
113
92
114
-
Recall that we can automate the process of executing `clang`, letting `make` figure out how to do so for us, thereby saving us some keystrokes. Execute the below to compile this program one last time.
93
+
Recall from lecture that we can automate the process of executing `clang`, letting `make` figure out how to do so for us, thereby saving us some keystrokes.
94
+
95
+
Create a new file called `Makefile` (no dot! no extension) and enter into it the following lines:
Copy file name to clipboardExpand all lines: mario/less/index.md
-4Lines changed: 0 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -205,10 +205,6 @@ Execute the below to evaluate the correctness of your code using `check50`. But
205
205
206
206
check50 -l minprog/cs50x/2020/mario/less
207
207
208
-
Execute the below to evaluate the style of your code using `style50`.
209
-
210
-
style50 mario.c
211
-
212
208
### Hint
213
209
214
210
A space is just a press of your space bar, just as a period is just a press of its key! Just remember that `printf` requires that you surround both with double quotes!
0 commit comments