Home » JVM Languages

JVM Languages

Running a Kotlin class as a subprocess

Last week I wrote a post on running a Java class as a subprocess. That post was triggered by my need to run a class from within a test without prebuilding a Jar. The only difference between what I wrote in that post and what actually happened was the language. I used Kotlin to write that test. Not Java. Therefore, ...

Read More »

Preventing invalid spending of broadcasted states

Corda is super flexible and will allow you to put together the code needed to write many complex workflows. This flexibility does come with one disadvantage. You, the developer, need to spend some time and thought on designing your application. No more blank contracts. No more responder flows that sign anything they receive. You’ll be glad you put in the ...

Read More »

Kotlin vs Scala: which is right for you?

Kotlin or Scala? Scala or Kotlin? The two contenders for the crown of the JVM Kingdoms and the title of “Better Java” each bring something unique to the fight. But which should be the next ruler of your code? Java is old. Not that there’s anything wrong with being old. Sometimes it can be a good thing. Math is old ...

Read More »

Kotlin primitive and object arrays

I initially set out to write this post because I was playing around with some reflection code and thought I found something interesting. Alas, that was definitely not the case. Instead, it was just a basic feature of Kotlin that I haven’t needed to use or focus on yet. Although this post didn’t turn out the way I wanted it ...

Read More »

Run you first gatling load test using scala

Gatling is a neat tool. You can create your load tests by just coding in scala. Jmeter allows you to do so through a plugin or beanshell but it is not as direct as the way gatling does so. I will start by adding the gatling plugin 1 addSbtPlugin("io.gatling" % "gatling-sbt" % "3.0.0") The next step is to changed the ...

Read More »

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 »