I’ve been blogging for 10 years now, starting with a simple opinion on UML. In those 10 years, I’ve had productive and less productive years, in regards to writing. Recently, I’ve had the pleasure of getting involved in HitSubscribe (by Erik Dietrich and his wife Amanda), allowing me to combine something I like with an advancement for my career. Here’s a recap of what I have already published. For Submain, I wrote an article titled Commented Out Code Is Junk

I’ve been programming for more than 10 years now, and only recently heard about Primitive Obsession. I’ve been guilty of this now and then. But I’ve also written/extended a library that tackles exactly that. Primitive Obsession is the use of primitive data types (i.e. strings, integers, doubles, etc.) for simple tasks, instead of using small objects. Examples are currency, phone numbers, postal codes, etc. Why would you not use primitive types for this? Surely a simple concept like a postal

A while ago, I had to explain, not for the first time in my career, why using interfaces, having loosely-coupled code, and writing tests (first) is a good idea. Time and again, I find developers, teams and companies resisting certain ideas that have been around for years or even decades. One of the reasons often stated, is novelty. An idea, principle or technology is refused because it is new and who knows what the next thing will be. Better to

A long time ago, I once read about how true democracy is impossible, but that shouldn’t stop us from trying to achieve it. Actually, it might have been a text about anarchism. I can’t remember. And it was probably more eloquently put, but I want to take that “quote” and change it to: While perfect code is impossible to achieve, we should continuously work towards it I was reminded of this quote when a fellow developer told us he had

If you haven’t tried feature toggles, they may seem daunting and/or abstract at first. But they can be implemented in a very simple way and will provide you with a powerful mechanism to change your code. Once you get to know feature toggles, you won’t ever want to write code without it anymore. And once you’ve implemented it yourself a few times, you’ll want to look at elaborate solutions. Simplifying things more than a bit, feature toggles allow you to

If you use GitHub, Bitbucket or VSTS regularly, you will be familiar with the term pull request. I believe GitLab uses the term merge request, but that it’s essentially the same thing (but don’t quote me on that). What you do is create some changes, and request another contributor to merge those changes into (usually) the main branch. The idea is to have a place where you can see the changes and have meaningful discussions about it. The pull request

Let me set the stage for this post first. Peergroups.be, the sharing economy website I develop for the non-profit WijDelen, is based on ASP.NET MVC. So I have a bunch of Controller classes with methods that end with return View(model);. Our first goal was to have a web application running as quickly as possible. Now that we have a stable system with active users, we’re looking into writing a mobile app. The mobile app can have the same pages/screens as

Here’s something I always need to Google: how to pivot the results of a query in T-SQL. In the Peergroups application, we help people lend objects from their peers. So, simplified, we have a Request table that includes the following example data: Id Description UserId CreatedDateTime 1 A lawn mower 54 2018-01-21 2 A ladder 12 2018-01-24 Other people in Peergroups will receive a message from these users, to which they can reply whether or not they have that object.

I recently had to generate a JSON Web Token (JWT) as a response from an login request to an api. The idea is to POST the user’s credentials from a mobile app, and to respond with a JWT. The mobile app can then verify that the user has logged in correctly. A quick introduction to JWT But let’s step out for a moment. What is a JWT exactly? According to jwt.io, a JSON Web Token is an open, industry standard

If you’re reading this, you may have noticed that you’re currently on petermorlion.com, the address of my blog. It’s a custom domain, served over SSL. Behind the scenes, I’m running the Ghost blogging software on Azure, with Cloudflare in front of it all. I recently had to set this all up again (due to updating Ghost), so I thought I might document the necessary steps. Setting up Ghost on Azure Setting up Ghost on Azure is quite simple. Ghost doesn’t