Archive

Archive for the ‘.NET / CLR / C#’ Category

Trailer: Java 4ever

June 26th, 2010 No comments

In genius trailer! The .NET vs Java train left the station so long ago for me. .NET’s great for somethings, for everything else, there’s Java. Probably one of the best nerdy videos for the year!

UPDATED: First video was removed :(

{lang: 'en-GB'}
Share

Office 2010 and SQL Server 2008 R2 (soon) available on MSDN!

April 26th, 2010 No comments

If you haven’t heard already, Microsoft have RTM’d both Office 2010 and SQL Server 2008 R2 and Office is already available for MSDN Subscribers with SQL Server 2008 R2 arriving soonishly – you can look at the download page for SQL Server 2008 R2 and download it from MSDN now (03/05/2010). There’s also a great ebook titled “Introducing SQL Server 2008 R2” available in XPS and PDF format :)

I’m one of those who love the ribbon UI, its made things easier for me (helps that I really wasn’t a heavy MSFT Office user back in the days). Now everyone’s getting on board the ribbon train, even the beloved WinZip!

Don’t forget the Office 2010 Movie from last year.

{lang: 'en-GB'}
Share

Visual Studio 2010 & Resharper 5 hit the interwebs.

April 13th, 2010 No comments

A little late on this one, but MSFT have released the long awaited Visual Studio 2010 release and JetBrains have also released ReSharper 5.

A full breakdown of Visual Studios are also available, not a huge fan of all these different SKUs to be honest. You can download a copy from your MSDN subscriptions now, or download the trial version (direct download), buy an upgrade from VS2008 or just download the .NET 4.0 runtime (48Mb).

I’ve spent the past 3 hours downloading from MSDN and its been crawling.

MUST.HAVE.PLINQ.FIX.

{lang: 'en-GB'}
Share

ASP.NET MVC 2 released!

March 14th, 2010 No comments

Quick note that ASP.NET MVC 2.0 was released on Friday, still yet to play with the RTM, but don’t let me stop you. Go for it!

Link dump – mostly from Scott Hanselman’s announcement:

Exciting and just in time for a fairly large project we’re working on right now :-)

{lang: 'en-GB'}
Share

Ninject 2.0 is out, now with more ninja!

February 27th, 2010 1 comment

Nate Kohari (the head Ninja of Ninject) has announced the availability of Ninject 2.0 which has been a long time coming – being a complete rewrite. The sources are on  github repository. Oh and checkout the new website, its got more ninja references that you can poke a ninja with!

As for .NET 4.0 compatibility,  whilst not officially announced, we’ve been using Ninject 2.0 (betas) and now just moving to the final release with .NET 4.0 without issues. All documentation and material are available on the wiki however.

{lang: 'en-GB'}
Share

Microsoft Visual Studio 2010 Release Candidate

February 12th, 2010 No comments

It seems every year life just keeps getting busier :( Anyway, here’s a bit good of news, the Visual Studio 2010 Release Candidate is available for download now. You can also get one chunky ISO if that tickles your fancy.

Compared to Beta 2, its a smooth and quite enjoyable experience and I’m very much waiting for the final. The performance of this release is insanely good and finally fixes some annoying performance issues we noticed in WPF in Beta 2 (lets forget Beta 1).

Don’t forget to try some of the cooler features of .NET 4.0 too.

{lang: 'en-GB'}
Share

Welcome to 2010 & Evict.nl is updated & ZScreen 3.25!

January 5th, 2010 No comments

5 days into 2010, its already feeling a bit awkward as 99 doesnt feel that long ago.

My good buddy Edwin Vermeer has finally got his WordPress blog setup and he’s also included many of his code as open-source. Of particular interest is the assembly SVGA library he wrote (!!!) 20 years ago and various projects I remember talking with him about over the years.

On a side note, I almost forgot to mention that ZScreen was updated on Christmas eve to 3.25 thanks to Santa. For those who haven’t tried ZScreen its a screen capture tool (open source and written in C#) that is chocko-block full of things that will make your life helluvah lot easier – especially when it comes to taking screenies for blog posts. Check it out, it goes beyond WindowClippings which used to be my screen-shot application.

Let the good times roll… Wishing everyone who stumbles apon this post all the best for 2010.

{lang: 'en-GB'}
Share

Some changes in .NET BCL 4.0

November 21st, 2009 1 comment

I’ve been porting a few products to .NET 4.0 and came across some cool new additions in .NET 4.0 which will be quite useful for developers.

Strings

Streams

Remember writing this before to copy one stream to another?

public static void CopyTo(this Stream input, Stream output)
{
byte[] buffer = new byte[2048];
while (true)
{
int read = input.Read (buffer, 0, buffer.Length);
if (read <= 0)
return;
output.Write (buffer, 0, read);
}
}

Now you don’t need to, just use the Stream.CopyTo() method.

inputStream.CopyTo(output);

Checking for 64bit-ness

Previously to detect a 64bit operating system you would either P/Invoke out and call the IsWow64Process in Kernel32, looked at the “PROCESSOR_ARCHITECTURE” environment variable or even easier (and completely managed code) way of checking the size of a Pointer.

public static bool IsWin64
{
return (IntPtr.Size == 8);
}
public static bool IsWin32
{
return (IntPtr.Size == 4);
}

Now you can simply use the Environment class that comes with two new properties.

WPF 4.0 Improvements

There are simply too many to list, see the article on ScottGu‘s blog about WPF4 and VS2010/.NET 4.0.

One very important tweak are the Text Rendering improvements that TextBlock‘s now have a new TextOptions.TextFormattingMode that greatly improves the quality of text rendering.

<Window x:Class="WpfApplication1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow" Height="350" Width="525">
<Grid>
<StackPanel xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'
xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'>
<TextBox TextOptions.TextFormattingMode="Ideal" FontSize="11">ThushanFernando.com - Ideal</TextBox>
<TextBox TextOptions.TextFormattingMode="Display" FontSize="11">ThushanFernando.com - Display</TextBox>
<TextBox TextOptions.TextFormattingMode="Ideal" FontSize="16">ThushanFernando.com - Ideal</TextBox>
<TextBox TextOptions.TextFormattingMode="Display" FontSize="16">ThushanFernando.com - Display</TextBox>
</StackPanel>
</Grid>
</Window>

Here’s a pretty picture showing the difference between using Ideal and Display. The difference is noticable for text sizes below 15.

MainWindowAlternatively you can place it in the Window so all child controls will render nicely.

<Window x:Class="WpfApplication1.MainWindow"
xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
Title="MainWindow - Display" Height="350" Width="525"
TextOptions.TextFormattingMode="Display">
<Grid>
<StackPanel xmlns='http://schemas.microsoft.com/winfx/2006/xaml/presentation'
xmlns:x='http://schemas.microsoft.com/winfx/2006/xaml'>
<TextBox FontSize="11">ThushanFernando.com</TextBox>
<TextBox FontSize="16">ThushanFernando.com</TextBox>
</StackPanel>
</Grid>
</Window>

There are LOTS more coming in .NET 4.0 that will make anyone doing .NET development today just wet their pants over, just read the article on MSDN by Justin Van Patten about Whats new in the BCL in .NET 4.0 and also posted on the BCL team blog.

{lang: 'en-GB'}
Share

Visual Studio 2010 Beta 2 is out!

October 21st, 2009 No comments

Microsoft has just released VisualStudio 2010 Beta 2 to MSDN Subscribers – aka Rosario.

msn_visual_studio_2010

I’m not sure why they’re going with the ULTIMATE moniker for Visual Studio, I still prefer the VS6 style Standard, Professional, Enterprise. Meh.

  • Microsoft Visual Studio 2010 Ultimate with MSDN
    The comprehensive suite of application lifecycle management tools for software teams to ensure quality results from design to deployment.
  • Microsoft Visual Studio 2010 Premium with MSDN
    A complete toolset for developers to deliver scalable, high quality applications.
  • Microsoft Visual Studio 2010 Professional with MSDN
    The essential tool for professional development tasks to assist developers in implementing their ideas easily. (Note: Visual Studio 2010 Professional will also be available without MSDN subscription)

Some of the more exciting things that are coming with Visual Studio 2010 are documented on MSDN or a better one would be Vikas Goyal’s post and also his .NET 4.0 coverage.. Personally the Parallel extensions are the most exciting bits for me. The new Java 7 work is concentrating heavily on concurrency and its good to see both camps pushing the boundaries.

{lang: 'en-GB'}
Share

Learning Scala from a Java perspective

October 1st, 2009 No comments

I’ve been reading up and keeping abreast of both the .NET world and Java world this year, both have some mighty exciting advancements coming – teaser: its all about the Pentiums! I’ll try and cover some of my research into parallel work later.

One of the other areas I’ve been keen on (after hearing from the leader of our pack, Mr Wolfe) was Scala and came across a incredibly useful resource by Daniel Spiewak on looking at Scala from a Java developers perspective.

The linked article is a ’roundup’ of the many posts he’s done on the topic and covers the many facets of Scala and gives it in a Java developers perspective. Highly recommended reading if your just starting out in understanding Scala and functional programming general. I have to admit, Scala is growing on me.

F# is the key functional programming language in .NET and whilst I’ve seen them being compared quite frequently, I feel they target to different areas. From a n00bish-functional-programming perspective, it feels like Scala is all about the OO and F# is more about writing in a functional perspective. But here’s an article from 2007 that may give you a better idea or Brandon Werner‘s article comparing the functional languages.

By the same token, there’s a great introduction to F# that will cover the historical and core language.

I remember messing about 10 years ago with Delphi, VB, Java, C/C++ and thinking this is RAD, but the world seems to be morphing into the functional programming paradigm now.  What better time to start musing with it?

{lang: 'en-GB'}
Share