A.I, Data and Software Engineering

Search results forkotlin

Exploring Kotlin’s suspendCoroutine: A Guide with Examples

petamind

Introduction: Kotlin, with its modern syntax and powerful features, has taken the programming world by storm. One of its unique offerings is the suspendCoroutine function, a game-changer when it comes to handling asynchronous operations. In this article, we’ll dive into the world of suspendCoroutine, demystifying its usage and providing you with real-world examples to showcase its...

Kotlin Best Practices: Elevate Your Code

petamind

Introduction: Kotlin, the versatile and powerful programming language, has taken the development world by storm. Its concise syntax, seamless interoperability with Java, and robust features have made it a favorite among developers. In this article, we will delve into the top 10 Kotlin best practices that will not only elevate your coding skills but also boost your app’s performance and...

Kotlin Scoping Functions apply vs. with, let, also, and run

petamind

Functional-style programming is highly advocated and supported by Kotlin’s syntax as well as a range of functions in Kotlin’s standard library. In this post we will examine five Kotlin scoping functions (aka higher-order functions): apply, with, let, also, and run. When learning these five functions, you will need to memorize 2 things: how to use them, and when to use them...

WHY DO WE NEED TO OVERRIDE EQUALS AND HASHCODE METHODS IN JAVA/Kotlin

In this post, we will discuss why it is important to override equals and hashCode method in Java/Kotlin. Item 9 in Josh Bloch’s Effective Java suggests always override hashCode() method if the class overrides equals(). In this post, we will discuss why this is necessary and good practice.  We know that two objects are considered equal only if their references point...

A.I, Data and Software Engineering

PetaMinds focuses on developing the coolest topics in data science, A.I, and programming, and make them so digestible for everyone to learn and create amazing applications in a short time.

Categories