Don’t repeat yourself

DRY – Don’t Repeat Yourself!

Ever heard that term?  It’s pretty simple really, but there are still many developers out there that don’t get it.  Below is only HALF of the code somebody wrote to change one word in a hyperlink and alter the background color of the row.  The code is too small to read, but you can get the gist of it by noticing how each block of code appears to have been copied from the previous.  This functionality will be rewritten in PHP using 1/10th of the amount of code.