New tricks for an old dog – what I learnt from VS Code

After nearly a decade of coding in Visual Studio, a recent change in employment has put me in front of VS Code. The experience has had its ups and downs, so I thought I’d post a few pointers for anyone else who ends up in my situation. Moving beyond practical matters, I’d also like to take a moment to reflect on what the experience of weaning myself off Visual Studio has taught me. Zooming out further still, I close this post by considering what VS Code says about the state of the .NET ecosystem and try to put it all in perspective. If you can stomach all that, read on…

Continue reading

How-to: Set up log4net on a new project

Today I want to talk about adding log4net to a new project. It’s not hugely complicated or high-tech, but there are a few factors that mean I always seem to struggle with one aspect or another. There’s usually an irritating couple of minutes when I’m Googling questions and seeing purple links! This post is a sort of memo to myself then, and perhaps next time this post will be among those Google results!

Continue reading

What is “boxing”? (And why should you care?)

If, like me, you’re coding education was (ahem) “non-standard”, you might not have given much thought to the underlying mechanics of how .NET uses memory. Us C# developers are a bit spoilt really. We can pretty much get on with the coding, without having to concern ourselves with allocating memory or worrying about leaks. The CLR does an excellent job of sorting it all out behind the scenes.

It was only when boxing came up in a conversation recently that I realised how flakey my understanding of memory management in .NET really was. I mean, I sort of knew the concepts, but I think I thought I knew it better than it turned out I did. So I went away and brushed up and thought I might as well share my new understanding. In this post I’ll try to cover some basic concepts, such as value types vs reference types, the stack and the heap, and boxing and unboxing. I’ll finish by explaining both why you should care and why it’s less of an issue these days. In future posts, I may go a bit deeper into some of these concepts, using this post as a reference. Continue reading