Home » Author Archives: Rado Buransky

Author Archives: Rado Buransky

Publish JAR artifact using Gradle to Artifactory

gradle-logo

So I have wasted (invested) a day or two just to find out how to publish a JAR using Gradle to a locally running Artifactory server. I used Gradle Artifactory plugin to do the publishing. I was lost in endless loop of including various versions of various plugins and executing all sorts of tasks. Yes, I’ve read documentation before. It’s ...

Read More »

Scala for-comprehension with concurrently running futures

scala-logo

Can you tell what’s the difference between the following two? If yes, then you’re great and you don’t need to read further.                 Version 1: val milkFuture = future { getMilk() } val flourFuture = future { getFlour() } for { milk <- milkFuture flour <- flourFuture } yield (milk + flour) Version ...

Read More »

Init.d shell script for Play framework distributed applications

play-framework-logo

I wrote a shell script to control Play framework applications packaged using built-in command dist. Applications packaged this way are zipped standalone distributions without any need to have Play framework installed on the machine that it’s supposed to run on. Everything needed is inside the package. Inside the zip, in the bin directory, there is an executable shell script named ...

Read More »

The best code coverage for Scala

scala-logo

The best code coverage metric for Scala is statement coverage. Simple as that. It suits the typical programming style in Scala best. Scala is a chameleon and it can look like anything you wish, but very often more statements are written on a single line and conditional “if” statements are used rarely. In other words, line coverage and branch coverage ...

Read More »

Scala Wonderland: All operations are method calls

scala-logo

I’ve started learning Scala two months ago and I can’t get back to Murakami’s 1Q84 so exciting it is. In the coming series I’d like to share my excitement with you. It won’t be yet another step-by-step tutorial. I’ll share features that made me think (IBM should be proud of me). For whatever reason.             ...

Read More »

Scala Wonderland: The functional style

scala-logo

Scala encourages to use a functional style of programming. For programmers coming from imperative world of Java or C# it is the main challenge. The first step is to recognize the difference between functional and imperative programming. Scala has two keywords for variable declaration: var – mutable variables val – immutable variables One sign of imperative sign is occurence of ...

Read More »

Scala Wonderland: Lists

scala-logo

In functional style methods should not have side effects. A consequence of this philosophy is that List is immutable in Scala. Construction of a List is simple.                   val abc = List("a", "b", "c") There is one trick in the previous code. A common trick in Scala. It invokes method named apply ...

Read More »

Scala Wonderland: Case classes and pattern matching

scala-logo

Pattern matching is usually related to text search. In Scala it has much more sophisticated usage. You can write exciting decision logic when used together with case classes. Even after understanding what the two things mean I wasn’t able to use them as they deserve. It takes a while to really grasp them. Long and winding road. Case classes allow ...

Read More »
Want to take your Java Skills to the next level?
Grab our programming books for FREE!
  • Save time by leveraging our field-tested solutions to common problems.
  • The books cover a wide range of topics, from JPA and JUnit, to JMeter and Android.
  • Each book comes as a standalone guide (with source code provided), so that you use it as reference.
Last Step ...

Where should we send the free eBooks?

Good Work!
To download the books, please verify your email address by following the instructions found on the email we just sent you.