Maintaining the Identity of an Object Graph

Hands up if you have ever built a highly interactive WPF application! I feel your pain. 🙂 Typically, in Banking the traders want to have all relevant information required for their day-to-day business compactly presented in very few or only one screen(s). This becomes challenging when the individual components are interactive, need to be up-to-date… Read More »

BIS Statistics F# Type Provider [alpha version]

The Bank for International Settlements (BIS) publishes statistics about the global financial system. The data is compiled in cooperation with central banks and other national authorities and provide information about financial stability. More information can be found on the BIS statistics website. Data exploration can be done either through the BIS Statistics Explorer, BIS Statistics… Read More »

Exploring World Bank Data with F#

As part of my F# journey, I came to the idea to explore data provided by the World Bank. The follow F# code fetches Diesel prices in USD per liter. These compontens have been used: WorldBank Type Provider This provider enables the access to the World Banks data in a type-safe way. The beauty about… Read More »

F# Journey: Course 3 – Discriminated Unions

It has been a long time since my last post here. One of my colleagues told me that the receptiveness of the human brain shrinks after reaching the 27 year. So it’s about time to learn F# before it’s too late! 🙂 In this post I want to present an calculator example with discriminated unions.… Read More »

My 2 Cents on Singleton

The implementation of the singleton pattern is pretty easy. However, despite the simplicity I see often that the pattern is being misused or implemented wrongly. What I’ve seen so far: The implementation is not thread-safe. (coding issue) Tight coupling: The business code/logic accesses a static property of a class in order to utilize the singleton… Read More »

IQueryable vs IEnumerable vs IHaveHeadache

Yes.. this ist just another blog post about IEnumerable and IQueryable. But the topic is quite important and I think it worth discussing about both approaches. Recently I had a discussion with a software architect about the implementation of the repository pattern. The question was: Should the repository return IEnumerable or IQueryable? So let’s do… Read More »

WCF Configuration for Large Data

In one of our projects we had to transfer large data from the server to the client WPF application. In the beginning we had some performance issues. Therefore we decided to do some comparisons between ASP.NET Web API, WCF (with and without protobuf-net). The configuration: ASP.NET Web API WCF (Protobuf) WCF – Protobuf serializer –… Read More »

C# Code Snippet for Unit Tests

After coding unit tests the whole day, I decided to create a nice Visual Studio snippet which helps me to write the test method quicker. I usually structure my unit tests like this: public void Validate_ReturnsFalse_WhenStringIsTooLong() { // Arrange var expectedResult = false; var watheverMock = new Mock<IWathever>(); // Act var validator = new Validator(watheverMock.Object);… Read More »

Entity Framework and Expression Queries

In my current project I had to generate a Entity Framework query based on some search criterias defined in a dictionary. The structure of the dictionary was similar to this example here: var searchCriteria = new Dictionary<string, List<string>>() { { "FirstName", new List<string> { "Darko", "NoName" } }, { "LastName", new List<string> { "Micic", "MĂĽller",… Read More »