Unless you’re a Multimillion or a Billion dollar company, you probably don’t have a multimillion-dollar ad budget or professional Spinners.
Your product needs to stand out on its own merits like More
Retrofit — Effective error handling with Kotlin Coroutine and Result API
Error handling is important, but if it obscures logic, it’s wrong.
What are retrofit call adapters used for?
How does CallAdapter work?
In this article, you will learn how can we do effective error handling with Kotlin Coroutine and Result API
Custom callAdapter in retrofit allows us to filter out various API error responses at a centralized level which reduces boilerplate code effectively. We will create our own Retrofit callAdapter to handle the API call Success and Error states.
We will use Kotlin Result API consistently in the whole application as a response of API calls.
You can find the full code of this project on github.
Golang — Time utility functions you will always need
How to use timestamp and other utility functions?
In this blog, we will discuss some of the utilities like adding days or finding differences between timestamps, etc. Which we many times come around but are not available at the library level. May this article will save some of your minutes!
Add days to or subtract days from a given time
Get day start time
Get Day end time
Check whether the given two days are the same or not
Find a number of days between given timestamps
Find a number of weekdays(Mon, Tue,…) between two dates
Check if a given year is a leap year