[Courses] [Ruby] Lesson 0: Installing, References, and your first
homework assignment
Darlene Wallach
wallachd at earthlink.net
Mon Nov 28 09:40:47 EST 2005
Laurel Fan wrote:
> = Lesson 0: Installing and Documentation References
[snip]
> == Homework
[snip]
>
> First, introduce yourself. Do you know any other programming
> languages? What do you like/not like about them? Why are you
> interested in Ruby? What are some things you'd like to learn to do?
>
Hi,
Laurel - thank you for the Ruby course!
My name is Darlene. I'm getting a late start on the Ruby course.
I'm an unemployed software engineer who did most of my work using
"C" and korn shell scripts.
I used to be very passionate about software but since returning
from almost 2 months in Palestine in 2002, I've been more passionate
about Palestine and other related political issues. I'm trying to
get my feet back in the software arena.
I heard good things about Ruby and kind of got an introduction last year
with a hands-on Ruby track with the Silicon Valley Patterns group. I'm
interested in learning Ruby and using it. I'm recently read Ruby on
Rails articles in the Linux Journal by Reuven Lerner. Rails seems very
impressive too.
> Second, find and run any ruby program. It can be something you wrote,
> something you downloaded (hint, look on RubyForge), an example you
> copied out of a book, something a friend wrote for you, etc.
>
> Finally, look at the code. Find a section of about 5-20 lines of
> code, and try to figure out what it does. If you figure it out (or
> just have a good guess), explain it to us. If not, show us the code
> and we'll try to explain it.
>
Here is one of the ruby scripts from execises during the Ruby track
last year:
# Define a method named "even" which takes one argument, an array of
# integers, and which returns an array consisting of the even integers
# (if any) from the argument array.
class ExerciseE
def even(startArray)
evenArray = Array.new()
startArray.each do |x|
if (x % 2) == 0
evenArray.push(x)
end
end
return evenArray
end
end
--
World Centric Fair Trade & Eco Store
http://www.worldcentric.org/store/
We have created and live in a world of gross social
and economic inequalities[1] and are at the same
time severely impacting[2] the natural eco-systems
and regenerating bio-capacity of the planet. Our
every action has an impact on the well-being of our
planet and our everyday decisions[3] can help create
a better world for all. In keeping with this fact
and our vision, the World Centric Fair Trade/Eco
Online Store provides everyday consumption choices,
which can help minimize social & economic
inequalities, reduce the impact of our consumption
on the environment and help create a better and
sustainable world.
[1] http://www.worldcentric.org/stateworld/socialjustice.htm
[2] http://www.worldcentric.org/stateworld/environment.htm
[3] http://www.worldcentric.org/sustain/index.htm
More information about the Courses
mailing list