“XYZ Is Bad For Performance”

May 8, 2009

After learning about the performance characteristics of .NET Reflection, you might be tempted to say that “Reflection is bad for performance”.  Roughly the same argument applies to string concatenation, out-of-process communication, context switching, virtual function calls… If you follow this path blindly, you will end up saying that programming is bad for performance. And as we all know, it is, but that doesn’t really lead us anywhere.  What I’m saying is that common sense needs be applied, as always, even to statements like “XYZ is bad for performance”.  Examples, good and bad: A:...
2 comments

Micro-Benchmarking Considered Harmful

Another title I’ve considered for this post was: When measuring something, make sure you’re really measuring it. Micro-benchmarking is the art of measuring tiny operations, and as always when measuring something tiny – there’s the problem of making sure that you’re actually measuring it.  Let’s take a couple of “trivial” examples, because usually trivial examples end up being more convoluted than the difficult ones. Example 1 – Measuring the time of the getpid() system call Assume that we want to measure the time it takes to trap into the OS kernel,...
no comments

Windows XP Inside Windows 7: The “XP Mode”

I’ll dare saying that you’ve probably already heard of the “XP Mode” lurking within the Windows 7 RC.  Don’t get it wrong – it doesn’t mean that the Windows 7 OS can run in Windows XP mode (although there are compatibility shims for applications that can emulate whatever version of Windows that you want).  It means that the new Virtual PC Beta, installed on top of Windows 7, can provide a seamless experience for installing and executing applications on a Windows XP virtual machine.  The seamless experience is achieved by showing the application window “outside” the virtual machine –...
tags:
one comment

What Should I Install – Windows Vista or Windows 7?

May 5, 2009

The title might imply that this is a question I’ve been pondering about, but in fact I’ve made up my mind a long time ago.  However, I’ve been asked this question multiple times by colleagues (who are usually developers) and friends (who are not necessarily developers).  Therefore, I decided to write down my answer once and for all. I currently have 6 physical machines at home running various Windows 7 builds, as well as multiple virtual machines for testing and other purposes.  All in all, I have builds of Windows 7 ranging from the M3 PDC build (6801)...
one comment

Metadata Belongs With The Class, Not With Another Class

May 2, 2009

After reading Mike Taulty’s post “Metadata Classes – A Force for Good or Evil?”, I realized that this is something that I was highly annoyed with in the past, and never got a chance to write anything about. If you haven’t seen them yet, “metadata classes” as Mike refers to them are a way to extend the metadata of code that doesn’t belong to you.  For example, in ASP.NET Dynamic Data you get a set of tool-generated types and can’t decorate them with attributes directly because these attributes will be deleted when the code is re-generated.  So what...
no comments

Similarity Analyzer

Simian (Similarity Analyzer) detects duplicate code in almost every human readable text format. The primary case brought forward by the product webpage is that you can correct a bug in one place in the program, without knowing that the same buggy code was copy-pasted to another location in the program. But that’s just a tiny fraction of the scenarios where “reuse by copy-paste” detection can improve the quality of your code.  Additionally, I can think of even more esoteric but interesting scenarios, such as plagiarism detection. Finally, you could address the output of Simian as a...
tags:
one comment