July 2009 Entries

Speaker

timhuckabyTim Huckaby is currently focused on RIA & Smart Client Technologies like WPF, VSTO, Surface, and Silverlight. He has been called a “Pioneer of the Smart Client Revolution” by the press. Tim has been awarded multiple times for the highest rated Keynote and technical presentations for Microsoft and numerous other technology conferences around the world by Microsoft Corporation. Tim has done presentations on Microsoft Technologies at technology events like Microsoft Tech Ed, Product Launch events, Dev Days, MEC, World Wide Partner Conference, MGB, MGX, and the PDC, along with 3rd party technology conferences all over the world is consistently rated in the top 10% of all speakers at these events. Tim was selected by Microsoft as a “Rock-Star” speaker for the International .NET Association and speaks world-wide on their behalf. Tim has done keynote demos for numerous Microsoft executives including Bill Gates and Steve Ballmer. Tim founded InterKnowlogy, experts in Microsoft .NET and Microsoft Platforms, in 1999 and has 25+ years experience including serving on a Microsoft product team as a development lead on an architecture team. Tim is a Microsoft Regional Director, an MVP and serves on multiple Microsoft councils and boards.

Topic

Integrating WPF & WCF into Your Office Business Applications Description This session will highlight many of the ways that the Windows Presentation Foundation (WPF) and the Windows Communications Foundation (WCF) can be leveraged in Office applications built with Visual Studio Tools for the Office System (VSTO). Visual Studio® 2008 introduced an array of new features aimed at a wide range of Office solution types. With Visual Studio 2008, you can build solutions that incorporate the native capabilities of the Office client applications (like Outlook) combined with the sophisticated UI capabilities of WPF that's connected to remote data and services via WCF and use the RAD features of LINQ to manipulate that data. These new technologies provide opportunities for building powerful solutions with functionality that was previously difficult or impossible to achieve. Now that Office has evolved into a true development platform, office-based solutions are becoming increasingly sophisticated, less document-focused, and more loosely coupled. This session will show you how easy it is to build robust solutions that leverage the latest technologies.

I look forward to seeing you all there!

Tuesday, July 21st, 2009 6:00PM – 9:00PM
Centriq Training
8700 State Line Rd
Leawood, KS 66206

Food Provided by Modis IT

Prizes Provided By Microsoft

At least not by the FIRST definition in Merriam-Webster online.

“a body of methods, rules, and postulates employed by a discipline : a particular procedure or set of procedures”

To me, this refers to my development practices (Test-Driven Development, Domain-Driven Design, Pair Programming, SOLID principles, SOA, SOC, etc.). How I do software development. Kanban and Scrum do, however, meet the second definition:

“the analysis of the principles or procedures of inquiry in a particular field”

It’s a tool for inspecting your methodology. I think if it as a “method magnifier”, a way to see everything about your methodology from every angle and every level of abstraction. To shine a really bright light on every corner of how you do things. This distinction is important for two main reasons:

You Can’t Use Them To Do Anything

This is where I think most teams make their first mistake. It is definitely where we made ours when first trying to employ Scrum. We built our “software building” around the tenets of Scrum (Sprints, Stories, Stand-Ups, Retrospectives, etc) instead of using those tools to inspect our methodology.

These tools are meant to be ways of showing everyone where the “stuff we’re doing” is failing or causing problems. They aren’t meant to be the way we do those things.

You Can’t Change ThemMicroscope

There are endless religious arguments from the “Agile Suicide Bombers” that will ride a the principles of their chosen agile process all the way into an epic failure, believing all the while that the principles will deliver them from destruction. People spend lots of time and money studying and evangelizing the tenets of their chosen agile process. Lots of them will never admit that this piece or that provides no value.

Changing your methodology, however, happens all the time. You find a better way to do something, and you start doing it that way. It makes complete sense. People are less afraid to chuck doing something that is wasting their time. It is important to make sure you are really getting no value from it before you chuck it, but if everyone on the team agrees that it is cumbersome or painful with no real payoff, nuke it.

My Opinion (FWIW)

Having done scrum and failed a little and succeeded a little and also done Kanban and failed a little and succeeded a little. Here’s where I feel I am using Kanban right now:

  1. Do things the way you do them. If you employ TDD or Pair-Programming or Code-Reviews or Continuous Integration, keep doing it.
  2. Try pointing the inspection tool of you choice at your methodology. Put your requirements up in stories and track them across the process from planning to implementation and use the tool to identify the things that you do that cause problems, bottlenecks or provide no real value.
  3. Change those things that you do.
  4. Rinse and repeat.

It may seem overly simplistic, but my team and I are constantly reviewing how we do things and watching the Kanban board for signs of problems. As soon as we identify a problem, we talk about it, discuss ways to resolve it and pick one. Then we continue. It has been outright fantastic. Not only have we been better able to “predict” when we think we’ll be finished with the next “thing”, we’ve actually gotten better at building software. That right there is worth the price of admission, for me.

Of course, these are only my opinions, based on my own studies and my own experience. Most of all, they’re my opinions as of this moment. I’ll be very interested to read people’s reaction to this post and see how other people are using these tools.

mvplogo I wanted to wait to announce this until I got my award package in the mail, in case they decided they made a mistake. :0) I am now officially a Microsoft MVP for Solutions Architecture. Thanks to everyone, and I hope to prove I’m worth the award.

 

 

 

 

 

~w00t!

The Way I've Come To See BDD

Over the last year and a half, I have been moving from TDD to BDD. For those who don't know, this is not a tool or technology switch so much as it is a mental paradigm shift. Luckily, I didn't work in a lot of shops that ever did a lot of unit testing (testing units of code after you write them). Most often, we'd be under time crunches that forced PMs to make the decision to forego unit testing in order to meet a hard deadline that they got from some estimation crystal ball (that's a rant for another time). The positive outcome was that I didn't get sucked into many of the pitfalls that plagues those who came from shops that did more unit testing. However, I was still convinced it was about testing.

It's not about testing. As Dave Astels would say, "TDD is not aboot testing, it's aboot design." That's a good way to say it (without the Canadian accent, of course). TDD is about driving the design of your code based on what the consumer of that code specifies. The problem is, most people start with what the consumer needs and try and break that into small pieces of engineering and then test that. BDD takes a different approach.

BDD (for me) starts and ends with user voice. If you can't describe it in the user's language, you should stop and think about whether or not you're over engineering. It may start with a simple, "A user should be able to log in.", and that can spawn several scenarios. What should happen if the user's username is bad? their password? What happens if they DON'T have a username and password? Should we allow the user to "stay logged in"? Once the user successfully logs in, where should they be taken? All these things are tenets of good requirements gathering, and they become specifications for building what the consumer wants/needs. After much reading, discussing and practicing, I have seen two major styles of BDD. I've come to call them "Concentric Circle BDD" and "Context Specification".

Concentric Circle BDDConcentricCircleBDD

Concentric Circle BDD starts with a plain English scenario, written exactly as a user or BA might write it. The generally accepted pattern for these scenarios is the "Given, When, Then" syntax. For instance, "Given that I have a valid username and password, when I enter them in the login screen, I should be successfully logged in”. In this more "traditional" BDD style, you use a tool like Cucumber, JBehave or NBehave to write code that will pull in that text and parse it and execute it in a observable, provable way. Once you have a failing scenario, you drop into the inner concentric circle and begin writing more focused specifications, that observe small, independent pieces of that scenario. Once each inner piece is working, the scenario should be proven as well. Concentric Circle BDD is, I believe, what Dan North had in mind when he introduced BDD. If you've done any BDD with rSpec and Cucumber, using the two together leads to this type of BDD.

Using this outside-in circular approach, lets developers start right where the user leaves off. Take the story and scenarios and make them executable. Easy enough, and it overcomes one of the biggest barriers for those new to TDD and that is where to start. The main drawback, is that once developers get to the "inner" concentric circle, they might become lazy about keeping specs in the user's voice. It's easy to write a spec called "should_call_login_method_on_authentication_service" instead of calling it, "should_authenticate_user_against_registered_users". Staying in user voice makes it easier to ask a user how something in the system SHOULD behave, when you are unsure.

Context Specification

The Context Specification style of BDD foregoes the need for the Scenarios written in plain English and the need to write the wrapper code that will ensure they are executable. Instead it takes those scenarios into the "inner" circle directly. They break the scenarios into contexts and observations that look an awful lot like the Arrange/Act/Assert used in TDD (Which is all Given/When/Then is if you think about it). By breaking the larger scenario into smaller pieces, it's a bit easier to write the specifications that will prove the system does what it should, but it can be a bit of a disconnect for developers compared to the "outer" circle of the Concentric Circle method that takes the scenarios right out of the user's mouth. Some developers break the specifications into "Bullet Point" specifications, to make them easier to translate directly into Contexts and Observations. These specs are usually kept closer to user's voice when they are written, generally because they will be the artifacts presented to the user or Business Analyst when communicating what you have made the system do so far. It can, however, confuse those new to BDD when trying to figure out where to start.

A Third Approach

I might be late to the party and perhaps everyone else was doing this from the start, but I've recently noticed that our development team's Context Specification specs have evolved into almost a hybrid of the Concentric Circle and Context Specification approach. I don't think we moved there consciously, but I've noticed the BDD really getting easier and moving faster. Also, I've noticed a marked improvement in the quality and simplicity of our code. We are less and less often wandering down a path toward "over-engineering " a solution to a given problem. This approach rids us of having to write a bunch of code to parse and execute "User English" scenarios, but helps us to get started with an outside-in approach to specifying what the system should do. Here's how it works:muchroom

Everything is written as a spec, but the first spec almost mirrors the user's scenario. This "outer" circle is almost completely an "interaction" or "integration" specification. Most of what you see in the context is mocked objects, and each observation is an observation about how each piece interacts. Almost every observation is an "AssertWasCalled" (that I have extended with a ShouldRecieveCall method) call. To me, this represents the outer ring of the system. Then for every "interaction" observation, there is an opportunity to pull a concrete implementation of that mocked object (or subsystem) and specify how it should behave. This inside circle may be a subsystem that requires another interaction type specification, that observes how each piece of that subsystem interacts with every other piece in it. Eventually, you will move down to a very small independently observable specification. In the inner circle, you deal more with concrete classes. Specifying the implementation details of those behaviors. In the next few weeks, I will be blogging more about the samples of this approach. Leave some comments and let me know what you think. Am I on to something or just ON something?