3 ms·
I don’t think XP could have worked at all without Refactoring, because everyone is sitting together and asking questions. With conventional coding, if your hou
by hinkley 5y ago
I don’t think XP could have worked at all without Refactoring, because everyone is sitting together and asking questions.
With conventional coding, if your house of mental cards falls, you may potentially lose all of your work. By working from working code to working code, even if you lose your train of thought you get to keep most of your work so far.
A number of other techniques also allow you to work more from working memory than memorization. This helps when writing code a little bit, but most of the payoff is for readers or subsequent additions.
The thing with DRY is that code reuse means that a breakpoint most likely can fire from multiple paths, which makes it hard to trace why you’re getting null/undefined instead of an empty array as your second argument. Conditional breakpoints can help for some of these scenarios, but it’s better if the code in the middle of the call stack tries to be as contained and organized as leaf node methods eventually become.
You can’t modify code if you can’t read it, and if it’s difficult to read then interruptions become more problematic, because both the cost of interruption and the likelihood of interruption go up when thinking time increases.
The cleverest code is the code which is easiest to understand.
- lanstin 5y agoI like what you say. I also think once you are used to an environment, you can type in such a way as to make errors that will be caught by the compiler/linter/tests. So once it compiles it works. Sort of leaning more into the design side and less into the is this variable defined side. How ever, in my experience, there are design points you won’t get to without building up state in you thoughts for hours and hours. Deep focus can give you diamonds that cut thru the thousand little decisions that you encounter during implementation. That is why for big projects I don’t like to really start typing till I have the three or for maxims for the project.