It is a good analogy but not entirely true. It is more like forming a clay ball into well defined (lego?)parts but the difference between your analogy is that the parts as still connected but can be separated at any time.
I guess it depends. When I was making this analogy, I had Javascript in mind. Most js hacks involve a huge set of function definitions and calls, all intertwined and confusing to figure out. Code refactoring for such hacks involves making logical separations in the code and define proper abstractions.
I just wanted to point out that although you extract the code logically, it is only from the developer's point of view that the code has been separated. For me when you refactor, you are positioning the code in such a way so that it will be re-usable when you need it to be. It has not been (really) separated yet. Until the parts have been used in multiple completely different projects by different people, then you can safely say that the code has been separated into multiple threads/yarns. :) Very colorful sweater by the way
It is a good analogy but not entirely true. It is more like forming a clay ball into well defined (lego?)parts but the difference between your analogy is that the parts as still connected but can be separated at any time.
ReplyDeleteI guess it depends. When I was making this analogy, I had Javascript in mind. Most js hacks involve a huge set of function definitions and calls, all intertwined and confusing to figure out. Code refactoring for such hacks involves making logical separations in the code and define proper abstractions.
ReplyDeleteI just wanted to point out that although you extract the code logically, it is only from the developer's point of view that the code has been separated. For me when you refactor, you are positioning the code in such a way so that it will be re-usable when you need it to be. It has not been (really) separated yet. Until the parts have been used in multiple completely different projects by different people, then you can safely say that the code has been separated into multiple threads/yarns. :) Very colorful sweater by the way
ReplyDeleteIts not a perfect analogy definitely, but its nonetheless entertaining (especially with the colorful sweater as you said) :P
ReplyDelete