Long paths in C#

By default, Windows uses a maximum length for paths that is 260 characters. This includes the drive letter – for example “C:\” – and the terminating null character. So this leaves you up to 256 characters for a path. This limitiation is defined due to the restrictions of the Windows API.

You can however use longer path names, that are up to 32767 characters. Within C#, there are serveral ways to achieve this:

  • By adding \\?\ in front of a path;
  • Using Windows 10 version 1067 or higher, updating the systems registry and your application manifest.
Read More…
Posted in Uncategorized at January 30th, 2023. No Comments.

What I’ve learned working at a startup

Within my previous employer, I worked at a startup company, where we created our own hardware, the software that addressed that hardware and a cloud environment. Before that, I once also worked at a startup, where the product contained a video conference application. Taking those experiences into account, I want to look back what I’ve worked during working within a startup.

Read More…
Posted in Uncategorized at December 27th, 2021. No Comments.

Do we need need software architecture or even software architects?

A lot of projects struggle with the fact, when and how much time needs to be spend on software design and software architecture. Although these are two separate things, they are entangled with each other.

I once had the discussion with a software developer that no time should be spend at all on software architecture. To him writing down software designs and architecture where not needed at all, it would turn everything into concrete. The design and architecture would grow naturally while coding. Assuming that, architecture and design would imply that once written, you never could change it. As we will see later on, leaving out the design will even lead to software that can’t be changed later on.

On the other side, there are projects where pages of documentation regarding the architecture is described. To find out what the good balance is and when to spend time at design and architecture within Agile, I started to look what exactly the two area’s tend to fulfill and how they could be embraced by Agile.

Read More…
Posted in Uncategorized at September 30th, 2020. No Comments.

Tool for checking which process blocks a certain file

Not necessary within programming, but sometimes you encounter a situation where a file is blocked and you can’t think of which program is actually locking this file. I used to use LockHunter, but the main drawback of this tool is that you have to install it. If you have a situation where you don’t want to install a tool like this, you can use Handle which is part of the Microsoft SysInternals. You can find it over here: https://docs.microsoft.com/sysinternals/downloads/handle.

When you run it in a command prompt, you get an overview of all processes which are running on your computer and an overview of which files it is blocking at the moment.

Posted in Uncategorized at February 28th, 2018. No Comments.

The art of writing unit tests

With keeping up the quality of your code comes writing unit tests. In its origin, a unit test tests the behavior of a method of a certain class. People tent to fall into writing more integration of system tests, where they test several components at once. Unit tests then become very hard to maintain. What does a good unit test consist of and what do we test?

Read More…

Posted in Uncategorized at December 27th, 2017. No Comments.

AnyCPU, x86 and x64 in Visual Studio

Within Visual Studio, you have the option to build your .Net application either for x32, x86 or AnyCPU. AnyCPU will allow the JIT-compiler of .Net to run the application on a 32-bits system in 32 bit and a 64-bits system in 64 modus.

Although this seems like a nice option, you will run soon in problems when compiling to third-party libraries. The third-party library can be pre-build into 32-bit or 64-bit. When you now compile your .Net application to AnyCPU against a 32-bit third-party DLL, it will give an BadImageFormat exception when running on a 64-bit system. The .Net application will, due to the AnyCPU option, run as a 64-bit application. Since the third-party library is 32-bit, this will clash.
Although you compile your application for AnyCPU, but select “Prefer 32-bit”, it again will be compiled into 32-bit when running on a 64-bit machine.

Read More…

Posted in Uncategorized at September 1st, 2017. No Comments.

Books you should read as a software developer

Why don’t you speed up your skills by simply learning from others who gained knowledge about your field? When I first entered the field as a software developer, I searched for some books that also could speed up my learning. There are a great number of books which learn you the actual (basic) skills you need to have. In this post I will provide you some books which you should definitely read to improve your knowledge. Do you have a book which is not in this list and each one should definitely know? Then drop me a message in the comment section below this post!

Read More…

Posted in Uncategorized at May 1st, 2017. No Comments.

Dependency Injection

When designing software, it’s a good thing to have a good separation between components, where components know as less as possible from other components. Components are specialized in one task and have well-defined interfaces (this also avoids “god classes” which knows to much or does to much) and components can be reused.

Read More…

Posted in Uncategorized at April 20th, 2015. No Comments.