The ThrowIf* Method Pattern

The ThrowIf* Method Pattern
   There is a simple pattern that is extremely effective and increases source code readability with practically no downsides. Sadly this pattern is underused and many developers do not even think about it. I am talking of course the ThrowIf methods used to throw exceptions when validating state and arguments.
Posted by:   Stilgar
22:59 13.08.2017

C# 7.0 Features

C# 7.0 Features
   With C# 7.0 now released, it is time to share my opinion, also known as the correct opinion, on the new features. People who are too lazy or uninformed to form their own opinion can safely use mine. I will not charge you for that. Sharing my opinion is absolutely free. If you are interested in more impartial overview of the features (i.e. if you really want to form your own opinion and risk being wrong) you can read Microsoft's post on the topic and the Stack Overflow documentation article. So let's begin...
Posted by:   Stilgar
16:28 06.04.2017

Why I Will Not Use AutoMapper

Why I Will Not Use AutoMapper
   AutoMapper is a library used to copy the properties from one object to another. Developers usually need this to copy data from their entities to their view models or DTOs. I once evaluated AutoMapper for a project and decided that I do not want to use it. Now I am working on a project where I am not the one choosing the tools so I get to use it. I have now confirmed that using AutoMapper is the wrong choice for most projects but interestingly the real-world issues with it were different from what I expected...
Posted by:   Stilgar
02:16 01.10.2016

The NSubstitute Library Is a Piece of Programming Art

The NSubstitute Library Is a Piece of Programming Art
   In the last couple of months I had to use the NSubstitute library. On their github page they define the library as "a friendly substitute for .NET mocking libraries". Essentially it is a mocking library but slightly different. In the past I have used Moq which is considered a high quality mocking library in the .NET world and while unit testing is probably my weakest side as a (business software) developer I have no reason to doubt that. That being said NSubstitute beats Moq so hard it is not even a competition.
Posted by:   Stilgar
21:41 14.09.2016

An Easy Way to Improve Code Readability

An Easy Way to Improve Code Readability
   Readable code has a lot of properties. Following conventions, consistent formatting, proper naming and even architecture affect readability. There is one aspect of readable code that I find often neglected and even broken on purpose for dubious reasons. Good code reads almost like a natural language sentence. While I am all for conventions and formatting I think staying closer to natural language is the most impactful feature of readable code...
Posted by:   Stilgar
16:33 14.05.2016
First Previous 1 2 3 4 5 6 7 8 9 10  ... Next Last