Blog Posts

The Degrees of Unit Testing

Three Degrees of Unit Testing I apologize for the length of this. I’m very passionate about this topic, and there is so much to say. The three styles of testing really are different, and explaining them does take some room! Any amount of unit testing, done almost any way, adds value to a code base. Regardless of how and when the tests were written, as long as they are reliable and quick, and prove the code does what we think it does, I’m in favor of them.
Continue reading -->

Agile 2016 – Requesting Help for Submissions

Agile2016 Submissions : Asking for Help Submitting a session proposal for a major conference can be a daunting task, especially if it is your first time. You’re putting your thoughts and ideas out there, knowing that a team of experts will read your words and eventually come to a decision about whether your submission is selected for the final program. Everyone on each track team knows exactly how you feel, because we’ve all done it, too.
Continue reading -->

Introduction to the Theory of Constraints

Introduction I’m obviously a big fan of the Agile methods and Lean/Kanban, as evidenced by how the teams on which I work, consult, or participate use aspects of each for their chosen processes. One of the underlying philosophies of both Agile and Lean/Kanban is the Theory of Constraints (ToC). The Theory of Constraints was developed by Eliyahu Goldratt in the early 1980s to describe how workflows can be understood and improved by focusing on the bottlenecks that constrain the flow of value through the system being measured.
Continue reading -->

A Life Changing Event

After almost 8 years at Asynchrony, I resigned my position as VP of Engineering on Thursday to take a new position working with some of my old friends. The times at Asynchrony were some of the best times in my career, and I feel privileged to have worked with so many bright, driven, passionate people. The reason for this move has nothing to do with Asynchrony – I consider them to be one of the good guys in the industry.
Continue reading -->

Re-energizing a Standup Meeting with Kanban

Problem: Standup meetings are more like status meetings than a collaboration meeting for the team. Symptoms:  The whole standup meeting is run by the Scrum Master, with no one doing or saying anything until called upon. People on the team report their status back to the Scrum Master or team lead. No one or few people speak to the rest of the team, and interaction between people is pretty rare.
Continue reading -->

“You get what you measure” versus “What you measure, you can manage” – The Agile Metrics Dichotomy

(I just reinstalled Windows Live Writer and reconnected it to my blog, and it pulled down some drafts I wrote years ago. So, I have no idea when I actually wrote this, what the context was that was in my head, but it seems like a decent article. So I’m posting it :)) I’ve long been a fan of the “You get what you measure” school of metrics doubters, especially in agile projects.
Continue reading -->

Looks like I’m speaking at SQE East in Boston, November 12th, 2013!

My good friend Mitch Lacey had to take a step back from a speaking engagement, and he asked me to cover for him to give a half day tutorial on Getting Started With Agile: An Experiential Workshop at the Better Software Conference in November. I’m very excited about doing this talk, both because of the opportunity to speak at this venue and to this audience, and because this kind of talk is so much fun to give.
Continue reading -->

New blog home

Hey, sorry for the inconvenience. We lost our hosting at our previous site (Thanks, Peter, for doing it for over 5 years!), so I’m reloading all content here, setting up a nice theme, etc. It might take a while, but it’ll eventually get done. Thanks for your patience… — bab
Continue reading -->

Test Driving a WPF App – Part 3: Switching to new window

This is the third part in what I hope to be a four-part series about creating a WPF application using TDD to drive the functionality and MVVM to keep everything testable as we go. The idea is to use view models to split away functionality from the view and have it available for testing while not losing any capabilities along the way. If you haven’t read the first two parts,  you may want to do that.
Continue reading -->

Test driving a WPF App – Part 2: Adding some data

This is part two of the blog series about creating a WPF application using TDD to drive the functionality and MVVM to split that functionality away from the view into something more testable. You may want to read part one if you haven’t already. In this part, we’ll see what it takes to display data on the front page about each player on the softball team. We’re not going to display all their stats, since we don’t need to for the example, but it would be very easy to extend this to do so.
Continue reading -->

Using Unity to make Singleton-ness an implementation detail

The most common, canonical use of the Singleton pattern irritates me. Every time I see it, I think, “The singleton-ness of a class is an implementation detail, and shouldn’t leak out through that class’s interface.” Yet, that’s what it always does. In the usual implementation, someone decides that some new class they’ve written is so resource critical, or so standalone, or so useful that they can have only one instance of that class and that instance has to be visible everywhere.
Continue reading -->

Test Driving a WPF application using MVVM and TDD

This is a preview of the material I’m going to be presenting at the St. Louis Day of Dot Net in a couple weeks. Introduction For those of you who are reading this blog for the first time, I’m pretty much the St. Louis Agile Zealot. Long hair, flowing robes… you get the picture 🙂 I’ve been advocating Agile and XP in St. Louis since around 2000, through speaking at various user groups and local conferences, teaching at local companies, giving talks in the park, dropping leaflets from airplanes, and so on.
Continue reading -->

Are you coming to St. Louis Day of DotNet?

Only a few seats left, apparently, for the conference on August 28th and 29th. Register here. Looks like lots of good sessions, lots of good topics, and filled with good speakers. Personally,  I’m speaking on Using MVVM and TDD to test drive a WPF application.   bab
Continue reading -->

I’m thinking of an example…

I’m writing an example for a workshop on estimation in an agile context, and I’m considering using the idea of preparing a multi-course meal. I think I like this because it is entirely non-technical, so I can give it to developers, customers, QA, or anyone else without regard to previous technical knowledge. I also like it because there are obvious tie-ins to concepts like freshness, inventory, rapid delivery, and so on.
Continue reading -->

Handling interactions between ViewModel classes

I’ve been puzzling over what seemed to be an insurmountable problem lately. It seemed that the guys who came up with the MVVM design pattern totally missed the boat on anything more than a simple, single-page app. It couldn’t be me, since I’m a SuperGenius ™. Well, OK, it did turn out to be me. Once I stopped flailing about in WPF-land and actually thought about the problem, it became easy.
Continue reading -->

Agile in 6 words

My good friend, Matt Philip, wrote an interesting blog entry the other day about Six-Word Memoirs By Writers Famous and Obscure. I thought it might be interesting to write about the agile methods, their values, and their practices, following a similar style. So here goes, my own take on Six-Word Memoirs on Agile Values, People, and Activities… Agile: Business plans, developers do, people thrive Agile: Don’t want “resources”, give me people!
Continue reading -->

Obvious comment of the day – TDD makes Pair Programming easier

A fairly obvious observation hit me today… If you are trying to pair program without also doing test driven development, when do you change roles? When doing TDD with Pairing, there is a rhythm to when the roles switch – see Micro Pairing. But if you’re not doing TDD, the person typing is frequently lost in solving a fairly large problem, they are balancing a bunch of things in their heads, and they have to finish a big thought before they could possibly swap the keyboard with their pair.
Continue reading -->

Continuing the Growing up Geek Meme

I’ve been tagged by Brad Wilson to tell a bit about my geek childhood. Like most of you, I certainly had one 🙂 My earliest geek memories starts with watching Star Trek back in about 1972. It was Return of the Archons – the one where the zombies in robes wander around talking about “Being of the Body”. I remember being totally and completely fascinated by it, and being hooked on science fiction from that point on.
Continue reading -->

A Story Splitting Story

This is a true story from a true client I’m working with . The names and details have been changed to protect the innocent… Story splitting Several of us were attending a pre-sprint planning meeting yesterday, trying to flesh out the user stories that the product owner was planning to bring to sprint planning in a few days. They are still pretty early in their agile adoption as well as their technology adoption, so there are lots of questions floating around about process and tools.
Continue reading -->

What do you think of this code?

I recently finished 6 weeks of coding for a client, and it was heaven! I actually got a chance to code every day, for 6 solid weeks. It was a chance for me to learn C# 3.0, and a chance to work on testing things that are hard to test. It was great! Out of the work, came several interesting observations and coding techniques, all rooted in C# 3.0. Since no one at work has any experience with these new idioms I “invented”, “discovered”, or just “copied”, I’d love to get some reader feedback.
Continue reading -->

Using Powershell to diagnose installation failures

I was trying to install the Application Block Software Factory, part of Enterprise Library 3.1, the other day, and I ran into a problem. During the installation, I got a failure stating that the necessary installer types could not be found in “c:program filesMicrosoft Visual Studio 8common7ideMicrosoft.Practices.EnterpriseLibrary.BlockFactoryInstaller.dll”. I was instructed to see the LoaderExceptions property of the exception for details. Huh? How in the world was I supposed to see this property of an exception that I didn’t even have access to?
Continue reading -->

The downside of coding alone…

I had what was probably an obvious insight the other day while I was working on my project alone. I’m a team of one, which kind of gets in the way when it comes to pairing. This, unfortunately, has an effect on my final code. Good pairs are adversarial When you find yourself pairing with someone really good, it can almost feel adversarial. What I mean by that is that you can get into a rhythm where one person writes a test, intending to lead his partner down the road of writing a particular piece of code.
Continue reading -->

Episode 2 – Filtering by Genre

Update — Craig Buchek pointed out something about one of my tests that he didn’t like. My test entitled PresortedBookListWithSomeBooksInCorrectGenreOnlyReturnsBooksInCorrectGenre made an assumption about data ordering that was stronger than was necessary for the intent of the test. I didn’t need to show that the elements came out of the filtered list in sorted order for that test — I only needed to show that the elements were present in the filtered list.
Continue reading -->

Another TDD example – Part 1

Title: Solution to Class Exercise As described in class: I have books — too many books. They are all over the floor, I trip over them. I can’t keep track of all the different books I have. I really need a book list manager. Please build one for me. Here is the list of stories I give the students, and I ask for them in somewhat random order. I should be able to see a list of my books, sorted alphabetically by title I should be able to see all books in a specific genre I should be able to read in a list of books from a text file I need to know the current price of a book I want to sort books according to price I want to be able to add a new book to my list I want to be able to save my list of books to a text file I want to be able to mark books as having been read I want to be able to find which books have been read I want to sort books by genre and title BookID |Title |Genre |HasBeenRead 1 |Clifford Goes To College |Childrens |Y 2 |Have Space Suit, Will Travel |ScienceFiction |N 3 |Goedel, Escher, and Bach |Science |N 4 |Elegant Universe |Science |Y 5 |Life in 1000 AD |History |N 6 |1001 Ways to Cook a Cat |Cooking |N Story 1 — Give me a list of books sorted by title
Continue reading -->

Slides from my powershell talk

I gave an introduction to Powershell talk at the St. Louis .Net UG meeting on Monday, October 29th to about 70-80 people or so. I introduced basic concepts of powershell, talked about a few problems I had solved with it, and showed some simple scripts. At the end of the presentation, I promised to post the slides by the end of this week, and I’m making it Wednesday night. Believe me when I say that me getting something finished early is a minor miracle 🙂
Continue reading -->

Finding installed products with uninstall instructions

I was repaving a machine the other day, and I had to load all my development tools. There were a bunch of them, and when I got finished, I noticed that IIS and SQL Server failed to install properly. So I uninstalled IIS and reinstalled it, no problem. SQL Server was another story. I uninstalled it, and it only went part way. Then I tried to reinstall it, and it said it was already installed.
Continue reading -->

Top 10 Movie List — just for fun

My wife, Sharon, and I were talking about our top 10 movie list and what would be on it. The requirements were pretty simple. These had to be movies that we would generally stop what we were doing and watch together. Just because one of us like it wasn’t enough to make the list — it had to be both. Here they, are in random order: A Few Good Men Field of Dreams The Shawshank Redemption Bull Durham Remember the Titans Top Gun Back to the Future Men In Black Breakfast Club No real point to this post, but I thought I’d share 🙂
Continue reading -->

New .Net testing framework, xUnit.net, available on CodePlex

I’m a few days late to this party, but my friends Jim Newkirk and Brad Wilson have released a [new .Net testing framework(http://www.codeplex.com/xunit). What is interesting about this framework is that it is built based on many years of combined experience between Jim and Brad, with input, I’m sure, from Scott, Peter, and others. Jim and Brad made some interesting choices, like removing SetupAttribute and TearDownAttribute, but they’ve defended their choices.
Continue reading -->

Episode 2 – The InputReader and the start of the Processor

OK, so this stuff is different. Really different. So different that i feel like a TDD rookie all over again. I find myself questioning everything that I do, and wondering if I’m going in the right direction. But it’s fun learning something new… When I last left you… When we finished episode 1, we had created a couple of customer tests and had used Interaction Based Testing to drive out the basics of our architecture.
Continue reading -->

Interesting difference using nested test suites in JUnit versus NUnit

My friend, Jim Newkirk, introduced me to a very nice way of partitioning programmer tests for a class as you write them. Most developers write a single test class for a single application class, and just dump all tests for that class in the same place. This is not as correct as it could be (that’s Consultant-Speak for “that’s just plain wrong”). The accepted best practice is to group together tests that have the same setup/teardown logic into the same test fixtures, which can lead to having multiple fixtures for a single class.
Continue reading -->

Episode 1 of Deep Dive Revisited — Setting the stage with customer tests

So let’s begin our reimplementation of the sample payroll system introduced previously. Briefly, the problem stated that I had a batch payroll system that I needed written to pay the few employees that I had right now for my small company. They are all salaried as of now, but I can imagine hiring some hourly employees later. Story number one said that, “As the owner, I want to be able to run payroll so that I can pay my employees”.
Continue reading -->

Deep Dive into TDD Revisited

Hi, everyone. I haven’t posted any serious technical content on this blog for a long time now. The reason for this is that I’m now a pointy haired boss most of the time. I spend my days teaching, mentoring, coaching, and occasionally pairing with someone on another team. I miss coding… I really do. However, I’ve been digging into Interaction Based Testing over the past few weeks, and I’ve found it fascinating.
Continue reading -->

Agile 2007

I’m eagerly looking forward to going to Agile 2007 next week. I look forward to this conference every year to give me energy to get through the next year. It’s so much fun to see all my agile friends for a week, hang out, talk about what we’ve learned, drink the occasional beer, and just catch up. If you’re going to DC this year, look me up. I’m in the conference hotel.
Continue reading -->

How to create a maintainable system

Ayende had an interesting post on his blog today about the only metric that really counts, which is maintainability. He made a joke about measuring this property of a system by measuring the intensity of groans that emanate from the team when asked to changed something, which made me laugh. It did bring up a more significant question in my mind, one that I’ve thought about before, and something that I’ve been telling my TDD classes lately.
Continue reading -->

Interesting lesson learned while teaching TDD this week…

I’ve been preaching TDD for years, and one of the lessons that I’ve taught over and over is that if a test is hard to write, you have probably bitten off more than you can chew. Comment out this test, try a smaller byte, and come back to this test later. I need to listen to myself more often 🙂 Background It has always been difficult for me to explain to students how TDD works with multiple objects, refactoring, stubs, and the whole shebang.
Continue reading -->

How do you manage multiple project streams?

I’m looking for a tool of some sort that will allow me to manage all the different projects that I have going on. I currently have about 10 different efforts in which I’m involved, each of which has its own context and state. I find myself switching between these projects all the time, and it is difficult to keep each one’s current state in my  head. Do you use a tool to let you manage things like this?
Continue reading -->

If something is hard, do it more often, until it becomes easy!

A team I was managing recently shipped a pretty complex, interactive web site, http://www.sothebyshomes.com . Feel free to check it out and let us know how you feel. During this project, there were a bunch of things that were really hard for us to do, and we invented ways of making them easier. By making them easier, we did them more frequently, and their value to the project and customer increased.
Continue reading -->

I’ve started another blog

I’ve had a bunch of personal thoughts and ideas that I’ve wanted to post over time, but I’ve always refrained from posting them here. So, instead, I’ve created another blog. I’m not sure where I’m going to host it permanently, so I’m housing it temporarily on blogspot. Check it out here if you’d like to read any of this. If you live in St. Louis, and especially the Rockwood School District, it is likely fairly relevant to you.
Continue reading -->

Another powershell quickie – removing all bin and obj directories beneath VS.Net projects

gci -recurse -include bin,obj . | ri -recurse I was playing around with how to get this to work, and I couldn’t seem to figure out why these commands didn’t find the same locations to delete: gci -recurse -include bin,obj . ri -recurse -force -include bin,obj -whatif . I finally got so baffled that I RTFMed remove-item, and there was my answer. In the fine print, nestled away in an example that did what I was looking for, and in the documentation for the recurse parameter was my answer…
Continue reading -->

3 day Test Driven Development course in St. Louis — June 12-14

For anyone out there interested in TDD training, Asynchrony will be holding a public TDD course in our offices in St. Louis June 12th-14th. If you have been interested in learning TDD, I promise you’ll enjoy this class. I’ll be teaching it personally, with the help of some very capable coaches. Good times will be had by all! Go here to learn more and to sign up for the course…
Continue reading -->

And so ends St. Louis Code Camp, 2007

Wow, what a great day that was! Yesterday we held the 2nd Annual St. Louis Code Camp, and it was a smashing success. We had about 100 people show up, and they all seemed to have a ball… Some of my own favorite moments: Meeting and getting reacquainted with folks I met last year. I hadn’t seen Alex Miller and Sean Carley, for example, since last year, and chatting with them was a ball.
Continue reading -->

The duty of agile developers

I’ve been noticing a common theme in several of the teams I’ve been helping or observing over the past few months. I’ve been hearing the complaint that members of teams are working as hard as they can to implement as many stories as they can, ignoring such “optional” activities as refactoring, etc, because they can’t afford the time. They are accepting so much work in terms of functionality that they don’t have time to put any time into the architecture, design, or other “niceties”.
Continue reading -->

Brainstorming a test list

Question — When writing code test first, how do you know where to start, how do you know what to do next, and how do you know you’re finished? Answer — By creating a list of tests that help you bound the problem you’re solving. Given that previous statement, it sounds like having a good set of tests is a pretty important part of Test Driven Development, eh? Obviously it is, so the question becomes how you create a good list.
Continue reading -->

find -name foo.* | xargs grep “find_me”

[Update from Brad Wilson and Scott Dukes] I’ve been wanting a powershell script to replace my favorite unix command for ages, and I took a stab at it today. This got me very close to what I wanted yesterday, which was just the names of files where the matches occurred. get-childitem -include foo.* -recurse | where-object { get-content $_ | select-string find_me } Scott Dukes pointed out that select-string would take the FileInfo object that was passed to it and search through the contents for the string file_me, and this would give me the exact same kind of output my unix command used to.
Continue reading -->

Powershell script to convert RTF docs to plain text using MS-Word

On our current project, we had a bunch of RTF files that had some text in them that we wanted to yank out and store in a database. Instead of laboriously opening and resaving each of the files as plaintext, I decided to write what I had hoped would be a simple PowerShell script to do that for me. What follows is my best try at that script. I am very open to any questions, criticisms, and improvements in the script, as I’m still very much learning the language.
Continue reading -->

Announcing the 2nd Annual St. Louis Code Camp

At long last, I can officially announce the 2007 St. Louis Code  Camp, to be held May 5th, in Creve Coeur, MO. The code camp will be held in the offices of Microsoft at Three City Place, at the corner of Ballas and Olive, and will meet from 8:30 until 5. Final plans for the number of sessions we can accept are still being drawn up, but we should have enough room for lots of good presentations.
Continue reading -->

Agile and Agile Project Management links

I gave a talk to the local PMI on Friday morning, and I promised them some links they could use to learn more about the subject. I’ve gone ahead and added those links to my page at http://del.icio.us/bbutton . I’ll keep adding information to that page as I remember or find new links. Here is a summary of what I have now: Websites: http://www.agilealliance.org http://www.xprogramming.com http://www.controlchaos.com http://www.cutter.com/project.html Books:
Continue reading -->

The hardest part of being an Agile Project Manager

I’ve been leading a team of 5 devs, 1 tester, 2 designers, and 1 customer for the past month or so. During that time, I’ve learned a lot from watching this team grow, in their relationships to each other, and in their ability to work together as a team. What has struck me about this is that all of this happens best if I keep my nose out of it. And this is the hardest part for me.
Continue reading -->

Asynchrony Solutions is hiring!

Asynchrony Solutions is looking for several developers to join our company. Our immediate requirements are: C/C++/Unix/realtime/embedded developer — This is for an exciting, very long-term project where you would have the opportunity to write code in C, Java, and C++ Java or C#/.Net/ASP.Net developer for any one of a number of projects Agile mentors and trainers In addition to technical skills, agile experience is a definite plus. Even if you haven’t ever worked in an agile environment, you should be very opening to learning agile skills and working in such an environment.
Continue reading -->

A Real World Example of Refactoring

I’m leading an agile team through developing a web site. This means that I spend most of my time managing, but on this one occasion I had the opportunity to write some code. The problem We had an image stored in a database that was always either 800×600 (portrait) or 600×800 (landscape). We had a need to render that image on the site either as-is or reduced to one of two other sizes.
Continue reading -->

Story Telling with Programmer Tests

(First test post with Windows Live Writer Beta…) Here are the tests for a class I wrote a while ago. This class is used internally by the Caching Application Block inside the Enterprise Library. It has a bunch of housekeeping data inside of it, but the only really interesting behavior in it revolves around determining when an item in the cache is expired. The user is allowed to provide zero or more objects who can determine, in a manner of their own choosing, whether or not the item in question has aged too long and should be flushed from the cache.
Continue reading -->

Eating Toast

There are two ways to break down a project (OK, there are probably more than two ways, but work with me here…) One way is horizontally, meaning to implement an entire application layer at once. This would be like building the entire UI first, then the business layer, then the database, etc. The other way is to implement bits and pieces of all layers over and over, which is like taking a vertical slice through a program — a bit of UI, business logic, persistence, and so on.
Continue reading -->

Agile 2006 Wrapup

I apologize to any readers that I may have left for my extended absence from posting anything of any consequence. It’s been a tremendously long time since I’ve felt that I’ve had the time or the energy to make a long, involved, technical blog post. I do have some coming — its just a matter of finding the time to write them Agile 2006 I was fortunate enough to attend this great conference this past week.
Continue reading -->

Brian’s Handy Dandy Rules of Framework Development

The whole basis of my talk at TechEd is that there are some non-technical rules around which creating good frameworks should revolve. Since I mined those rules from my earlier poll on this blog, I thought I should share my results with you. I give you Brian’s Handy Dandy Rules for Framework Development Clients come before frameworks Ease of use trumps ease of implementation Quality, Quality, Quality Be an enabler It’s a people problem Clients come before frameworks
Continue reading -->

Another great Wardism

One of the best parts about working with Ward Cunningham when he and I were at patterns & practices is that I’d get to listen to him, and hear these gems of wisdom fairly often. Now that we’re both gone from p&p, I’m reduced to finding these quotes as they are relayed by others. Here is a quote from Ward that really captures the essence of what it means to write great Agile code:
Continue reading -->

St. Louis Code Camp Materials links

Sorry this took so long. Here are the links that I have from people to the materials from their talks: Cory Foy – Ruby for C# Developers, Achieving Customer Zen with Fitnesse Kevin Grossnicklaus — Advanced Threading in .Net Dave Holsclaw — Rails without the Hype Jeff Barczewski — Extending Ruby on Rails (Project Site) Steve Brennan — Bringing Existing Code Under Test Chris Caplinger — Using the Atlas Framework for ASP.
Continue reading -->

What are your top 5 things to consider when building a framework?

Help me out with an experiment… I’m finishing up the slides and content for my TechEd talk, and I want to do a little research based on the community. The subject of my talk is “Architecting your own enterprise framework”, and I’m curious to know what you consider when you’re doing this, and what you’d like to hear someone talk about. This is going to be used in the structure of my talk to make a point about how frameworks are built, so your answers are very important to me.
Continue reading -->

I’ll be speaking at Tech Ed!

I’ve been meaning to post this for a while, but I’m finally making myself do it now… I’ll be giving a presentation on “Creating Your Own Enterprise Application Framework” at Tech Ed in Boston, on Friday, June 16 at 9:00 AM in Grand Ballroom A. My talk is based on experiences in my 2–1⁄2 years in patterns & practices and how I believe we most successfully build our libraries and frameworks.
Continue reading -->

Code Camp Organizer podcast with Podcast Studio posted

I was asked by Jeff Julian and John Alexander to participate in a podcast of MSDN Code Camp organizers yesterday evening, and the resulting podcast has been posted. The group consisted of Jeff and John, along with Thom Robbins, the originator of Code Camps, Don Demsak (DonXML) from the NJ Code Camp, Chris Williams and Robin Edwards from the South Carolina Code Camps and yours truly. It was a round-table discussion of aspects of organizing and holding a Code Camp.
Continue reading -->

St. Louis Code Camp — huge success!

The St. Louis Code Camp was yesterday, and it went great. We had 72 people there, 14 talks, lots of good conversation, and we even gave away an xbox 360! I’d like to thank everyone who volunteered, everyone who showed up, and all the speakers. A great time was had by all. The best news out of all of this is that people were practically demanding that we do this again in the fall!
Continue reading -->

Slides for today’s webcast

Here are the slides from today’s webcast. Thanks who all tuned in. There will be a slight delay in posting the code from the webcast, as I seem to have accidentally deleted it in the process of getting it ready to be uploaded. I was trying to get rid of all the bin and obj directories, and I did. I also got rid of all the source code  I’ll try to recreate it tonight and post it tomorrow.
Continue reading -->

Still looking for St. Louis Code Camp speakers!

For any of you planning on attending the St. Louis Code Camp, we are still looking for speakers. If you have ever wanted to try your hand at sharing some of your knowledge with your fellow developers, Code Camps are a great place to start out. Talks are very low key, audiences are very friendly, and you’ll give yourself a big leg up for that next presentation you have to give to your great-grand boss at work If you’re interested, please go to our web site and site up to attend and to speak.
Continue reading -->

Chock full of bloglets

Hi, All, This entry should have something in it for everybody, since I have a bunch of little things to say. Friday is my last day at patterns & practices. I want to thank everyone there who has put up with me for 2–1⁄2 years. The experiences I’ve had there and the friends I’ve made there will last me the rest of my life. And hopefully I’ve left something of myself behind that will help them in their future endeavors.
Continue reading -->

stlcodecamp.org is live!

Please use www.stlcodecamp.org to register for the St. Louis Code Camp, May 6 and 7. That site will be the primary place to get news and information about this upcoming conference. Thanks! — bab  
Continue reading -->

Taking a new direction…

I am very pleased to announce that I have accepted a position as the Vice President of Engineering at Asynchrony Solutions, Inc., a leading agile development firm based in St. Louis, MO, effective May 1st, 2006. I’m thrilled to take this new position, as the spirit, principles, and values of Asynchrony very closely mirror my own — honesty, integrity, agility, openness, and all that other good stuff. In my new role, I will be responsible for helping align the agile project processes and practices with the larger business goals of the organization, developing an entirely new training division specializing in agile development and management practices, creating a .
Continue reading -->

Announcing the St. Louis Code Camp!

At long last, I can officially announce the 2006 St. Louis Code  Camp, to be held the weekend of May 6th and 7th, in Creve Coeur, MO. The code camp will be held in the offices of Microsoft at Three City Place, at the corner of Ballas and Olive, and will meet from 8:30 until 5 each day. Final plans for the number of sessions we can accept are still being drawn up, but we should have enough room for lots of good presentations.
Continue reading -->

Configuration ExceptionHandling without using an external configuration file

A couple of weeks ago, someone posted a question on the Enterprise Library GDN workspace, asking about how they could configure the Exception Handling block without using an external configuration file. I wrote a bit of code to do that, and I wanted to share it with everyone else. Here is my solution. This first part is a very small change I made to ExceptionPolicy to allow it to accept an ExceptionPolicyFactory through an additional HandledException method.
Continue reading -->

Webcast Announcement – Thursday, February 9, 1100-1200 PST

This Thursday, Tom Hollander and I will be presenting a web cast on building your own application block using Enterprise Library January 2006. The talk will discuss how to take a piece of functionality that you have built and plug it into the configuration system, so that it can be constructed using our provider-based factories. The topics will include: Building the simplest Application Block possible Attaching configuration to the block Allowing for variability through custom providers Creating your own configuration objects for your providers And if time allows, I’ll be discussing how to create and attach instrumentation to your new application block.
Continue reading -->

The St. Louis Code Camp is Coming!

It’s on the East Coast… It’s on the West Coast… Now it’s coming to St. Louis… The St. Louis Code Camp Are you passionate about some technical topic? Are you interested in learning what other developers in your area are doing? Have you always wanted to present, but never had the nerve to do it? Well, the St. Louis Code Camp is for you! What is a code camp? Code camps are very informal gatherings of developers who want to get together to share what they know with their fellow developers.
Continue reading -->

Enterprise Library and Object Builder

One of the biggest areas of change between this new version of Enterprise Library and the original version, shipped a year ago, is our configuration system. The original configuration system, written (and rewritten 3x) by Scott Densmore, worked tremendously well, but was custom-written just for Enterprise Library. In our newer version, we’ve adopted a more reusable framework on which to base our configuration system. This framework, called Object Builder, is a reusable, configurable dependency injection and object creation pipeline written as part of the CAB project by Peter Provost and Brad Wilson, with lots of goals donated by Ed Jezierski.
Continue reading -->

Astronomy versus Lasik?

I’m interested in hearing from any astronomers out there who have had Lasik surgery. I’m tired of glasses and contacts just aren’t as comfortable as I might hope they would be. I know Sky and Telescope did a big article on this subject in September, 2005, and I’ve read it, but I’d love to hear from people who have actually had this done. If you’ve had Lasik, and you’re an astronomer, I’d be very curious to know how it affected your vision at the eyepiece.
Continue reading -->

What do you all do with your old magazines?

I, like most of you, get a ton of magazines per month. I get Dr. Dobbs, MSDN, Software Developer, Runner’s World, Sky and Telescope, Infoworld, CRN, and so on. Do you save them? Do you clip certain articles out of them and pitch the rest? Do you just pitch the whole thing when you’re finished and rely on the web to find them for you again later? I’m genuinely curious to find out.
Continue reading -->

Visual Studio 2005 ACE Winner!

Imagine my surprise when I woke up yesterday, checked my MSN email, and found a note from Soma  It seems that someone out there nominated me for an ACE (Award for Customer Excellence) for helping get VS.Net 2005 out the door, and Soma was writing to tell me that I had won. I have to admit, I was not expecting this at all (in fact, I had never heard of this until Sam Gentile mentioned that he got one), so I was really pleased when I saw it.
Continue reading -->

patterns & practices Agile and Extreme Programming Lessons Learned webcast link

Sorry I didn’t get this link out in time for folks to tune in live, but I spaced on it  Anyhow, Peter Provost, Brad Wilson, Darrell Snow, and I did a webcast about a week ago talking about lessons learned during our projects (EnterpriseLibrary and CAB). We ran both of these projects using similar Agile methods, had great results in both, and talked about what went well and what we wanted to improve on for next time.
Continue reading -->

Real Test Driven Development with Visual Studio Team System

There has been a lot of controversy lately, both in the blogosphere and on the Yahoo TestDrivenDevelopment group, about whether or not it is possible to due true Test Driven Development (TDD) using VSTS. I’m here to tell you that it is absolutely, completely, totally possible. But it ain’t easy. The point of the rest of this post is to explain why, and to show you another, easier, way. My definition of TDD
Continue reading -->

Enterprise Library Caching Block and Exception Safety

Someone recently sent me some email after looking through my old Enterprise Library January, 2005 Caching block code, and asked to say a few words about the design of the exception safety of that block. This was one of the flaws in the original implementation of the Caching block that this newer implementation replaced. It had some thread safety issues, and it did not function well in the face of exceptions.
Continue reading -->

This isn’t how I learned TDD… — Updated!

**Updated – 11/23/2005 The content on this page has been taken down. I want to thank those of you who voted on this topic to send the correct message to Microsoft, and those of you inside of Microsoft who took the complaints seriously and acted on them. </> – bab **Original Post This link has been making its way through the blogosphere over the past couple of days. Please take a minute and visit that link, and then come back here.
Continue reading -->

Announcing the Enteprise Library November CTP — available now!!

patterns & practices is proud to release to the web Enterprise Library for .NET Framework 2.0: November 2005 CTP (that’s a mouthful!). This version of the library has been recoded to take advantage of the  new .NET Framework 2.0 features, including database providers, better support for logging and tracing, and the new System.Configuration subsystem. Blocks included in this release are: Caching Data Logging Exception Handling Security Security Caching
Continue reading -->

Want a great job??? patterns & practices is hiring

One of the best gigs I’ve had in my whole life has been working with the great people at Microsoft’s patterns & practices group. These people are responsible for solving interesting problems in interesting new ways, and sharing their code and learnings with you, fellow Microsoft developers. At this point, they’re looking to hire another developer to join their team. I warn you — the bar is high. They interview many and accept only the best.
Continue reading -->

Long time, no see…

I know I haven’t posted for a long time, hopefully to the dismay of some of you . I’ve been involved with remaking myself physically, which has taken a tremendous amount of my time and energy, but has also paid off very well. During my time off from blogging, however, I’ve still been generating ideas on what I should write about. Here are some of the entries that I have coming in the next days, weeks, and months, in no particular order:
Continue reading -->

What do you find hard to test?

OK, folks. I’m asking you — What kinds of problems do you find hard to conquer through TDD? I’m interested in writing a continuing series on my blog about things that are difficult to create TDD. I plan on taking the suggestions that I get, both through email and as comments on this blog post, and begin solving them using C# and .Net. The intent of this series is twofold: the first result I hope to get from this is the obvious one — a set of lessons about how to TDD hard problems.
Continue reading -->

I really did mean it — avoid Setup and Teardown

I’m glad my post on Assiduously Avoiding Setup and Teardown has engendered so much conversation over the past few weeks. I’m on vacation in Europe until August 15th, so I’ve had spotty internet connectivity. On my few opportunities to check in, however, I’ve seen a lot of activity on that post 🙂 Some of the activity concerned me, however. I really did mean what I say, and I can explain why.
Continue reading -->

A politician who is truly out of touch

I just read an article about possible changes to Daylight Savings Time in the US. They want to start it two weeks earlier and end it one week later. But here is the best part. Fred Upton, R-Michigan, had this comment: Kids across the nation will soon rejoice because they’ll have another hour of daylight trick-or-treating. Now, this is truly a man without a clue. Is there anyone out there, parent or child, that wants to go trick-or-treating in daylight?
Continue reading -->

Assiduously avoid Setup and TearDown!!

Enough people have been ragging on me for not having blogged anything significant for a while that I thought I’d make use of my airplane time to say something that might actually matter (as opposed to whining about various .Net features that I don’t like :)). So here goes… Setup and Teardown Are Evil When writing tests in NUnit, JUnit, and probably most of the other xUnits around town, you have the ability to share setup and teardown logic between tests.
Continue reading -->

EAP for ReSharper 2.0 starts!

After many weeks and months of waiting, the Early Access Program for ReSharper 2.0 has begun. Grab it here!! For those of you who don’t know, ReSharper is a plug in for Visual Studio .Net that adds in a bunch of refactorings, navigation helpers, and other stuff that just makes you more productive. There are separate downloads for VS2003 and VS2005. Grab it, use it, and tell ‘em about it!
Continue reading -->

Looking for ideas for TDD webcast next week

I’m currently scheduled to take part in a TDD webcast next Wednesday, and I’m looking for advice about what to cover. We’ve already done a basic, “This is TDD” webcast in May or so, so I’m looking for what Chapter 2 should be. Ideas I’ve had include TDD Around the Edges — how to TDD code that touches APIs, servers, databases, etc TDD and its affect on Architecture — how TDD affects the architecture of a system Whatever we do, it has to be coverable in roughly 50 minutes of talking plus demos.
Continue reading -->

More VSTS Unit Testing learnings

I was having problems getting a very simple test to work this morning using VSTT, and I distilled my problem down to its most simple form: using System; using Microsoft.VisualStudio.QualityTools.UnitTesting.Framework; using System.IO; namespace FileCopyingBug { [TestClass] public class FileCopyFixture { [TestMethod] public void WillCopyFileWhenRun() { Assert.IsTrue(File.Exists("TestFile.txt")); } } } And I created the external TestFile.txt in my project directory and set its properties to have it copied to the output directory always.
Continue reading -->

Slides from Enterprise Library presentation at St. Louis .Net User Group, June 26th

On Monday, June 26th, I had the pleasure of addressing the St. Louis .Net User Group. I had been invited to speak about Enterprise Library, as several people had been asking questions in the group about how to get started using it and were looking for an overview. I had already given a talk on Enterprise Library to the C# and VB.Net SIGs of this group, so it was only natural that they might call on me to give the talk at the main meeting at well.
Continue reading -->

WMI, LUA, and a surprise for me!

Note to self: WMI and LUA don’t play together nicely. I’ve been researching a bug that many of you Enterprise Library users may have encountered. According to our instructions, you have to run installutil against all EL assemblies, to allow them to load up their performance counters, event log sources, and WMI schema. If you do this as an admin, things work beautifully. If you run your EL-based app with less than admin privileges, interesting things happen with WMI, but that has been covered on other blogs.
Continue reading -->

My Myers-Briggs Profile

Some of my friends here at Microsoft have been involved with some personality analysis to find out how red, blue, green, or yellow they were. These colors reflect some sort of behavior (think aggressive, depressing, party, and mom :)). Since I’m just a consultant here, I didn’t get a chance to do this, but I did go back to a Myers-Briggs testing site and took one of the on-line quizzes. I turned out to be an INTJ, which chances are most of you are, too.
Continue reading -->

Whidbey System.Configuration, the Principle of Least Surprise, and a dash of TDD

What in the world do these three topics have in common??? I would have thought nothing until yesterday. But then I learned better… The Principle of Least Surprise Do me a favor, really quickly. Google “Principle of Least Surprise”. Back already? Good. It sure seems like there are a lot of folks out there who are pretty hot on using software that does what they expect it to do. And doing something unexpected, like making Ctrl-Q quit your program instead of ending macro recording, makes some folks pretty angry.
Continue reading -->

3-day public Test Driven Development course in St. Louis, MO, July 13-15

Sorry for the crass commercialism, but I thought I’d post this to my blog to see if anyone was interested. Agile Solutions Group will be offering another in its series of public Test Driven Development classes, July 13–15 in St. Louis, MO. The class covers both refactoring and test first programming, which together make up TDD. The session is about 20% lecture, 30% example, and 50% lab, so you’ll get a chance to really get your hands dirty with this stuff.
Continue reading -->

Double Duty — My “Better Software” article as PDF

Thanks to the kind folks at Better Software Magazine and Sticky Minds, I have my article, as published, as a PDF. In this article, I discuss how to write programmer tests in a little different way to support them being used as API documentation. Tests needs to stand alone a little bit more, you need to pay more attention to using better names, and you need to have some way to let you map from application method to the tests that define it.
Continue reading -->

Recovering from corrupted perf counters

Don’t know if any of you have ever had this happen to you or not, but it paniced me a bit when it happened to me. I opened up perfmon, and instead of nice names of counters and categories, I had nothing but numbers in their place. The last thing I wanted to do was to have to rebuild my VPC, so I really wanted a way to fix this.
Continue reading -->

Refactoring Web Cast — Wednesday, May 25th, 3-4 PM PDT

Sorry for the late notice, but I’m doing a teched webcast tomorrow on Refactoring. I’d love it if a big crowd showed up! Here is the link to listen: http://www.microsoft.com/communities/eventdetails.mspx?CMTYSvcSource=MSCOMMedia&Params=%7eCMTYDataSvcParams%5e%7earg+Name%3d%22ID%22+Value%3d%221032273124%22%2f%5e%7earg+Name%3d%22ProviderID%22+Value%3d%22A6B43178-497C-4225-BA42-DF595171F04C%22%2f%5e%7earg+Name%3d%22lang%22+Value%3d%22en%22%2f%5e%7earg+Name%3d%22cr%22+Value%3d%22US%22%2f%5e%7esParams%5e%7e%2fsParams%5e%7e%2fCMTYDataSvcParams%5e Yeah, I know — what kind of system do they have to create URLs that long! Show up anyhow and ask lots of good questions. Hope to see some of you there. — bab
Continue reading -->

What Makes a Good War Room?

If you could design your own war room for a software team, what would be in it? I’m talking about the kind of stuff that a company can provide, not the soft stuff like candy, etc. Here are my choices: A shared, isolated space Teams need a shared space to work, but they need to be isolated from everything else. All folks involved with the project need to be welcome in the war room, but no one not on the project should be in there.
Continue reading -->

Agile Speaking

I was asked by the local VB.Net User Group to give a talk on Agile Development. The problem with giving a talk like this is that there are so many possible things to cover in the time allotted. And I never know what kind of background the folks showing up will have. So, if I explain this in another way, I have a specific time in which my talk has to fit, I have a specific amount of resources to deliver the talk (me!
Continue reading -->

The Delta Lounge V2

Enterprise Library V2 is starting up, and we’re having problems getting traction. Scott Densmore, Mani, and I are the only holdovers from the original project, and we’ve picked up a new tester, Gokul (I know I spelled this wrong — sorry!) and two new developers, Brad Wilson and Fernando Simonazzi. In short, we’re basically starting over from a team point of view. And I get the sense that we’ve been thrashing the past couple of weeks, because we’re still trying to understand all kinds of different things.
Continue reading -->

The Power of the War Room

I was just reading an article in Fast Company. The theme of this issue was “Design”, and the first article in there was about designing workspaces for knowledge workers. The article was written from the point of view of the author as she was writing the article, in a shared work area, with all kinds of interruptions going on around her. Every now and then in the text, she’d add an aside about how someone just came up to her to ask a question, or she’d mention that she overheard some conversation going on a few desks over.
Continue reading -->

Why I love astronomy

Astronomy is one of my major hobbies. I have a 10” Discovery PDHQ Dobsonian that I take out waaaay to infrequently. But when I do get out, I see things that are really beautiful. The last time I went out, a few weeks ago, I saw this, one of my favorite celestial sights. It looks great in this picture, but I saw it with my own eyes. Clear and bright. That was fun.
Continue reading -->

Announcement: TDD Webcast, 1100-1200 PDT, Thursday, April 28th

Peter Provost, Scott Densmore, Brad Wilson, and I will be doing a webcast on TDD, hosted by Ron Jacobs. I don’t have the link yet, but as soon as I do, I’ll post it here. The content for this webcast is introductory — we only have 1 hour, so we’re going to talk about what TDD is, how it can help, do a really quick example of it, and share some of our war stories of using it on real-life projects.
Continue reading -->

My first day using VSTS

My group at MS is considering changing over to using the new unit testing stuff built into the newest version of Visual Studio, so I decided to give it a try. I’ll be keeping a diary of how things go today, and hopefully I’ll learn something interesting. The first thing I’ve learned is that I can’t wait for the ReSharper EAP  I need the navigation and refactoring tools I get with that.
Continue reading -->

Running the Enterprise Library Unit Tests

One of the biggest secrets of Enterprise Library is that we shipped it with 1800 NUnit unit tests. These tests reflect our best efforts to write this code in an agile, Test-Driven style. Sometimes we were more successful than others, but the fact remains, we did a damn good job of writing tests for our code. What do the unit tests do for me? As a developer, these unit tests are a great resource.
Continue reading -->

Delta Lounge Podcast — Take 2

The second part of our continuing conversation with Ron Jacobs about our time in the Delta Lounge. Scott, Peter, and I get further into team dynamics, pair programming, things that went right, and things that went wrong. Tons of fun to create, hopefully as much fun to listen to! — bab
Continue reading -->

Legacy Refactoring Series – Part1

As promised, this is the first installment of a series of articles on refactoring a piece of legacy code that I have been given. The purpose of this particular piece of code is to use reflection to find all the types in an assembly, determine the relationships and associations between these types, and spit the resulting model out in XMI. For those of you who are unfamiliar with XMI, as I was/am, it is a standard interchange format that UML tools are supposed to support that allows models built in one tool to be viewed in another tool.
Continue reading -->

Learn about the infamous Delta Lounge — Where all the Enterprise Library dirty deeds were done…

Ron Jacobs has up Part 1 of a 2–part podcast series that Peter Provost, Scott Densmore, and I did about our working environment during Enterprise Library V1 development. I consider the fact that we were all put into the same room to be the critical success factory in letting us get Enterprise Library out the door in the time that we did, with the quality it has. Our conversations in the 2–part series roam through how and why we used the Delta Lounge, who was in there, why it was important that devs, architects, and test were all in there at the same time, how our choices in music help draw us together as a team, and more.
Continue reading -->

Explaining TDD to a non-techie

I was explaining what was different about the agile approach to software to a non-technical person the other day, and I chanced upon an explanation that I kind of liked. She did, too, as it made sense to her. So, this is the explanation I used: Imagine you have to write a 10 page paper. One way of doing it would be to sit down and outline the whole thing carefully, and then write it.
Continue reading -->

TDD defeats Programmer’s Block — Film at 11

Cheesy title, but it caught your eye, eh? The real point of this article is to describe a TDD experience I had the other day (Friday), and how it changed my life (OK, a bit over the top, but hey,  it kept you reading…) Here is the scene. I’m working with Peter Provost and Jim Newkirk, building a Continuous Integration system to be used internally in patterns & practices. Peter and I have been the devs on it, and Jim provided the customer’s point of view.
Continue reading -->

The Dispose pattern, Finalizers, and Debug.Assert?

Peter Provost, Scott Densmore, and I were talking about some additions to our project coding guidelines, and I proposed a new one that we wanted to get some feedback on from the community. According to the Dispose pattern, you’re supposed to create classes that look like this: public class BuildProcess : IDisposable { ~BuildProcess() { Dispose(false); } public void Dispose() { Dispose(true); GC.SuppressFinalize(this); } protected virtual void Dispose(bool disposing) { if (disposing) { } } } Now the issue here is what should happen if your class is disposable and the finalizer gets called?
Continue reading -->

New continuing series starting

Consider this an teaser of things to come 🙂 A group I am a member of, the C# Design Patterns Group, had a piece of software donated to it, and we are now responsible for its maintenance and upkeep. It just so happens that the software is not in the best possible shape, as far as design quality goes. Our plan is to fix a few bugs, refactor it a bit, and eventually add some new features to it.
Continue reading -->

The difference between OEM and Retail when buying computer components

I may be in the process of learning a not-inexpensive lesson here, and I wanted to share it with others in the hopes that you may avoid my pitfall. There are two ways to buy most computer components. You can buy full retail boxes, which are exactly as produced by the factory for the part’s manufacturer, or you can buy an OEM part. OEM stands for Original Equipment Manufacturer, which is someone who builds systems and buys that part to include in their system for resale.
Continue reading -->

Building a new development machine

Update — Brad Wilson has given me some advice about RAM and video cards, and Sean Malloy advised me away from 25ms response time LCDs, so its back to the drawing board for those. I may also change out the Zalman cooler for one from Silenx as well as a couple new case fans. The Zalman cooler is actually about the same in terms of cost and noise, but the Silenx one doesn’t have the freaky blue LEDs in it 🙂 The Silenx case fans are supposed to be really quiet, so I may upgrade to those after the fact.
Continue reading -->

Pointer to posts mentioned in my webcast

Hi, all, I hope some of you had a chance to listen to my webcast yesterday on the Enterprise Library Caching block. I did an OK job — I was a little nervous at first and felt very rushed during it. Anyhow, I hope the content I wanted to get in was understandable… At one point, someone in the talk asked about thread safety and performance of the  block, and I mentioned that I had blogged about how the locking scheme in the caching block evolved over time.
Continue reading -->

Double Duty — Using Unit Tests as Documentation is published!

The article I wrote about some months ago is finally published in the February, 2005 issue of Better Software Magazine. I spent a lot of time on that article, and to see it in print is particularly satisfying. There is a discussion forum for the article currently being hosted on Sticky Minds, so if you’d like to comment on the article or participate in the conversation, please visit. I am also actively developing the TestMap application I speak of in the article.
Continue reading -->

TDD — What about internal methods?

Over the past few months, I’ve taken part in a few chats about whether or not internal methods should be tested. One of the basic premises of TDD is that you should use it to explore, design, and implement the public interface of your classes. If you are using it to test methods that are less than public, you are probably testing implementation and not interface, which leads to very fragile tests.
Continue reading -->

Enterprise Library released to the wild!!!

I know I’m a few days late to this party, but I’ve been recovering from workaholism for the past few days. Now, feeling refreshed and energetic, I add my voice to the growing firestorm: Check out the Enterprise Library. It is everything you have ever hoped for, dreamed about, and wanted, for your software development needs 🙂 Compliments cheerfully accepted. Criticisms consciously sought and appreciated. After all, we want to get better.
Continue reading -->

Death by spam

I admit it. Spam has me beat. A few weeks ago, I got around 1000 spam a day. Two weeks ago, I got 2000 spams a day. Last week, 3000 per day. Are you picking up the pattern yet? As of today, I got 4500 spams. By next week, I’ll be over 5000, I just know it. Does anyone out there have any suggestions about how to tame this problem? I have spambayes in the middle of my mailtool chain, so I don’t see very many of these, but I still have to deal with the bandwidth they take up.
Continue reading -->

A constructor is not part of a class’s interface

Peter Provost and I were talking today about some code that we’re working on together. We’re constructing a class right now, called a Starter. The job of a Starter is to stitch together a Repository, a class whose job it is interact with a source control repository, subversion in our case, a Builder, which is responsible for causing a Project to be built, and a BuildLogger. All of this stuff has to be aware of configuration changes, so we also  have to pass in a Configuration object that is able to tell us the current configuration values.
Continue reading -->

Release date for Enterprise Library announced!

According to Scott Densmore, barring anything unpredictable happening, Version 1.0 of the Enterprise Library will be released to the web on January, 28th. It will be available MSDN and the patterns & practices site. Yahoo!!!! Hmmm. Rumor has it that Agile Solutions Group will soon be offering training classes on Enterprise Library as well as consulting services revolving around using it. Email entlib@agilesolutionsgroup.com if you’re interested 🙂 — bab
Continue reading -->

“Extreme” Refactoring — The Video Store Revisited

In Fowler’s Refactoring book, he has an extended example  of refactoring procedural code into object oriented code. I’ve gone through this example in talks a bunch of times, doing the refactorings Fowler does for the most part, with my own little twists to it. Today, however, I wanted to have a little fun. I wanted to turn my refactoring knob up to about 12 and see what happened. So I started with the Customer class after it was refactored in the Video Store example and see how much further I could take things.
Continue reading -->

“Cannot Create SSPI Context” and how to fix it

Just a quick note for anyone who has ever gotten this error before: “Cannot create SSPI context”. I started getting this error when I was trying to establish a connection to a SQL Server when I wasn’t connected to the internal Microsoft corporate network. Connection strings that worked just fine when I was connected just wouldn’t work at all, and I could not figure out how to fix it. GIYF (Google Is Your Friend) I googled it and found out that I had my connection string set wrong.
Continue reading -->

Enterprise Library talk at St. Louis C# Users Group, January 10th

I’ll be speaking about the Enterprise Library project I’ve been working on at Microsoft since early 2004 at the C# UG in St. Louis on Monday, January 10th. I’ll be talking about the design of the Enterprise Library, showing off some of its capabilities, and demonstrating its common configuration tooling. Given time, I’ll also be building a sample application, to illustrate how simple it is to consume it in your own application.
Continue reading -->

How much travel is too much travel?

I’m sitting here on the plane flying from Dallas to St. Louis, the second hop of my trip home from Redmond, and we’re a couple hundred miles out of St. Louis. I just made it to Executive Platinum on American Airlines in the past 100 miles or so. For those of you who don’t know what that is, that’s 100,000 miles flown in one year. Is that too much travel? Sometimes I feel like I’m just visiting when I’m home 🙁
Continue reading -->

TDD Dive — Chapter 6

In this installment, we’re going to code up the input side. This is going to be very much like the last installment, where we did the output. The key to making this easy is to do everything in terms of TextReaders instead of specific kinds of TextReaders. This will allow us to use StringReaders in our tests, and substitute in a StreamReader later, in main. Armed with this knowledge, we can put our test code and test data in the tests themselves, as opposed to having the data spread out in little files all over the place.
Continue reading -->

A Great Refactoring Experience

This post is going to be entirely non-technical. Instead, I want to relate a refactoring experience I had yesterday with Peter Provost. Peter is working on something that he has never worked on before, Event Tracing in Windows (ETW). This is a very low-level, kernel-provided facility to track events in Windows. Accessing these APIs is hard, because you have to P/Invoke to get to all the calls, and it involves messy logic in .
Continue reading -->

The Never-ending TDD Story — Part 5

[Note: I’m using Copy as HTML to transfer code from VS.Net to BlogJet. This tool embeds style sheets into the posted blog entry to provide the nice formatting for the source code. Unfortunately, the version of .Text used by Dot Net Junkies won’t let me post the embedded style sheets. This means that viewing this article in an aggregator will look different, and worse, than viewing it on the DotNetJunkies site.
Continue reading -->

TDD Dive 4 — Refactoring away External Loops

[Note: I’m using Copy as HTML to transfer code from VS.Net to BlogJet. This tool embeds style sheets into the posted blog entry to provide the nice formatting for the source code. Unfortunately, the version of .Text used by Dot Net Junkies won’t let me post the embedded style sheets. This means that viewing this article in an aggregator will look different, and worse, than viewing it on the DotNetJunkies site.
Continue reading -->

Different keyboards promote different priorities

Scott Densmore and Peter Provost are both keyboard junkies. They live their lives finding new keyboard shortcuts to do stuff. If it doesn’t have a shortcut for it, they ain’t gonna use it. On the other hand, I don’t have an obsession with keyboard shortcuts. I have no problem using a mouse, right clicks, etc, to get the job done. And it is not because I am in love with the WIMP style of interfaces.
Continue reading -->

Speaking at .Net Users Group in St. Louis, 11/29

For those of you interested, and in St. Louis, I’ll be speaking at the .Net Users Group meeting this month. My topic will be “Refactoring: Adding Design to your Code After It Is Written”. My underlying intent in this talk is to convince people that refactoring is a worthwhile activity, as it adds value to your code. I intend to walk through some simple refactorings to improve a piece of procedural code and begin to flesh out its dumb data objects into living, breathing OO classes.
Continue reading -->

The Psychology of the Extreme Programmer

There has been an interesting thread going on in the Extreme Programming Yahoo group. I haven’t read the whole thing, but I’ve cherry picked out some good posts from the list. Steve Gordon posted one that I find particularly interesting. He posits: I am finding that the most productive pairings are when the knowledge of the more junior developer is not a proper subset of the knowledge of the more senior developer, but complements it in some way.
Continue reading -->

Diving into TDD — Take 3

[Note: I’m using Copy as HTML to transfer code from VS.Net to BlogJet. This tool embeds style sheets into the posted blog entry to provide the nice formatting for the source code. Unfortunately, the version of .Text used by Dot Net Junkies won’t let me post the embedded style sheets. This means that viewing this article in an aggregator will look different, and worse, than viewing it on the DotNetJunkies site.
Continue reading -->

Happiness is…

Spambayes. A long time ago, in a blog far, far away, I pined for something to free me from this prison of spam. My good friend, Peter Provost, turned me onto Spambayes. This single tool has given me back my inbox. I’ve been targeted these past few days by a particularly nasty spam that has been sent to me over 300 times in the last 24 hours. Spambayes caught each and every one of them, and I didn’t even know they were there until I went back to look at the spam that had been filtered for me.
Continue reading -->

TDD Dive — Part Deux

When last I left you, we had just about started implementing a simple payroll system using TDD. We had written two tests and done some refactoring, but there were still some code smells that I didn’t care for that we were going to look at before proceeding. This is the current Payroll.Pay method: 1: public string Pay(string payDate) 2: { 3: if(employees.Count == 0) return null; 4: Employee theEmployee = employees.
Continue reading -->

Deep Dive into Test Driven Development

In a class I recently taught, the students created a simple payroll system using Test Driven Development. Different students made different amounts of progress, some almost finishing the example I’m about to post, and some not quite so far. But they all asked for my solution. I have already posted the code to my solution, but now I want to talk about how I went about creating it. Hopefully this will share my Test Driven thought processes with my students and anyone else who might be reading.
Continue reading -->

The unsung benefit of TDD

Through an interesting set of circumstances, I have the opportunity to create a really simple build server here on my project team at MS. We’re using Windows Services for Unix and writing everything using KSH scripts. Ah, my years of Unix experience coming in handy again 🙂 Anyhow, the issue here is that my script is now 200 lines long, and I’m trying to put in several different changes to get it finished.
Continue reading -->

To my students from last week…

As promised, here is the code I told you I would post. This is just the first story, paying a salaried employee. I’ll post an explanation of what I did and what I refactored tomorrow. After that, I’ll post the code for the next story and an explanation of that. See PayrollExample — bab
Continue reading -->

Serendipity

Sometimes you accomplish nothing but you learn everything. That’s what happened to me yesterday in the Triangle Lounge. Quick background — I’m working on the Enterprise Library project in the Microsoft patterns & practices group. We’ve been working on consolidating many of the current MS Application Blocks into a single, coherent offering. We all sit in one room, called the Triangle Lounge, including the 3 remaining developers and the 3 testers.
Continue reading -->

Programmer Tests as Agile Documentation talk at St. Louis OOSIG last night

I gave another talk on this subject last night at the St. Louis OOSIG meeting. Not a huge crowd, as the announcement came a little late (that’s my story and I’m sticking to it :)). Presentation went really well I thought, and I’m really getting my thoughts and ideas in focus around this subject. I do think there is a tool and a technique missing from my bag of tricks that would make life easier when using tests as docs.
Continue reading -->

Simple Solution To Hashtables and Thread Safety

Shortly after I posted the original entry on this, I figured out a much more simple way than using version numbers, etc. Item item = null; bool lockWasSuccessful = false; while(true) {     lock(hashtable) {         item = hashtable[key];         lockWasSuccessful = Monitor.TryEntry(item);     }     if(lockWasSuccessful == false) {         Thread.Sleep(0);         continue;     } // If we reach here, the item was successfully locked     try { // Application code goes here
Continue reading -->

Thread-safety and hash tables

I’m storing information in a hashtable. The information is keyed off a string, and the key is volatile — items can be removed, added, replaced, etc., from the hash table. The problem that I’m studying is how to manipulate this information in a thread-safe way without locking the entire hash table all the time and killing performance. Solution number 1 was to lock the entire hash table during each operation on the data in the hash table.
Continue reading -->

Another name for unit tests…

There are so many names being used for TDD’ed unit tests right now: Unit Tests (of course :)) Programmer Tests Technology Facing Tests and more I can’t think of right now But, my friend Michael Hill (who doesn’t blog and I wish he would) came up with a different name for them at the XP Universe conference a few years ago. We were talking at the bar (where else would you find Hill?
Continue reading -->

Updated outline for Agile Tests as Documentation

I’ve updated my outline a bit and fleshed it out some. This is the new outline, so please feel free to comment. Introduction <LI> problem </LI> <br /> <OL type="i"> <br /> <LI> Documentation is an expensive anchor around a team&#8217;s neck<br /> <LI> Lots of money to produce (40% on current project)<br /> <LI> Expensive to change (increases inertia and cost of change)<br /> <LI> Difficult to make comprehensive (need source anyways)<br /> </OL><br /> <LI> Need something different that will promote minimal inertia, cost, and is accurate and comprehensive.
Continue reading -->

Upcoming talks in St. Louis

If you happen to be in St. Louis any time over the next few weeks, I’m talking at a couple of different user groups. On Wednesday, Sept 1, from 7-9PM, I’m talking at the XPSTL meeting in St. Charles. And I’m also talking at the St. Louis OOSIG meeting on Thursday, Sept 16th. The topic of both talks is the same: Using Programmer Tests as Agile Documentation. For more information, and an outline of the talk, please see the previous entry in my weblog.
Continue reading -->

Feedback sought on using Offline Application Block

Has anyone out there written any code using the Offline Application Block? If so, Microsoft would love to talk with you. patterns&practices is actively looking at what changes should be made to the OAB for version 2, so any feedback would be great. In particular, we are looking for information on how easy the API was to use and understand, if there were any things that you were trying to do with the block that were impossible or needlessly difficult, and any new features or tooling that you’d like to see.
Continue reading -->

Using programmer tests in place of some or all documentation?

I’m writing an article for an agile software magazine about how to use programmer tests in place of some or all written documentation, and I’d appreciate some feedback on a very early outline for the article. This is what I intend to cover: Different audiences for documentation <LI> Application programmers &#8212; users of our libraries </LI> <br /> <LI> Maintenance programmers &#8212; modifiers and extenders of our libraries </LI> <br />
Continue reading -->

Button’s Law of Design Maturity

The prevalence of Singletons in a design is inversely proportional to the maturity of the design, and the designers. Be it known, that from this day forward, this shall be known as Button’s Law. (Just kidding) There is a note a truth here, however. I’ve talked to a lot of the best designers that I know in the field, and we all share a common opinion. (Not that I’m putting myself in the same class as these developers.
Continue reading -->

Quick trip report from XP/Agile Universe

I just got back from the 4th annual XP/Agile Universe conference, held this year in Calgary. I was only able to attend the first 2 days due to other obligations, but I wanted to share what happened while I was there. It started Sunday, with a day full of tutorials. I’ve been the tutorial chair for the last three years, and I’ve noticed a shift in the attendance patterns. The first year, we had more tutorials focused on basic agile programming techniques, like TDD and refactoring.
Continue reading -->

Background Noise in a Team Workspace

I’ve been working on a project along with about 10 other people in a really small conference room at Microsoft in a room we’ve dubbed The Triangle Lounge. This room could comfortably fit about 5 people, but we’ve been cramming 8-10 in there every day. Why do we do it? Because we find that we are much more productive as a team if all sit in the same place.
Continue reading -->

Microsoft Enterprise Library

One thing I haven’t mentioned about myself yet is that I’m part of the Microsoft Enterprise Library team. I’ve been working on this project since its first day, back in February, and MS has finally taken the wraps off the project. This has freed us up to start talking about it, and talking I intend to do! You can see the blogs of the other Enterprise Library team members at the far left of my blogs.
Continue reading -->

The Present I Promised

As promised in the previous blog entry, here is the code I used to implement the Active Object pattern on a .Net project I’ve been working on. Here’s the setup for the pattern again. I was working on rewriting some caching functionality on this project, and I had some housekeeping operations that had to happen in the background. This meant that I had to have multiple threads operating at the same time, but I had several choices as to how to do this.
Continue reading -->

A Pattern and a Present

What’s In a Name It’s 1995, and the GoF book had just been published. For those of you who do not know what the GoF book is, it is the original Design Patterns book, written by Ralph Johnson, Erich Gamma, John Vlissides, and Richard Helm. At that point in time, very few developers had ever heard of patterns as reusable problem solutions. I was fortunate to be hooked in with some very smart people, so I was pushed towards reading this book, and it has served me well to this day.
Continue reading -->

Online example of TDD’ed code

Over the years, I’ve gotten a lot of requests for non-trivial examples of code entirely written using TDD and Simple Design. I can finally give you that example. This code is for the Offline Application Block, part of Microsoft’s Smart Client initiative. Basically, it implements a framework that will allow client code to operate in much the same way, whether it is connected to the internet or not. It was written over a period of about 12 weeks, and was done entirely test first.
Continue reading -->

It’s not about testing!!!

When you hear someone talking about Test Driven Development, what is the first thing that comes to mind? Is it “Gee, this sounds like a testing technique!”? If it is, you aren’t alone. Given that the first word of the phrase is Test, I guess you could be excused. But the startling fact is that Test Driven Development, or TDD for short, is not fundamentally about testing. If Not Testing, Then What?
Continue reading -->

I guess I should introduce myself…

I’m Brian Button, and I own Agile Solutions Group. My 30-second elevator speech goes something like, “Agile Solutions Group works with small to medium size business and teams that creates software as part of their business, but not as their primary business function. I can show them how to build better, faster, stronger software using less time and fewer people, and creating the software with higher quality than anyone else in their industry.
Continue reading -->