Experiment: Using a dark theme in VS for a week
Sat, Sep 20 2008 15:03

I've been highly critical of using dark themes in Visual Studio particularly because the UI of VS is light in its very nature. The combination of the two proving to be an interesting proposition when using VS for large durations of time.

I digress. Recently I have suffered a few eye issues and I'm pretty much willing to try and use a dark theme now for more than an hour and then dismissing it in the hope that it may help me out a little. I have tried a few other minor solutions prior to this experiment, the most of which revolve around making the background colour of VS a slightly off-white colour. If anything that approach made things worse.

I'll be using the theme for all my coding which spans from C++ to C# and see how it goes. The theme I will use is Vibrant Ink by Rob Conery.

Hopefully this may help my eyes a little? ...

Design Patterns - Part 4 published
Wed, Sep 17 2008 14:14

Part 4 of the design patterns series I have been writing has just been published on DotNetSlackers. This part covers the singleton pattern.

View it - Design Patterns - Part 4

Desktop 1.0
Fri, Sep 12 2008 13:12

In case I am not the only one that appreciates virtual desktops then be sure to download this new tool from Mark Russinovich and Bryce Cogswell.

More on it here.

UPDATE: I'm only using this because I've recently sold my monitors as I'm moving country soon. Life without many monitors is pretty bad ;-(

by Granville Barnett | with no comments
Filed under:
Data Structures and Algorithms 0.6 released!
Fri, Sep 12 2008 11:35

We have just released 0.6 of the Data Structures and Algorithms library. Notable new features include (amongst many other little changes not listed):

  • AVL Tree
  • Deque
  • Radix sort

Download Data Structures and Algorithms 0.6!

Using Pex in a TDD fashion...
Tue, Sep 9 2008 6:23

Peli has just posted a good post on using Pex in a TDD fashion to create a binary heap.

In case you don't know, Peli is actually one of the guys working on Pex at MSR so if you have a chance do give it a look ;-)

"Pex (Program EXploration) is an intelligent assistant to the programmer. From a parameterized unit test, it automatically produces a traditional unit test suite with high code coverage. In addition, it suggests to the programmer how to fix the bugs."

By the way Pex is not tied to MSTest. See the Pex Extensions project on CodePlex for other framework support like NUnit.

by Granville Barnett | with no comments
Filed under: , ,
Design Patterns - Part 3 published
Fri, Sep 5 2008 8:39

The third part of this series covers the factory pattern.

View it - Design Patterns - Part 3

You may also be interested in part 1 (strategy), and part 2 (observer).

Setting up a build environment article published
Mon, Sep 1 2008 5:03

An article I wrote for DotNetSlackers has just been published entitled Setting up a build environment. The article is based upon a pretty simple example that uses Subversion, TortoiseSVN, MSBuild, MSBuild Community Tasks, and TeamCity.

Give it a read - Setting up a build environment.

Note: I give a brief mention also to the SDC Tasks Library project which contains some very helpful tasks.

Visual Studio and TeamCity integration

One thing I didn't really have space to mention in the article is the integration that TeamCity provides for Visual Studio. Its a little plugin that allows you to view the results of builds, as well as being able to run a local build. There are a few more features and I suggest you view this video on the JetBrains web site to get up to speed with all of them.

by Granville Barnett | with no comments
Filed under: ,
DSA book on 'This Week on C9'
Sat, Aug 30 2008 6:42

First off thank you to all who have downloaded the first draft of Data Structures and Algorithms: Annotated Reference with Examples. At the time of writing this post there have been more than 3200 downloads within around 3 days of it being put up on DotNetSlackers which is great!

Thanks to all those who have helped spread the word by linking to the posts I made and to the actual project page. I'd also like to thank Dan Fernandez who gave the book a mention on This Week on C9 (a weekly review program on the popular Channel9 site). You can view the episode here.

If you haven't checked it out already then go give the first draft of Data Structures and Algorithms: Annotated Reference with Examples a look.

F# CTP out
Fri, Aug 29 2008 17:13

Seems like ages I have waited for this moment, and now it is finally here I find myself with no time to actually mess around with it that much. I have really enjoyed using F# on and off for the last 18+ months and the IDE has been by no means the best but it has done the job sufficiently. Looks like there will be no more need to manually reference external assemblies and the like now ;-)

Hopefully I will wrestle some time to spend a few minutes with this.

Download link for the F# CTP - http://www.microsoft.com/downloads/details.aspx?FamilyID=61ad6924-93ad-48dc-8c67-60f7e7803d3c&displaylang=en

by Granville Barnett | with no comments
Filed under: ,
Data Structures and Algorithms book (free) first preview available!
Wed, Aug 27 2008 8:55

This is a little project that myself and Luca have been working on in our spare (spare) time in the last monthDSA_Book or so. The book is no where near complete but we wanted to get it out there now and progress with it in view of the public eye rather than just sit on it and wait months until it was a lot more thorough.

As this is just a preview don't expect it to be all finely polished, we know what we are lacking in terms of explanations. No chapter in the preview is the final version of that respective chapter. It's also worth mentioning that this is not the final list of chapters.

Our intended target audience are those who know how to use their respective language of choice, other than that you should be OK to follow the book. We have intentionally tried to keep the book compact and to the point.

The book is language independent. We use a form of pseudocode for all algorithms as such these algorithms can be easily ported to most imperative languages like C++, C#, and Java.

Why is it free? Because we want it to be. At this present moment in time all suggestions etc have come from a small number of reviewers, for which we are incredibly grateful. But we felt the time was right to throw it out to the larger audience so we can get more feedback on what we have thus far.

The book is hosted for us on DotNetSlackers, you can view the page dedicated to the book here.

Go check out the first preview of Data Structures and Algorithms: Annotated Reference with Examples now!!!

EDIT: if you could help spread the word we would be incredibly grateful ;-)

Design Patterns - Part 2 published
Fri, Aug 22 2008 17:43

In the first part we looked at the strategy pattern, in part 2 of this design patterns series we take a look at the observer pattern.

As I mentioned in a previous post this series is aimed more at developers that are relatively new to design patterns rather than the seasoned pro's.

View it - Design Patterns - Part 2

Interesting paper by the late Jim Gray and Bob Fitzgerald on flash disks
Thu, Aug 21 2008 11:39

This paper which can be viewed in the July/August ACM Queue magazine I found quite interesting as I had noticed that both Apple (MacBook Air) and Dell (XPS range) now ship notebooks with solid state hard drive's. Granted they are a lot more expensive but consume less power and provide a lot more accesses per second. In the paper entitled Flash Disk Opportunity for Server Applications Gray and Fitzgerald state that accesses per second may be as high as 10 times more per second than that of a high-end SCSI disk.

Interestingly the 64GB and 128GB solid state disk upgrades to the Dell XPS range differ by only £10, the smaller being £300, the larger being £310. I guess if you were paying that much on a disk drive and didn't shell out the extra £10 then that would probably infer that you had just checked out of a mental asylum.

The July/August issue is littered with papers on flash drives, well worth a look. I'm in the market for a new laptop in the coming months, at the moment though one with a solid state disk is well out of my price range.

by Granville Barnett | with no comments
Filed under:
StyleCop and FxCop released
Thu, Aug 21 2008 10:56

I am a massive fan of both these tools. Now StyleCop 4.3 and FxCop 1.36 have been released.

For a long time now FxCop 1.36 has been in Beta. I thought that maybe the standalone tool had been dropped or something but alas I am wrong, and thankful for it.

StyleCop, formerly C# Code Analysis (? I seem to remember the version prior to this was called that, may be wrong) fixes a tonne of bugs. The previous version broke several things in Visual Studio like the properties window for a project, this is no longer the case. There are a few rules that I don't really like. One no more so than the naming of member variables, I believe it will give you abuse if you use a pattern like m_myVar, or _myVar - the tool by default will tell you it should be myVar. This is a very subjective rule though. I tend to just customize the rules for a few things and go from there. Still only works for C# code.

by Granville Barnett | with no comments
Filed under: ,
Design Patterns - Part 1 published
Tue, Aug 19 2008 9:23

I recently started writing a series on design patterns for DotNetSlackers. The series is aimed squarely at those who are new to design patterns. In the first part we cover the strategy pattern.

At this moment in time I am not sure of how many parts the series will consist of but I have an idea so if there is a design pattern you would like me to cover then do let me know.

View it - Design Patterns - Part 1

A bit late...Pex 0.6 (with x64 support) released
Sat, Aug 16 2008 11:30

I've not looked at Pex (Program EXploration) yet but it seems pretty interesting. The previous version 0.5 only supported x86.

I watched the Channel9 video on Pex a while back now, and have been following it via word of mouth for a long time so when 0.5 dropped it was pretty exciting...until I found out it didn't support x64.

Nikolai Tillman has some more information on the 0.6 release, of particular note "64-bit support: Pex 0.6 installs on 64-bit Windows (but cannot analyse 64-bit-only code)"

by Granville Barnett | with no comments
Filed under:
Visual Studio 2008 SP1 released
Mon, Aug 11 2008 12:26

Download.

Some stuff it includes:

  • Some new WPF designer stuff (not sure what though - not really my area)
  • ADO.NET Entity Designer
  • Office MFC stuff (not sure if it also includes TR1, these two were bundled together earlier on in the year)
  • Some improvements for the JavaScript support
  • Background compilation for C#

Also you will need SP1 to use VS2008 with SQL Server 2008 which was released a few days ago.

Hang on! I've been mentioned on This Week on C9!
Sat, Aug 9 2008 13:39

I think I'm almost famous. I'm mentioned 10:47 - 12:25. The mentioning was in response to my Visual Studio vNext wish list.

Check out the video.

by Granville Barnett | with no comments
Filed under: ,
My Visual Studio vNext wish list
Mon, Aug 4 2008 5:20

My wish list for Visual Studio vNext isn't that long. The things I would like to see in Visual Studio vNext (I'm not that hopeful) are the following:

  • A filtering intellisense members list box
  • Some intelligent suggestions
  • More refactoring options

Unfortunately I am going to do the unmentionable and compare VS to Eclipse.

A filtering intellisense members list box

As the number of classes in the BCL grows, and with newer technologies arriving all the time I don't think there has ever been a better time to implement this feature. Eclipse does a good job of it and is incredibly handy:

eclipse_make_that_list_smaller_1

eclipse_make_that_list_smaller_2

There are some products out there that you can actually install to do this, they include:

Some intelligent suggestions

This is a lame example, but its a pretty common one. Today in VS suggestions for the most part are non-existent. I know that in VS 2008 SP1 background compilation for C# is here (warnings, errors) but it still doesn't give you what Eclipse does with respect to suggestions.

eclipse_unused_imports

I know that there are probably a tonne of people reading this now shouting "You can remove unused using directives now!" True, but its never emphasised to you by the IDE. Again I find myself uttering the word Resharper for this stuff, but should we really have to buy into a 3rd party product for something like this? We could also extend this to something like variables that are never referenced.

eclipse_unused_vars

More refactoring options

Eclipse offers an absolute tonne of refactoring options which are integrated really great into the IDE.

eclipse_refactor_menu

While I don't have any major gripes about what is offered in VS 2008 with respect to refactoring, I do think it lacks somewhat. Some of the refactoring options in VS could do with a more streamlined approach as well. A great example of this is the rename option. Invoking rename will open a big goofy dialogue box which would be appropriate if you were renaming a field or something - in place renaming would be much more appropriate for local renaming's though.

eclipse_in_place_renaming

Final thoughts

I really like VS and all that it gives you but I can't help feel that we are losing out on some of this stuff. I'm sure that the VS team are incredibly busy building new designers, but if anyone on the VS team happen's to stumble across this post then please give these features consideration.

Purposely I have not mentioned C++, they have enough trouble getting intellisense working as it is. If you are interested in this though then check out Intellisense History, Part 1 and Intellisense, Part 2 (The Future). Both blog posts are from the VC++ blog. Visual Assist X is a nice tool though if you want a more rounded experience in VC++ land right now.

Partial classes - they have only one real use, right?
Tue, Jul 29 2008 11:23

Over the years I have heard that some folk actually use partial classes to help assist in-team collaboration efforts, yet I have yet to meet such people. If you have a standard source control system that allows you to merge then surely this is just as good?

The reason I bring this up is that I was recently extending some code that is designer driven, well that's not really true there is no designer but what the program generates is some generic code that is partial so you can cleanly extend it without wading through all the nonsensical automated comments and clear lack of sane code formatting.

If you were to look on MSDN there are two major points which are mentioned about the partial keyword (shamelessly lifted from the MSDN site):

  • When working on large projects, spreading a class over separate files allows multiple programmers to work on it simultaneously.
  • When working with automatically generated source, code can be added to the class without having to recreate the source file. Visual Studio uses this approach when creating Windows Forms, Web Service wrapper code, and so on. You can create code that uses these classes without having to edit the file created by Visual Studio.

Now I can totally see that partial classes for designer driven code is very good, e.g. WinForms which if you use the designer to build just throws in a tonne of glue for you that you really don't want to damage your eyes by looking at - but do we really use partial classes in these large projects?

I'd be interested to know if folk have actually used partial classes in the way in which the first point alludes to from MSDN.

p.s. (final reminder) please post any comments on my new blog - http://msmvps.com/blogs/gbarnett

by Granville Barnett | 11 comment(s)
Filed under: ,
Data Structures and Algorithms book
Sun, Jul 27 2008 12:26

Myself and Luca are currently working on a free e-book that should be out near the end of the year, it will be a companion to the Data Structures and Algorithms project located on CodePlex.

The book use's pseudo code to describe the solutions that we have created so that it can be easily ported to many imperative OO languages like C#, C++, and Java (amongst others).

We are targeting this book at intermediate to advanced programmers, however we do cover some of the basics to give the reader a hand in getting up to speed pretty quick with the terminology used etc.

Presently we have a few good reviewers on board, however if you are interested in this area and would like to be a reviewer then please get in touch with me so I can add you to the reviewers list.

p.s. as you may have noticed my blog has moved to http://msmvps.com/blogs/gbarnett so please post any comments there.

More Posts « Previous page