3 Fun Call-by-Name Tricks in Scala
5 min read • • Guide
Maximize call-by-name semantics in Scala: control when your results are evaluated
Founder | Rock the JVM
Software engineer and best-selling instructor. I'm an avid fan of Scala, Kotlin, functional programming, big data and streaming. As of May 2023, I've taught more than 80000 people all over the world.
Become a Kotlin rockstar by mastering Kotlin with our comprehensive, hands-on advanced course
Become a Scala 3 rockstar by mastering Scala 3 and functional programming with our comprehensive, hands-on advanced course
Build microservices in minutes using Akka/Apache Pekko HTTP with Scala: Develop stream-based REST APIs, backends, and microservices with ease, sending and receiving JSON effortlessly using a powerful server DSL
Now with Scala 3 – become a Scala rockstar by mastering Scala and functional programming with our comprehensive, hands-on advanced course – also available for Scala 2
Say goodbye to threads, locks, and headaches: meet the Actor Model and discover a smarter approach to concurrent and distributed coding — classic actors also available
Become a Akka Classic developer by mastering the essentials of Akka Classic with Scala using our comprehensive, hands-on course
Harness the power of reactive streams using Akka/Apache Pekko Streams with Scala: learn to implement scalable, data-rich systems efficiently, writing in a few lines what takes others thousands to achieve
Embrace a new approach to persistence and storage with Akka Persistence and Scala, a solution that perfectly complements the Actor Model
Unlock the power of large-scale, reactive distributed systems with Akka Classic Remoting & Clustering with Scala, and experience unparalleled scalability and resilience in your applications
Stream big data like a pro using Apache Flink with Scala: Process millions of events in real time using one of the most powerful libraries and engines for stateful data streaming
Don't waste months on ineffective Java serialization: boost your Akka system's performance with Akka Classic Serialization with Scala using Avro, Kryo, or Protobuf
Write performant code: master Apache Spark with Scala's tools and techniques to make your applications run blazing fast and learn the strategies used by top developers
Become an Apache Spark developer by mastering the essentials of Apache Spark with Scala and big data with our comprehensive, hands-on course
Optimize Apache Spark with Scala for peak performance: master Spark internals and configurations to achieve maximum speed and memory efficiency for your cluster
Master Apache Spark Streaming with Scala: process massive data as it arrives, integrate with Kafka, JDBC, Cassandra, and more – handle live data streams effortlessly
Write composable, high-performance, purely functional applications and boost your productivity with Cats Effect, one of the most powerful libraries for Scala
Master Scala and functional programming with the Cats library: Learn to write high-level, grounded code using one of the most popular libraries in the functional programming ecosystem
For the busy programmer: learn Kotlin's most important features in the time it takes to watch a movie
Become a Kotlin developer by mastering the essentials of Kotlin with our comprehensive, hands-on course
Master Kotlin coroutines and build massively parallel and concurrent applications with our hands-on course designed for pro Kotlin developers
Master data structures, algorithms, and the pure functional programming mindset with Scala to ace your Scala interview
Discover Scala 3's new features without re-learning the language — a concise course designed for Scala 2 developers
For the busy programmer: learn Scala's most important features in the time it takes to watch a movie
Now with Scala 3 – become a Scala developer by mastering the essentials of Scala and functional programming with our comprehensive, hands-on course – also available for Scala 2
Become a Scala 2 developer by mastering the essentials of Scala 2 and functional programming with our comprehensive, hands-on course
Become a Scala wizard. Learn how to manipulate Scala code at compile time (with Scala!) and write powerful code and tools that other developers only dream about
Become a Akka/Apache Pekko and distributed JVM applications expert from scratch with our all-inclusive course bundle: master everything you need with Scala in one complete package, at a discount
Get practical experience with Scala by building real things — file synchronizers, photo processors, AI agents and more
Become a Kotlin expert from scratch with our all-inclusive course bundle: master everything you need in one complete package, at a discount
Become a Apache Spark and big data expert from scratch with our all-inclusive course bundle: master everything you need using Scala in one complete package, at a discount
Become a Scala and functional programming expert from scratch with our all-inclusive course bundle: master everything you need in one complete package, at a discount
Build your own full-stack Scala application with ZIO: from credit card checkout to AI and emails, experience real-world development with our comprehensive course, and see the live app here
Unlock the potential of ZIO: master writing powerful applications with parallelism, concurrency, and pure functional programming
Build your own full-stack Scala application with Typelevel: working on credit card checkout and emails, experience real-world development with our comprehensive course, and see the live app here
5 min read • • Guide
Maximize call-by-name semantics in Scala: control when your results are evaluated
Founder | Rock the JVM
3 min read • • Explanation
Master file reading in Scala with ease: compare it to other languages and discover how our simple API approach is almost as straightforward as Python's read()
Founder | Rock the JVM
4 min read • • Guide
Scala is an incredibly expressive language: discover hidden features that even experienced developers might miss!
Founder | Rock the JVM
7 min read • • Guide
Pattern matching is one of the most powerful Scala features: learn to use it to the max and write your best Scala code
Founder | Rock the JVM
7 min read • • Retrospective
In this article, I'll recap 2020's highlights, share key insights and achievements, and unveil exciting plans for the future of Rock the JVM
Founder | Rock the JVM
5 min read • • Retrospective
Wrap up 2021 with us as we review the year's highlights and achievements at Rock the JVM
Founder | Rock the JVM
13 min read • • Explanation
Master solving Sudoku and other constraint-satisfaction problems with recursive backtracking in Scala
Founder | Rock the JVM
12 min read • • Guide
Discover the best Scala course for your learning journey: explore recommended courses and libraries such as Cats Effect, ZIO, and Apache Spark
Founder | Rock the JVM
6 min read • • Guide
Explore a fresh perspective on monads: Discover new angles on this familiar concept with Rock the JVM
Founder | Rock the JVM
12 min read • • Explanation
What's the problem?
Founder | Rock the JVM
29 min read • • Guide
Akka, Cats, and Cassandra in a larger Scala project integrating multiple pieces of the Scala ecosystem
Founder | Rock the JVM
3 min read • • Explanation
Abstract classes and traits share a lot of overlap in Scala: discover how they actually differ
Founder | Rock the JVM
8 min read • • Guide
Akka HTTP needs JSON like humans need water: discover how to integrate Spray-Json, circe, and Jackson into Akka HTTP
Founder | Rock the JVM
5 min read • • Guide
Easily deploy your first Akka HTTP service to Heroku in minutes
Founder | Rock the JVM
10 min read • • Guide
Discover how Akka Streams implements backpressure, a key component of the Reactive Streams specification, in this detailed demonstration
Founder | Rock the JVM
7 min read • • Guide
Akka Typed has transformed actor creation: in this article, we explore various methods for managing state within Akka actors
Founder | Rock the JVM
11 min read • • Guide
A common pattern in Akka Typed: discovering how to find actors not explicitly passed around
Founder | Rock the JVM
8 min read • • Guide
Learn how to organize code, messages, domains, and logic in an Akka application with Scala
Founder | Rock the JVM
6 min read • • Explanation
Discover how Akka Typed revolutionizes actor protocol definitions and dramatically enhances actor mechanics
Founder | Rock the JVM
7 min read • • Explanation
Spark supports more types of table joins than you might expect: discover the different join options in this article
Founder | Rock the JVM
9 min read • • Explanation
A Scala tutorial on Monads that starts with practical needs and builds up from scratch: derive the monad patterns (laws) with no assumptions
Founder | Rock the JVM
7 min read • • Explanation
Broadcast joins in Apache Spark are a highly effective technique for boosting performance and avoiding memory issues, offering great value for optimization
Founder | Rock the JVM
26 min read • • Guide
Unlock the secrets to crafting a full-stack Scala 3 application from scratch: dive into Cats Effect, doobie, http4s, and Tyrian and build robust, modern software with ease
Founder | Rock the JVM
6 min read • • Explanation
An Introduction to Asynchronous Computations with Fibers in Cats Effect 3, Tailored for Scala 3
Founder | Rock the JVM
5 min read • • Guide
Following the introduction to concurrency in Cats Effect: explore advanced techniques for managing racing IOs and fibers
Founder | Rock the JVM
9 min read • • Explanation
Cats is a complex library for Scala: This article deconstructs the major type classes and explains their connections
Founder | Rock the JVM
14 min read • • Guide
Explore how Akka Streams, Kafka Streams, and Spark Streaming stack up and find out which one is best for your use case
Founder | Rock the JVM
3 min read • • Explanation
Learn how to handle deterministic Futures in Scala using Promises in this article
Founder | Rock the JVM
4 min read • • Guide
Discover how to create your own custom string interpolator that feels like a native feature of Scala
Founder | Rock the JVM
6 min read • • Guide
Pattern matching is one of Scala's most powerful features: discover how to customize it and create your own patterns in this article
Founder | Rock the JVM
10 min read • • Explanation
Explore the infamous 'covariant type occurs in contravariant position' problem in Scala: discover effective solutions and best practices
Founder | Rock the JVM
4 min read • • Guide
Deploying Scala Code to AWS Lambda Is a Breeze: Discover Our Step-by-Step Tutorial to Guide You Through the Process
Founder | Rock the JVM
3 min read • • Explanation
Scala 3 Introduces Enums: A Major Update with Significant Implications
Founder | Rock the JVM
5 min read • • Explanation
Explore the intriguing world of eta-expansion: Discover how methods and functions interact in Scala, revealing insights that can elevate your coding game
Founder | Rock the JVM
4 min read • • Explanation
Explore core Scala constructs from a fresh perspective and uncover new insights into their use and application
Founder | Rock the JVM
6 min read • • Explanation
Discover how to use Scala's implicit resolution to enforce type relationships at compile time
Founder | Rock the JVM
10 min read • • Explanation
Discover Finagle: a powerful yet deceptively simple library for building distributed systems, offering built-in HTTP support, seamless load balancing, and more
Founder | Rock the JVM
16 min read • • Explanation
A tutorial on Free Monads in Scala: Explore how they work and discover their benefits
Founder | Rock the JVM
7 min read • • Explanation
Discover a powerful Scala feature that many developers overlook: a concise guide to functional collections that could revolutionize your Scala programming
Founder | Rock the JVM
8 min read • • Explanation
Scala generics are a breeze for Java developers, but what about those coming from Python or JavaScript?
Founder | Rock the JVM
9 min read • • Explanation
Scala Options are among the first concepts we encounter: Discover what they do, why they're useful, and their importance in programming
Founder | Rock the JVM
20 min read • • Guide
A long-form guide on Scala 3 macros - learn how to use them, how Scala macros work, and why they exist
Founder | Rock the JVM
5 min read • • Explanation
For OO programmers looking to dive into functional programming in Scala: a gentle introduction to functions working with other functions
Founder | Rock the JVM
5 min read • • Explanation
Explore how Akka Typed integrates good practices directly into the API
Founder | Rock the JVM
4 min read • • Explanation
Various idioms like '20.seconds' seem built into Scala: discover how these idioms work
Founder | Rock the JVM
9 min read • • Guide
Error handling can be one of the most frustrating aspects of programming: let's explore how Scala offers better and worse ways to manage it
Founder | Rock the JVM
10 min read • • Guide
Discover how to harness lazy values and call-by-name techniques to craft a fully immutable doubly-linked list in Scala
Founder | Rock the JVM
6 min read • • Explanation
Inspect, extract, and modify deeply nested data structures in Scala with ease: discover a powerful method to handle complex data effortlessly
Founder | Rock the JVM
12 min read • • Guide
The ultimate 10-minute guide to building a Snake game in Scala: learn fast and code smarter
Founder | Rock the JVM
4 min read • • Explanation
Explore the `Nothing` type in Scala: A short trip to nothingness and its unexpected usefulness
Founder | Rock the JVM
5 min read • • Explanation
Although frowned upon by FP purists, creating and managing mutable data structures is important in any language: Explore Scala's first-class mutability features
Founder | Rock the JVM
1 min read • • Explanation
Learn how to tackle a Google-style algorithm interview question in Scala using pure functional programming
Founder | Rock the JVM
5 min read • • Explanation
This article is for beginner Scala programmers: an introduction to singleton objects and companion objects, exploring their uses, benefits, and best practices
Founder | Rock the JVM
12 min read • • Guide
ZIO layers (ZLayers) help structure complex services into independent, composable, and easy-to-understand modules: discover how they can simplify your architecture
Founder | Rock the JVM
5 min read • • Explanation
Explore how to impose constraints on values at compile time using the Refined library
Founder | Rock the JVM
5 min read • • Explanation
Clarifying the differences between two essential repartitioning operations in Apache Spark
Founder | Rock the JVM
10 min read • • Explanation
Learn Scala 3 inlines - a powerful tool for code expansion at compile time, which can improve type safety and (if you know what you're doing) performance
Founder | Rock the JVM
4 min read • • Guide
Discover a Scala 3 trick few developers know: leveraging the absence of a given instance to enforce type constraints
Founder | Rock the JVM
4 min read • • Explanation
Deconstructing extension methods: one of the most exciting features of the upcoming Scala 3
Founder | Rock the JVM
7 min read • • Explanation
Scala's general type projections are considered unsound and were removed in Scala 3: discover what this means and how it affects your code
Founder | Rock the JVM
7 min read • • Explanation
Explore Scala 3's given/using clauses: a crucial feature for modern Scala programming, and learn how to leverage them effectively
Founder | Rock the JVM
5 min read • • Explanation
This quick article demonstrates how Scala 3's given instances integrate seamlessly with Scala 2's implicits
Founder | Rock the JVM
7 min read • • Explanation
Building on the previous article's insights into givens, let's explore how they stack up against the traditional Scala implicits
Founder | Rock the JVM
6 min read • • Explanation
Some people love it, some hate it: Scala 3's indented syntax might surprise you with its potential to enhance your code structure
Founder | Rock the JVM
5 min read • • Explanation
Unlock advanced programming techniques with Scala 3: explore dependent types, methods, and functions in this concise tutorial
Founder | Rock the JVM
7 min read • • Explanation
Scala 3 comes with lots of new features: in this episode, we dive into match types, a powerful tool for pattern matching on types and more accurate type checking
Founder | Rock the JVM
7 min read • • Explanation
Explore the Game-Changing New Types in Scala 3: What We're Eagerly Anticipating
Founder | Rock the JVM
4 min read • • Explanation
Explore opaque type aliases in Scala 3 and learn how to define new types with zero overhead
Founder | Rock the JVM
4 min read • • Explanation
This article delves into Scala 3's advanced trait functionalities, building on our previous explorations of the language's new features
Founder | Rock the JVM
4 min read • • Explanation
Exploring type lambdas in Scala 3: a quick yet powerful structure that will elevate your high-level thinking
Founder | Rock the JVM
7 min read • • Guide
In this article, we explore the main testing styles in Scala and ScalaTest: understanding what terms like 'FunSuite' and 'FlatSpec' really mean
Founder | Rock the JVM
3 min read • • Explanation
Self-types are a powerful way to enforce type constraints in Scala: learn to use them effectively in just a few minutes
Founder | Rock the JVM
8 min read • • Explanation
This article provides a gentle introduction to Monoids and Semigroups, exploring functional abstractions and the workings of the Cats library
Founder | Rock the JVM
4 min read • • Guide
Learn to use Akka HTTP with Scala and send HTTP requests in just a few minutes with the Akka HTTP server DSL
Founder | Rock the JVM
6 min read • • Guide
Master List Sorting with Tail Recursion in Scala: Enhance Your Functional Programming Skills and Boost Your Interview Readiness!
Founder | Rock the JVM
21 min read • • Guide
Discover how to integrate Apache Pulsar with Apache Flink: perform advanced data enrichment using state from multiple topics
Founder | Rock the JVM
13 min read • • Explanation
Explore Apache Pulsar's role in event streaming and computing: discover practical use cases and learn when to integrate advanced computing engines for sophisticated stream processing
Founder | Rock the JVM
5 min read • • Explanation
We explore the trade-offs between three parallel coding styles in Scala and Akka: focusing on thread usage and other effects
Founder | Rock the JVM
12 min read • • Explanation
Demystify the tagless final pattern in Scala: it's not about type classes
Founder | Rock the JVM
38 min read • • Guide
Learn Kotlin with the ultimate, comprehensive, and hands-on guide
Founder | Rock the JVM
7 min read • • Explanation
Demystify one of the hardest concepts in Akka Streams: materialized values made simple
Founder | Rock the JVM
4 min read • • Explanation
Discover the different flavors of 'nothing-ness' in Scala and how they impact your code
Founder | Rock the JVM
5 min read • • Opinion
Daniel dives into another rant about learning (and teaching) Scala with loops: Are they truly useful?
Founder | Rock the JVM
3 min read • • Opinion
Daniel shares a candid rant on the challenges of learning and teaching Scala with variables
Founder | Rock the JVM
10 min read • • Guide
Mastering Scala can be simple: discover 10 key mental skills to excel as a Scala developer
Founder | Rock the JVM
9 min read • • Guide
Harness the power of givens to infer type relationships in Scala 3: at compile time
Founder | Rock the JVM
16 min read • • Guide
Level 90 of type-level programming: implementing a real sorting algorithm on lists as types
Founder | Rock the JVM
7 min read • • Guide
Harness the full power of Scala's type system: let the compiler infer complex type relationships for you at compile time
Founder | Rock the JVM
11 min read • • Guide
We continue exploring type-level power in Scala: adding numbers as types at compile time
Founder | Rock the JVM
17 min read • • Guide
The final chapter in our type-level trilogy: mastering list sorting at compile time
Founder | Rock the JVM
6 min read • • Explanation
Discover Scala's powerful type system: explore type organization, type constructors, and their significance
Founder | Rock the JVM
4 min read • • Explanation
Scala syntax can be confusing: discover almost all uses of underscores and why understanding their inconsistent philosophy is worthwhile
Founder | Rock the JVM
6 min read • • Guide
Discover the essential skill for optimizing Spark performance: mastering the Spark UI and understanding the job execution graph
Founder | Rock the JVM
6 min read • • Guide
In this article, you'll learn one of the most important Spark skills: reading how your job will run, which is foundational for any further Spark optimization
Founder | Rock the JVM
7 min read • • Guide
Explore Akka Streams' powerful Graph DSL and learn how to get started quickly with our easy guide
Founder | Rock the JVM
7 min read • • Explanation
Discover how referential transparency boosts your productivity as a functional programmer in Scala and why it's crucial
Founder | Rock the JVM
5 min read • • Explanation
Explore one of the most essential concepts in pure functional programming: the Functor, a crucial but abstract idea that will challenge your understanding
Founder | Rock the JVM
4 min read • • Explanation
FP fans discuss the challenge of type classes in pure functional programming with Scala: why are they difficult, and why do we really need them?
Founder | Rock the JVM
4 min read • • Explanation
Unravel the complexities of Scala's powerful type system with our deep dive into contravariance: we simplify and demystify its challenging aspects
Founder | Rock the JVM
This site uses cookies. Check our cookie policy (TLDR: no personal information is stored). For more information see our cookie policy.