Articles

Tips on Scala, functional programming, Akka, Spache Spark and more

3 Fun Tricks with Call-By-Name

Call-by-Name (CBN) is one of those Scala features that had more confused programmers than happy programmers. It's deceptively powerful, often abused, most of the time misused, almost never employed to its full potential, and it has a terrible name. The genesis ...

READ MORE

Reading Spark DAGs

This article is for the Spark programmer who has at least some fundamentals, e.g. how to create a DataFrame and how to do basic operations like selects and joins, but has not dived into how Spark works yet. Perhaps you're interested in boosting the performance out of your Spark jobs. ...

READ MORE

Much ado about Nothing

I've seen quite some confusion about the Nothing type in Scala and I wanted to shed some light on it. If you're a Scala programmer, you might have seen Nothing once or twice, and you have at least the broad picture of Scala's type hierarchy. Quick intro ...

READ MORE

How Things Don't Make Sense - Scala Loops

I wrote an article not too long ago on why learning variables in Scala doesn't make sense, and likewise teaching variables as one of the first concepts also doesn't make sense. In this article I'm going to expand that idea to the lovely loops. This article is for 1)...

READ MORE

Jedi Values in Akka Streams

This article is for the Scala programmer who has the very very basic familiarity with Akka Streams, in the sense that you can use some already made components, glue them together and start the stream, but otherwise no knowledge of behind-the-scenes functionality is required. If you've never used...

READ MORE

Reading Spark Query Plans

This article is for the Spark programmer who has at least some fundamentals, e.g. how to create a DataFrame and how to do basic operations like selects and joins, but has not dived into how Spark works yet. Perhaps you're interested in boosting the performance out of your Spark jobs. ...

READ MORE

How Things Don't Make Sense - Scala Variables

For a long time in my Scala classes and trainings I used to start the training, obviously, with values and variables. The gripe This is what everyone starts with when learning Scala: val aValue = 2 aValue = 3 // NOPE. can't reassign var...

READ MORE

Higher-Order Functions for OO Programmers

This article is for the programmer who is familiar with Scala concepts and structure, but has the object-oriented programming principles deeply ingrained. This article will not attempt to change them, but rather show you how you can map these principles to the very abstract functional programming...

READ MORE

Controllable Futures

In this article I'm going to address the problem of "deterministic" Futures. You probably know by now that Futures are inherently non-deterministic, in the sense that if you create a Future val myFuture = Future { // you have no future, you are DOOMED! 42 // JK. } you know...

READ MORE

Self-types in Scala, Real Quick

In this article I'm going to address self-types, which are a pretty strange piece of Scala syntax and functionality. Many Scala devs go on writing code for months without any encounter with self-types, then they get baffled by the structure when they need to dig into some library code. ...

READ MORE