DEV Community

Cover image for Day 31. Technical debt
Kiolk
Kiolk

Posted on

Day 31. Technical debt

Code quality is a cornerstone of programming. Rapid development without attention to quality is a direct path to increased technical debt. This makes our lives more complicated in the future. However, my projects often don't reach this future because they die early. 
Technical debt

What I did:

Today, I focused on code quality. I decided to set up the static analysis to prevent the rise of technical debt. I chose a standard solution for Kotlin projects: Detekt. I won't go into detail about Detekt; you can read more about it in my series of posts. I've used it for Android projects, but not for KMM. I spent some time to clearly understand how to set it up for our project. After several attempts, I got it working. As I expected, the first run of Detekt revealed a lot of issues in my code - more than two hundred. I don't have time to fix them all. I used a hack to hide them like dust under the carpet. I just run the detketBaseline task, which generate a baseline file that suppresses all current issues. It feels like starting with a clean slate.
A lot of issues

This was the first step. I added some automation with a GitHub action to make Detekt more efficient. Now, when I created a Pull Request or push directly to the develop branch, a GitHub action with code quality checks is triggered. To save time on running checks, I added a pre-commit hook that does the same before committing. You can read more about this hack in another post.
Passed checks

These improvements didn't directly advance application development, but they created a good foundation for keeping the code cleaner. 

What I will do:

If you want to join the project, just leave a comment here, or write a message in LinkedIn.

What help I'm looking for:

Designer (create design of application in Figma)
Android/KMM developer
Any other help related to the project.

My timeline:

Day 1. Deep breath and dive
Day 2. Networking layer.
Day 3. Loading of articles.
Day 4. ArticleItem.
Day 5. Localization.
Day 6. Work on Sunday.
Day 7. First week.
Day 8. Enjoying coding.
Day 9. Expect/actual.
Day 10. TODOs.
Day 11. Friday evening.
Day 12. Frustration.
Day 13. Blocker
Day 14. Monday
Day 15. Reactions
Day 16. Feed
Day 17. stringWithFormat
Day 18. Comment
Day 19. 1 percent
Day 20. A bit of progress
Day 21. Pagination
Day 22. Lottie animation
Day 23. Sorting of articles
Day 24. Step by step
Day 25. Broken endpoint?
Day 26. After party
Day 27. Burnout
Day 28. Opportunity for growth
Day 29. Hard work
Day 30. Old code

See you tomorrow. 

Top comments (0)