Home » JVM Languages

JVM Languages

5 Kotlin Features That Every Android App Developer Must Know

Java is considered to be the heart of the Android operating system and so for every Android developer, there is hardly any alternative than knowing Java. Well, at last, a superb alternative to Java has appeared with a lot of value packed within. Kotlin is a new programming language comes as a better and more effective alternative to Java for ...

Read More »

Water Pouring Problem with Kotlin and Vavr

The first time I saw the Water Pouring Problem being programmatically solved was the excellentlectures on functional Programming by Martin Odersky on Coursera. The solution demonstrates the power oflazy evaluation in Streams with Scala. Solving Water Pouring Problem using Kotlin I wanted to explore how I can rewrite the solution described by Martin Odersky using Kotlin and I realized two ...

Read More »

A small bank application with Clojure

Overview Clojure is a passionate language that uses strong mathematical expressions for you to write a code, I think it’s cool. I am not a language expert, in fact in any language, I have a general profile, I decided to create a small banking application for study and testing purposes. Tools Dexter’s labs: I’ve used clojure with Leiningen and use ...

Read More »

Testing exceptions in Kotlin with assertFailsWith

I wanted to write this short post to highlight the assertFailsWith function available to Kotlin that makes testing exceptions a bit easier. Testing exceptions isn’t something fancy or new to JVM languages (from now on I will use Java for comparisons) but Kotlin comes with the nice extra benefit of providing this functionality as part of its standard library. Comparing ...

Read More »

Loops performance in Groovy

Introduction In the 2018 Advent of Code challenged I solved all the puzzles in Groovy. It is pretty obvious, that choosing good data structure is the most important to obtain performant solution. However, the way we iterate over those structures is also very significant, at least when using Groovy. Measuring performance I want to measure how long it takes to ...

Read More »

Storing when block subject in a variable

Super short post, on a change introduced in Kotlin 1.3 (yes I know it has been out for a while now). We will take a quick look at capturing the subject of a when block into a scoped variable. This is a quality of life improvement that saves a line or so of code while making the role of the ...

Read More »

Comparing Kotlin performance with Graal and C2

You may have heard of Graal, the new JIT compiler for the JVM written in Java. It is available inside the JDK since Java10 and in the future will probably become the standard of the JDK. If you are interested, you can find more information here: https://www.infoq.com/articles/Graal-Java-JIT-Compiler In the last year I mostly worked with Kotlin and as personal project I ...

Read More »

Clojure – comparison of gnuplot, Incanter, oz/vega-lite for plotting usage data

What is the best way to plot memory and CPU usage data (mainly) in Clojure? I will compare gnuplot, Incanter with JFreeChart, and vega-lite (via Oz). (Spoiler: I like Oz/vega-lite most but still use Incanter to prepare the data.) The data looks like this: ;; sec.ns | memory | CPU % 1541052937.882172509 59m 0.0 1541052981.122419892 78m 58.0 1541052981.625876498 199m 85.9 ...

Read More »