My experience of programming has proven to me the value of coding for patterns. Creating helper functions, classes and methods to deal with common patterns has saved me innumerable hours over the years and is the only way I know to be able to create new code or an application that works pretty much straight out of the box and with relatively little effort.
I'm just writing about it now because I checked out http://en.wikipedia.org/wiki/Design_pattern_(computer_science) and thought it explained the basics really well. I researched this years ago and thought it was brilliant. I'd already been doing it but now had a term to describe it.