Skip to content

Commit

Permalink
incorporate feedback from teaching teachers session; add 'programming…
Browse files Browse the repository at this point in the history
… skills' preso
  • Loading branch information
alexch committed May 2, 2011
1 parent 99696d0 commit 241f816
Show file tree
Hide file tree
Showing 5 changed files with 219 additions and 59 deletions.
7 changes: 7 additions & 0 deletions beginners/hello.rb
@@ -0,0 +1,7 @@
require 'rubygems'
require 'sinatra'

get '/' do
"<b>Hello, <i>bang bang</i>!"
end

72 changes: 72 additions & 0 deletions beginners/programming_skills.md
@@ -0,0 +1,72 @@
# Programming Skills

This presentation covers the basic skills required to be a programmer...

...that **don't** involve actually writing code.

# Files and Directories

* The House/Rooms/Drawers Metaphor
* directories store files and keep everything in your ‘house’ organized

# The Command Line

ls
cd
pwd
echo
touch
cat
mv
cp
rm

# Special Directories

* Current directory
* `.` ("dot")
* Parent directory
* `..` ("dot dot")
* Home directory
* `~` ("tilde")

# More about directories

* Explain where home and root are located in relation to all directories.
* Explain difference between absolute paths (starting with a /) and relative paths.

# Text Editing

* text editor vs. word processor
* similarities and differences
* Have group open editor, create and save file with explanation of how and where files are stored.
* after change, go to command line and `cat` the file to see
* Explain file extensions and file types.
* File types tell the editor how to color the special words in each language.
* Explain difference between the buffer (in the editor’s memory) and the file (stored on disk).
* Emphasize the importance of saving the buffer to a file before trying to run it with ruby.
* "Save" makes things unsafe

# Compilers, Interpreters and Programming Languages

* Use metaphor of programming language as an agreed set of rules about syntax for writing source code that is sent to the interpreter and translated into byte code.
* Explain that byte code is the binary that machines understand and use for executing instructions.
* Use metaphor that CPU is like a guy in a factory executing commands that it is handled, and the source code are those instructions.
* Explain differences between compiled vs. dynamic languages.
* Tie everything together by explaining that source code are instructions that are translated into language that machines understand and can execute.

# Memory, CPU, Hard Disk

* Very briefly explain how a computer works and all the moving parts (literally) starting with hard drive, memory, and CPU.
* Give the group basic understanding of where the source code is stored and how and where it is executed.

# Operating System

![](img/os_x_logo.jpg)
![](img/windows_logo.gif)
![](img/linux_logo.gif)

* The OS is a program that runs other programs
* the term "multitasking" actually started with computers and migrated to common usage
* It also helps programs communicate with hardware (video, memory, disk, network...)

25 changes: 25 additions & 0 deletions beginners/programming_intro.md → beginners/ruby_for_beginners.md
Expand Up @@ -146,6 +146,31 @@ The easy way, with "do...end" rather than "{...}"
plum
=> ["kiwi", "strawberry", "plum"]

!SLIDE
# Sinatra

## hello.rb

@@@ Ruby
require 'rubygems'
require 'sinatra'

get '/' do
"<b>Hello, <i>bang bang</i>!"
end

!SLIDE commandline
# Sinatra

$ gem install sinatra
$ ruby hello.rb
== Sinatra/1.2.6 has taken the stage on 4567 for development with backup from Thin
>> Thin web server (v1.2.7 codename No Hup)
>> Maximum connections set to 1024
>> Listening on 0.0.0.0:4567, CTRL+C to stop

then open a browser to <http://localhost:4567/>

!SLIDE

## Now we've done some Ruby...
Expand Down
4 changes: 3 additions & 1 deletion intro_to_ruby/ruby_intro.md
Expand Up @@ -361,7 +361,9 @@ Blocks can also return a value. Map translates each item in an array.

!SLIDE

# Ruby Quickstart for Refugees:
# Ruby Quickstart for Refugees

<https://gist.github.com/190567>

--

Expand Down

0 comments on commit 241f816

Please sign in to comment.