Articles

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

5 Nice Scala Tricks for Expressiveness

This article is for Scala programmers of all levels who are at least familiar with the absolute essentials (values, classes, functions etc.). In this post I'm going to show you a few syntax tricks and sugar elements that make Scala such a powerful, expressive language. Many of these techniques...

READ MORE

How to Create Your Own Custom String Interpolator

This article will show you a less-known customizable part of Scala that will allow you to build powerful tools that seem to be part of the language itself. The article is for intermediate to advanced Scala programmers who know how implicit classes work. The Background ...

READ MORE

How Akka Typed Incentivizes You to Write Good Code

Akka Typed is widely praised for bringing compile-time checks to actors and a whole new actor API. The problem is that even this new typed API has loopholes that almost never completely close the old Akka anti-patterns. However, the 2.6 API is a big step in the right direction, because although...

READ MORE

Sync, Async and (non) blocking

This article is for programmers of all levels, willing to deal with asynchronous and/or non-blocking computation. I'm going to write Scala (naturally), but the problem I'll address is general and across almost every language and tech: the difference between synchronous, asynchronous, blocking and...

READ MORE

4 Nice Ways to Read Files in Scala

One of the hurdles many learners of JVM languages face is: how do I read a goddamn file? And then you have your face blasted with DataInputStreams, FileReaders, buffered this, buffered that, channels or whatever. In this article I'd like the make things clean and simple, and...

READ 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