In programming, monkey patching is the practice of modifying or extending system software within an individual instance of a program (according to Wikipedia). Specifically in languages like Ruby and Python, monkey patching refers to the practice of modifying classes that are built into the language, bending the language’s core functionality to fit your needs. If you want arrays do something that Ruby doesn’t have the capability of doing right out of the box, monkey patching really can come in handy!
Earlier this week, I was working on a technical challenge based around the Fibonacci sequence. In it, I was asked to write a method that takes a number, n, as an argument, and returns the number that takes up the nth place in the Fibonacci sequence. And when I say “write a method,” I actually mean “write two methods, one iterative and one recursive.”
This week’s blog post is the first of hopefully many that will chart the progress of my campaign finance webapp, tentatively called “Follow The Money.” You can see the (very early and nowhere near complete) source code here.