Wednesday, May 27, 2009

Visual Studio 2010 Extensions

Using the Visual Studio 2010 Extension Manager. So far, I found these extensions useful

extensions

I guess the plan to use WPF for Visual Studio development is beginning to pay off. I still miss GhostDoc though :)

Tuesday, May 26, 2009

Intel VT not in HP nc6400

Just think it time to check out the Windows 7 XP mode out and after wasting 445MB of my monthly internet Quota to discover that my HP nc6400 most priced notebook will not run XP mode.

Windows 7 XP mode requires Intel VT for hardware assisted Acceleration to run. I exactly don’t know whom to blame, Intel or Microsoft or HP.

Intel for failing to include such feature but of course they got processors with these feature present. HP for choosing to use a processor in a business/performance based device like the nc6400 and finally Microsoft. How in the world should this not just be a boost requirement. Other virtualization applications like VMware don’t make this compulsory so why should this be. I could expect that this works but some performance pain if Intel VT missing rather than an outright failure.

I hope this gets fixed in the final release.

Monday, May 25, 2009

Tuple in C# 4.0

Tuple is defined as a Sequence (or ordered list) of finite length. Other definitions exist but I particularly like to see it as such.

I have been craving for this feature ever since seen in Cw(C-Omega). This is particularly useful when you want to return multiple values from a function/method especially when they are not related enough to want to put then in a class or struct. Some developers like myself result to using multiple out parameters. This gets messy for methods that have return type and so inconsistence in returning values from such methods.

   1: var x = DoSomething(out int a, out int b);




The compiler is smart enough to detect when you have unmatched number of arguments





   1: var myTuple = new Tuple<int, int, int>(0, 1); 




or request for a member beyond it's definition





   1: Console.WriteLine(myTuple.Item4); 




Tuples in C# 4.0 lacks the ability to get the Length/ Count/Size value even though the underlying interface ITuple specifies this. I guess the C# team pulled this out to prevent us from seeing or using this as an Array or Collections.



In the Beta 1 Release, I tried getting my hands dirty with this and was shocked on a discovery. Something about an error on the eight argument of a tuple being requeired to be ITuple. I searched online for this and came across an interesting Post about infinite Tuple (Tuple with eight parameters in constructor)






   1: Tuple<int, int, int, int, int, int, int, int> 




http://blog.dynamicprogrammer.com/2009/05/25/TupleANewTypeOnNet40.aspx

Friday, May 22, 2009

Implicitly Type Local Variable & Multiple Declarators

It is perfectly legal in C# to have declarations written this

int x, y;
which with initialized values is
int x= 5, y=6;

Alas, the C# compiler rejects this
var x=5, y=6;

This is because the C# Compiler does not allow multiple declarators on the var keyword. I wondered where this is not allowed and if you ask me so much restrictions on the use of the var keyword (can't use as method return type or method arguments).

A recent mail from Eric Lippert clarifies this. His reasons for why this feature was made illegal was that of removal of confusion. In his own words

object M() {}
string N() {}
var x = M(), y = N();
about fifty percent of people thought that the “obvious” meaning was
object x = M();
string y = N();
That is, the “obvious” meaning is “split the two apart and do them separately”.
About fifty percent thought that the “obvious” meaning was
object x = M(), y = N();
That is, “find the thing that you could replace the ‘var’ with and pretend it was there”.
No matter which we picked, half our users would think that we did it wrong. So we cut that feature.  A “var” declaration can only have one variable declared

Tuesday, May 19, 2009

Visual Studio 2010 and .NET FX 4 Beta 1 ships


The Beta 1 version of Visual Studio 2010 and .Net 4.0 shipped to MSDN download subscribers early yesterday. It can be downloaded here.

I have already downloaded it and the first test performed is co-existence with my VS 2008 and so far no problem yet with the little test I have done on it.

Friday, May 15, 2009

Imagine Cup (Nigeria) '09

The Nigeria final of the Imagine Cup competition ended yesterday with Team X emerging the winner. The competition was quite keen and winnings was just by a slight margin.

I was particularly impressed with Team X for their presentation and having a cool extensible application. The judging criteria allowed extensibility just 10% but the fact that they are the only one with extensible application left a great impression on the judges mind.

In terms of Innovations, the first runner-up team (Team Indwell) has that even though they not handed the plaque.

The winning team still has a lot to do and tie up quite some nuts before the appear in Egypt though. Interestingly, they were the winner at last year's event too. Somebody gotta do that but Team Indwell almost did except they got big ideas but little work done.