Archive for the ‘Programming’ Category

Update February 17, 2010: I forgot to mention that if you need FIFO guarantees today and don’t mind losing some of the conciseness, Jarrod Carlson has a nice solution posted here. I plan on stealing his way of doing FIFO. Since leaving Microsoft in September, I’ve been working almost exclusively with Google Web Toolkit (GWT). […]


As requested by Scott, here’s the code to QuickTimer. public struct QuickTimer : IDisposable { private readonly DateTime start; private readonly string label; public QuickTimer(string label) { this.start = DateTime.UtcNow; this.label = label; } void IDisposable.Dispose() { DateTime end = DateTime.UtcNow; Console.WriteLine(“QuickTimer: {0} ({1} ms)”, label, (end – start).TotalMilliseconds); } } Note that DateTime.UtcNow is […]


Scott linked to my previous post on the Schwartzian Transform. Not long after, Randal L. Schwartz himself (!!) drops by with a comment: Wow. Interesting to see how different it looks in C#. Of course, I think the original in Perl still looks the most elegant. As if response, Elton Wells comes up with an […]


Ben Hall has posted a good series on developing plugins for Windows Live Writer. Lots of practical tips here, including how to use Visual Studio to create an MSI-based installer for your plugin (which is a prerequisite for getting onto the Gallery).


I’ve been dabbling with the Wide Finder problem and have found a solution in C# 3.0 that is startlingly elegant.


Coincidentally, I have stumbled into a few interesting links about parallel programming over the past few days. Task Parallel Library – Really cool, practical library for doing multithreaded programming in .NET. If anything it makes it a little too easy–it’s not a substitute for knowing the ins and outs of concurrent shared-memory programming, and you […]


(Update 8/25: Changed the example scenario slightly.) Inspired by Beautiful Code, which I just started reading yesterday, I’ve decided to post some beautiful code of my own. Specifically, I’d like to show off some of the fancy features of C# 3.0, and explain why they’re good for much more than just LINQ. What’s a Schwartzian […]