However, eighteen years is an old age for a programming book, so I felt it was time to go back and rework it.
Justin Caseцитує2 роки тому
Refactoring is the process of changing a software system in a way that does not alter the external behavior of the code yet improves its internal structure.
Justin Caseцитує2 роки тому
most people believed that we design first, and only when done with design should we code. Over time, the code will be modified, and the integrity of the system—its structure according to that design—gradually fades.
Justin Caseцитує2 роки тому
A poorly designed system is hard to change—because it is difficult to figure out what to change and how these changes will interact with the existing code to get the behavior I want
Justin Caseцитує2 роки тому
When you have to add a feature to a program but the code is not structured in a convenient way, first refactor the program to make it easy to add the feature, then add the feature.
Justin Caseцитує2 роки тому
If I’m writing a program that will never change again, this kind of copy-and-paste is fine. But if it’s a long-lived program, then duplication is a menace
Justin Caseцитує2 роки тому
When I want to turn a chunk of code into a function like this, I have a procedure for doing it that minimizes my chances of getting it wrong. I wrote down this procedure and, to make it easy to reference, named it Extract Function (106).
Justin Caseцитує2 роки тому
Duplication means that every time you read these copies, you need to read them carefully to see if there’s any difference
Justin Caseцитує2 роки тому
One way of dealing with future changes is to put flexibility mechanisms into the software
Justin Caseцитує2 роки тому
Repeatedly, I saw people only understand what they really needed from software once they’d had a chance to use it, and saw the impact it made to their work.
fb2epub
Перетягніть файли сюди,
не більш ніж 5 за один раз