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 […]


Sure, there have been Notepad replacements for years–TextPad, EditPlus, Notepad2, etc. I even tried emacs for a while. Somehow, none of those ever “felt” right to me. Sorry, I wish I could put my finger on it. TextMate on OS X came close, but try as I might I could never get used to Mac-style […]


IronRuby!

24Jul07

Somewhere deep in the Borg machinery, a small team led by John Lam is working on a fully open source implementation of Ruby for the CLR, and is even going to accept outside contributions. Yesterday they announced the first source code release of IronRuby. It’s pretty rough so far, but showing a ton of promise. […]


Sim says: I like Ruby but I don’t see it becoming a mainstream language soon. The biggest strength of Ruby–the OO nature of the language and some of its cooler constructs–are its greatest weakness. Consider continuations, for example. How many people in the world would know how to implement something with continuations without screwing up? […]