Tuesday, February 05, 2008
Opening black boxes, and Eiffel games
For many years Bertrand Meyer and others have advocated teaching object oriented programming by using objects as "black boxes" then progressively opening up those black boxes to see how they work. This is "inverted" compared to the traditional curriculum which starts with the lowest level of raw constructs and builds progressively more sophisticated constructs from them.
One way to motivate students is to let them design computer games. James McKim was using Eiffel for that in the early 1990s, and the topic regularly came up at the "Eiffel in Education" conferences.
At ETH Zurich, first-year computer science students are combining these ideas, using a high-level Eiffel game library to design games. The library is EiffelMedia, started by Till Bay and developed and maintained by students under his oversight, and now exceeding 500,000 lines of code.
EiffelMedia is comprehensive, covering 2D graphics, text, sound, sprites, collision detection, 3D graphics, networking, high-score tracking, game-oriented widgets, game saving, level management, error reporting and peripheral interfacing.
EiffelMedia, its use, and some of the games developed with it, are described in an article at the Journal of Object Technology: "A production-quality multimedia library and its application to game-based teaching". This code snippet (adapted from that article) shows the high-level use of the sound library:
One way to motivate students is to let them design computer games. James McKim was using Eiffel for that in the early 1990s, and the topic regularly came up at the "Eiffel in Education" conferences.
At ETH Zurich, first-year computer science students are combining these ideas, using a high-level Eiffel game library to design games. The library is EiffelMedia, started by Till Bay and developed and maintained by students under his oversight, and now exceeding 500,000 lines of code.
EiffelMedia is comprehensive, covering 2D graphics, text, sound, sprites, collision detection, 3D graphics, networking, high-score tracking, game-oriented widgets, game saving, level management, error reporting and peripheral interfacing.
EiffelMedia, its use, and some of the games developed with it, are described in an article at the Journal of Object Technology: "A production-quality multimedia library and its application to game-based teaching". This code snippet (adapted from that article) shows the high-level use of the sound library:
if audio_subsystem.is_enabled thenEiffelMedia and many of the games written for it (such as AntWorld, shown above) are freely downloadable. EiffelMedia itself won second prize in the 2005 Eiffel Struggle competition. According to the article, the prize money is used for release parties.
audio_subsystem.mixer.open
create player.make_with_file("hello.ogg")
player.set_repeat(true)
player.play
end
Comments:
<< Home
I got tired of the need to uncover and work around Eiffel compiler bugs relating to exception handling and catcalls.
I would really like to pick up the Amber project again, but I don't have a secure enough "day job" to be able to spare the time.
Having said that, I have been using the Scala language, which is quite a remarkable language. It's a beautiful synthesis of Object Orientation and Functional Programming, really nicely done. All it's missing is Design By Contract and the elegant syntax of Eiffel.
I would really like to pick up the Amber project again, but I don't have a secure enough "day job" to be able to spare the time.
Having said that, I have been using the Scala language, which is quite a remarkable language. It's a beautiful synthesis of Object Orientation and Functional Programming, really nicely done. All it's missing is Design By Contract and the elegant syntax of Eiffel.
Maybe you can port Amber to JVM.
Scala is a nice language, you can use DbC http://scala.sygneca.com/code/design-by-contract, I agree with you, DbC should be part of the language itself.
I think that Eiffel should be generate bytecode to the JVM the same way that bytecode to the CLR
And finally, I think that Goanna could be refactored to support a Web Framework like Wiket. I think that XSLT Web Framework like Enhydra is good but sometimes is good other options
Scala is a nice language, you can use DbC http://scala.sygneca.com/code/design-by-contract, I agree with you, DbC should be part of the language itself.
I think that Eiffel should be generate bytecode to the JVM the same way that bytecode to the CLR
And finally, I think that Goanna could be refactored to support a Web Framework like Wiket. I think that XSLT Web Framework like Enhydra is good but sometimes is good other options
As eth student I've personally experienced this black box model and I'm still skeptical. I don't see why more LOC seems to be better in the eiffel world (traffic, the lib we "unboxed" is sad to have 2mil LoC (give or take). That's just stupid! Give me back my hello world)
Post a Comment
<< Home