0%

Consider the following code:

class Woot
{
private static float PI;
private static bool initialized = doInitialize();

private static bool doInitialize()
{
if (!initialized)
{
var thread = new Thread(() => { PI = 3.14f; });
thread.Start();
thread.Join();
}
return true;
}

public static void Main(string[] args)
{
Console.WriteLine(PI);
}
}

What is the output of this program? Is it:

Read more »

Here’s an issue I’ve been struggling with: it seems that by accessing a certain property of a docked tool window of an add-in, an exception is thrown somewhere inside Visual Studio 2010. It’s caught internally, and the exception message, Object reference is not set to an instance of an object, is shown whenever I was trying to open any file (code or otherwise).

Read more »

As I’m writing this, Dror Helper blogged about using a poor man’s performance profiler. This profiling technique is useful when the tools are lacking, and we need to measure a performance of method(s) within our code. This information is usually logged, and after a run we’re left with a huge file containing hundreds (and sometimes thousands of lines). How do we make sense of this mess? How do we filter out and understand the relevant performance information?

Read more »

[November 16, 2010] While the information below is still very much relevant, please download the latest version of ReSharper from JetBrains website.

Have I mentioned that I love ReSharper? While patiently waiting for the 5.0 release to RTM, the team at JetBrains have shipped the Beta 2 release (build 1618). This is a very stable, very good improvement over the previous nightly builds.

Read more »

Note: this is part 2. Read part 1 of the trip here.

Early Saturday morning on Islay, and we are set to go on another adventure! After eating a delicious breakfast that our lovely host prepared for us, we were set to try and explore some more distilleries. Unfortunately there were no tours at Lagavulin and Ardbeg on a Saturday, so we decided to drive to the place where one of my most favorite pictures was taken – the Carraig Fhada Lighthouse.

Read more »

Every whisky lover gets, at some point, to experience whisky from the island of Islay in Scotland. This experience will be remembered throughout his life – it can be either love at first taste, or loathing for eternity. Not everybody can handle the intensity and the powerful peaty flavor of (most) Islay whiskies, some may even stop drinking whisky altogether. Others, like myself, fall in love with the flavor and rarely able to drink anything else.

Read more »