344 words — 2 minutes read

71 - teaching

Last year I started to work at the ZHAW (were work means: part time, coaching student teams of two on a semester long software project).

This year, I’m co-teaching a “Web Application Programming” course for the next semester. My colleague Beat kicked it off last week and I had two classes of around 18 students for 90 minutes each today. We went through the architecture of Rails applications (did I say, that the course is based on Rails - how cool is that?), MVC and some Ruby basics. I was worried in the beginning, that this was too little content for a lecture of 90 minutes, but I managed to spend all 90 minutes talking and introducing the students to Rails and Ruby.

Most fun was the intro to Ruby. We just went through the basic data types, some methods on strings and method definitions.

One thing that usually blows the minds of students is to write a “celsius to fahrenheit” converter function, make it more Ruby like and then then turn it into a method on all numbers:

# version 1
def c_to_f(celsius)
  f = celsius * 9 / 5.0 + 32
  return f
end

# version 2
def c_to_f celsius
  celsius * 9 / 5.0 + 32
end

# version 3
class Numeric
  def to_fahrenheit
    self * 9 / 5.0 + 32
  end
end

37.2.to_fahrenheit # => 98.96000000000001

The satisfying thing for me is to see when the students “get’it” - and there were quite a few A-ha moments during the two classes. There were also a few critical voices (“unmaintainable”, “shoot yourself in the foot”, …) - let’s see how they will like to work with Rails during the next few weeks.

What I learnt (or re-learnt) is that I really enjoy teaching and that I enjoy the contact with a bunch of students. Even though I taught the same material two times in a row, the two lessons focused on totally different things. Another of the joys of teaching.

Next week: Github and Heroku and the first Rails App deployment.

Jens-Christian Fischer

Maker. Musician