Reddit Reddit reviews Refactoring: Improving the Design of Existing Code (Addison-Wesley Object Technology Series)

We found 1 Reddit comments about Refactoring: Improving the Design of Existing Code (Addison-Wesley Object Technology Series). Here are the top ones, ranked by their Reddit score.

Computers & Technology
Books
Computer Programming
Software Design, Testing & Engineering
Object-Oriented Design
Refactoring: Improving the Design of Existing Code (Addison-Wesley Object Technology Series)
Check price on Amazon

1 Reddit comment about Refactoring: Improving the Design of Existing Code (Addison-Wesley Object Technology Series):

u/DrMantisTobboggan ยท 1 pointr/cscareers

Honestly from what I've seen, and I've been coding professionally for over a decade, no such an ideal environment with everything you describe applied everywhere doesn't really exist.

The best I've come across is organisations where the company culture is one of passion, continuous learning and improvement. In a place where people are skilled and care, not everything sucks, and the things that suck tend to get better over time.

All code seemed like a good idea to the author at the time they wrote it. They may have had goals that weren't explicitly "make this clean", or the one-clean code may now have enough other code around it that applying some additional abstractions would simplify things. If these abstractions had been applied earlier, it's highly possible that they would have been overengineering. Like it or not, a lot of development is working with and hopefully improving legacy code.

It can be hard sometimes but resist the urge to rewrite everything. Instead, when you come across some code you don't like, try to identify exactly what you don't like about it. There may be multiple things.

Pick whichever is the smallest, simplest change you can make. Implement only that change and nothing more. Initially this might be as simple as cleaning up some conditional logic, writing a missing test, or extracting a method or interface. Over time, the parts of the codebase you work with most frequently will be in better shape and it should be easier to change higher level structure where appropriate.

Sometimes chucking things out and rewriting is inevitable but being able to make small changes is important for several reasons.