In my previous post I argued that Kitaplus, the Kita management software our daycare board chose, is a good product built on a smart business model. The company behind it understood that deep domain expertise in a regulated niche is a durable competitive advantage, and they packaged that expertise into something useful. I still think that's true. However, in this post I want to look at the…
In the beginning of the year, I became a board member of a small parent-initiative daycare in Germany, a Kita-Elterninitiative . It's about as unglamorous as it sounds: law of associations, funding applications, staffing regulations, and GDPR compliance for an organisation that runs on volunteers and goodwill. At some point the question of Kita management software came up, because the old…
JetBrains recently announced that they are sunsetting Code With Me , their IDE feature for remote collaborative coding. They explain this decision with declining demand after the pandemic, stating that teams have found "different collaboration workflows". As someone who has experienced the value of pair and ensemble programming, both sitting at the same computer and remotely, I find it sad to see…
Wow, I can't believe that this blog has been dormant for more than six years! And the last post was frankly not more than a sign of life, informing about the migration from Octopress to Zola. It's not that I haven't had anything to say in all those years. It's just that I have exclusively published my blog posts on the INNOQ company blog . While I plan to be an even more active…
Scala from Scratch: Understanding is the second in a series of two books that teach you the Scala programming language. Readers that have read Scala from Scratch: Exploration or have learned some Scala trhough other means will get a deeper understanding of the language features and underlying functional programming concepts that have been explored in the first book. You will also learn about…
Scala from Scratch: Exploration is the first in a series of two books that teach you the Scala programming language. Readers that have some experience with an object-oriented or imperative language, like Java, Ruby, or Python, will get a comprehensive overview of what Scala brings to the table. The goal is to get you excited about Scala and give you a strong foundation for writing your first…
If you have visited my website before, you will notice that things look a bit different from what they used to now. This is because I finally took the time to get rid of Octopress , the static-site generator on which my website was based. In doing so, I took the opportunity to rewrite the HTML and CSS as well. If you're interested in why I put so many hours into replacing something that…
This blog post is a text version of a talk I gave at Lambda World Cádiz on October 25, 2018, for those who couldn't attend and don't like watching video recordings . Thanks a lot to Jan Stępień for encouraging me to publish a text version of my talk. In this article, I want to share my thoughts on a trend I have been observing for a few years. It's a trend that probably exists in…
For the past 15 months, I have been working on a new library on and off. So far, I have been mostly silent about it, because I didn't feel like it was ready for a wider audience to use – even though we had been using it successfully in production for a while. However, since I broke my silence as long ago as April this year, when I did a talk about it at this year's ScalarConf in Warsaw,…
In 1999, Andrew Hunt and Dave Thomas, in their seminal book, demanded that programmers be pragmatic . Ten years later, Chad Fowler, in his excellent book on career development, asked programmers to be passionate . Even today, I still consider a lot of the advice in both of these books to be incredibly valuable, especially Fowler's book that helped me a lot, personally. Nevertheless, in recent…
Recently, I tweeted about an observation I have made a couple of times in various Scala projects: Observation: People are using Option too often where their business logic clearly indicates they should use their own, custom ADT. — Daniel Westheide (@kaffeecoder) April 20, 2016 Since 140 characters are not nearly enough to discuss this issue appropriately and there were a few questions around…
When the access patterns of a service are such that there are a lot more reads than writes, a common practice for scaling it horizontally is to have the service talk to a master database only for operations that result in state changes, while all read-only operations are performed against one or more read slaves. Those read replicas are only eventually consistent with the master. This practice is…
As I have already hinted at in the previous article, the Neophyte's Guide to Scala is coming to an end. Over the last five months, we have delved into numerous language and library features of Scala, hopefully deepening your understanding of those features and their underlying ideas and concepts. As such, I hope this guide has served you well as a supplement to whatever introductory resources…
In the previous part of this series, I introduced you to the second cornerstone of Scala concurrency: The actor model, which complements the model based on composable futures backed by promises . You learnt how to define and create actors, how to send messages to them and how an actor processes these messages, possibly modifying its internal state as a result or asynchronously sending a response…
After several articles about how you can leverage the Scala type system to achieve a great amount of both flexibility and compile-time safety, we are now shifting back to a topic that we already tackled previously in this series: Scala's take on concurrency. In these earlier articles , you learned about an approach that allows you to work asynchronously by making use of composable Futures.…
In last week's article, I introduced you to the idea of type classes – a pattern that allows you to design your programs to be open for extension without giving up important information about concrete types. This week, I'm going to stick with Scala's type system and talk about one of its features that distinguishes it from most other mainstream programming languages: Scala's…
After having discussed several functional programming techniques for keeping things DRY and flexible in the last two weeks, in particular function composition, partial function application, and currying, we are going to stick with the general notion of making your code as flexible as possible. However, this time, we are not looking so much at how you can leverage functions as first-class objects…
Last week's article was all about avoiding code duplication, either by lifting existing functions to match your new requirements or by composing them. In this article, we are going to have a look at two other mechanisms the Scala language provides in order to enable you to reuse your functions: Partial application of functions and currying. Partially applied functions Scala, like many other…
In the previous articles, I discussed the composable nature of Scala's container types. As it turns out, being composable is a quality that you will not only find in Future , Try , and other container types, but also in functions, which are first class citizens in the Scala language. Composability naturally entails reusability. While the latter has often been claimed to be one of the big…
In the previous article in this series , I introduced you to the Future type, its underlying paradigm, and how to put it to use to write highly readable and composable asynchronously executing code. In that article, I also mentioned that Future is really only one piece of the puzzle: It's a read-only type that allows you to work with the values it will compute and handle failure to do so in…
As an aspiring and enthusiastic Scala developer, you will likely have heard of Scala's approach at dealing with concurrency – or maybe that was even what attracted you in the first place. Said approach makes reasoning about concurrency and writing well-behaved concurrent programs a lot easier than the rather low-level concurrency APIs you are confronted with in most other languages. One of…
In the previous article, I discussed functional error handling using Try , which was introduced in Scala 2.10. I also mentioned the existence of another, somewhat similar type called Either , which is the subject of this article. You will learn how to use it, when to use it, and what its particular pitfalls are. Speaking of which, at least at the time of this writing, Either has some serious…
From November 2012 to April 2013, I created and published a blog series called The Neophyte's Guide to Scala , targeted at aspiring Scala enthusiasts who have already made their first steps with the language and are looking for more detailed explanations. Later in 2013, I published an ebook version (PDF, epub, Kindle) at Leanpub using a pay-as-much-as-you-want price model. Get ebook If you…
When just playing around with a new language, you might get away with simply ignoring the fact that something might go wrong. As soon you want to create anything serious, though, you can no longer run away from handling errors and exceptions in your code. The importance of how well a language supports you in doing so is often underestimated, for some reason or another. Scala, as it turns out, is…
For the last couple of weeks, we have pressed ahead and covered a lot of ground concerning some rather advanced techniques, particularly ones related to pattern matching and extractors. Time to shift down a gear and look at one of the more fundamental idiosyncrasies of Scala: the Option type. If you have participated in the Scala course at Coursera, you have already received a brief introduction…
In the previous part of this series , I gave an overview of the various ways in which patterns can be used in Scala, concluding with a brief mention of anonymous functions as another place in which patterns can be put to use. In this post, we are going to take a detailed look at the possibilities opened up by being able to define anonymous functions in this way. If you have participated in the…
In the first two parts of this series, I spent quite some time explaining what's actually happening when you destructure an instance of a case class in a pattern, and how to write your own extractors, allowing you to destructure any types of objects in any way you desire. Now it is time to get an overview of where patterns can actually be used in your Scala code, because so far you have only…
In the first part of this series, we learned how to implement our own extractors and how these extractors can be used for pattern matching. However, we only discussed extractors that allow you to destructure a given object into a fixed number of parameters. Yet, for certain kinds of data structures, Scala allows you to do pattern matching expecting an arbitrary number of extracted parameters. For…
More than 50,000 people signed up for Martin Odersky's course "Functional Programming Principles in Scala" at Coursera. That's a huge number of developers for whom this might have been the first contact with Scala, functional programming, or both. If you are reading this, maybe you are one of them, or maybe you have started to learn Scala by some other means. In any case, if you have…
For the past seven weeks, I have been participating in the online class "Functional Programming Principles in Scala" provided by Martin Odersky, the EPFL, and Coursera. This has not only reignited my more or less dormant passion for the Scala language, but has also been tremendously fun and instructive at the same time. Having just finished the final assignment, let me tell you why. First of all,…
Last Monday, at the August meetup of Bonn Agile , I did a talk about architectures based on the CQRS pattern. I presented various opportunities enabled by this pattern, specifically asymmetrical scaling, separating the models for reading and writing, eventual consistency, and event sourcing. I also put up some very crude demo code in Scala to show how one might implement a command handler and a…
Many books have been published about the technical aspects of software development, and, granted, a lot has been written about how to successfully manage IT projects and about why and how to apply certain agile methodologies. Yet, you hardly find any literature dealing with the human factors of software development, neither does it play a significant role on any of the computer science curricula…
Last weekend, I attended the Advance Hackathon 2012 , which was hosted at the Coworking Space Gasmotorenfabrik in Cologne. Even though I had been intending to participate at such an event for a long time, this was indeed my first hackathon. There were 80-90 people working on 20 projects from Saturday, 10am to Sunday 4pm. All of the projects were very interesting, and most of them managed to make a…
I have been intending to start blogging again for a long time. Now I have finally managed to put this into practice. I am a maker of software, and my plan is to primarily blog about my experience as well as opinions on various aspects of the software development process. But from time to time, I will certainly put on the user hat and write about the intricacies of human computer interaction from…