It is somehow shared knowledge among Haskellers that applicatives allow performing static analysis, while monads do not. But what does it mean in practice? And what kind of static analysis is this referring to? The best answer I could find online is this answer on StackOverflow. In this post...
Haskell is a programming language well known for its usage of monads and for the over-abundance of tutorials trying to explain them. This is not one of those posts. On the other hand, in this post I’ll try to convince you that Haskell without monads (as a main concept) is not only possible, but...
In this post I’d like to try to discuss what functional optics are, without going too much into why they are so cool, and you should use them, or how they are implemented1 and should be used with a specific language and library. I personally think that functional optics should be a really easy...
When we think about interfaces in software development, it’s easy that our thoughts go the interface keyword used in many Object-Oriented languages like Java and C#. But interfaces are a much more general concept, and they could be defined as: an interface is a shared boundary across which...
When we are writing our beautiful code we often need to deal with dependencies, might they be tools, libraries, or simply other code we wrote some time ago. Choosing to use a dependency usually comes with its own set of tradeoffs and constraints. For example using a relational or a...
One of the aspects which sets Haskell apart from other programming languages is that we tend to handle our effects with care. We are used to using monads to encode side effects; for example we use Either e to encode failures, Reader r to describe configuration and State s for stateful...
Last year we installed a 20 SEER variable speed heat pump to replace our old, failing 12 SEER AC and furnace. I ran some numbers prior to the install and expected minimal cost savings. Well, the winter numbers are in and I was way off. I estimated $300 in savings on natural gas, and the actual...
I’m a fan of the character and charm of old houses. Living in New England, I was surrounded by Victorians and Colonials, Federals and Cape Cods. I love to see houses that match their place. I’m delighted by row houses in New York and pictures of Pueblo architecture in the Southwest. My area is...
Since moving into our house in late 2019 I have wanted to replace the kitchen sink. The existing sink was an enameled cast iron double bowl that weighed around 130 lbs. My preference is for one large single bowl so that I can fit my larger pots, pans, and cutting boards. I also wanted to add an...
It is very hard to know what the right answer is these days when it comes to pandemic safety. Government data carries lots of caveats, but roughly 1 in 100 reported cases still lead to death E.g. LA County reports 1017 new cases and 14 new deaths today, 3,476,928 new cases and 33,889 deaths...
It is October 17th, 2019. We are in a drab procedure room at the Kaiser hospital complex in Hollywood. I am holding the hand of my wife – my brave, strong, amazing partner – as her procedure is about to begin. It is June 1st, our wedding day. The celebration is joyous, we are surrounding by...
Query optimisation is one of my favourite things to do because you can get extra performance in response times and because we will use fewer resources in your database. To optimise queries properly, you have to look at the queries but also know something about your application’s domain. I will...
Since I started learning DDD and Event Sourcing in particular, I was always fascinated by the picture that explains everything by Alberto Brandolini. It describes an high level perspective on how to model domains using the elements of event storming. Briefly, it proposes to structure the flow...
Either is one of the easiest data structures which can be used to make your code safer and more composable. It is not particularly complex but sometimes it is still hard to grasp, especially for programmers used to a procedural or object oriented approach. In this post I’ll try to give an...
Soisy is an Italian startup working in the fintech sector, providing a payment by instalments system to affiliated e-shops. Some months ago the need to release a new version of our risk engine emerged, so we started considering how to actually build it. The decision we took was to use Haskell....