A Body of Code
David Roberts
I teach people to land software development jobs ? Co-Founder of Crushing Digital
Have you ever written some code and looked back on it years later to see that it remains as beautiful and perfect as you thought when you wrote it. No? Me neither.
Good code is like getting fit. It's not something you can attain and then give up. Well, you can, but I doubt you'll be pleased with the overall results! It's something you maintain. You don't go to the gym, work on your abs until they look good and never do a sit up ever again. A car is the same. Clean it, fill it with fuel and leave it parked for 3 years and it won't be in a good condition upon your return. It will simply rot. It needs to be used and maintained.
Most developers, at some point in their career, have been in the situation to have to choose between well structured code and getting it done fast! We all dream of that quiet time after the sprint where you can revisit and refactor the mess you submitted only hours ago as a proof of concept.
Refactoring is important, or should I say essential, but we are again seeing it as a fleeting thing you do to your code before the final commit. Set and forget. I think it has become this way as the chances of getting back to this code any time soon are minimal. There's a backlog of features to implement as long as your arm, right?
"Fewer clients, less money." - Jerry Maguire
Suddenly, the words of the great Jerry Maguire spring to mind. No, not "show me the money!" but "Fewer clients, less money". In my mind, this translates to "Fewer lines, less features". In order to maintain the whole body of code, we need less code to maintain. Code shouldn't be refactored once, but repeatedly. It needs to be maintained.
We're so busy measuring and evaluating the quality of the code we produce, when we should be gauging success by how often we revisit that code. Your code, your car and your body are all machines requiring maintenance.
Product Architect at Docupace Europe
4 年Ironically, failure of producing refactorable code iencloses proportionally large portion of cases when development itself fails or creates a product, obselete the first day it is used.
Senior Software Engineer
4 年Incremental design and architecture are chemical reactions that will occur at that specific, merciless refactoring, condition of temperature and pressure.