Refactoring Again
I can never leave well enough alone. I'm refactoring my website and adding features to my CMS. One of the main reasons I am refactoring is to make my code more reusable across the websites I have built. I wasted alot of time rewriting the same scripts over and over again. I would make a good change to one version of a script, but he similar version I had made on another website was just different enough that I couldn't copy the new script and use it.
One major thing I have been doing to make my code more reusable is by simplifying my HTML. Mostly, I have been reducing the number of divs, classes, and IDs. My mastery of CSS has grown by leaps and bounds over the past year. I finally have a good grasp on the box model so I don't have to put divs around evertyhing to get them do display properly. I have also wrapped my head around all the child relationships so I don't have to style everything by explicitly adding a class or ID to identify and element.
I have ideas for alot of websites I would like to do, but my poor coding practices have made it difficult to reuse code. I know that I will always need to write some new code for any new site I do, but I shouldn't be rewriting mail forms every time I do a new site. I'd rather spend my time on the graphic design aspects on a new site than reinventing the wheel. Now if I make an improvement to a script, I'd like to be able roll that out to all the sites I do.