When my 4 years old daughter likes a song, she asks me to repeat the song over and over. I believe this is no news for any parent… 😛
This weekend’s song was “Reduce, Reuse, Recycle” by Jack Johnson. Below is a clip of the music where Jack sings the song with some children. I set the video to start at the beginning of the music:
Whenever I hear this music I think about code and how the “reduce, reuse, recycle” motto should be applied to writing software:
- reduce: as written by the 37signals guys in their Getting Real book, “Less software is easier to manage. Less software reduces your codebase and that means less maintenance busywork (and a happier staff). Less software lowers your cost of change so you can adapt quickly. You can change your mind without having to change boatloads of code. Less software results in fewer bugs. Less software means less support.”
- reuse: as defined in Wikipedia, “is the use of existing software, or software knowledge, to build new software.” and includes the use of libraries, frameworks and design patterns.
- recycle: in the physical world “recycling involves processing used materials (waste) into new products to prevent waste of potentially useful materials, reduce the consumption of fresh raw materials, reduce energy usage” (source: Wikipedia). When I read this definition of recycle it immediately reminds me of another R used in software development, refactor. “Code refactoring is the process of changing a computer program’s source code without modifying its external functional behavior in order to improve some of the nonfunctional attributes of the software. Advantages include improved code readability and reduced complexity to improve the maintainability of the source code, as well as a more expressive internal architecture or object model to improve extensibility.” (source: Wikipedia).
- So the next time you are writing software, don’t forget to “reduce, reuse, recycle“! 🙂