Wednesday, September 23, 2009

Windows 7 Developer Boot Camp

If you want to get ahead with developing solutions for the latest version of Windows, then this sounds like a fantastic event in the making. I’m a big fan of Mark Russinovich and I also enjoyed watching the Channel 9 videos of Landy Wang (memory manager guru) and Arun Kishan (architect in the Windows kernel team) – and to have these guys make an appearance at the developer boot camp makes me wish I had the chance to go. Ah well, you win some, you loose some.

To any of you who are going, I hope you have a great time (I hope the sound of my gritted teeth didn’t come through there!).

Thursday, September 17, 2009

.NET Reflector 6 EAP Available!

For those of you who love using .NET Reflector, there is now an EAP of version 6 available here. Red Gate have done a ton of work in this version to allow you to step into .NET code using a .NET Reflector addin in Visual Studio. There is an example walkthrough of this listed in the above I link I gave. As I´m currently in Tenerife, I can´t test the addin,but I have downloaded version 6 to have a quick look. On the whole it still looks the same as version 5, so for this EAP the big news is the VS integration. I´m sure that Red Gate will had features to the stand alone Reflector program as well. Looking forward to the next release :)

Thursday, September 10, 2009

Telerik Release TFS Work Item Manager & TFS Project Dashboard

Just a quick mention of some new, and free, tools from Telerik for those of you who use Team Foundation Server as part of your development process. The new tools are applications that you can use to view things such as work items, iteration and sprint details (for those of you using the agile templates), progress information (number of items completed, those currently being worked on, etc). Doesn’t sound like anything special, but when you see the great UI which is presented to you (built with WPF), you’ll soon forget about using the boring team explorer tab in Visual Studio.

A video on the site shows you an introduction to the tools, which I’m going to install tomorrow if I can squeeze some time in.

Friday, July 31, 2009

Wow, Must Be One Hell Of A Long Path!

image

Monday, July 20, 2009

I've Added Ad Sense To My Blog

I’ll have to wait about 48hrs for adverts relating to software development to appear. In the meantime, for those of you viewing my blog, you lucky people can click on these beauties which were generously randomized for me:

image

Passed exam 70-536.

About a month ago I passed the TS: Microsoft .NET Framework - Application Development Foundation exam. I had been a bit lazy about taking this one, having bought the training kit about 2 years ago! (Yup, I bought the the first edition, which has about 3 Microsoft Knowledge Base articles devoted to it’s mistakes). Mistakes aside, I managed to pass the exam with the aid of that book, plus Programming Microsoft® Visual Basic® 2005: The Language which is an excellent tome. I highly recommend it, even though its targeted towards Visual Studio 2005, since the author goes into great depth on many subjects such as reflection, object oriented programming, threads, security.

Saturday, May 23, 2009

Trying Out VS 2010

I downloaded the VS Professional 2010 bits last night, as I’ve been looking forward to testing out the next version for a while. The new WPF code editor has got me very excited (yeah I know – sad :)) due to the new possibilities for writing some cool UI extensions, like those which can be found at the Visual Studio Gallery.

One of the first things I wanted to try out where the new Sub() based Lambda’s in VB, which was not available in the language for VS 2008, though Func() was. As I sat down to start a new console application, I was a bit disappointed. Here is the code I was working with at the time:

Public Sub Main() 
    Dim k As String() = { "F", "B", "C" }
    k.ForEach(
End Sub

When I type the ‘(‘ character, VS started to churn a bit, think about it for a bit longer and then crash :( Humph. OK it’s a beta, so things like this are going to happen. Unfortunately it happens a lot for me. Even when creating a new class and instantiating it, the second I type a dot ‘.’ next to the variable name, I get a crash. Grrr.

Oh well. Hopefully by beta 2, things like this will have been ironed out. All in all, I’m really looking forward to VS 2010 since there is promised SharePoint support in the IDE (inside the server explorer, where you’ll be able to navigate SharePoint sites directly) and more SharePoint project templates. Cool. Having worked on many SharePoint projects, I can say that the development experience can prove frustrating at times.

Personally, it would be nice if they got rid of the need for SharePoint Designer and integrated everything into VS, giving users the option to use either for their SharePoint work. My reason for this request? SharePoint Designer is a heap of junk and I detest having to use it. But hey, that’s for another blog post…..

Monday, November 24, 2008

Unit Testing Private Methods

I’ve been reading a lot recently about people’s opinions regarding the correctness of unit testing private methods. Personally, I don’t see anything wrong with testing them – after all, private or not, I want to know if the code is going to work!!!

Who cares if it’s private?

Granted, performing the tests on a private method can prove tricky. I use VSTS for my coding, thus I take advantage of the private accessor code that is generated for me when I create a test on a private method. I find it quite bizarre that someone would suggest not testing private code, rather you should unit test any public methods that make use of that private code. Tsk, rubbish. If I had a coder on my team with that attitude, I’d seriously question his sanity.

Sunday, May 25, 2008

Passed Exam 70-630 TS: Microsoft Office SharePoint Server 2007, Configuring

Well I'm really chuffed that I passed this exam last Monday, with a score of 805. Admittedly I wasn't 100% confident that I had prepared enough, but with the help of Measure Up I was able to fill in any blanks that I had in my preparation.

In response to this success, I'm looking to taking exam 70-542 TS: Microsoft Office SharePoint Server 2007 – Application Development. I have no timeframe yet though I'm looking to get that one out of the way in the next couple of months. In the meantime I might have a go at exam TS: Microsoft .NET Framework 2.0—Application Development Foundation. Passing this will open the way for me to complete an MCPD certification, most likely in the web development area.
I'll keep you posted on any progress.....

Thursday, April 03, 2008

TypeMock - It's well ace.

Recently I purchased a fantastic mock framework called TypeMock and I will recommend any developer who wishes to improve their testing procedures to consider it. There are a number of bloggers out there with plenty of code examples, but here is my contribution. Today I needed to figure out a way that I can mock a SharePoint SPSite obejct, specifically a site object returned via SPContext.Current.Site. I wanted to do this in order for me to be able to run unit tests against my web parts. Before using TypeMock, the only way I could know what my code was up to was by using trace files. Now, I'm able to physically run the web part's code in real time and see whats going on! :) Ok, so here's the test:
    Public Sub SPContext_MockInstance_Test()
        Dim mockSPSite As Mock = MockManager.MockObject(Of SPSite)(New String() {"http://mycomputer:24000"})
        Using recorder As New RecordExpectations
            Dim dumm As SPSite = SPContext.Current.Site
            recorder.Return(mockSPSite.MockedInstance)
        End Using
        Dim target As BitsAndBobs = New BitsAndBobs
        target.Testy()
        If mockSPSite.MockedInstance IsNot Nothing Then
            DirectCast(mockSPSite.MockedInstance, SPSite).Dispose()
        End If
    End Sub
OK, so the test code works by mocking the call to SPContext.Current.Site, and when that happens, rather then returning that site object (which never exists anyway) the TypeMock framework returns my testing instance of an SPSite object. This is a very cool feature for me, since I've found testing web parts to be a bit of pain. Looking up articles that show you how to attach the debugger to the w3wp.exe process is handy, but it's so fiddly and often doesn't work (well, for me anyway!), so this is a big improvement on that, and hopefully will speed up my testing and allow me to use various scenarios to test the code.

Friday, March 21, 2008

Why Not VB.NET Books?

What’s with this trend of book publishers bringing out new books on topics (such as ASP.NET, LINQ, etc) that are C# focused, and only after about 2–3 months later does the VB.NET version of the same book make an appearance?

This sucks and is totally unfair.

Recently I looking forward to some LINQ related books from APress, only to find out that they’re for C# devs. Normally this isn’t a problem, as it’s quite easy to transfer the C# code to VB.NET. But I was thinking, why the hell should I be doing this anyway? Both the C# and VB.NET books should be made available at the same time.

Tuesday, March 18, 2008

It's Been A While

Having not touched this blog for around 3.5 years, I thought it might be time a made another appearance!

So, with my first blog entry in a while, I thought I'd start off with a mention of a really useful utility that I came across last week called LINQPad.

image

If you're into writing LINQ queries then this tool will really help your LINQ skills. LINQPad isn't simply a Notepad for LINQ though, it has some really cool features.

No Need To Install

Once you download LINQPad there's no installer to run, just run the EXE itself and off you go.

Database Connectivity and LINQ To SQL Features

In this screenshot I've configured LINQPad to connect to the AdventureWorks database on my SQL Server instance:

image

From here I can drag tables into the query editor and use those in my queries. LINQPad automatically takes care of the underlying database connecting for you. Check out this example which returns the Title column value for all records in the Employees table:

image

Note the use of the Dump() method call, this displays the content of j into the LINQPad console window. This query results in the following output:

image

A cool feature is the SQL button found here:

image

Pressing this button will give you the SQL syntax for the LINQ to SQL query in the editor:

image

This is just a taster of how handy this utility could be for you. Check it out.

Friday, December 03, 2004

Great VS IDE Addin

Found on the GotDotNet site a great addin – Boot Addins. I would give the URL but it won’t work anymore. The GotDotNet search workspaces feature never seems to work. If you can find the workspace page for the Boot addins project, you will find items such the ability to play movie/music file directly in the VS IDE! very cool.