Reactoring Archive

Let’s examine a refactoring to move code to follow the open/closed principle. We’ll see how the resulting calling code becomes much easier to read locally, without having to open other files or classes to understand what’s going on. Open/closed principle First, let’s do a quick recap of the open/closed principle. Classes should be open to extension, but closed to modification. What does that mean? Let’s take it a half at a time.

Ruby Reactoring

Image

Christopher R Marshall

@codegoalie

Enjoys programming web applications; especially in Go and Ruby. Also enjoys playing ice hockey as a goalie and playing the guitar.

Categories

I'll send it to you

Email versions of my posts. Plus about once a month, I send a manually curated list of interesting things I've found around the web.

    We respect your privacy. No spam ever. Just a message from me to you. Unsubscribe at any time.