Sunday, August 29, 2010

The most useless feature of Visual Studio 2010

Although the majority of people like discussing new exciting features and possibilities, I tend to be more rational and sceptical in this field. For example, I don’t like the new blue-yellow look of the studio,  I hate the new WPF-base editor because is doesn’t support my favorite open type fonts, I dislike the situation when every new release of VS is becoming slower and slower and eats more and more resources but the most annoying thing in my opinion is the tendency to add bells and whistles instead of concentrating on quality and performance.

Take, for example, the following “killer-feature”, which everybody might have already noticed:

VS-zoom

It is editor zoom control. Everyone was dreaming of this for ages. (Yes, it is sarcasm). They even dedicated to it a standalone post with video trailer. Nice. Here it is.

I especially liked one of the comments by Atle Iversen, let me quote it:

“Here are my suggestions for "features" in Visual Studio 2012 (which would make me actually consider upgrading)

  • increased performance (everywhere)
  • less bugs (everywhere)
  • less memory use/waste

I know that you put in a *lot* of effort in improving Visual Studio, but you're putting in the right effort at the *wrong* places - instead of more functionality with less quality we need less functionality with more quality !!!”

Although, I’m not sure that anybody from VS team has heard this cry from their customer.

Moral: Stop living in reality separated from your customers, their needs and requests. It’s a dead end.

Wednesday, August 25, 2010

Programming fonts

Recently, I’ve found an interesting post, where top 10 programming fonts are being compared. Every font is accompanied with comments and image of font in action. For example, one of my favorite ones, DejaVu Sans Mono looks like that:


Another one, which I also like and which is used in Android OS, is Droid Sans Mono:


The whole story is here. Hope you find there your new favorite programming font instead of boring Courier new and Consolas.

Sunday, August 22, 2010

Visual Studio 2010 vs. Inconsolata font

Hello,

After several days playing with the Silk style for Visual Studio 2008/2010 I’ve realized that you can’t achieve more or less good overall results with default fonts like Consolas, Courier New or something. I know that there is a perfect font, named Inconsolata, and what is more important, its author made it free. Here is how it looks like:

The same font in action:

I must make a remark that the font is being redistributed in OpenType format. I was happy using the font in Visual Studio 2008 but unfortunately, 2010 version has different Text Editor component, written totally on WPF and these things together make impossible usage of all other fonts except TrueType ones. WTF???

Luckily, I’ve found a workaround:

  1. Download the font from the official site.
  2. Go to online font converter, and convert OpenType Inconsolata font into TrueType format.
  3. Install TrueType version onto your system.
  4. VoilĂ !

VS

Hope that will be useful.

UPDATE:

Here is the second chapter of this fascinating story.

Friday, August 20, 2010

On Visual Studio styles

I’m almost sure that everybody knows StudioStyles.info website, where tons of various syntax highlighting styles for Visual Studio 2008/2010 are being added and updated everyday.

Right after its appearance I decided that default VS style is too bright and therefore, too tiring for my eyes and switched to a darker one, named “Son of Obsidian”:

sonofobsidian

I thought that I would feel positive result but I was wrong. Watching on dark screen and seeking for light symbols of code seemed to be even more tiring than the default color scheme. Soon I started to search for less contrast schemes and after several minutes of looking over styles on the website I found “Old Book”:

oldbook

This one was much better, it was really easy for eyes, and mimicked an old, pergameneous book. I used this style for several months, until I realized that it was not ideal and there might be more optimal one.

Today I’ve made a draft of a new style, which is going to be clean and tidy. Here it is:

silk

I’ve named it as “Silk” because in my opinion it is smooth and clean. If you like it, it can be found here.

I would like to hear any comments or remarks.

Friday, August 13, 2010

Fast Reflection Library

Hi there,

Recently while browsing Microsoft Codeplex projects I’ve found another good thing. They call it ‘Fast Reflection Library’, it is written in C# and its purpose is to provide the same as part of the reflection features like executing method dynamically but give simple and faster implementations.

Example of usage:

using System;
using System.Reflection;
using FastReflectionLib;
    
namespace SimpleConsole
{
    class Program
    {
        static void Main(string[] args)
        {
            PropertyInfo propertyInfo = typeof(string).GetProperty("Length");
            MethodInfo methodInfo = typeof(string).GetMethod("Contains");
    
            string s = "Hello World!";
    
            // get value by normal reflection
            int length1 = (int)propertyInfo.GetValue(s, null);
            // get value by the extension method from FastReflectionLib,
            // which is much faster
            int length2 = (int)propertyInfo.FastGetValue(s);
    
            // invoke by normal reflection
            bool result1 = (bool)methodInfo.Invoke(s, new object[] { "Hello" });
            // invoke by the extension method from FastReflectionLib,
            // which is much faster
            bool result2 = (bool)methodInfo.FastInvoke(s, new object[] { "Hello" });
        }
    }
}

Although DataObjects.Net contains its own implementation of fast reflection (see: Xtensive.Core.Reflection), I like in this one the following aspects: clear & minimalistic design, simple and obvious API & ease of use. It took several seconds to understand the general idea and start using it. I think that this might be a good example of how library should look like: it should solve 1 concrete problem in most efficient way and do nothing more in order not to turn into another dinosaur.