I noticed something recently, that I was using exactly the same logic in two seemingly unrelated aspects of my job. Database transactions and self-contained chunks of engineering work are exactly the same! Bear with me… First, you probably already know what I mean by a database transaction, but just in case: When you want multiple … Read more
I’m pleased to announce that my book “Async in C# 5” has been published by O’Reilly! http://oreil.ly/QQBjO3 If you want to know about how to use async, and whether it’s important for your code, I thoroughly recommend reading it. It’s the best book about the subject I’ve ever written. In fact it’s probably the best … Read more
I had a bit of spare time last week, so .NET Demon has a new feature for web developers. It’s called LiveReload Integration, and it uses the existing tool, LiveReload, which is popular with web developers on Macs. Every time .NET Demon finishes building your project, it will reload your tab in Google Chrome. For … Read more
I’ve just found the coolest feature of VS 2012 by far. I thought that being able to silence an exception from the “exception was thrown” popup was awesome, and the “reload all” button when a project file changes is amazing, but this is way beyond all of that. You can step over awaits when you … Read more
The .NET Demon team have just implemented an experiment that is quite a break from Red Gate’s normal business model. Instead of the tool expiring after the trial period, it now continues to work, but with a new message that appears after the tool has saved you a certain amount of time. The rationale is … Read more
I’m pleased to announce that .NET Demon will be shipping simultaneously with Visual Studio 11, whenever it ends up being released. That means we’re going to make sure that a version of .NET Demon is released very near to the Visual Studio 11 final release which supports the new version of VS fully. The interesting … Read more
I reckon that I come across enough interesting C# and coding related stuff that I can keep a twitter account busy just with my thoughts on those subjects. I only have one follower so far, which makes me sad, so please follow me and make me feel popular. @alexdcod… Read more
I’ve just found something quite cool. It’s a code snippet that lets you use the real VS 11 C#5 compiler to write code that uses the async and await keywords, but to target .NET 4.0. It was published by Daniel Grunwald (from SharpDevelop). That means I can stop using the Async CTP for VS2010, which … Read more
Today’s post will explore why the current ways to communicate between threads don’t scale, and show you a possible way to build scalable parallel programming on top of shared memory. The problem with shared memory Soon, we will have dozens, hundreds and then millions of cores in our computers. It’s inevitable, because individual cores just … Read more
I’d like to present a new tool for .NET Developers that we’ve been cooking up in the Red Gate .NET team. It’s only a beta at the moment, but it works for most people. .NET Demon Beta It’s a Visual Studio extension that cuts the time you spend waiting to find whether your code is … Read more
Programming to take advantage of multicore processors is hard. If you let multiple threads access the same memory, bad things happen. To avoid this, you use the lock keyword, but if you use that in the wrong way, your code deadlocks. It’s all a nightmare. Luckily, there’s a better way – Actors. They’re really easy … Read more
Our obfuscator, SmartAssembly, does some pretty crazy reflection. It’s an obfuscator, it’s sort of its job to do things in the most awkward way possible. But sometimes, you can go too far. One such time is this little gem from the strings encoding feature: It’s designed to find the type where the calling method is … Read more
.. but it isn’t 🙁 Visual Studio’s remote debugger is a really neat bit of kit that lets people with a lot of patience and no firewalls debug processes on a test machine using a visual studio instance on a completely separate development machine. Obviously it would be great if you could combine this ability … Read more
Back when we were designing the new memory profiler last year, Andrew had realised that there was one thing that made all the exisiting memory profilers slow the profiled application to a crawl. That was remembering the place in the program (the call stack) that every object gets allocated. We’ve decided to take this feature … Read more
In my earlier post I mentioned that there are a couple of design patterns that I think are wholly wrong. The one that I’m most convinced is an abomination is the singleton pattern. The basic idea is that you make a class that should only ever have one instance, and you provide that instance by … Read more
I realised my last post was a bit negative, so I thought I’d do a quick one with my 2c about what you should do instead of following patterns. There obviously needs to be a way by which you can judge how good code is, a “design principle” if you like. In my world, there … Read more
When I first started work, my manager decided that it’d be a good idea to make sure I was well trained enough to design good code. That sounds fair enough. So I was given a book (or told to read a website, I can’t remember) about design patterns. The “Gang of Four” was mentioned, which … Read more
I’m Alex, and I’m going to start writing blog posts when I think of something interesting to say. I’ve been working in the .NET division for five months now, developing ANTS Performance Profiler and ANTS Memory Profiler (and a little bit of Exception Hunter when the mood takes me). Last year I was a computer … Read more