Monday, February 18, 2008
Self Printing JavaScript Literals
We Eiffel programmers often take a lot for granted, things that other languages just struggle with:
We Eiffel programmers just say:Are you ever sick of seeing Object get printed out when you try to output a variable to your console.
object.outIt's that easy.
Friday, February 08, 2008
CDD Extension for EiffelStudio
The CDD extension for EiffelStudio is an ETH Zurich project which adds support for unit testing to EiffelStudio 6.1. The current status is "beta 2", and it's released for Linux and Windows. Features include:
- visualization of test cases and their outcomes
- one button creation of manual test cases
- limiting of visible test cases using predefined filters and custom tags
- test case management through tags
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