Disposing of Interfaces

Sometimes you run across situations where there is just no good solution. No matter which option you choose, there are downsides. I found one such situation today when trying to design an interface. The code below are simple examples I wrote for the purposes of this post. public interface INotifier { void Notify(string message); } I had written my initial implementation, which happened to use a resource that needed disposing....

July 9, 2015 · Joshua Marble

WaitTimeout - A Solution For Waiting

I recently found myself needing to periodically check the status of another operation, waiting for it to finish. In pseudocode, the basic operation is similar to this: while (!complete) { //check the status if ([completed]) complete = true; else //sleep 500ms } I did not want to wait forever, though, so I wanted to implement a timeout. I could have used a timestamp, then checked the elapsed time with each iteration, but I wondered if there was a more reusable approach....

January 16, 2015 · Joshua Marble

Finding Versions of mscordacwks.dll

In my post on Debugging Different SOS Versions With WinDBG, I wrote how you often will need a different version of mscordacwks.dll, but I skipped over the part about how to obtain the version you need. Of course the natural answer is to get it off the machine from which the dump file was obtained. Unfortunately, that is often easier said than done. I have previously looked online to try to find copies with little luck, but today I ran across a site that attempts to index every version of the file....

November 24, 2014 · Joshua Marble

IVPN Review

I decided I wanted to get a VPN service that I could use to protect my privacy and security on the internet. This isn’t so much an issue at home as it is on public wi-fi, but I figured it wouldn’t hurt to protect my privacy at home, too. These initial uses led me to a few requirements. It had to be fast with unlimited bandwidth. It had to protect privacy....

April 7, 2014 · Joshua Marble

Debugging Different SOS Versions With WinDBG

Debugging memory dump files from .Net processes with WinDbg is always an adventure. I have below a solution to the common problem of CLR version mismatching. But first, I will give a quick introduction to WinDbg and memory dumps for those new to the topic. Memory dumps are files with the contents of the memory of a process. They contain variable data, method calls, exceptions, and anything else. An easy way to create a memory dump is to use Task Manager....

January 20, 2014 · Joshua Marble

The Context Pattern

I have found myself enjoying a certain coding pattern lately, so I thought it would be a good opportunity for a new post. There are situations where you want to do something within a certain state, and ensure the state gets reverted at the completion of the operation. For example, while setting some properties, you want the INotifyPropertyChanged event to be temporarily suppressed, but ensure that it is functioning normally once these properties have been set....

January 14, 2014 · Joshua Marble

Doing Work In Dependency Property Setters

I was working on a WPF app recently where I was binding a dependency property to the selection of a ComboBox. I needed to pass this value down to a domain object, so I decided I would modify the bound property setter to also set a property on my domain object. This seemed a fairly straightforward approach, commonly used in normal properties. To my surprise, my property setter never got called and my domain object never had the value set....

September 3, 2013 · Joshua Marble

Controlling Browser Interpretation of Character Encoding

This article is about character encoding, but I thought it would be beneficial to give some background on what I’m doing. I’ve been working on a project that generates a report, and I needed to be able to output my report in any format, including XML and HTML. Through an effort to achieve a good modular design, I wrote several report formatters that all just return a byte array to be persisted (to file primarily, but streams or a db are possibilities)....

June 21, 2013 · Joshua Marble

Migrating From FunnelWeb To Wordpress

You probably already know that FunnelWeb has no ability to export your posts. However, I have devised a way to export your FunnelWeb data from the database into a WordPress export file format. This then allows you to import your posts directly into WordPress by tricking it into thinking your posts came from another WordPress blog. The intention of this tutorial is not to get your site perfectly setup and ready for visitors....

April 18, 2013 · Joshua Marble

Google Has Terrible Customer Service

Google has terrible customer service. Big surprise, right? Yes, I know I’m getting many things for free. I don’t dispute that. My problem is when they are happy to charge me money but not provide any support related to those charges. I have a few of the old Free Google Apps accounts from years ago. With my recent changes in registrars, I went ahead and transferred all my domains over to Gandi (which has excellent support)....

April 17, 2013 · Joshua Marble