It's not often that you see a presentation or a code repository that blows you away. That's why this past month was a stand-out. I found two incredibly useful projects floating in the Java/Scala community, that compelled me to write idiomatic ports for C#.
Alex tipped me off to an eye-opening CodeConf presentation by Coda Hale of Yammer fame on making better business decisions by instrumenting code, and he provided a Scala library called 'metrics' to do it. The last slide read "Please build this", so I did. The code itself is an interesting use of the new .NET 4.0 concurrent types, as well as a few borrowed concepts from Java like AtomicLong and TimeUnit. It was a fun and challenging project to put together for the CLR, and I hope you will join me in making it a useful contribution to .NET. We already instrument quite a bit of our code at Wildbit, but I'm looking forward to streamlining everything through metrics, and using HTTP-based reporting to make real-time visualizations for the rest of the team. Mainly, I am happy to ditch Performance Counters in favor of a lean and mean interface, though some of them are still in play behind the scenes.
Things I learned (or re-learned) during this retro Java port-a-thon include:
- The closest you can get to magic in this industry is running a data-driven business.
- There are no dead languages, only dead people. Cool stuff is happening everywhere.
- The JVM is a lot more flexible, when it comes to runtime introspection, than the CLR.
- While C# extension method usage can quickly border on the obnoxious, adding them to enums is the knees.