Reading book ‘Think Twice’
Posted by Bryon on January 19th, 2010Interesting book by by Michael J. Mauboussin on how to recognize and avoid common mistakes when making decisions. Review coming soon…
Interesting book by by Michael J. Mauboussin on how to recognize and avoid common mistakes when making decisions. Review coming soon…
TWAS THE NIGHT OF THANKSGIVING,
BUT I JUST COULDN’T SLEEP.
I TRIED COUNTING BACKWARDS,
I TRIED COUNTING SHEEP.
THE LEFTOVERS BECKONED -
THE DARK MEAT AND WHITE,
BUT I FOUGHT THE TEMPTATION
WITH ALL OF MY MIGHT.
TOSSING AND TURNING WITH ANTICIPATION,
THE THOUGHT OF A SNACK BECAME INFATUATION.
SO, I RACED TO THE KITCHEN, FLUNG OPEN THE DOOR,
AND GAZED AT THE FRIDGE, FULL OF GOODIES GALORE.
GOBBLED UP TURKEY AND BUTTERED POTATOES,
PICKLES AND CARROTS, BEANS AND TOMATOES.
I FELT MYSELF SWELLING SO PLUMP AND SO ROUND,
‘TIL ALL OF A SUDDEN, I ROSE OFF THE GROUND.
I CRASHED THROUGH THE CEILING, FLOATING INTO THE SKY,
WITH A MOUTHFUL OF PUDDING AND A HANDFUL OF PIE.
BUT, I MANAGED TO YELL AS I SOARED PAST THE TREES….
HAPPY EATING TO ALL – PASS THE CRANBERRIES, PLEASE.
MAY YOUR STUFFING BE TASTY,
MAY YOUR TURKEY BE PLUMP.
MAY YOUR POTATOES ‘N GRAVY HAVE NARY A LUMP.
MAY YOUR YAMS BE DELICIOUS.
MAY YOUR PIES TAKE THE PRIZE,
MAY YOUR THANKSGIVING DINNER STAY OFF OF YOUR THIGHS!!
HAPPY THANKSGIVING TO ALL
TFS provides the WIQ Language (Work Item Query) to query work items. WIQ is very similar to standard SQL — you have a Select statement to pull back columns of data, a Where clause to filter data, and a Sort By clause. However, WIQ is much more limited than standard SQL. In particular, advanced sorting logic is not supported. Thus, you may find yourself needing to implement some type of custom solution to sort your work items. A recent client had a pretty advanced sorting system in place in their old Mercury TestDirector system (they migrated over to TFS and got rid of TestDirector). You might need custom sorting if, for example, you need special logic to determine the priority of the defects/bugs. Developers will work on the queue of defects based on the order of the work items. Here are your options:
The web service gets run after you save the work item. The web service event fires, evaluates the work item, assigns a value to the "SortOrder" field, and then saves the work item.
Sample code (this uses the TFSEvents framework available at Codeplex):
public void Notify(string eventXml, string tfsIdentityXml)
{
WorkItemChangedEvent workItemChangedEvent = this.CreateInstance<WorkItemChangedEvent>(eventXml);
TFSIdentity tfsIdentity = this.CreateInstance<TFSIdentity>(tfsIdentityXml);int WorkItemID = workItemChangedEvent.CoreFields.IntegerFields[0].NewValue;
Microsoft.TeamFoundation.Client.TeamFoundationServer TFS = new TeamFoundationServer(tfsIdentity.Url);
TFS.Authenticate();WorkItemStore WIS = TFS.GetService(typeof(WorkItemStore)) as WorkItemStore;
WorkItem updatedWI = WIS.GetWorkItem(WorkItemID);
string priority = "";
string environment = "";if (updatedWI.Fields.Contains("CustomFields.SortOrder"))
{
priority = updatedWI.Fields["CustomFields.Priority"].Value.ToString();
environment = updatedWI.Fields["CustomFields.FoundInEnvironment"].Value.ToString();if (priority == "1-Now")
{
updatedWI.Fields["CustomFields.SortOrder"].Value = 1;}
else if (priority == "2-ASAP")
{
updatedWI.Fields["CustomFields.SortOrder"].Value = 2;
}
else if (updatedWI.Fields["CustomFields.CRID"].Value.ToString() != "" ||
(updatedWI.Fields["System.IterationID"].Value.ToString() != "154" &&
updatedWI.Fields["System.IterationID"].Value.ToString() != "314"))
{
updatedWI.Fields["CustomFields.SortOrder"].Value = 3;
}
else if (environment == "2-PRE-PROD" || environment == "3-Test" || environment == "4-DEVL")
{
updatedWI.Fields["CustomFields.SortOrder"].Value = 4;
}
else if (environment == "1-PROD")
{
updatedWI.Fields["CustomFields.SortOrder"].Value = 5;
}if (updatedWI.IsDirty)
{
updatedWI.Save();
}
}
}
A big disadvantage to this method — the work item gets updated by the web service, thus if a user has the work item loaded on their screen, makes a change, and tried to save, it will fail and notify the user the work item has been updated by another user. This scenario is very likely to happen since the user will have the work item on their screen during the initial save and may want to add additional data or update information on the work item. They are forced to close and reopen the work item after each save. For most organizations, this would be frustrating and probably disqualify this solution.
Based on all these options, the best option if you require advanced sorting logic is to develop a client-side custom control.
We usually read Nicholas a book each night before bed… and he is always so excited! Here he is flipping through a favorite book.
Brendon hasn’t been feeling well the last couple days – I think it’s because he is teething right now. After Nikki told Nicholas that little Brendon wasn’t feeling good, Nicholas offered some love
We went on our first family camping trip last week! Yes, real camping in a tent. We went to Many, LA at Toledo Bend Lake. It was a pretty camp site – right there on the lake. Mom & Dad brought their RV, while we had a tent. Everyone had a great time. It rained most of the days we were out there, so we didn’t get to go fishing or do some of the activities we planned, but we still enjoyed it. I’m amazed at how well both Nicholas and Brendon did – especially considering all the rain. A few photos:
We took the boys up to the fire department during our trip to Shreveport / Stonewall last week. Dad has been volunteer firefighter in Stonewall for many years now. Nicholas love his play fire trucks – but he was a little scared of the big fire trucks!
Little Brendon is now crawling all over the place, pulling himself up and almost walking! Just 8 months old and he seems so grown up. Amazing how fast it has gone – and what a good baby he is… never sick, eats like crazy, and is always happy and smiling.
I’ve been training a lot lately to improve my 5k performance and work towards triathlon event. To build up my upper strength, I started a 6-week pushup program (it’s an iPhone app – yes, the iPhone does everything!). The graph below is my progress so far. I did 142 pushups at my workout today… the next two weeks are going to get really difficult to keep up.
Recent Comments