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.

Friday, July 9, 2010

The useful finding

Just’ve found on the web an amazing resource full of nice CSS templates, licensed under the Creative Commons Attribution 3.0 Unported License — FreeCSSTemplates.org.

Here are some examples:

Well done!

Thursday, May 27, 2010

Time to get your discount on X-tensive products

Hey guys, great news for you!

If you are interested in getting a discount on DataObjects.Net or HelpServer, take a look at this link and this one.

Saturday, May 15, 2010

On blog changes

Hi there,

Recently members of DataObjects.Net team have finally agreed on principal alteration of news and announces publishing policy. By this I mean that in order not to spread your attention between several personal blogs we decided to concentrate on exactly one, dedicated to DataObjects.Net development. So I’d strongly recommend you to update your RSS subscriptions.

In case you are interested in using the ORM under Visual Studio 2010 & .NET 4.0, there is a big announce for you, don’t you miss it!

Thanks for your attention!