forked from cherimarie/gdi-ruby
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathclass0.html
322 lines (278 loc) · 13.1 KB
/
class0.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="utf-8">
<title>Intro to Ruby ~ Girl Develop It</title>
<meta name="description" content="This is the official Girl Develop It Core Intro to Ruby course. The course is meant to be taught in four two-hour sessions. Each of the slides and practice files are customizable according to the needs of a given class or audience.">
<meta name="author" content="Girl Develop It">
<meta name="apple-mobile-web-app-capable" content="yes" />
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent" />
<link rel="stylesheet" href="reveal/css/reveal.css">
<link rel="stylesheet" href="reveal/css/theme/gdicool.css" id="theme">
<!-- For syntax highlighting -->
<!-- light editor--><link rel="stylesheet" href="reveal/lib/css/light.css">
<!-- dark editor<link rel="stylesheet" href="reveal/lib/css/dark.css">-->
<!-- If use the PDF print sheet so students can print slides-->
<link rel="stylesheet" href="reveal/css/print/pdf.css" type="text/css" media="print">
<!--[if lt IE 9]>
<script src="lib/js/html5shiv.js"></script>
<![endif]-->
</head>
<body>
<div class="reveal">
<!-- Any section element inside of this container is displayed as a slide -->
<div class="slides">
<!-- Opening slide -->
<section>
<img src = "images/gdi_logo_badge.png" alt="GDI Logo Badge">
<h3>Intro to Ruby</h3>
<h4>Class 0</h4>
</section>
<!-- Welcome-->
<section>
<h3>Welcome!</h3>
<div class = "left-align">
<p>Girl Develop It is here to provide affordable and accessible programs to learn software through mentorship and hands-on instruction.</p>
<p class ="green">Some "rules"</p>
<ul>
<li>We are here for you!</li>
<li>Every question is important.</li>
<li>Help each other.</li>
<li>Have fun!</li>
</ul>
</div>
</section>
<section>
<h3>Welcome!</h3>
<div class = "left-align">
<p class = "green">Tell us about yourself.</p>
<ul>
<li>Who are you?</li>
<li>What do you hope to get out of this class?</li>
<li>What is your favorite ice cream or frozen dessert?</li>
</ul>
</div>
</section>
<section>
<h3>What we will cover today</h3>
<ul>
<li>Installing Ruby</li>
<li>Installing all the other tools you'll need</li>
<li>Command Line Basics</li>
</ul>
</section>
<!-- Part 1: Installfest, 60 minutes -->
<section>
<h3>A little help from our friends...</h3>
<p>We'll be using Railsbridge's Installfest instructions to get set up. <a href="http://railsbridge.org/" alt="railsbridge home">Railsbridge</a> is an awesome organization that we're friends with and you should be, too! </p>
</section>
<section>
<h3>Installfest</h3>
<p>Just work through the instructions for your operating system. <strong>Stop after the "Install an Editor" step.</strong> Ask a volunteer for help if you get stuck or lost. This process should take about an hour.</p>
<p class="green">Here it is!</p>
<p><a href="http://docs.railsbridge.org/installfest/" alt="railsbridge installfest">http://docs.railsbridge.org/installfest/</a></p>
</section>
<!-- Part 2: Intro to Terminal, 20 minutes -->
<section>
<h3>Intro to Terminal</h3>
<p>Working in the terminal can be really intimidating at first!</p>
<p>With practice, navigation and file manipulation is significantly faster in the terminal than in the GUI.</p>
<p>Professional software developers use the terminal all the time, and this class will require some use of it.</p>
</section>
<section>
<h3>Intro to Terminal</h3>
<p>Mac & Linux users: Open <strong>Terminal</strong></p>
<p>Windows users: Open <strong>Command Prompt With Ruby on Rails</strong></p>
<br />
<p>We will not be using Windows "cmd" program, as it uses a different syntax than *NIX systems.</p>
</section>
<section>
<h3>Intro to Terminal Prompt</h3>
<p>The line that appears in the terminal when you open it is called the prompt. It usually contains information about the user and current directory. It can be customized.</p>
<img src="images/prompt1.png" alt="example prompt">
<img src="images/prompt2.png" alt="example prompt">
<img src="images/prompt3.png" alt="example prompt">
<img src="images/prompt4.png" alt="example prompt">
<img src="images/prompt5.png" alt="example prompt">
<p>Terminal instructions often start a line with a $. This represents the last character in the prompt, you don't need to type it.</p>
</section>
<section>
<h3>Terminal Cheatsheet</h3>
<table style="font-size: 20px; line-height: 1.4em;">
<tr>
<td>.</td>
<td>the current directory- ex: "touch ./wow.txt"</td>
</tr>
<tr>
<td>..</td>
<td>the parent of current directory - ex: "cd ../RubyParty"</td>
</tr>
<tr>
<td>~</td>
<td>the root directory- ex: "cd ~/Pictures"</td>
</tr>
<tr>
<td>cd [location]</td>
<td>"change directory" to [location]</td>
</tr>
<tr>
<td>pwd</td>
<td>"present working directory" - where am I?</td>
</tr>
<tr>
<td>ls -al</td>
<td>"list all" of the contents of current directory, including invisible ones</td>
</tr>
<tr>
<td>touch [filename.extension]</td>
<td>create a file called filename.extension in the current directory</td>
</tr>
<tr>
<td>mkdir [directoryname]</td>
<td>create a directory called directoryname in the current directory</td>
</tr>
<tr>
<td>rm [filename]</td>
<td>"remove" (delete) the file called filename</td>
</tr>
<tr>
<td>rm -rf [directoryname]</td>
<td>"remove recursively with force" the directory called directoryname</td>
</tr>
<tr>
<td>clear OR cmd+k</td>
<td>clear the terminal screen</td>
</tr>
<tr>
<td>help</td>
<td>lists all possible commands</td>
</tr>
<tr>
<td>man [command]</td>
<td>displays the manual for command</td>
</tr>
</table>
</section>
<section>
<h3>Terminal Activities</h3>
<pre><code class="terminal">
# navigate to your hard drive
cd ~/ #Linux, Mac
cd C:\ #Windows
# make a directory called code
mkdir code
# navigate into the directory
cd code
</code></pre>
</section>
<section>
<h3>Terminal Activities Continued</h3>
<pre><code class="terminal">
# make a directory called gdi_class0
mkdir gdi_class0
# navigate into the directory
cd gdi_class0
# create a file
touch class0.rb
# list the contents of the directory
ls
</code></pre>
</section>
<section>
<h3>Terminal Activities</h3>
<pre><code class="terminal">
man ls
</code></pre>
<p>Output:</p>
<img src="images/manls.png" alt="ls manual contents">
</section>
<section>
<h3>Questions?</h3>
</section>
<section>
<h3>What is programming?</h3>
<ul>
<li class="fragment">Teaching the computer to do a task.</li>
<li class="fragment">A program is made of one or more files of code, each of which solve part of the overall task.
</li>
<li class="fragment">Programming code is human readable but also needs a form that the computer can run directly.
This form is not human readable.
</li>
<li class="fragment">Programming is just learning a language that computers can use</li>
</ul>
</section>
<section>
<h3>Programming Languages are also read by people</h3>
<br></br>
<p class="fragment">"Code is written once, but read many times"</p>
<p class="fragment">Code that's easy to read is also actually easier to write too</p>
</section>
<section>
<h3>Writing code the easy way</h3>
<br></br>
<ul>
<li class="fragment">Break each requirement into the shortest possible sentence to describe it</li>
<li class="fragment">Write each sentence as a comment</li>
<li class="fragment">Translate each sentence into code</li>
<li class="fragment">Read the comments to make sure code does what we wanted</li>
</ul>
<br></br>
<pre>
<code contenteditable class="ruby fragment">
# comments are just text annotations in code
# denote a comment in ruby using the hash/pound/octothorpe
# text in comments is ignored by interpreters and compilers
</code>
</pre>
</section>
<section>
<h3>Let's Develop It!</h3>
<br></br>
<p class="fragment">Let's write out the sentences for a small program that takes in a users age and returns their age in dog years</p>
</section>
<section>
<h3>Homework</h3>
<p><strong>Practice:</strong> Practice navigating and creating/removing documents and directories with the command line using <a href="http://cli.learncodethehardway.org/book/">"The Command Line Crash Course"</a> ending with the section called "Moving a file." You can optionally work through the whole lesson.</p>
<p><strong>Prep:</strong> Work through Code Academy's <a href="http://www.codecademy.com/courses/ruby-beginner-en-d1Ylq/0/1?curriculum_id=5059f8619189a5000201fbcb" alt="Code Academy">"Intro to Ruby"</a>. If you don't have previous programming experience, read Chapters 1 and 2 in <a href="https://pine.fm/LearnToProgram/?Chapter=01" alt="Learn to Program">Learn to Program</a> - don't try to do the exercises at the end, though. </p>
</section>
<section>
<h3>Resources</h3>
<p>Learning is more fun with people! </p>
<ul>
<li>Start a study group with some classmates</li>
<li>Attend the <a href="http://www.meetup.com/Girl-Develop-It-Atlanta/" alt="GDI Code & Coffee info">GDI Code & Coffee</a> extra help and study time.</li>
<li>Attend the <a href="http://www.meetup.com/Rails-Girls-Atlanta/" alt="Rails Girls Atlanta info">Rails Girls Atlanta</a> meetup with women learning Ruby and Rails.</li>
<li>Attend the <a href="http://www.meetup.com/Women-Who-Code-Atlanta/" alt="Women Who Code Atlanta info">Women Who Code Atlanta</a> Code Jams and monthly meetups to study and learn about being a developer.</li>
</ul>
</section>
</div>
<footer>
<div class="copyright">
Intro to Ruby ~ Girl Develop It ~
<a rel="license" href="http://creativecommons.org/licenses/by-nc/3.0/deed.en_US"><img alt="Creative Commons License" style="border-width:0" src="http://i.creativecommons.org/l/by-nc/3.0/80x15.png" /></a>
</div>
</footer>
<script src="reveal/lib/js/head.min.js"></script>
<script src="reveal/js/reveal.min.js"></script>
<script>
// Full list of configuration options available here:
// https://github.com/hakimel/reveal.js#configuration
Reveal.initialize({
controls: true,
progress: true,
history: true,
theme: Reveal.getQueryHash().theme, // available theme are in /css/themes
transition: Reveal.getQueryHash().transition || 'default', // default/cube/page/concave/zoom/linear/none
// Optional libraries used to extend on reveal.js
dependencies: [
{ src: 'reveal/lib/js/classList.js', condition: function() { return !document.body.classList; } },
{ src: 'reveal/plugin/markdown/showdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'reveal/plugin/markdown/markdown.js', condition: function() { return !!document.querySelector( '[data-markdown]' ); } },
{ src: 'reveal/plugin/highlight/highlight.js', async: true, callback: function() { hljs.initHighlightingOnLoad(); } },
{ src: 'reveal/plugin/zoom-js/zoom.js', async: true, condition: function() { return !!document.body.classList; } },
{ src: 'reveal/plugin/notes/notes.js', async: true, condition: function() { return !!document.body.classList; } }
]
});
</script>
</body>
</html>