-
Notifications
You must be signed in to change notification settings - Fork 0
/
teacher_notes.html
125 lines (96 loc) · 5 KB
/
teacher_notes.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
<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_temperature_object/index.html">08 Temperature Object</a></li>
<li><a href="09_book_titles/index.html">09 Book Titles</a></li>
<li><a href="10_timer/index.html">10 Timer</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>Teacher Notes</h1>
<h2>Slides</h2>
<p>Some slides are in test-first-teaching/ruby_notes. They're in Markdown+Showoff format, which means they should be usable either as slides</p>
<pre><code>cd ruby_notes
showoff ruby_notes
</code></pre>
<p>or plain HTML</p>
<pre><code>cd ruby_notes
rdiscount *.md > index.html
</code></pre>
<h2>Rules (for students)</h2>
<ul>
<li>Always read the error!</li>
</ul>
<h2>Solutions</h2>
<p>The <code>solutions</code> branch is dead; long live the <code>solution</code> directory.</p>
<p>To add a solution, you must put your Ruby file(s) in a directory <strong>inside</strong> the lab directory with the name <code>solution</code>, e.g. <code>learn_ruby/hello/solution/hello.rb</code>.</p>
<p>Solutions only appear in the teacher repository (<code>test-first-teaching</code>) not the generated student repo (<code>learn_ruby</code>). When you run <code>rake</code> the tests will be run against the solutions, to assure that your code is correct.</p>
<p>Make sure not to check in any cruft in the lab directory, since that will be seen by (and surely befuddle) students.</p>
<p>Multiple solutions aren't supported yet.</p>
<h2>Notes and instructions</h2>
<p>Every lab has (or can have) a <code>index.md</code> file that the students can read. This is a good place for background, instructions and hints for solving the exercises.</p>
<p>Files ending with <code>.md</code> (Markdown) are converted to HTML and given a <code>.html</code> suffix, and files ending with <code>.scss</code> (Sass/SCSS) are converted to CSS and given a <code>.css</code> suffix. Any other files will be copied over to the student repo as is.</p>
<p>Lab directories become numbered; e.g. <code>hello</code> will become <code>00_hello</code>.</p>
<p>Each curriculum contains an <code>assets</code> directory, which is a good place to put shared files like <code>.js</code> and <code>.css</code> and images. You can refer to them using <code>..</code> in your markdown files, e.g.</p>
<pre><code>![logo](../assets/logo.gif)
</code></pre>
<p>This works in "preview mode" too, though it's a little weird, since <code>.scss</code> isn't converted into <code>.css</code> until the course is built using <code>rake build</code>.</p>
<p>There's also a <code>ubiquitous</code> directory, whose contents are copied into each and every generated lab directory.</p>
<h2>Tricks</h2>
<p>Here are some nice git config settings:</p>
<pre><code>git config --global alias.st status
git config --global alias.ci commit
git config --global alias.co checkout
git config --global alias.br branch
git config --global alias.unadd "reset HEAD"
git config --global alias.l "log --oneline --decorate --graph"
git config --global push.default matching
git config --global color.branch=auto
git config --global color.diff=auto
git config --global color.interactive=auto
git config --global color.status=auto
</code></pre>
<p>Or, you can edit <code>$HOME/.gitconfig</code> -- you should have sections like this:</p>
<pre><code>[color]
branch = auto
diff = auto
interactive = auto
status = auto
[alias]
st = status
ci = commit
co = checkout
br = branch
unadd = reset HEAD
l = log --oneline --decorate --graph
[push]
default = matching
</code></pre>
</div>
<div class="footer"><a href="http://testfirst.org">TestFirst.org</a></div>
</body>
</html>