DEV Community

Discussion on: Technical debt so bad I quit my job

Collapse
 
waylonwalker profile image
Waylon Walker

Thanks for sharing such an impactful story! I agree that a good refactoring is so rewarding! I like to try to set my projects up for easy refactoring as much as I can. In the beginning everything may be in one file, but settings are stored in a data structure that lends itself to being pulled into a settings file or a database, not haedcoded in. Functions are small manageable pieces with sane default inputs. Code smells such as data clumps are avoided as much as possible, or are setup for annexit strategy if certain things grow legs.

It's important to not necessarily start out with the final draft, because it's common to make the wrong call. Things become too abstract and hard to follow. Too many separate functions with things put in odd places make them hard to find. It's much easier to see the logical architecture after getting started for awhile.

Collapse
 
excid3 profile image
Chris Oliver

💯