Constructors are not simply meant to be null-valued instanciators for objects. They server a multiple purpose with up to four different operations done in a single semantic spec. This has a lot of advantages and should be used more often !

Read More

Comment are great. Comments are amazing. But we (and I include myself) very often misuse them. This post doesn't really say anything that hasn't been blogged about before. It just add my own take on the matter.

Read More

It is often said that the hardest part of software engineering is naming. Functions, variables, classes ... anything really. I disagree. Naming is easy. Naming should be a description, it servers the same purpose as a comment, but better.

Read More

This post describes the only way I found so far to overcome the poor built-in support of enum in the swagger-doc and Swashbuckle.NET. It requires a change in the way the swagger doc describes enums and has some fairly major shortcomings ...

Read More

With a web project 'YYY', that has a reference on a class library project 'XXX', building in my dev environment worked like a charm, like all software should.

Now when I was building the same project in AzureDevops in order to deploy it in the pr├ęproduction environment, the build failed with a good lot of errors that looked a bit like this:

[...] Error CS0246: The type or namespace name 'XXX' could not be found (are you missing a using directive or an assembly reference?)

Read More

After having generated a C# REST client using the swagger-codegen java tool, I started using it in my application to send requests to the REST API. The usage of this client is very simple, all you have to do is instanciate an object and the call the apropriate method with the right parameters, no config required, plug'n'play style. Until you want to target an endpoint which is not the one from which the code was generated ... It gets a bit foggy then an somewhat lacks documentation regarding the "normal" way to do it.

Read More