Clean Code with Kotlin

With Kotlin we can write concise, expressive, and safe code. Sounds like clean code, doesn’t it?

In this article we will recap what clean code is, we will highlight the importance of defining meaningful names, and how to write clean functions and classes.

Finally, we will be able to learn more about the advantages of immutability, how to handle the errors in Kotlin, and what are the best practices in terms of writing tests. By the end of this blog post, you will better understand what clean code means and learn a series of tips and tricks ready to be applied in your code.

“Coding is not a sprint, is a marathon” so let’s exercise together our clean code skills.

Continue reading “Clean Code with Kotlin”

Generics in Kotlin

Generics means we use a class or an implementation in a very generic manner. For example the interface List allows us for code reuse. We are able to create a list of Strings, of integer values and we will have the same operations even if we have different types. So the list wraps a common functionality for each implementation.

Kotlin allows you to use parameters for methods and attributes, composing what is known as parameterized classes.

Continue reading “Generics in Kotlin”

Collections in Kotlin

It’s time to continue our learning path in Kotlin. The subject covered in this new post is represented by Collections and data operations applied to them.

Collections are actually a set of classes and interfaces that provides high quality implementations of useful data structures and algorithms that help developers to reduce the programming effort and time.

collections kotlin magda miu

Continue reading “Collections in Kotlin”

Kotlin Basics

In my previous article we discovered details about how Kotlin was designed, what is the philosophy behind this new programming language and how its popularity has grown over the past years.

In this article we’re going to continue with some basic concepts from Kotlin Wonderland like the available types, control flow instructions, equality checks and null safety.

kotlin-basics-magda-miu

Continue reading “Kotlin Basics”