I am sure like many avid Developers out there ( Taking into account Windows 7 launch as well this week ), I downloaded VS2010 Beta 2 and began to look at what is coming for us developers in the future.
So bottom line is the shipment date for VS2010 is set at March 22, 2010. Not sure where I found this date not that I think about it, but doing some Googling sure confirms this quite quickly. Don’t quote me on that though!
So one of the exciting features I wanted to take a brief look at was ‘optional paramters’ which the VB guys are probably shouting “done that been there!” – well Yes we C# guys now have optional parameters…
So I started with a new Class Library project and went straight into ready made cs file. I eagerly, entered a new function.
private void OptionalParameterTest(int i = 1, string y, int b)
{
// implementation goes here!
}
Tried to build and bam, error! So scratching my head, I took a look at help regarding optional parameter and through reading found out that you have to place optional parameters at end of parameter listing…
private void OptionalParameterTest(string y, int b, int i = 1)
{
// implementation goes here!
}
Now it worked as intended. The interesting thing to note, is that when intellisense comes across a function with optional parameters they are displayed in ‘[]‘. It is very wierd to call the above function leaving out i but also can see the major benefits that come with this functionality which has been missed by myself after leaving VB all those years ago.
Apologies for not making this a more techie post, but I to be honest have not explored this topic in depth however will in the future and update article with more in-depth examples.
Recommended OSX Apps – Part 1
Virtualisation

My strong recommendation in this area a fantastic application called VMware fusion from VMware.
VMWare has enabled me with ease to run multiple Microsoft, Linux operating systems with ease and performance has been quite stunning at times.
Some awesome features which stick out for me are:
- Snapshots – this provides the ability to take snapshots of VM before making changes you may have the desire to rollback for instance. This has personally been a phenomenal time saver for me especially when trying out new beta products which could prove to be rather unstable or having the ability of going back after system change which has undesired effects. I know you are probably thinking ‘System Restore’ isn’t this feature what you want…. Well in some cases yes however not really applicable.
- Unity – this has been improved further in current version, basically bringing Windows apps or alike within mac shell ( or at least perceive themselves as so ). This was available in previous version however was a real performance hog. With new release this has improved and I have successfully used this to bring stable windows Chrome to the mac platform via an XP VM seamlessly.
- Virtual Harddisk Mounting – With the latest version of VMware fusion one has the ability to “mount a suspended virtual machine’s virtual disks as read-only Mac volumes”. This is a major feature for me, especially when you use VM’s for hardcore development and the time saver and convenience which comes with being able to grab code or files from within a suspended VM without spinning it up is great.
The only thing I have missed, which is available within VMware Desktop edition on PC, is the ‘Clone’ functionality. This feature saves loads of time, especially when provisioning VM’s amongst a development team or creating a virtual network environment mimicking a client’s server setup.
There are more than 50 new features and plenty more which can be found on VMware’s website.
In Part 2, I will be writing about Screen casting tools.
Linq to Entities and SequenceEqual()
Determines whether two sequences are equal by comparing the elements by using the default equality comparer for their type. MSDN Reference
An very simplistic usage:
Boolean isDifferent = [Generic List].SequenceEqual([Second Generic List]);
Take careful note of this paragraph in MSDN souce:
Return Value
Type: System.Boolean
true if the two source sequences are of equal length and their corresponding elements are equal according to the default equality comparer for their type; otherwise, false.
This saved me a whole load of work, of course if you are comparing default types not custom types. If you are comparing custom types then use the over load providing a custom IEqualityProvider(T). The nice thing is that becuase it iterates through each collection item executing default comparer the order of each is not a factor.
Red Gate ANTS Performance Profiler
Over the past few days I have had the pleasure of playing with v4.3 of ANTS Porformance Profiler by Red Gate. Already, within short space of downloading and installing I have pinpointed some serious performance issues which needs rectifying ( all before a end customer would be suffering the performance problems ).
Some of you might be asking yourselves: “Surely you noticed that the application was slow before?” Simple answer, No.
The reason being is that most of us developers or techies alike run pretty quick machines and it is easy for us to assume that everyone runs fast machines. Unfortunately, this is not the case and becomes even more important when developing a “product”.
This tool certainly delivers bang for buck in my books with some of most notable features for me being:
- Function level highlighting with colour status indication
- Ability to click through, navigate from function to function
- The gorgeous, object graph explorer ( great for convincing the boss to purchase product )
- Realtime graph, with selection and drill-down while running
As with all profiling tools you do have to expect an overhead while profiling but the wait is more the worth while. All in all I have no hesitation in recommending this product and urge you to download and take a look for yourself.
Ever had to validate that a number falls between 2 other numbers and also decimal places are defined as validation as well? Well, I had to do this today. For the first few minutes I scratched my heading wondering whether the double class would prove this to be a trival task. However, not the case. After, a little more thought and of course using Test Driven approach, I came up with the following code which works.
However, there is an edge case, whereby if you execute code with 0.0, 0, 0,0 => the answer is true! However, for my needs this will not be the case. Negative numbers are not a factor either!
public static Boolean VerifyNumberMeetsSpecification(double Value, double Min, double Max,
byte DecimalPlaces)
{
int StartValue = Value.CompareTo(Min); // 0 or +
int EndValue = Value.CompareTo(Max); // 0 or -
string strVal = Value.ToString();
if (strVal.IndexOf('.', 0) > 0)
{
int decimalPlaces = strVal.Length - strVal.IndexOf('.') - 1;
// take into account decimal places if we have dec's
return (StartValue >= 0 && EndValue <= 0 && decimalPlaces == DecimalPlaces);
}
return (StartValue >= 0 && EndValue <= 0);
}
I should also mention that the code is written in C#!
You learn something new every day… well today while in Visual Studio 2008 with ReSharper 4.5 installed I right clicked on a folder and went to properties. While scanning the properties panel I noticed a Group called Resharper, and below an option to specify whether the folder forms part of the namespace for files contained with in it.
Now if you like me, like to use folders to organise your code but do not want to alter the namespaces or indeed when adding new files, have them take on folder as part of namespace then you know where to turn this off now ( of course assuming you have ReSharper ).
ReSharper you beauty!
Wireframes and Prototyping Tools
When it comes to creating wireframes, the benefactor standard for me has always been Visio. Over the past couple of months I have branched out and tried some of the competitors. These include:-
Balsamiq Mockups
At $79 this product goes a long way in making in-roads into wireframe creation. I have personally seen this tool being used by novices to mock up screens very quickly. With its extensive list of controls users can quickly put across their intended UI.
If not mistaken this is a Ruby on Rails application using Adobe Air as enabling platform for OS independence.
iRise
This software looks very impressive however I have no personal experience using this tool. Their website certainly indicates that they are “World leaders” and as with most software that claim to be elite their price tag is significant or at least too significant for small software development houses.
There are some very big advantages with software of this kind, simulation engines etc. Their slick website and walk through video certainly present a well established thought out software. I am not sure I will get the chance to use software of this calibre.
Axure RP Pro
I had the pleasure today of downloading and making use of Axure Pro 5.5 and must say was very impressed. Unlike Visio it was quick to knock together wireframes with behaviours and the cream on top, documentation.
With being so impressed, I demonstrated it to a few colleagues and boss in turn and all were very impressed. Especially with the documentation. With a fair price of $589, it is not too expensive however must point out that it is an additional tool as apposed to a replacement for Visio.
With tools like Axure it seems plausible that you can sit down with a client, knock up all the bahaviours and UI elements and at the end of the meeting generate specification, and have client walk away with first draft and HTML prototype for other business stakeholders to work through. Very impressive for a client I am sure and I am sure more real world.
In summary, there are many tools now available for wireframe development and their are situations were I have come across organisations using VS Studio for wireframing, what ever the tool, surely it needs to assist in the process of UI and IA design.
A wonderful quote which comes to mind is
“If I can’t picture it, I can’t understand it.” Albert Einstein
Back on the interweb!
I have moved hosting again
The people who know me probably are not to surprised however possible might be surprised by the technology being used. After playing around alot with technology and spending hours getting it all to work I have decided to make things alot easier for myself. With easier management of my blog, I am hoping for more posting and giving back to the community.
So please do check back as I strive to expand my information portal on the web ( well blog ).
