## Blog: Ramón Soto Mathiesen

### First thing first

Before you can create your own F# logo, you will need a drawing/editing program with support for layers. If you work on a Windows box, you might as well go with Paint.NET - Free Software for Digital Photo Editing, but if you are on a *nix box as myself, you might want to give Pinta: Painting Made Simple a try.

Your logo file should preferable be in a looseless format and with the following measurements: 200 pixels x 200 pixels.

from the The F# Software Foundation Logo for F#. You should have the following in a local folder by now:

### Let’s do it!

The initial logo looks like this:

Once the file is open in Pinta, we will create a new file with the same dimensions and save it with the OpenRaster format (.ora). This format supports layers, which is indispensable for this kind of work. We will create an empty layer called frm and we will import the fsharp100mclight.png as a layer (Menu |> Layers |> Import from File…)

We will now choose our logo file and select all and copy it.

Afterwards, we will paste it into the frm layer. As the frm layer is below the transparent F# logo layer, the F# logo will still be visible (slightly).

The reason the logo is not blending in well is because I have a black background. In order to make the logo visible, I will change the colors to dark green and light green.

And you are done:

Easy right? Btw I tried out changing a bit the colors in order to comply with the terms of use:

… I’m not convinced though.

Update: @ReedCopsey sent me the following logo which is pretty much awesome!!!

I have no clue how he has done it, but at least it doens’t violate the terms of use. The lesson learned here is that the F# Comunity will help you out if you aren’t able to do it yourself which is pretty cool.

### It wasn’t that bad, Nykredit only lost 650.000 USD but …

A couple of days ago, a Danish Finance Institution, Nykredit, was in the media due to a stock mistake: Stock mistake costs Nykredit millions. The mistake was that instead of selling 4 A.P. Møller - Mærsk B at 14.000 DKK/stock, the stock broker sold 14.000 shares to the price of 4 DKK/stock.

A bit of simple mathematics will show us how bad that deal was:

• 14000 x 14000 - 14000 x 4 = 195.944.000 DKK

in looses, more or less 33 million dollars. The finance institution was lucky that the deal was made in the last five minutes before the close of trading, where all deal are secret and the final price is set when trading in closed, which in this case was 13.980 DKK/Stock. Nykredit only lost 3.780.000 DKK, about 650.000 USD, which given the circumstances wasn’t that bad.

You might be thinking: “How the heck can a Finance Institution make such a big mistake, aren’t these guys supposed to be looking after our money?” but then you also might think: “Well these greedy bastards had a lot to do with the financial crisis so …” The main issue here is, why would the stock broker even be allowed to make this kind of mistakes? The answer would be that most business critical solutions are still made with an old fashioned approach.

I will, in very few lines of F# code, show how this kind of mistakes would never be possible by using their Units of Measure to construct a very simple but correct and robust DSL (Domain specific language):

In the example above, the stock broker needs to explicitly assign to each of the used integers, a corresponding units of measure tag. The result is what we intended it to be, which we also don’t need to make any kind of unit test, as we have ensured that is not possible to represent an illegal statement with our domain:

Sadly, there are still to many people, in charge, that live in the past and keep banging their heads against the same walls over and over again instead of taking a ladder and climb over them once and for all … Anyway, if you want to read a few testimonials on how using this kind of approach, please visit: