Diary of a Failed Startup
"Solve a problem, not a class of problems."<p>I, for one, think this is good advice for code in general. At least "at first, solve a problem, not a class of problems".<p>I have noticed that if I write my code too general at first, it ends up solving one class of problems kinda poorly, and ends up being re-written. If I write it for the specific problem I need to solve, and then generalize it to include another similar problem when I need to (and continue this process), I end up with very solid generalized code that solves a specific class of problems very (IMO) elegantly. It still gets re-written, but in a small-chunk iterative fashion.<p>This, of course, may be because of the way I think - or it may be due to me being relatively "young" as a developer. I am slowly generating more general purpose code that is getting reused for similar problems in different applications, however I write much more code for specific problems than I re-use.<p>Perhaps someone who's been doing serious coding work for more than a few years would like to weigh in on this?