The 1.0.0 of Idris has been released just a few months back, just enough to start trying out the language and some of the possibilities dependent typing offers. Back in July, we implemented a type safe bowling kata in which we could not create a bowling game that would not satisfy the rules of the... Continue Reading →
Monoids: what they are, why they are useful, and what they teach us about software
Monoids are a pretty interesting concept in software development. Monoids are everywhere. Monoids are simple yet powerful. And Monoids have a lot to teach us about software, in particular about composition and building powerful abstraction. This post will take you through a small tour of what Monoids are and are for. We will first define... Continue Reading →
How to make a better polymorphic clone in modern C++
This short port is an answer to the blog post of @JoBoccara on how to make a polymorphic clone in modern C++ in the presence of smart pointers. The goal of this post is to explain in which aspects the solution of the OP is not really satisfying, and to provide what I believe to... Continue Reading →
How the List Monad helped me better understand Non-deterministic Polynomial time complexity
I have always been puzzled with the definition of NP: Non-deterministic Polynomial time complexity. A problem is in NP if it can be solved by an algorithm that runs in polynomial time on a non-deterministic Turing Machine, a computer that can "guess" which path to take toward the right answer when given a choice. I... Continue Reading →
A follow up of the study of 4 Money class designs: why not having currencies as type parameters?
In the previous post, we went through a comparative study of 4 different designs for a Money class that represents an amount of money. To do so, the Money class groups an amount with a currency (its unit) and implements a safe arithmetic which takes into account the currencies. This article received a quite positive... Continue Reading →
A study of 4 Money class designs, featuring Martin Fowler, Kent Beck and Ward Cunningham implementations.
Following a TDD training that could have gone better, I started to read the Test Driven Development: by example book (by Kent Beck). It offers a perspective on TDD that is far from being dogmatic. It is a really good back and I highly encourage you to read it. But this post is not about... Continue Reading →