In this blog post, I describe the way we currently work as a team to deliver our product (TimeRocket) to our users and customers. This reflects our current understanding of working in an agile* way that matches our needs and skills. We are uncovering better ways of developing software by doing it and helping others do it. Manifesto for Agile Software Development (agilemanifesto.org) As the manifesto for Agile Software Development states, we continuously try to improve our way of working, so...
Today’s random F# code: one-line unit tests
Myths about F#: F#’s strict ordering is dumb! No, it’s great for taming dependencies.
In F#, you specify the order of files explicitly. Any code can only reference types, modules and functions that are higher up in the same file or in a file higher up in the file list. When starting with F#, this feels strange because most programming languages don’t rely on ordered files. Some call this feature even dumb.
Myths about F#: F# is slow! No, F# can be really fast.
Today’s random F# code: Using measures to give types more meaning
We use NodaTime in our application to deal with time. As you may remember, time is very important in our application – it’s a attendance time-tracking tool with duty planning and many more features. For example, we use Instant to model a point in time. But sometimes, we need a point in time with a granularity of minutes, not nanoseconds. Instead of introducing our own type to model an instant with minute granularity, we use an Instant with a measure. Let’s see how this works:
Myths about F#: F# is hard to learn! No, it’s just different than C#.
A typical conversion: Me: “Did you take a look at F#?”Paul*: “No, it’s just too hard to learn!”Me: “Why?”Paul: “I don’t understand anything because of the syntax.” *Paul = Person assuming unyielding learning F# isn’t hard to learn. But you probably have to learn four concepts that you may never have seen before** **unless you have experience in other functional programming languages Let’s see these concepts and how you can...
Object-Oriented vs. Functional Programming with C# and F# [Presentation]
Myths about F#: We can’t use F# because we can’t rewrite everything from C#! You don’t have to, use Interop.
Most code running on .Net is written in C#. So when you consider writing some code in F#, you probably already have a good amount of C# code. C# code you want to keep. It probably doesn’t make economic sense to port C# code to F#.
The good news is that you can start using F# anyway. F# and C# have excellent interoperability.
Today’s random F# code: Using Verify to prevent breaking changes in stored data
We use event sourcing in many sub-systems of our application to store data. We serialize the data of the events as JSON and store the JSON in the database. To ensure that we don’t change the structure of these event data and by this introduce backward compatibility issues, we use Verify to snapshot test the event data.