Help Me, Help You… Windows Azure at Tech Days.

Friday, 9 July 2010 17:48 by SyntaxC4

techdays_magnify Today at 5pm I received an important email that I had been waiting for, this email confirmed me as being a Session Leader at Tech Days 2010 in Canada.  This means I will be creating the slides and demos that will appear in the “Using Microsoft Visual Studio 2010 to Build Applications that run on Windows Azure”.  I have been speaking on Windows Azure across Canada, and up until now I’ve been showing off what I wanted to show you, now it’s your turn.

 

It’s a hard knock life, for us

office-space Being a Developer is challenging at times, we have to figure out the problems of the world. Although we all live in the same world, we all face different challenges; currently my challenge is to encompass a little bit of each of your lives into one hour of your time. This leaves me with one question what are the battles you’re going to be taking into the cloud? For this I need your help, Please leave a comment, or Contact me and let me know one thing that you think you can benefit from knowing about Windows Azure.

The Next Generation of Defensive Coding

Tuesday, 6 July 2010 19:46 by SyntaxC4

If you’re a Software Developer, hopefully you understand the concept of Defensive Coding. If you’re not familiar with the term here is a quick example to explain the concept.

public string SomeMethod(string prefix, string rootWord, string suffix)
{
	// Ensure Parameters contain values.
	if(string.IsNullOrEmpty(prefix))
		throw new ArgumentNullException("Prefix cannot be null");

	if(string.IsNullOrEmpty(rootWord))
		throw new ArugmentNullException("RootWord cannot be null");

	if(string.IsNullOrEmpty(suffix))
		throw new ArugmentNullException("Suffix cannot be null");

	return string.Format("{0}{1}{2}", prefix, rootWord, suffix);
}

Defensive coding gives the benefit of ensuring that your method is being used properly by who ever is implementing your code, if the proper requirements aren’t met the code throws an exception and warns the Developer what particular parameters expects in order for the function to complete properly.

This concept has been used for years and has suited its purpose well. However there are certain things that this method doesn’t provide. Wouldn’t it be nice if these conditions could be validated by the IDE, before compiling your project? Enter Code Contracts.

codecontracts_sm Code Contracts were added to .NET 4, but are available to be used in previous versions of the .NET Framework by installing them from the Microsoft DevLabs Project Site. To use Code contracts you will have to Add a Reference to the System.Diagnostics.Contracts namespace.

 

Static Checking which is the feature of Code Contracts that works without explicitly compiling your code [Visual Studio Background Compilation is necessary], is unfortunately only available in Visual Studio 2010. [Aside: I use the term unfortunately here lightly, you really should Upgrade to Visual Studio 2010, Microsoft has done an amazing job, and you won’t be sorry]

To Mimic the code that I’ve shown above, however this time leveraging the Code Contracts.

public string SomeMethod(string prefix, string rootWord, string suffix)
{
	// Ensure Parameters contain values.
	Contract.Assert(!string.IsNullOrEmpty(prefix));
	Contract.Assert(!string.IsNullOrEmpty(rootWord));
	Contract.Assert(!string.IsNullOrEmpty(suffix));

	return string.Format("{0}{1}{2}", prefix, rootWord, suffix);
}

As you can see the implementation is much neater and easier to read than the blocks of if statements.  This is not the only functionality of Code Contracts either, you can let the contract pass the value through by using the Assume Method which assumes that the value is valid. Other Advantages include Code Based Documentation [Outlining what is expected by the method (in Code, because no one likes making XML Comments)], Business Rule Validation, Can be evaluated on TFS Gated Check-in.

Once I start using Code Contracts in more depth, I’ll be sure to start giving you more real life implementation scenarios. As always be sure to check back!

Until then, Happy Coding!

You asked, Microsoft Delivered. Free Time on Windows Azure.

Tuesday, 6 July 2010 17:13 by SyntaxC4

If you were one of the developers at one of my talks that was tempted to try Windows Azure, but didn’t want to pay to give the platform a shot, here is your chance.  Previously, the only way to get some time on Azure was to have an MSDN Subscription but Microsoft noticed that a lot of their audience that wanted to try out the Azure a Platform didn’t have a subscription.

Microsoft has announced the Windows Azure Introductory Special which offers 25 free hours per month on a Small instance, a Web Edition SQL Azure Database, 2 Service Bus connections to AppFabric, and 500MB of Transfers coming to, and going from the Cloud.  This is a fairly decent starting point for someone trying to launch an existing application to Windows Azure.

How do I get started?

If you just came across my blog there are a few posts that you may want to check out to get up to speed on Windows Azure:

You can also get some tools and an a free IDE to help you deploy your project to the cloud.

Where do I sign up?

Head on over to the Windows Azure Offers page, and click the Buy Now button under the Introductory Special.

What do I do next?

Head out to TechDays 2010 for some Training on Windows Azure.

[Update]

The Microsoft DPE Team in Canada is Dedicated to answering your questions about Windows Azure. If you have a question you would like to ask directly to a Microsoft Representative email the Canadian team at

[/Update]

Doin’ TechEd – Speed Up in Visual Studio

Tuesday, 8 June 2010 20:57 by SyntaxC4

Some of the neat hidden features in Visual Studio 2010 that not too many people know about. These tips were learnt during the #Dev315 Session at TechEd North America.

Zooming your Code in Visual Studio 2010

[Ctrl] + [Shift] + [<] or [>]

Love your Visual Studios 2010 Windows Layout?

You can save out your windows layout which is included in the Export Settings Dialog located under the Tools Menu. Take it home, Screw with your co-workers, or share it online.

Navigate hidden tabs from your keyboard

[Ctrl] + [Alt] + [Down]

Navigate To…

Instead of using the Solution Explorer you can use the Navigate to Menu to search through files in your solution. To open this use:

[Ctrl] + [,]

Writing Throw Away Code

A lot of Developers break complex code down to Console Applications, this is something that I practice when I’m running into issues. This can litter your hard drive with a whole lot of temporary projects. Avoid this by disabling Save new project when created feature in Options.

Visual Studio 2010 Options - Disabled Save New Project When Created

Smart Tag Shortcut

Opening the menu when you have “Background Squiggles” can be easily done with [Ctrl] + [.]

Doin’ TechEd – Developer Fundamentals Session

Monday, 7 June 2010 07:04 by SyntaxC4

New Capabilities for Visual Studio 2010

Even though Microsoft just Launched Visual Studio 2010, they are constantly going back to create new features. Just launched today is a new set of features for workflow in Visual Studio. You can Download the new Visual Studio Pro Power Tools from Visual Studio Gallery

Some examples of the new Features

  • Hold ctrl – Click : Urls to Code
  • Triple Click : Place Cursor far left
  • Pin Tabs in IDE with Project Based Tab Coloring
  • Search on Add Reference Window (Finally!)

Going Agile in Visual Studio

Scrum Process Templates are available for TFS 2010 so you can start bringing the power of Agile Methodologies into your IDE. This tool gives you ability to outline and organize your projects in a way that works for you. This tool also gives you the ability to get reports on how your project is coming along. To give this tool a test drive, head over to the Visual Studio Gallery and download the TFS Scrum v1.0 beta.

Expression 4 is Available

Released today is the new version of Expression, Expression Studio 4. If you have a MSDN Subscription you are able to download these tools today!

There are a number of new Behaviors available from within the Assets tool menu. These behaviors allow you to enable some additional features in sketch flow without writing any code, like creating more intelligent prototypes.

About SyntaxC4:

  • Cory Fowler
  • Guelph, Ontario
  • English
  • SyntaxC4

SyntaxC4 Tweets:

Posts by Date:

<<  September 2010  >>
MoTuWeThFrSaSu
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910

Archive:

Advertisements:

Tag Cloud:

Favourite Publishers:

Apress Daily Deal
Apress Daily Deal

Blog Roll: