r/learnprogramming • u/Bon_Appetit357 • 19h ago
Resource Expectations when developing an Android Application
I started to delve right into Kotlin Programming Language under Android Studio and it's getting interesting. But as I get further and further to the field, I realized that it wasn't really easy when dealing with advanced topics such as State Hoisting, Mutable States, ViewModels, and Hardware Services (Bluetooth, Camera, and Accessibility).
Therefore, as a hobbyist, I would like to ask what are the things I should expect while coding (i.e. getting frustrated or stuck)? Do I also need to code my own Unit Tests and Android Tests to confirm if it works? And finally, what are the best practices or habits that makes the code much more readable?
3
u/best-home-decor 17h ago
Expect to get intimately familiar with Logcat output. It will become your best friend and your worst enemy
1
u/Bon_Appetit357 17h ago
Oh, I recently discovered this feature last week and it was life-changing! It helps makes the interaction between each UI and the values in each Mutable States much more transparent.
Before discovering it though, it was a pretty hellish journey when it comes to guessing what values are being stored after each interaction.
5
u/elnoxvie 18h ago
Speaking from experience, i would suggest building a strong understanding of Kotlin fundamentals, including syntax, coroutines, and Flow. You should also understand the Android lifecycle, core components, and recommended development practices.
MVVM and MVI are widely used in modern Android development to separate responsibilities and organise code clearly. Following these pattern consistently gives your app a solid structure and makes it easier to maintain.
Good Naming techniques and SOLID principles can also help you write code that is easier to read, test, extend, and debug.
Modularise your application where appropriate. For example:
core/networkcore/databasefeature/subjectA modular structure improves separation of concerns, encourages code reuse, and may reduce build times as the project grows.
Follow good Kotlin practices:
valunless a variable genuinely needs to change.Automated tests catch problems early, provide faster feedback than repeated manual testing, and give you confidence when changing existing code. They also help making sure that your application remains reliable before deployment. Testing should be part of your Android arsenal.
If you follow all the good practices mentioned in the Android and kotlin Documentation, you will save lots of trouble in the future.
Lastly, you could also make use of AI but don't trust it blindly.. Read every code generated. Make sure you understand what's being generated. Having said that hands on (without relying on AI) is great way for learning.