-
Notifications
You must be signed in to change notification settings - Fork 3
Expand file tree
/
Copy pathindex.html
More file actions
139 lines (107 loc) · 5.47 KB
/
index.html
File metadata and controls
139 lines (107 loc) · 5.47 KB
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
<html>
<head>
<title>Test-First Teaching: learn_ruby: learn_ruby</title>
<link href="assets/style.css" media="screen" rel="stylesheet" type="text/css" />
</head>
<body>
<div class="header">
<h1><a href="http://testfirst.org">TestFirst.org</a></h1>
<h2>the home of test-first teaching</h2>
</div>
<div class="nav">
<h2><a href="index.html">learn_ruby</a></h2>
<b>Labs:</b>
<ul>
<li><a href="00_hello/index.html">00 Hello</a></li>
<li><a href="01_temperature/index.html">01 Temperature</a></li>
<li><a href="02_calculator/index.html">02 Calculator</a></li>
<li><a href="03_simon_says/index.html">03 Simon Says</a></li>
<li><a href="04_pig_latin/index.html">04 Pig Latin</a></li>
<li><a href="05_silly_blocks/index.html">05 Silly Blocks</a></li>
<li><a href="06_performance_monitor/index.html">06 Performance Monitor</a></li>
<li><a href="07_hello_friend/index.html">07 Hello Friend</a></li>
<li><a href="08_book_titles/index.html">08 Book Titles</a></li>
<li><a href="09_timer/index.html">09 Timer</a></li>
<li><a href="10_temperature_object/index.html">10 Temperature Object</a></li>
<li><a href="11_dictionary/index.html">11 Dictionary</a></li>
<li><a href="12_rpn_calculator/index.html">12 Rpn Calculator</a></li>
<li><a href="13_xml_document/index.html">13 Xml Document</a></li>
<li><a href="14_array_extensions/index.html">14 Array Extensions</a></li>
<li><a href="15_in_words/index.html">15 In Words</a></li>
</ul>
</div>
<h1>learn_ruby</h1>
<div class="content"><h1>Learn Ruby Test-First</h1>
<h2>Setup</h2>
<ul>
<li><p>Install Ruby</p>
<ul>
<li>You will need Ruby, RubyGems and RSpec to Learn Ruby.</li>
<li>We recommend using <code>rvm</code></li>
</ul>
</li>
<li><p>Open a terminal window.</p></li>
<li><p>Install RSpec (this tutorial was initialy written in rspec 2 which we will use)</p>
<pre><code> gem install rspec -v '~>2'
</code></pre></li>
<li><p>Enter the course directory. (That's the same directory that this <code>index.html</code> file is in.)</p>
<pre><code> cd learn_ruby
</code></pre></li>
<li><p>Enter the <code>00_hello</code> lab.</p>
<pre><code> cd 00_hello
</code></pre></li>
<li><p>Open the lab's <a href="./00_hello/index.html">index.html</a> file in a web browser and follow the instructions there.</p>
<pre><code> open index.html # this works on Mac OS X only!
</code></pre></li>
</ul>
<h2>Using These Exercises</h2>
<p>Your course directory has a list of lab directories. Each
directory has a spec file. You will write all the code to make all the specs
in it pass.</p>
<p>To get your feet wet in this process, go into the "hello" lab with <code>cd
00_hello</code> and read the detailed instructions in its <code>index.html</code> file.</p>
<p>If you got through "hello", then congratulations! Now it's time to go to the
next directory (whose name begins with <code>01_</code>) and start learning Ruby!</p>
<h2>Course Outline</h2>
<p>Each course is different, so check with your instructor for details on the
curriculum he or she has chosen. Here is a survey of a few of the labs:</p>
<ul>
<li><strong>hello</strong>
Gives you a feel for how to use these tests.
See <a href="00_hello/index.html">00_hello/index.html</a> for detailed instructions.</li>
<li><strong>temperature</strong>
Write and class and do some basic math.</li>
<li><strong>calculator</strong> introduces a little more math, and you'll need to iterate.</li>
<li><strong>pig_latin</strong> lets you manipulate strings.</li>
<li><strong>in_words</strong> asks a number to say itself in English. Extend a built-in class. By the end you'll use conditionals, arrays, iteration, and maybe even some recursion.</li>
<li><strong>blocks</strong> introduces block syntax, including <code>yield</code></li>
</ul>
<h1>Problems? Questions?</h1>
<p>First, ask your neighbor. Then, ask your instructor.</p>
<p>Then ask Google (seriously!). If there's an error, try copying the error string and pasting it into a <a href="http://google.com">Google</a> search box. If that doesn't help, do a search on one of these sites:</p>
<ul>
<li><a href="http://stackoverflow.com/">http://stackoverflow.com/</a></li>
</ul>
<p>You can also find help at the <a href="http://testfirst.org">TestFirst.org</a> site or the <a href="http://groups.google.com/group/test-first-teaching">Test-First Teaching mailing list</a>.</p>
<p>And many related lectures, notes and videos are at <a href="http://CodeLikeThis.com">http://CodeLikeThis.com</a>.</p>
<p>Remember, if you post a technical question online, you should</p>
<ol>
<li><p>Include version numbers:</p>
<pre><code> $ ruby -v
ruby 1.8.6 (2008-08-11 patchlevel 287) [universal-darwin9.0]
</code></pre></li>
<li><p>Note where you have already looked for an answer</p></li>
<li>If you can, include code snippets that reproduce the problem in isolation</li>
</ol>
<h1>Solutions and Submissions</h1>
<p>This Github repo (<code>learn_ruby</code>) is <em>generated</em> from a different Github repo, <a href="http://github.com/ultrasaurus/test-first-teaching">http://github.com/ultrasaurus/test-first-teaching</a>.</p>
<h1>Credits</h1>
<ul>
<li>Concept by Alex Chaffee</li>
<li>Exercises by Alex Chaffee, Sarah Allen, Liah Hansen, Kai Middleton</li>
<li>Early quality assurance by Sumiki, Dimitri, Liah, Michael, and Brendan</li>
</ul>
</div>
<div class="footer"><a href="http://testfirst.org">TestFirst.org</a></div>
</body>
</html>