thebeebs | May 2010
thebeebs
Zeroing the desk - Ignore the design
 
 

The Sun headlines directly in your browser

by thebeebs 26. May 2010 05:36

The Sun Accelarators Over the past few months I've been working with some great brands helping them to leverage the features of IE8. The Sun were one of those brands and today they have released a Football Headlines and Showbiz Headlines webslice. You can install them here.

If you’ve not used webslices before they are little buttons that sit on your favourites bar in IE8. When the news is updated they go bold and when you click on them they show the latest stories.

They were built using .net 4.0 and a whole heap of JQuery. In the next few weeks I'll blog a little more about how we built them but for now, install them and let me know if you like them or not.

Tags:

VS2010 with a real project

by thebeebs 5. May 2010 05:06

vs2010 I’ve had access to VS2010 for the past 4 months but the last 2 weeks was the first time I'd used it to produce production code (yeah I really produce that little code these days), I was helping some customers produce IE8 Webslices and Accelerators.

I thought I'd provide a quick round up of some of the features that really got me loving VS2010.

 

Test Impact

I like to claim I always do TDD but in reality, as a product matures, I often will often refactor a line or method without writing the test to first mandate it. In VS2010 as you make changes to your code the Test Explorer tells you how many tests are impacted by the code change. This is a useful indicator of how big a change you are making and enables you to run a subset of the tests rather than all the tests... this helped speed up the refactor test cycle as I didn’t need to run through 900 tests when I knew with some certainty that my change only impacted 10 of them.

 

Profiling

The profiling in VS2010 not only allows you to find bottlenecks in your standard C# but also lets you interrogate the Asynchronous calls that JQuery makes. This helped me discover a bug where I had a JQuery Timer making a heavy Database call, It worked fine with a single instance but when I scaled it up to a larger load my CPU utilization went through the roof.

 

Automated UI testing

A lot of the webslices I produced had complex UI so having User Interface Testing built into VS2010 ensured that modifications I made didn’t effect the user experience. Good UI regression testing catches many common avoidable mistakes.

 

Anonymisation of Data

Before VS2010 I’d have used RedGate tools to generate anonymous test data, now I can do it easily from within Visual studio. Which is helpful, when in our instance, we knew the schema we were working to but because of data protection we couldn’t have access to the actual data.

 

TDD improvements

Its now easier for VS2010 to stub methods which enables quicker red/green/refactor cycles. Also I liked that I could create a new class and specify the Namespace and Project that I wanted it created in rather than the class being created in the Test Project and then having to manually more it.

 

Azure Publishing

Publishing to azure is getting so simple it’s scary, with an MSDN subscription you get 750 hours free. In VS2010 you just need to right click the webrole and choose publish then upload the two files it creates to Azure. Cloud computing doesn't get much easier.

 

I haven’t even touched on intelitrace and all the other crazy goodness in the new release but when I do I'll be sure to update you.

Tags: , , , , ,

Say “No” to “Null”

by thebeebs 4. May 2010 11:20

I Just read the blog post: Say No to Null and it was an interesting read but something about the idea of not handling Possible null exceptions rubs me up the wrong way.

The two reasons for not handling null were:

  1. Less code would need to be written.
  2. Code will look more elegant.

Neither of these two reasons satisfies my core values when developing code: Producing fast, Bug free code.

My null handling will remain the same. If I have 100% code coverage on the method and null parameters cause potential avoidable exceptions… I will fix them.

Tags: