All Blogs

HTTP Request vs HTTP Long-Polling vs WebSocket vs Server-Sent Events

HTTP Request vs HTTP Long-Polling vs WebSocket vs Server-Sent Events

HTTP Request asks once, Long-Polling waits until data is ready, WebSocket keeps a two-way connection open, and SSE lets only the server push data to the client.

AssociateBy - List to Map in Kotlin

AssociateBy - List to Map in Kotlin

associateBy is a Kotlin collection function that converts a list into a map, where we decide the key for each item. We will learn it with an example.

Remove duplicates from an array in Kotlin

Remove duplicates from an array in Kotlin

We can remove duplicates from an array in Kotlin using distinct(), toSet(), toMutableSet(), or toHashSet(). We choose one based on our use case.

Caching with OkHttp Interceptor and Retrofit

Caching with OkHttp Interceptor and Retrofit

With OkHttp Interceptor and Retrofit, we can cache HTTP responses in Android, even when the server does not send the Cache-Control header, to build offline-first apps.

Why is it recommended to use only the default constructor to create a Fragment?

Why is it recommended to use only the default constructor to create a Fragment?

We must use only the default constructor for a Fragment because Android calls the no-argument constructor when it recreates the Fragment, like on rotation.

Top Tech Engineering Blogs of Companies

Top Tech Engineering Blogs of Companies

The top tech engineering blogs to learn from are by Netflix, Dropbox, X, Uber, Airbnb, Spotify, Stripe, and Pinterest. Here is why each one is worth reading.

Career advice for a software developer to earn a higher salary

Career advice for a software developer to earn a higher salary

To earn a higher salary as a software developer, keep upgrading skills, hunt for the right resources, switch at the right time, and take on bigger challenges.

Differences between a junior, mid-level, and senior developer

Differences between a junior, mid-level, and senior developer

A junior developer learns to build things, a mid-level developer knows what can and cannot be done, and a senior developer thinks end to end, with all edge cases.

How to remove items from an array in JavaScript?

How to remove items from an array in JavaScript?

We can remove items from an array in JavaScript using splice(), filter(), delete, pop(), shift(), or the length property, depending on our use case.