Underscore

The Scala Specialists

Know Your Scala

Training

Books, videos, training, and mentoring... everything you need to excel.

Browse our catalogue

Succeed With Scala

Consulting

Professional services tailored to your business, whatever stage you're at.

Work with us

Latest from the Blog

Simple Isn't Easy

I recently wrote about keeping Scala simple. That’s something you have to work at. Let me explain.

While packing up to move house I came across my undergrad vector calculus notes. Although I, sadly, don’t remember the definitions of div, grad, and curl I do remember that course as marking a turning point in my academic career.

Continue reading…

Upsert in Slick 3

An upsert means inserting a row into a database if it doesn’t already exist, or updating the row if it does exist. The Slick database library knows how to do upserts. This posts takes a look at the built-in support, and gives an example of what you can do if you need to roll your own upsert logic.

This is part of a series on Slick, for material in or being added to Essential Slick.

Continue reading…

Newsletter 10: Conferences, Cats, and Robots from the Future

Hi everyone,

We’ve had a heatwave in London this week with highs of over 30 Celsius (unusually toasty for the rainy UK). To celebrate, let’s pull out our deckchairs, place our knotted handkerchiefs on our heads, and dive into the latest news from the Underscore Newsletter.

This month we’re focusing on conferences: Scala Exchange is just around the corner, the videos from Scala Days are out, and we’re doing some advanced Scala training at Scala World. Plus some blog posts about cats and robots… this is the internet, after all!

Continue reading…

Annihilators in Scala: An Example of Type Class Design

In this post I want to explore the design of a type class solving a problem that came up repeatedly in my current project. It’s fairly general, so rather than diving into the details of the project, I’ll start with a few simple examples:

  • integer multiplication is annihilated by zero, in that once zero is introduced the result is always zero;
  • set intersection is annihilated by the empty set, in that once the empty set is introduced the result is always the empty set; and
  • field dereferencing using the “null-safe” ?. operator in Kotlin and Coffeescript is annihilated by null, in that once a null is introduced the result is always null.

Continue reading…

Our Customers

Some of our happy customers: