A Blog about C#, Clean Code, and Refactoring

  • Panik?! Kubernetes ohne Docker

    Das steckt da wirklich hinter Vor ein paar Tagen stieß ich auf einen Artikel mit dem verwirrenden Titel „What Does Kubernetes’ Docker Deprecation Mean for Users“ oder zu deutsch „Was bedeutet die Einstellung von Docker in Kubernetes für Benutzer?“. Der Artikel impliziert, dass eine Microservice Architektur auf der Basis von Docker nicht mehr auf einem […]

  • Bullet Journal Templates

    Not Just Talk But Act OneNote is very flexible and you can move pages around and reorder them. So I won’t spend much time now on structuring my Bullet Journal. I simply created a section for „Januar 2023“ with a page for each day and a section for „Year 2023“. And then, I started filling […]

  • OneNote as Bullet Journal

    Bullet Journaling For a couple of years, I use the technique of a bullet journal to get my days, weeks, and months organized. I am not someone who can handicraft for hours as relaxation. So my bullet journal was just a huge book with handwritten notes and a default calendar so I don’t need to […]

  • Create C# SMTP Server

    It took a while to find a library which provides a SMTP server. There are a lot of SMTP clients out there, but the number of SMTP servers seems very limited. Finally, I found a library SmtpServer with an SMTP server and several hooks to extend the functionality. Open port 25 The documentation is straightforward […]

  • ESP8266, Homematic & Raumtemperatur

    Projektziel: Temperaturanzeige Für meine Hausautomatisierung benutze ich eine Homematic von ELV. Mit der Erweiterung „XML-API“ kann man die Sensoren auslesen und steuern. Für mein erstes Projekt wollte ich die Temperaturen der HM Thermostatventile auslesen und über ein kleines Display anzeigen. Komnponenten & Bibliotheken Für meinen Prototyp benötige ich die folgenden Komponenten Zusätzlich habe ich noch […]

  • Pre-Compiler Directives That Make Sense

    The [last blog article](/posts/sonar_code_duplicates/) was dealing with the same linked file in different projects. A reason could be, that some code needs to be compiled with different frameworks. In my case, I had to compile business logic with Microsoft CSOM for SharePoint 2016 and Microsoft CSOM for SharePoint Online. The API is more or less […]

  • SonarQube Code Duplicates

    Sometimes you need to copy code between different projects for several reasons. It is required that the same class has to be in both projects e.g. a class that is compiled with different frameworks. But this has a negative impact on code analysis results regarding code duplicates. So let’s take an analysis result of a […]

  • Dynamically create a generic using reflection

    A long time ago I created a class which helps create a sut for unit testing. This class is generic and has the type of the sut as a generic parameter. Details see ContextFor<> zum Testen des SUT. Now, I was trying to use the `ContextFor<T>` in a data-driven test which passes the type as […]

  • Lazy loading of assemblies can be tricky

    NUnit error message on data-driven test: `Test` is Inconclusive ReSharper Test Runner warning: Element `Test` was left pending after its run completion. Recently I was doing some testing and trying to check if all classes have a corresponding test class. Therefore I used data-driven NUnit tests, which uses a list of all classes in non-test […]

  • Powershell 7 and „Trusted Publishers“

    Untrusted Publishers Recently, I installed `Powershell 7` and was using it for a while. After settings my code security to AllSigned, I got the following error. File C:\…\PSReadLine.format.ps1xml is published by CN=Microsoft Corporation, O=Microsoft Corporation, L=Redmond, S=Washington, C=US and is not trusted on your system. Only run scripts from trusted publishers. This is a little […]