What are your approaches to keep the code clean in...
# suitescript
t
What are your approaches to keep the code clean in case of new requirements popping up every now an then. I usually structure my code, make it modular using functions, but still When the Original Requirement + 50th new requirement/change come the code is not as clean as I started with. It’s not hard, but due to so many changes it’s not easy as well to maintain the same quality for every new changes.
s
Some of this is just the evolution of software, basically Gall's Law. The initial code is small, simple, and functional. But the complexities of business needs end up making the code more complex over time too. I have found that test-driven development can guide the code towards better maintenance, and structure. It forces the developer to break things down into small, easily testable sections of code, that are also easier to understand as a side-benefit.
None of that enforces clean code, though. Using a linter and an opinionated formatter (like ESLint + Prettier) can help standardize the code to some degree.
m
Today I learned what Gall's Law is. :)
☝️ 2