Golang: Polymorphism

Polymorphism is a bit different in Go. It supports polymorphism only through interfaces (and not through inheritance). To help you understand better, here is an example:

However, Polymorphism doesn’t work when driveACar(lammborgini) would not work if Car was a struct and not an interface. Here is an example:

Go: Declaring and using objects

Go (or Golang) doesn’t have the concept of classes. The class equivalent in Go loos like this:

The above declaration can now be used as an object like so:

Clean your oil painting brushes the non-toxic way

Oxyclean stain remover is your friend. Wipe your brushes with a paper tower, then spray some Oxyclean into the bristles, leave it for a few seconds and wash them. You may need to use more than once on a brush but it will clean the brush and leave no color stains ( at least not […]

Macports Ruby: Symbol not found: _SSLv2_client_method error

This error usually shows up when you try to run the following command:

For those that don’t know what I am talking about, this is the error message:

The only way to get this to go away is to re-compile ruby so it will use the new openSSL library. Macports, however, installs packages […]