>Antialiasing Gone Bad


Antialiasing Gone Bad
Originally uploaded by jeropa

I’ve changed my VS2005 color scheme to a funky black-background scheme that I found on the net (and then tweaked a bit). I hadn’t noticed this before, but today while in the HTML editor the text on the currently selected line looked absolutely horrible. I suspect that it’s the antialiasing that is assuming things about my color scheme. Whatever it is (could also be ReSharper but I can’t tell) it’s extremely annoying and may cause me to switch my colors again.

Update: Turns out the issue _was_ ReSharper. It has a feature called “Highlight current line”. I turned that off and problems go away! I’ve filed a bug with JetBrains.


>Humane Interfaces and Primitive Obsession


I just finished reading a blog post from Martin Fowler on Humane Interfaces.  Summed up the term simply means that an API is designed to be useful to a developer instead of being minimal and “legalistic” about what it should include (this is how _I_ understood the post).

I also read Chris Wheeler’s “My Favorite Smells” Primitive Obsession blog post yesterday and the while reading Martin’s post I had a small epiphany.

Based on Chris’s example of array indexes and the confusion over 1 or 0-based arrays, I thought, this would be a place where a Humane Interface could have solved the Primitive Obsession problem in a slightly different way.

Take a bunch of arrays that use a mixture of 0 and 1-based indexes.  Chris’s solution was to have a ZeroBasedInt and OneBasedInt that were used to index into the array.  My idea is that the array’s themselves could have simply had a First and Last property (or method).

The code would then simply be:

for (int i=myarray.First; i<=myarray.Last; i++)

{ // do something }