This week's question comes from
Thang:
How to be scalable and easy to maintain in the long term for an iOS project given we are starting today?
This has been a relevant question for everyone for years. I bet we all have examples of projects that started great but became unmanageable after months or years.
How to prevent this?
- Write tests.
I can’t stress this enough, but tests are a great way to keep your code stable and prevent unexpected bugs. This definitely makes a project easier to maintain
- Modularity
Split up your project into child packages. Focus on single responsibility and add tests within each package.
- Coding guidelines
Either automatically or manually linted, keeping your code consistent with similar formatting makes a project easier to digest, understand, and manage.
- Documentation
Even though the code you write today seems self-explanatory and ‘easy’ to understand for everyone, I bet you’ll thank your future self for writing documentation while you’re in the given context.
Like with many things, not just one thing solves this challenge. Your project will become easier to maintain when applying all these 4 rules.
Want to have your question answered next week? Ask your question on LinkedIn or Twitter.