Usually IT books don’t age very well, things change very fast in the sector. This is specially true of books on particular tools, libraries, frameworks… but even books about methods and techniques require critical thinking when studying them. If the book is 5 or 10 years old, it’s very likely that the author himself doesn’t code the way he described in his book. We evolve as programmers – hopefully. However that doesn’t mean that the book is no longer valuable. Many things are still valuable for sure, we just have to figure out what slices are useful today given our current context. Reasoning may be different if the programming language is not the same you use today, or even if its version is not the same. The paradigm may be different as well. Tools change and evolve very fast so unit tests written today, with all the fancy assertion libraries we have plus all the modern features of xUnit frameworks, have to be very different to the unit tests you can find in a book written a decade ago.
I am currently reading a classic book, a great one from Martin Fowler Signature series – not written by Martin though. The book is terrific, I wander why didn’t I read it then years ago! I am getting a lot of value from it, but I also notice certain old fashion techniques with well-known downsides.
I wrote a book on TDD 6 years ago. Since then my programming style has changed quite a lot. The way I do TDD today is different, and there are certain examples in the book that I even consider anti-patterns. I don’t know when will I be able to rewrite it, although I wish, but the reality is that time flies.
Consider the age and context of books, don’t just assume everything is valid today