This is part 3 of my ongoing series about programming with Eiffel and EiffelStudio. See part 1 on how to install EiffelStudio and part 2 for an introduction to the Eiffel vocabulary.
In this part we finally write our first Eiffel application.
Göreme is set amid towering fairy chimneys, majestic honeycomb cliffs and cave dwellings. Altough Cappadocia is one of the most visited tourist attractions in Turkey, village life in Göreme manages to happily coexist with a thriving tourism industry.
The region around Göreme was used for shooting “Dünyayı Kurtaran Adam” (Turkish Star Wars). Besides showing the beautiful landscape of Cappadocia it also contains some really hilarious dialogues:
Murat: “Begin your famous whistle which no woman can resist.”
Ali: [Whistles]
Murat: “You whistle it wrong”
Ali: “Why?”
Murat: “Skeletons came instead of women”
And my personal favourite:
Ali: “Do you think you are the man who saves the world?”
Murat: “As much as you think you are a womanizer.”
If you are into bizarre movies, you definitely have to watch “Dünyayı Kurtaran Adam”.
This is part 2 of my ongoing series about programming with Eiffel and EiffelStudio. See part 1 on how to install EiffelStudio.
Before we start programming, I’d like to introduce some of Eiffel’s basic principles and special vocabulary.
Sinop is a popular destination for holidaymakers from İstanbul and Ankara. The city takes its name from the legend of Sinope, daughter of the river god Asopus and was the birthplace of Diogenes.
Sinop’s main attractions are the relatively well-preserved fortification and the Tarihi Cezaevi (Old Jail).
The object-oriented programming language Eiffel was designed by Betrand Meyer in 1985. The name is an homage to Gustave Eiffel, who among other things built the metal scaffolding of the Statue of Liberty in New York and the Eiffel Tower in Paris.
With Eiffel, Meyer created a tool, which enables developers to construct large software systems out of reusable and easily maintainable modules. This series of articles introduces the programming language Eiffel and describes how to develop applications with EiffelStudio.
Anıtkabir is the mausoleum of Mustafa Kemal Atatürk. Mustafa Kemal is the founder and first president of the Republic of Turkey. The mausoleum is located in Ankara on top of Rasattepe (Observation Hill).
I finally found some time to familiarize myself with RSpec by working through the excellent PeepCode RSpec screencasts (part 1, part 2, and part 3). In his screencasts, Geoffrey is using Growl for displaying notifications of autotest.
I wanted something similar and found a few examples explaining how to use notify-send from libnotify. While this is pretty easy to implement, it is just not flexible enough.
After some more searching I found an article by Derek Berner about ruby-libnotify doing more or less exactly what I want. The only problem was, that I couldn’t get his code working on my computer running Ubuntu 7.10. So I decided to write my own autotest configuration and now enjoy nice autotest notifications.
The status symbol in the notification area additionally shows the last autotest result as a tooltip.
Eiffel is statically typed, which means that type checking is performed during compile-time as opposed to run-time. Therefore it should be guaranteed that no execution of a valid program will ever produce a run-time type failure.
To be a little bit more precise, an Eiffel program is class-level-valid if it satisfies the following properties:
x := y - either explicit or through argument passing - type of y conforms to type of x.x.f(...), f is an exported feature of the class of x.Without so-called CAT calls, any class-level-valid program would be type-safe. The acronym CAT stands for Change of Availability or Type.
Alanya is a seaside resort in the south of Turkey. It has in the past couple of decades been discovered and subsequently conquered by European package tourism, especially from Russia, Germany and Scandinavia.
In my opinion, unfortunately Alanya was not able to keep its identity during this process and most parts of the city look like German or Russian colonies. But there are still some really nice places like Alanya Castla, an old Seljuk fortress, or Kızılkule (Red Tower).
Conformance determines when a type may be used instead of another. The conformance mechanism relies on inheritance:
Ais conform toBif the base class ofAis a descendant of the base class ofB.
Convertibility completes the conformance mechanism. Convertibility lets you perform assignment and argument passing in cases where conformance does not hold but you still want the operation to succeed after adapting the source value to the target type. For example:
my_real := 42 -- my_real: REAL, i.e. my_real is of type REAL |
Many classes in Eiffel Base, like INTEGER, STRING, etc. support conversion. In this article I’d like to show you how to add convertibility to your own classes.
The Mevlâna museum, located in Konya, Turkey, is the mausoleum of Jalal ad-Din Muhammad Rumi, a Sufi mystic also known as Mevlâna or Rumi. It was also the lodge of the whirling dervishes.
This year is the 800th anniversary of the birth of Mevlâna and the UNESCO year of birth of Mevlâna Rumi.