Posted: February 10th, 2012, 6:00am MST
When programming, there will naturally be activities we will want to do again and again: adding up the values in an array, stripping extraneous blank spaces from a string, getting infor mation into a hash in a particular format, and so on. It would be tedious to write out the code for each of these little processes every time we need to use one, and maintaining each code segment would be horrific: if there's a bug in the way we've coded the activity, we'll have to go through and find each one of them and fix it. It would be better if we could define a particular process just once, and then be ...