I have now finished teaching ruby to beginning programmers in a mixed class of postgrads and first years students. All in all it went ok. However, there are some things that I will do differently next year. Using small jumps each week seemed to go ok. I used lots of images on the slides and illustrated each lecture with live demos, which seemed to work ok too. Using a repo of ruby basics at github worked well too. This meant that I could sync the code there with what I had on the machine in the lecture without any trouble and it would always be fresh.
Some parts though seemed to need even more examples in more detail than I provided. Next year I’ll need to work slower perhaps and put more detail into the explanation of the examples with better slides and diagrams of what’s happening.
I also think it would be good to move to testing sooner than I did. I wasn’t sure about this test first teaching idea as expressed by Sarah Allen in the past, but have come around to it now after thinking about it more. Next time I will bring in tests earlier to show that the code works instead of writing little progammes to loop and ask questions to progress the program.
Instead of this I’ll have the students use test/unit to see that the code works as expected. This will translate into useful groundwork for rails apps, as well as setting them up for test driven development in later courses. Later it will be useful to introduce rspec and cucumber too as alternative ways to test the program. Tying this in with Selenium should also be useful for beginning rails.
The problem, or concept that held me back previoiusly was the idea of learning a new idea and then simultaneously learning the testing concepts. I always thought this would be a double-whammy against the students. Now I see that if testing is sold as just another way to check the program works, then this is less of a hurdle as we’re not trying to sell TDD; we can do that later. By showing them how to more quickly know if the program works or not they can develop the application faster, which is always good.