AI-powered
podcast player
Listen to all your favourite podcasts with AI-powered features
Refractorin - The Basic Idea of Refactoring
The litmis test for me is really quite simple. The moment i select a chunk of code and hit copy, that's a candidate for refractorin. Another critera have i also used is to see if my code's business logic is expressed too verbosely or not. If i have three logical items that i'm doing, then why should i be reading 17 lines of code to see that i'm accomplishing three things? Shouldn't it be more like three lions, give or take? So that's the kind of thinking that goes into refactory. What about one actually doing terefactori? Well, then i'll ask myself a few more questions as well.