π§ This is not a tutorial about developing an Android app with Kotlin. This is about the experience I had recently working with Kotlin. π₯
A little background about my Android competent, I never had a grasp with the basics of it. I had a little experience with it when I was college. But it was not enough and it was uncomplicated. The language that Android developers used that time to create mobile apps is still Java. No Kotlin yet that moment. With Java, I have a solid grasp and it was actually my favorite programming language before. I can go all day and night working with it before even though it was slow! π
But not today.
Those days were part of the dynasty era.
The experienced I had with Android was puppy love.
Since then, I never had another experience developing Android natively.
Was it goodbye already?
Are we not meant to be?
Planetary Collisions π₯
I had read that many astronomers believed that from a planet collision it can form or start a new life. They said that it can form or start because of the debris due to the collision. But it is better to leave that discussion for later.
Last month, my world and the Android world collide again for the second time. It was unexpected.
Just woke up one day that our world is about to collide again and we cannot do anything about it. We cannot avoid it. It was meant to happen. It was destined to bring new life. It was destiny.
What to do now?
Should I get scared of how huge it is now compared before? Seems like a different world of the beast now. π»
Getting Started β¨
Since day 1, I set my mind and myself that this time it is real. This time it will be different. This time we are matured enough and we will never hold back.
Each day I am ready to fail and learn from working with it. I even caught myself smiling while working on it. It was pure happiness. I am committed.
I cannot believe the developer experience I had when doing the screen layouts. It was like I am working on a web page doing HTML. How convenient it is! I liked how I should type the layout tags because it feels like I am actually into it. In addition to that, getting the strongly typed implicitly. What a great type inference! I just realized the type system Java has and how Kotlin does its way. β‘οΈ
But wait, why do I have to create so many files from different files just a for a simple screen?
Oh okay, maybe it is part of the architecture β Android Components Architecture.
Let us add and do the necessary files:
Create a fragment, layout, and view model files. Add in the navigation graph the created fragment.
Can we try to compile and see if it works?
β¦ Uh oh, it failed to build. It says it cannot find the view model from the fragment. π΅
I have asked the community. Then I learned that we should inject it through the Dagger dependency framework. π
Can we try again to compile and see if it works?
Looks like it works now π
That is one thing I do not like much in Android. You have to create and do so many things before you can actually get into it. You know that right? Get in the work!
Combining two different worlds does not mean it will be perfect. It will have flaws and obstacles along the way. It is just what it is. Nothing is perfect.
Bringing It All Together π
The issue/s I had brought up a while ago, maybe that is part of the software architecture we had chosen. Cannot complain about it but be grateful for all the experiences. It is there for a reason.
I do not see it clearly now, but I believe in the process.
My working environment is surrounded by great people. They are the reason I am talking here right now. They are the reason I wrote this article. Every day I would listen to their feedback and approaches. I am not afraid to fail and redo again the codes to apply the best practices. They are part of the reason for the success I had accomplished for myself.
Take the first step in faith. You donβt have to see the whole staircase, just take the first step. β Martin Luther King,
Every step we take open a lot of possibilities we never actually knew. The only time we will know about it is when we take the leap of faith. We will never know unless we take the first step. It is scary most of the time but we needed that.
I am beyond grateful for the experience I had working with Android β Kotlin. I never thought before that I would like it! As I said, the people that surround me are the reason for the success I had accomplished. I will be forever grateful.
Thank you for helping me become a better version. Teaching me the right things to do. This is just the first step, I know that there will a lot of things I will learn along the way. I will always be a student of the game we are playing. πΆπ»π»
May you reach your dreams.