Skip to content

Coding Practice

Boost your Debugging Speed with OzCode

In a perfect world, no one needs to debug. All code is covered by tests and if something goes wrong, it's just adding yet another test. It's a whole other story in legacy code, where the debugger is your only chance to figure out what is going on. A tool like OzCode will make debugging a whole lot faster.

Let Death Code Die

Let's talk about some of the more annoying habits many programmers have: the inability to delete code. Code is kept around as if their life depends on it, even when its purpose is long gone. They do all possible things so they don't have to delete anything. They comment code out, put unreachable conditions around it or throw files out of a solution (in Visual Studio), just to keep the file in a place where no one is looking. All this is clutter and needs to go away.

/etc/hosts on Windows and Mac

The /etc/hosts (or hosts file) is a small text file that maps (domain-) names to IP addresses. It's especially helpful when you want to use an easy to remember name for a computer in your home network. Another good reason to use it is for development purposes. With an entry in hosts file you can check if your website works long before the DNS system has distributed the new IP address.

Passwordless Backup with Synology DiskStation

The network attached storage appliances from Synology, called DiskStation, are great backup devices. They come in various sizes and don’t need much maintenance. The only thing that is a bit annoying is the password prompt whenever I use rsync to backup my files. With public key authentication over SSH that problem can be solved without risking the security of my data.

Allowing Self-Signed Certificates on Localhost with Chrome and Firefox

HTTPS for web applications is soon no longer an option, but a must-have. When you develop your application on your local machine, you may want to use a self-signet certificate. They cost you nothing and tools like Visual Studio create them on the first run in IIS Express. Everything would be great if current web browsers wouldn’t show you an error page like this one:

The Problem

Fixing Unicode Characters When Using DbUp

DbUp is a great tool to manage your database migrations. As I wrote here, it’s simple and easy to use. However, when it comes to edge cases like the German umlauts, that simplicity can have its downside. With neither a flag to change the encoding nor a way to interfere with the execution, it seems as if DbUp isn’t up for the task.

But don’t jump too early to this conclusion. It’s wrong and the source of the error is SQL Server, not DbUp.

Simple Database Migrations with DbUp

Keeping your database up-to-date with your code is an important task. There are many different approaches and even more tools to support you. However, they often come with a price you may not be willing to pay.

A different way goes DbUp. This little tool helps you to update your database in a simple, understandable manner. It can’t do everything, but what it can works great. Let’s have a deeper look at DbUp.