If know a language like C++/Java/C#/JavaScript/etc, then try building a simple app without using any of the following constructs: if, while, for, foreach, do, goto, and switch. Also, don't expose any instance variables or use setters, and try to limit the use of assignment statements to constructors only. Implementing something as simple as a FizzBuzz solution under those constraints will be enough to understand OOP.
Ask HN: Are there any courses/course materials that teach oop concepts well?
11–13 of 13 posts
Re: Ask HN: Are there any courses/course materials that teach oop concepts well?
#12According to the Wikipedia article about him, he also created the idea of Design by Contract [4], involving preconditions, postconditions and invariants, and DbC is built-in to Eiffel. DbC is now supported in many languages or in their libraries.
[1] https://en.wikipedia.org/wiki/Bertrand_Meyer
[2] https://en.wikipedia.org/wiki/Object-Oriented_Software_Const...
[3] https://en.wikipedia.org/wiki/Eiffel_(programming_language)
[4] https://en.wikipedia.org/wiki/Design_by_contract
Scott Ambler's The Object Primer was also good, also read some years ago.
IBM developerWorks article by him about the topic: https://www.ibm.com/developerworks/library/ws-using-oo/
The book: https://www.cambridge.org/core/books/the-object-primer/BD0D5...
Just checked, it is still available, though the page at the link below says there is a newer version (linked on same page): http://www.amazon.in/Object-Primer-Application-Developers-Ob...
Update: Just remembered, when I was checking out Eiffel some years ago, I had read up on success stories about it. One very interesting one was about how HP used it to create a printer driver for a printer, after attempts using another more mainstream language had worked, but the driver had a lot of bugs. IIRC, the article [5] said that with Eiffel, the new version of the driver was created a lot faster, and also had a lot less bugs.
[5] Found the article from a Google search: