CI and Unit Testing Processes

Working with unit tests and CI in a team environment poses some interesting process challenges. It's good to enforce the stigma of the Broken Build, but process should help prevent that scenario from ever occurring in the first place (disclaimer: I've been party to responsibility for broken builds twice in two days, ashamedly).

I'm thinking the following process should be enforced:

  1. Write Tests (TDD & all)
  2. Write Code to pass Tests
  3. Refactor
  4. Make sure Code passes Tests
  5. [placeholder -- ready for checkin] Prepare for checkin by:
  6. Update code (get latest)
  7. Build
  8. Run All Tests
  9. Refactor as needed
  10. Checkin Code

If this process is not used, there's a more serious concern of regression tests only getting caught at the automated CI build, rather than through the everyday making sure that tests are going to pass proactively prior to actually submitting code to the source engine.

Posted on 10/28/2008 5:31:00 PM by Jason Nadal

Permalink | Comments |

Categories: development | tdd

Tags: , ,

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Improved Paging

I don't know how everyone feels about pagers, and specifically about the GridView, but it's sometimes the quickest way to solve a problem. I had worked on an isolated area of an application where GridView seemed like a good fit, although the built-in paging mechanism never quite seems to fit the bill.

So I did some research, and came across this blog post by Francisco Santos, Jr., giving a very clean-looking paging system. The best parts about it are the instant notification of just how many pages are being returned, coupled with a dropdown to choose which page to actually go to. The blog post is flawed in that it never mentioned that the ImageButtons in the PagerTemplate needed to be bound to the Paginate method he declares (sometimes the best part about a blog post is the comments!), but other than thatt, the approach is good.

Also cool on his blog is a post about a script outline add-in that allows you to use Document Outline with Javascript. It's written for VS2005, so I can't guarantee it'll work for 2008.

Posted on 10/27/2008 6:39:00 PM by Jason Nadal

Permalink | Comments |

Categories: asp.net | development

Tags: ,

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Javascript, AJAX, Controls and Libraries, Oh My.

While looking around the net today for a specific control, it's amazing the number of javascript do-everything libraries that are out there. From mochikit and scriptaculous, to Yahoo.UI and Google's offering, to various ajax libraries like Microsoft's AJAX.NET, AJAX.NET Pro (the non-MS offering), and many many others, the number of choices is amazing. It seems they all have thier shortcomings, but that doesn't stop the devs on these projects to continue their broad scope.

What I came across that was a bit unusual was a framework that relies on a compiler that runs at serve time. Called Jitsu, it's yet another UI, animation, data binder, and AJAX library. The site looks pretty stale (circa 2006), but the approach was interesting because it was different.

Posted on 10/26/2008 4:26:00 PM by Jason Nadal

Permalink | Comments |

Categories: development | javaScript

Tags: , ,

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Reasons for Mandatory Reboots

In this month's TechNet magazine the last article, by Raymond Chen told of the reasons why reboots are required after installing updates. It's not so much that windows is unable to swap out dll's that are being used, it's more a product of not needing to support parallel versions of the same dll for apps or services that are already loaded.

Posted on 10/25/2008 9:08:00 PM by Jason Nadal

Permalink | Comments |

Categories: network | windows

Tags:

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

The Longest 60 Seconds

I moved servers within our location at work today. While it was a pretty physical workout (servers containing many drives & redundant power supplies make for some heavy lifting), it was much more mentally draining.

It's amazing how long & panicked the wait between powering up a RAID array is, and the time it states it's fully functional is. All went well, and Hyper-V is right where it belongs. I could actually feel my heart beating in my chest as I watched the lights cycle... finally rendering their blue verdict.

My only complaint so far with Hyper-V in Windows 2008 is the weak support of P2V (that is, Physical to Virtual conversion). I've got some pretty dated win 2000 servers that I'd like to retire, but it seems I need to create the VM's the old-fashioned way, through windows install disks, and manually copying the data over. The only other issue so far I've found with windows 2008 is the difficulty in Apple machines getting an IPv4 address through DHCP on a Windows 2008 server. Hopefully I'll find a way around that, since I can force people to use Windows.

Posted on 10/24/2008 8:22:00 PM by Jason Nadal

Permalink | Comments |

Categories: network | troubleshooting

Tags: , ,

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Javascript, Booleans, and Implicit/Explicit Casting Performance

Ahh the variant. It provides so much ease in writing code, and yet can cause so many headaches. In Javascript, I learned today what joys and pains of assumption of datatypes through boolean expressions can provide. Take the following simple statement:

var x=true;
var y=false;
if (x || y)
  alert('true');

In this case, x is ORed with y, resulting in an obvious true. But we're assuming boolean values. What happens when one has the possibility of not being boolean?

So the creators of javascript saw in their wisdom to add strong-ish typed declarations. You can declare a boolean explicitly, like so:

var isInAGoodState = new Boolean(true);

So all is happy and we can use good booleans. However, there's also an implicit declaration that's much better in terms of performance:

var isInAGoodState = !!(sourceValue);

Essentially saying not-not-sourceValue, using a double negative, results in a true statement. The amazing thing here is just the scale of the performance gain. From a source example, "Overall, the performance gain for using implicit conversion averaged out to 53% across browsers after 10 tests"

Posted on 10/23/2008 7:16:00 PM by Jason Nadal

Permalink | Comments |

Categories: development | javaScript

Tags: ,

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Resharper tip: Go to Inheritor

My latest most-used resharper tip these days has been: Go to Inheritor. This is fantastic when tracing through code for debugging, and winding up at an interface. Go to Inheritor (Alt+End if you use the VS shortcuts) will jump to a list of classes that implement that interface.

Alternatively, Alt+Home will take you back up from the implementation back up to the Interface.

Posted on 10/22/2008 8:39:00 PM by Jason Nadal

Permalink | Comments |

Categories: development

Tags: ,

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Scrum for TFS

I found something rather interesting by chance today. Conchango Scrum Template for TFS. It looks to be pretty immature, but it's nice to see that even a product as large in scale as TFS can support scrum.

Personally, I find that Rally is sufficient for most tasks, lacking only a properly functional visual studio plugin (there's one available, but seems to disappear quite often; perhaps that's just my machine).

Posted on 10/21/2008 8:53:00 AM by Jason Nadal

Permalink | Comments |

Categories: development | scrum

Tags: ,

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

Silverlight 2!

Don't know how I missed this, but Silverlight 2.0 has been released!

Get it here: Link

Posted on 10/20/2008 8:55:00 AM by Jason Nadal

Permalink | Comments |

Categories: development

Tags: ,

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5

VisualSVN

After working with SourceSafe for a few years, working with SourceGear's Vault for a couple, and TFS briefly, VisualSVN was recommended to me.

This engine was extremely easy to set up,  and even easier to update for patches. This was the main contention I had with Vault. The visual studio plugin is $49, but "It Just Works", and in my opinion is worth the expense. This is especially true considering the server itself is free.

Posted on 10/20/2008 8:22:00 AM by Jason Nadal

Permalink | Comments |

Categories: development

Tags: ,

Be the first to rate this post

  • Currently 0/5 Stars.
  • 1
  • 2
  • 3
  • 4
  • 5