Posts with tag: kotlin
The Kotlin standard library provide many useful helper extension functions for string operations. You probably know the basic ones to make a string lower and upper case, but did you know that there are many more? Some of them do operations that you would otherwise implement yourself, and some are more focused on making the code more clear by exposing the intent of the operations as a name. Some of these may be common to you, but I hope that you at least find one that you are not familiar with!Read more..
If you work with Kotlin, you probably use Collection types like list a lot. Most people already know of simple list operations like getting elements, checking if an element is present, mapping etc. Did you know that the standard library provides a whole plethora of useful operations? In this article we will look at operations that are often overlooked when we talk about list processing. For the people who are more new to Kotlin, we will start with a small recap. So don't worry if you are relatively new to Kotlin, hopefully you will learn some new nifty tricks here as well!Read more..
Do you want to learn Kotlin? Wonder what resources you should use to learn it? In this article I collect a few different resources depending on your interests and skill level. You might pick a few, mix and match or do whatever you want that makes you learn the concepts. Only you know the way you learn things the best. Without further ado, let us dive into the resources!Read more..
Last year I wrote a blog post about the basics of using Kotlin in Emacs. Since then, some new developments have happened, including some new features have been added to the Kotlin langauge server. I also got some questions regarding which Eamcs packages I like using when developing Kotlin code. Let's answer some of the questions not answered last time, and see what Kotlin Language Server and Kotlin Debug Adapter can do!Read more..
You may have seen the book Designing Data-Intensive Applications mentioned several places, and wondered if you should read it. I have to admit I bought it years ago, and read parts of it (got side-tracked and researched graph databases further, and read something else). Last Christmas holiday I picked it up again, and this time I finished it. It covers many topics, ranging from how databases are designed, to how we can design good stream processing systems. Should you read it? Continue reading the review to find out!Read more..
This time we will look at features in Kotlin that are often overlooked in walkthroughs or other places, but are still cool and can be useful! Some are features some of us might know of, but often forget exist. Others are features we forget exist until we see them mentioned, probably because we don't use them as often (or very rarely). Hopefully you will see at least one feature you have forgotten existed!Read more..
Reactive is a buzzword thrown around a lot, but what is it really? At first glance, reactive doesn't seem to be anything special. Asynchronous stream processing seems nice, but is that all? Fortunately, the answer is no! Reactive also includes nonblocking IO, which makes resource utilization better. If you have never heard any of these terms before, it may just seem like a word-soup. Don't worry! We will explain the terms below, so you can understand the big whoop with reactive. Getting an overview of the concepts will be the main goal here, but I will provide links for further reading. Some oversimplification may happen, but I hope that it will help you understand concepts without being boggled in buzzwords and lots of pre-requisite knowledge.Read more..
Did you know that you can use Java and Kotlin for scripting? In this post I will introduce you to my favorite ways of doing scripting on the Java Virtual Machine (JVM), which is JBang and KScript. Some people may not enjoy Java projects as much because of all the verbosity (big project structures), so small scripts may make the languages more approachable and less intimidating. Being able to easily handle all external dependencies in the same file (no extra configuration files!) is also a big bonus. Lately I've heard from several people that they did not know about JBang, so I guess that might be true for KScript as well. Hope this post will provide you with some information on them, as well as good links to get started!Read more..
Some people, including myself, grudgingly used IntellIJ IDEA for Kotlin programming for a long time, maybe because we didn't think the Emacs tooling was up to speed. Well, it is, and we can finally use the best editor of all time (Emacs) to do Kotlin programming! Today I'm going to show you basic setup (and share some links), so you can also use Emacs for Kotlin programming! I made the switch this summer (reasons for waiting so long below), will you make the switch too?Read more..
In this article I will show you two types of easy customizations you can do with your Spring Boot applications. One of them can be very useful, and one is mostly cosmetic for the benefit of those seeing the server logs. This article is language agnostic, so it can be used for all programming languages you might make Spring Boot applications in (probably Java or Kotlin).Read more..
Today we are going to look at some small tricks that will make you more effective when using Maven! Some of this will be simple, and some of them you might not have heard about. I've done some presentations at work and similar earlier about this, and there is almost always something new to people. The topics range from basic usage and flags, to ways of handling your dependencies. One or two might be a bit enterprise specific, but most can be useful no matter if you program inside a company or not. (no secret that I love those of you who, like myself, LOVE computers with a burning passion! <3 )Read more..
New year, new programming languages to learn! It is overwhelming though… With so many languages to choose from, it can be hard to select what to learn. Sometimes it is easy, we might want to accomplish certain tasks. Other times you may want to learn to think in new ways, as a fun challenge.Read more..
Domain Specific Languages (DSLs) can be used to solve a lot of different problems (more on that shortly!). In this article we will take a look at how we can create DSLs in a very simple way that make for highly readable and expressive code. I will not go through general DSL creation, only the building blocks unique to Kotlin. At the end we will look at an example from an open source testing library (Spek).Read more..