If you’re not familiar with System.Runtime.Caching.MemoryCache, chances are that the following code does three things you wouldn’t expect… https://gist.github.com/alexdresko/bd08881515a0a7a5ad0f Take a look at the call… Read More »MemoryCache – Acceptably unpredictable
Forget about the code for a moment. Find your happy place. Know that you already have all that you need for happiness in this world.… Read More »Writing code – 5 quick steps for getting in the zone
We devs… We write code, save, flip over to the browser, press F5 to refresh the page… and wait. And wait. And probably wait some… Read More »Time saver – Audible page load notifications
Whether you realize it or not, you need a tool that finds duplicate source code in your applications. In fact, if you’ve never used one before, you probably don’t realize how much you need an automated solution to this problem. It’s nearly impossible to manually locate the types of duplicate code that such a tool can easily bring to the surface. Even if you think you’re intimately aware of an application’s code base, every line of code you write contains the potential to awaken the duplicate code dragon.
To combat the problem, we have Atomiq – what I consider to be the best solution for finding duplicate/similar code in C#, VB.Net, ASPX, Ruby, Python, Java, C, C++, ActionScript, and XAML.
Here’s a simple technique you can use to easily eliminate duplicate code. Try not to let the word “delegates” scare you away from learning the technique and I’ll try to refrain from using the word “delegate” as much as possible. I’ll start small and then work my way towards a more complex example that really demonstrates its power.Read More »Using delegates to eliminate duplicate code
How many times have you complained about how much repetitive code is required to properly dispose of objects in your code? How many times have you found yourself in a situation where you’re unsure whether or not you’re even supposed to dispose of an object in the first place?
I want to show you a technique which completely (or, at least, temporarily) avoids the need to bother yourself with those very important concerns. This is an extremely powerful technique which can be used for much more than dealing with IDisposable related issues, but that seems to be the scenario I use it on most often.Read More »Using IDisposable objects responsibly – the easy way