Category Archives: Coding Analogies

Object Oriented Programming Analogies

Rails Mama  has written a series of blog posts to help explain object oriented programming from the perspective of a new Rails dev. I thought they were great, so I am adding them to my ‘coding analogies’ tag (which has been sorely neglected I know).

I highly recommend you read the whole three posts but I’m also going to summarise what I think are the most interesting points from all three, so that it is easy for me to come back and reference what I got out of them. Continue reading

Leave a reply

Polymorphism Analogies Are Hard

Polymorphism is hard. I have had to deal with it in projects a few times, and I really have to draw these things out on paper to make them stick.

In my head, the following is what polymorphism is like, but just in case you want something a bit more experienced, from someone who is a bit more certain, you can also check out this post,  polymorphism made easy.

In my example, beverages are polymorphic, I’m going to call them ‘Drinkable’.
Continue reading

2 Replies