Your source of geek knowledge

Y

Latest stories

Our journey to F#: bye-bye fluent syntax

O

In C#, our preferred way to define a builder is using a fluent syntax. Whether it is setting up the system under test in our specifications by defining how we want external calls to be faked, setting up complex test data or defining the steps to be executed in an operation with automatic compensation in case of an exception. In F#, this works, but feels weird, because a fluent syntax typically uses classes and/or extension methods and there are a lot of . involved. So we experimented with a...

Our journey to F#: Know your shortcuts

O

I develop code with C# for 18 years and I’m a heavy ReSharper/Rider user. So I know a lot of shortcuts. Really a lot.Actually, my fingers know them. Whenever I get asked during pair programming how I did this, I almost certainly reply with: “ask my fingers, I don’t know.”

Programming in F#, I had to retrain my fingers to use some new shortcuts that I was not used to. And that’s why I share them here with you:

Our journey to F#: Learning the basics of F#

O

To start our experiment with F#, we first needed to learn to write code in F#. Read a little I knew about the site  quite some time, but finally, I took the time to read some posts there until I thought I’m fit enough to code something real. Code a little Once upon a time, I wrote a report generator for xBehave.net in C#. The report generator generates a markdown report from the results of a test run of xBehave.net tests/specs. The code was old and lacked some features. So I started...

Our journey to F#: Prolog

O

The past I’m a C# developer since .Net came into life in 2002. I’ve built many systems using C#, and I like(d) it. C# is an excellent object-oriented programming language. For the last five years, I’ve built only backend systems with C# – the clients were web clients. The backends we built were almost entirely stateless. Either the client holds the state or the state resides in a database. So we started to write stateless C# code. Today, we write lots of read-only data...

Azure Service Bus .NET SDK Deep Dive – Deduplication

A

Explains how de-duplication can help to make sure a message is only delivered once within a certain time period, for more posts in this series go to Contents. In the posts atomic sends and send via I showed ways to achieve atomicity for a group of messages or messages that are sent out as part of an outgoing message. Let’s have a look at a piece of code that looks super simply but might always behave like you’d wish it should behave: public async Task<IActionResult>...

Azure Service Bus .NET SDK Deep Dive – Sessions

A

Explains how message sessions can be used to de-multiplex interleaved message streams and guaranteed ordered delivery, for more posts in this series go to Contents. Usually, when someone asks what the characteristics of a queue is most people would say First-in, first out. The thing is though with regular Azure Service Bus queues that is not guaranteed. Simply because you might do concurrent receive operations on the same queue or a message that failed processing will be handled later due to...

Azure Service Bus .NET SDK Deep Dive – Transfer DLQ

A

Explains where messages go when they can’t be transferred to the destination, for more posts in this series go to Contents. A while ago, I introduced the concept of deadlettering messages in which I talked about where messages go in case of message expiry, reaching the maximum delivery count, or they were forcefully dead lettered. In the posts about atomic sends as well as send via, I showed how a transaction scope can be used to group send operations together into atomic units that...

Azure Service Bus .NET SDK Deep Dive – Runtime Information

A

Shows how to query runtime information using the management client, for more posts in this series go to Contents. Quite early in this series I introduced the ManagementClient to create queues for example. Besides being able to create entities like queues, topics and subscriptions the management client provides the capability of querying runtime information from namespaces, queues, topics and subscriptions. The ability to query runtime information is quite handy for diagnostics purposes, check...

Azure Service Bus .NET SDK Deep Dive – Send Via

A

With SendVia, it is possible to create an atomic transaction between the incoming message and outgoing messages, for more posts in this series go to Contents. In scenarios where transactional processing is required for an incoming message that would generate some outgoing messages, the incoming and outgoing messages should all succeed or rollback. Failure to do so would either create duplicate processing (failure to complete the incoming message) or ghost messages (failure to revert the...

Recent Posts