Refactoring as a way to understand code - composition.al
Dec 29th, 2015 Recently, an acquaintance was complaining of a project they were working on that involved reading a mountain of "incidentally complex" code — code that wasn't doing anything particularly interesting algorithmically, but that was nevertheless so hairy that it was difficult to understand the implications of adding even the small feature they wanted to add. After reading code non-stop for a week, they were tearing their hair out in frustration. As a researcher, I'm often faced with piles of undocumented, untested, poorly-engineered, "research-quality" code that I need to somehow come to understand well enough to modify. What I've found is that I can't just sit there and read that kind of code for very long; I don't learn anything, and I end up miserable. I need to dig in and start trying to refactor. The idea is to pick some concrete task and attempt it. Depending on the code, some options (in order of how ambitious they are) might include:Read full article from Refactoring as a way to understand code - composition.al
No comments:
Post a Comment