5 Kotlin Tips for a Cleaner Codebase
<p>Kotlin offers a lot of useful concepts and structures that make it easy to write concise code. But when working in a team, the primary goal should be to write code that is easy to read, understand and maintain. We’re going to take a look at a few good practices that should maintain a healthier codebase.</p>
<p><img alt="" src="https://miro.medium.com/v2/resize:fit:700/1*XoAJ5gpuIAbpjEnZMcIr6Q.jpeg" style="height:394px; width:700px" /></p>
<blockquote>
<p>Note: these are just suggestions and do not imply this is the correct way to do things. The style of the code you write is down to your and your team’s preference.</p>
</blockquote>
<h2>1. Pay attention to the visibility of classes</h2>
<p>Pay close attention to the visibility modifier that you apply to new classes and functions. Classes are public by default, which means that the class will be accessible from any other module that depends on this one.</p>
<p><a href="https://medium.com/@domen.lanisnik/5-kotlin-tips-for-a-cleaner-codebase-3582f2e4e2af"><strong>Learn More</strong></a></p>