2016s
Validation with Either data type in C#
In this article we will employ a functional monadic concept Either to make validation code more expressive and easier to maintain.
Read more...Fire-and-forget in Service Fabric actors
At the recent Webscale Architecture meetup we discussed two implementations of the Actor model in the .NET ecosystem: Akka.NET and Azure Service Fabric Actors. One important discussion was around Ask vs Tell call model.
Read more...Monads explained in C#
The newer and much longer version of this article is now available: Monads explained in C# (again) It looks like there is a mandatory post that every blogger who learns functional programming should write: what a Monad is.
Read more...Building a Poker Bot: Card Recognition
This is the first part of Building a Poker Bot series where I describe my experience developing bot software for online poker rooms. I'm building the bot with .NET framework and F# language which makes the task relatively easy and very enjoyable.
Read more...Akka.NET-style actors in Service Fabric
Akka.NET and Service Fabric are the two actor frameworks that emerged in .NET world in the last year. The two implementations of actor models are quite different. These differences are multi-faceted but today I want to focus on API to define an actor and to communicate to it.
Read more...Building a Poker Bot: String and Number Recognition
This is the second part of Building a Poker Bot series where I describe my experience developing bot software to play in online poker rooms. Reading cards and other fixed images was the first step. The bot should also be able to read different text-based information from the screen.
Read more...Unit testing Dapper repositories
Dapper is a micro-ORM library which is very simple and super fast. Quite often the data access code is difficult to be unit tested. In this post, I present some ideas of testing Dapper-based database access.
Read more...Building a Poker Bot: Mouse Movements
The last step of the poker bot flow: clicking the buttons. The screen is already recognized, the hand is understood, the decisions are made and now the bot needs to execute the actions. This means clicking the right button at the poker table.
Read more...Aurelia Map Component with Leaflet
This is a short tutorial on how to create a map control in an Aurelia.js application. I am using the Leaflet library with custom tile source and I also show the way to implement your own overlay layer.
Read more...Functional Actor Patterns with Akka.NET and F#
My exploration of Actor model started with Akka.NET framework - a .NET port of JVM-based Akka. Actor programming model made a lot of sense to me, but once I started playing with it, some questions arose.
Read more...Building a Poker Bot with Akka.NET Actors
This post lays out the most exciting part of the bot. I'll compose the recognition, flow, decision and mouse clicking parts together into the bot application. The application is a console executable interacting with multiple windows of poker room software.
Read more...T-SQL MERGE statement is underrated
How many times did you write a SQL to save a row without knowing whether the same primary key already exists or not? You just get an object in your data access layer and you want to save all fields into the database.
Read more...Tweaking immutable objects with C# and Fody
Immutable data structures provide a lot of benefits to programmers, especially when representing domain value objects. Immutability is an essential part of functional programming paradigm. The concept is useful in object-oriented languages too, but you have to pay some price to get this advantage.
Read more...Dependency Inversion Implies Interfaces Are Owned by High-level Modules
Dependency Inversion is one of the five principles of widely known and acknowledged S.O.L.I.D. design guidelines. This principle is very powerful and useful when applied consistently.
Read more...Building a Poker Bot: Functional Fold as Decision Tree Pattern
This is the fifth part of Building a Poker Bot series where I describe my experience developing bot software to play in online poker rooms. I’m building the bot with .
Read more...Mocking API calls in Aurelia
Aurelia is a modern and slick single-page application framework. “Single-page application” aspect means that it’s loaded into the browser once, and then the navigation happens on the client side and all the data are loaded from a REST API endpoint.
Read more...Comparing Scala to F#
F# and Scala are quite similar languages from 10.000 feet view. Both are functional-first languages developed for the virtual machines where imperative languages dominate. C# for .NET and Java for JVM are still lingua franca, but alternatives are getting stronger.
Read more...