This philosophy reminds me of the agile programming maxim of "do the simplest thing that could possibly work, then iterate". The key thing is to remember that this not-quite-general functiuon exists, so when you need it again in a few more places, you remember to go back and refactor it, rather than re-implementing it again..