I have a secret code for you to crack detective! 🕵️♀️
originally published on https://chetangupta.net/bbk-main/
Don’t be a Java-ish dev in Kotlin-ish world, improve your knowledge about Koltin Standard Library and write better Kotlin code. ✌🏻 If your Java dev migrating to Kotlin this will help you learn alot!
This quiz was suggested by Rohan Singh on Twitter, sorry for the delay mate!
Question
: You have received a secret message! unfortunately, you can’t just read it, it is encoded in Morse code. Your task is to implement a function that would take the morse code as input and return a…
👨🏻💻 How to create base-class of Activities and Fragment
Note this post is just one fraction of the ViewBinding Deep Dive I did on my personal blog. If you find it useful do consider checking-out the full In-depth article.
Creating BaseActivity
Creating BaseFragment
That’s it! copy these snippets and you will have ready-to-use ViewBinding Classes in your codebase.
It’s not just Another ViewBinding Article 👇🏻
There are many view binding articles out now, what values does it add? after completing this one you would be familiar with these points
Curious how Kotlin resolve the Java platform’s map?
Most of the Kotlin developers are migrated from the Java environment, they are pretty well versed with uses-cases and application of Collection Framework in the Java platform, but applying the same knowledge in a Kotlin codebase isn’t guaranteed to work always. You could end up with a spaghetti codebase base having a long trailing function and making hacks to achieve a functionality that could easily be solved using Kotlin’s standard functions easily. Kotlin stdlib which offers generic interfaces, classes, and functions for creating, populating, and managing Collections of any type.
Learn pure Kotlin DI then migrate it to HILT or Dagger.
Dagger is one of the popular frameworks that has been known for Dependency Injection (DI) for Java and Android platforms. It’s in most of the Android projects whether small or large, developers tend to start off with the basic scaffold of Dagger just not to deal with the huge boilerplate or to avoid huge migration of adding it later to the project. …
List to String is very crucial operation that you need to know if you’re into competitive programming.
to learn more advance operations such as truncating string, performing transformations, adding a prefix and suffix, and much more that can be done on the `joinToString()` follow up the companion article.
Even been confused or keep forgetting which is called first init blocks or constructors? Never again keep reading…
Hi #androidDevs, This is Androidbites where I try to break down a small concept into an understandable code snippet and share my learning experience with it.
Today we are discussing init blocks
, here is a little challenge for you guys, let's see if you could guess the correct out! if you can guess the right output you get a Candy,
if you don’t know then, don’t worry grab your headphones and put on lofi music and read thought my article from below…👇💻
See you on the other side 😈
Happy #Hacking!💻
safely handling position even when data members are re-positioned!
Hi #androidDevs, This is Androidbites where I try to break down a small concept into an understandable code snippet and share my learning experience with it.
As per my previous article, I discussed how destructuring is limited in kotlin in case you missed it go through the following link.
Today snippet tells about the place where you should never use destructuring. 👁 on the code 💻👇
You must be wondering then what should be the ideal place when we should be using it or even to use for not, to figure…
lateinit vs nullable type, is lateinit actually the answer to your nullable type issues.
Hi #androidDevs, This is Androidbites where I try to break down a small concept into an understandable code snippet and share my learning experience with it.
Today’s topic is related to handling nullability using lateinit modifier, I absolutely agree `null` is the Billion dollar problem in a programming language, and for you, as a developer, it’s your responsibility that your app doesn't fall in as a victim of it and not crash your app due to that, In kotlin there are many languages functionalists build in…
An elegant way of error handling using expressions and null-handing
Taking inspiration from getOrNull type function in Kotlin, I ended up creating this extension which has helped me out in multiple cases, Specially dealings with JsonParsing
.
Highly recommend the following extended explanation of how this extension work, Do checkout and stay tuned for more content.
Happy Hacking!
follow me on social media :
LinkedIn : https://bit.ly/ch8n-linkdIn
Medium: https://bit.ly/ch8n-medium
Twitter: https://bit.ly/ch8n-twitter
Blog: https://chetangupta.net
Github: https://bit.ly/ch8n-git
Youtube: https://bit.ly/ch8n-youtube
Coding enthusiast! love Android #kotlinAlltheWay, want to explore all opportunity around it! CodingMantra: #cleanCoder #TDD #SOLID #designpatterns