Originally posted by greg fuentes:
Does clean code involve "Programming to an interface" and keeping methods as Generic as possible?
Yes and no.
It involves a whole lot more than programming to an interface. The book talks about coding so that your program tells its story well, how to name variables and functions and classes so that they are expressive, how not to name variables, functions, and classes. It talks about using whitespace to help visually clarify your code, about how not to use comments, about how long methods and classes should be, about writing clean tests.
Should a method be as generic as possible? Not necessarily.
In some cases, it should be as specific as possible - especially if you are only using it once.
It talks about writing dirty code and then cleaning it up, step by step, under the protection of automated tests.
Clean code is about writing code that is a pleasure to read, easy to understand, easy to extend and modify, easy to maintain, easy to pass on to another developer.
... and so much more.