Happy Pi day!!!
Other than being Pi day it's also Mr. Einstien's birthday!
Other than being Pi day it's also Mr. Einstien's birthday!
Posted by
Adam
at
3:38 PM
0
comments
For some reason or another my esc key stopped working in visual studio. To make things worse I never made a copy of my environment settings. Without a copy of my default settings I thought that I would have to reinstall or repair visual studio. I was completely and utterly doomed. However, thanks to a quick search, I found that visual studio can be reset back to its default settings through the command line:
devenv /resetsettings
MSDN Documentation
Posted by
Adam
at
6:03 AM
17
comments
Labels: Visual Studio
For the last few months our team has been using ruby and RWebSpec for functional testing. The only problem with this type of testing is that it's very brittle. The slightest change to an html element name or even renaming a view can cause our tests to fail. We have been actively searching for a better solution without any results. At least until NOW.
Jimmy Bogard recently hosted a screencast called "UI Testing". From the looks of it, the Jimmster has solved our brittle functional testing problem. Using watiN, gallio and most importantly designing for testability our functional tests can be less fragile. It's actually no different than test driven development. The first thing that you learn with test driven development is that you have to design for testability. If your interested in making your legacy code more testable I suggest giving Michael Feathers book "Working Effectively with Legacy Code" a read. As Michael puts it, all code is legacy code.
On a separate note our team has also been struggling with deciding how to integrate functional testing into our sprint. One idea that we have is to create a set of acceptance criteria for each story. The acceptance criteria would then be confirmed through our functional tests. Therefore, a story can only be marked as complete if it passes all acceptance criteria.
Click here to view Jimmy's awesome screencast.
Posted by
Adam
at
5:48 AM
0
comments
Labels: Asp.net MVC, Functional Testing
Every once in a while early adoption has a way of making a simple process painful. What makes matters even worse is the lack of documentation. Several times during the spiking process I found myself second guessing whether I was at fault or I found a bug.
First here's an awesome walk through of how to use MVC client side validation. That's right, it's just a blank page at the moment.
public class Car
{[DisplayName("Make")]
[Required] [StringLength(100)]public string Make { get; set; }
[DisplayName("Model")]
[Required] [StringLength(100)]public string Model { get; set; }
[Range(1900,2011)]
public int Year { get; set; }
}The create action can now ask the ModelState if it is valid. If the ModelState is not valid you can redisplay the view with errors.
public ViewResult Create(Car car)
{ if (ModelState.IsNotValid()) return View(car); CreateCarCommand.Execute(car);
return View("Success");
}
Validating On The Client Side (MVC 2 Preview 2)On the view you can display errors in a validation summary or place the errors next to the offending html control.public static class ModelStateDictionaryExtensions{public static bool IsNotValid(this ModelStateDictionary subject){return !subject.IsValid;}}
ASP.NET MVC Preview 2 includes the jQuery validation library and a client-side validation adapter for that library. The adapter supports the following DataAnnotations namespace validation attributes:
· StringLengthAttribute
· RequiredAttribute
· RegexAttribute
· RangeAttribute
The only kicker is that this is a preview and far from perfect."
Posted by
Adam
at
10:39 AM
23
comments
Labels: Asp.net MVC
Posted by
Adam
at
8:21 AM
0
comments
Labels: Food
This is my first blog post from my IPOD Touch. How cool is that.
Posted by
Adam
at
9:54 PM
0
comments
Posted by
Adam
at
2:02 PM
4
comments
Posted by
Adam
at
7:23 PM
0
comments
Posted by
Adam
at
3:48 PM
1 comments
Labels: Agile, Presentation