IT Initiative - Information Technology and the blind or visually impaired logo.
Information Technology in the School Banner
Image of a studious person

National Federation of the Blind Chapter Home Page.

Skip to main content

Initiative Home

Students

Parents, Employers,
Teachers

Workshop Modules

  1. Information Technology Career Opportunities
  2. “Hands On” Beginner Programming
  3. Introduction to the Internet
  4. Email and Mailing Lists
  5. Information Resources of the Internet
  6. Computer Tools (Word, Excel)

Module 2 - “Hands On” Beginner Programming Class Script

The purpose of this session is to answer the question "What is a program?". The Ruby programming language is an easy to use and learn programming language. It is an interpretive, interactive language that allows statements to be entered an executed as the student enters them. The results are displayed immediately. This will allow easy "hands-on" teaching of how to enter and execute a simple program. An added advantage of Ruby lends itself readily to JAWS, increased font size and magnifying needs.

Aproximate time:

90 minutes (plus 15-30 minutes for installing ruby)

Preparation for Using Ruby

Ruby needs to be installed on each PC to be used by the student. The steps below describe the process. If a PC does not have Internet access to the Ruby download site, a copy of the Ruby program must be made to a CD. There are 2 processes described:

  • Using the Internet to install Ruby files
  • Using a CD created from a PC which installed ruby.

1. Installing Ruby from the Internet

2. Using a CD

The first process describes creating a “Ruby” cd from the installion described above. The second process describes how to install the “Ruby” files in the student's PC.

2a. Creating a CD for other PCs

 

  • Copy the rc2 file in \downloads\ruby onto a CD
  • Copy the ehruby.bat file
  • copy this .doc file

2b. Installing Ruby from the CD

  • Create C:\ruby directory
  • copy the rc2 file into the directory. Then double click the rc2 file and the install wizrad screen will show.
  • Create my documents\ruby folder
  • cd to it
  • Copy EHRUBY.BAT from the CD.

3. Executing the class exercises

  • To execute RUN on start menu, enter “cmd.exe”
  • cd my documents\ruby
  • Type “irb --noprompt”
  • To execute a ruby source file, type ruby calc.rb f

For interactive ruby reference look at http://www.rubycentral.com/pickaxe/irb.html
Notes:

  • he fxri interactive desktop icon creates an interactive IDE. But, it might be too much for screen readers.
  • The SciTE desktop icon is the SciTE IDE Editor.

Note 2

“Hands-On Exercises”

Use as a calculator
3+2, 8/2, 1*2, 3-2
a =1, b=2, c=3, d=8
c+b, d/b, a*b, c-b
Strings and Puts
puts “Hi”
x =”Hi There ”
Puts x
Student = “Andy “
Puts x+ Student

A Few Things to Try

Write a program which tells you:

  • how many hours are in a year?
  • how many minutes are in a decade?
  • how many seconds old are you?
  • how many chocolates do you hope to eat in your life?
    Warning: This part of the program could take a while to compute!

 

Flow Control
puts 1<2
puts 2>1
puts 2<1

puts 1==1
puts 1==2
puts 1!=1
puts 1!=2

name = “Jesus”
if name==”Jesus”
puts “What a great name “+name
end

Lists
i=[“”Jesus”,”Jennifer”,”Andy”]
puts I

Loop
while b < 10
print b

  • b=b+1
  •  Decision
  • a=1
  • if a == 1: print "Yes"

Create a couple rb example files that can be looked at

- student should get interesting project
- individually consider each student's interests
- continue, don't drop off
- the fact that the language was wasy allowed the student to add/change and get more interested in knowing more.
-visual studio will require scripts (advanced)


Between Python and Ruby for a beginner, I recommend Ruby.  It has an
interactive shell that is even more speech friendly than Python's.
Indentation is optional, not required, and automatic code formatters are
available.  An excellent tutorial that teaches programming through Ruby is
available at the following web page:

Top