software solutions / project leadership / agile coaching and training

I’m speaking on TDD tomorrow at Agile Lunchbox

Posted on September 28, 2010

I’m speaking on test-driven development at Agile Lunchbox Wednesday afternoon. The meeting is at the Quick Solutions office (440 Polaris Pkwy, Suite 500, Westerville) at 11:45pm and food is provided.

This will be a more business-focused version of the talk. There will be some code, but this is more about why we do TDD and behavior-driven development, the benefits of TDD, the theory behind it, etc. So bring your managers and PMs along too!

I’m not going to be that guy

Posted on September 27, 2010

This week was my second week working on a Ruby on Rails project. Even though I am thoroughly enjoying Ruby on Rails (more on this later), I’m not going to use this as an excuse to blast .NET, the .NET community, and anyone else associated with .NET.

I really don’t see how posts like this one do any good at all. You may be tired of Microsoft’s stance on things, and you might be tired of working with people who don’t share your values, and that’s legitimate. You may want to work on a platform like Ruby on Rails that you feel is going to make you more successful. But that doesn’t mean that you should go out in a blaze of glory and tear down everyone and anyone associated with .NET.

If you don’t like .NET, you have two choices, you can change your platform (i.e. switch to something like Ruby) or change your platform (i.e. make the .NET world better). There are a lot of people doing the latter, and to slam the entire .NET culture does these people a big disservice. I am very thankful for these people because they are making the .NET platform much better, and I’ve reaped the benefits of this over the years.

This post was initially prompted by this tweet from Jeremy Miller:

I don’t think there’s anybody more self-righteous and condescending than a .Net turned Ruby developer.

Seeing that 27 people have retweeted that, that tells me that he’s not the only one who is hurt by all of the anti-.NET sentiment.

A lot of people in the .NET community don’t agree with how Microsoft does things and what they stand for, and I fall within that group. I would rather see Microsoft spend less time on things like Microsoft.Data and LightSwitch and spend more time promoting good developer practices (like TDD), helping to create some kind of .NET package management system (like Ruby’s gems), SQL migrations (like Ruby’s rake), and the like. If you want to blast Microsoft for stuff like this, be my guest. They’re a for profit company, so they can act like big boys and take the criticism. But please don’t aim that venom at all of the good people in the .NET community who are spending a lot of their free time to make the .NET platform better.

Thoughts on pair programming (and when it makes sense)

Posted on September 21, 2010

Pair programming is a development technique used in Agile software development techniques like XP. Lots of people I know are big fans of pair programming, and many teams have everyone pairing on pretty much all coding activities. I’m just wondering if this is really the best way to do things in all situations.

To be fair, I’ve never been on a project where we paired all the time. I’ve paired off and on for various things. So I can’t really present the argument from the side of someone who pairs on everything.

There are many obvious benefits to pair programming, as you could imagine.

  • Onboarding a new team member
  • Senior developers pairing with junior developers
  • Working together on something particularly challenging

I’m not debating the value in this kind of thing. I’m just questioning the value of doing it all the time on everything.

I’ve asked a lot of people who pair a lot why they find it to have so much value. I’ve heard various answers, some of which I’m not sure I agree with.

The hard part of programming is figuring out how to do something, not the actual typing part.

This may be somewhat true… but to what extent? For most features, I usually sit down at the beginning and think about how to design things at a high level (and often discuss it with others). This certainly is the hard part, but once we figure it out, then I have to plug through the work and get it done, and doing this design doesn’t usually take that long. At that point, I see less benefit in having someone else there watching me, especially when I’m doing mundane tasks like HTML layout, setting up test data, etc.

Pair programming is actually faster than doing tasks individually.

In order for this to be true, that means that at least 50% of my time spent doing a task individually is wasted time due to bugs, rework, getting stuck, time spent figuring things out, etc. I don’t doubt that two people working together end up with better quality code in less time. But how much better? And can you honestly say that two of you can do it in half of the time compared to one of you doing it individually? Maybe in some cases this is true, but I would think that more often this wouldn’t be the case.

There are diminishing returns to pair programming. What I mean by that is this: if you and I paired on the same project, over time we would both learn the system better, we would start doing things the same way, we would design code better, we would learn new tricks and techniques from each other, we would work better with our team, and we would become more disciplined about writing tests and not cutting corners. But as time goes on, we would also be getting better at doing these things individually. We would be able to design things better individually, we would learn to be disciplined to write tests, and we would get better and doing things right the first time.

What if we were already able to understand how to design things correctly, we were already disciplined to write tests and not cut corners, we already communicated well and were team players, and we were better at development in general? In that case, I feel like pair programming makes less sense because the value we’re getting with pairing over individual development would be less.

On every project there has to be some balance between speed and quality. On one end of the spectrum you have startups who have to ignore quality and things like automated tests to just throw something together that seems to work so that they don’t lose their funding. On the other end you have some mission-critical project like a nuclear power plant or a pacemaker that can’t afford to fail. Those mission-critical projects need higher quality, but that comes with a lot of extra cost. Somewhere is the middle are our projects.

Obviously quality is very important, and if you know me you know how much I am a fan of TDD. But TDD, pairing, and anything else needs to be justified in terms of cost (both short-term and long-term). Is what we’re doing worth the time that we’re going to spend on it? The code has to work, that’s not negotiable. But since we have a finite amount of time to finish a project, we can only sacrifice so much speed in order to make sure we have quality.

When it comes to pairing, there are a lot of factors that need to be considered, namely how difficult your project is, what the business problem is, who is on your team, how experienced they are, and so forth. I’m not saying that pairing is bad in all situations. I’ve seen it work very well on several different projects, and like I said earlier, there are places where it definitely fits.

Now I am a proponent of having all code agreed upon by more than one person. You could do this with code reviews, pair programming, or assigning features to two people (who will spend time agreeing on the design, but won’t necessarily sit at the same machine and do the work together). I just want to make sure that we don’t have to waste time due to rework. I also emphasize to people that if they get stuck on something to please please please ask someone for help instead of trying to be a hero and spending a whole day trying to figure something out just because they feel like they should be smart enough to solve it on their own.

Again, I’m not saying that all pairing is bad, or that if you’re pairing on everything on your project that you’re doing it wrong. My whole point in this is that I think we need to evaluate each situation and decide how we can best deliver a solution with a sufficient level of quality in the least amount of time possible. Maybe that involves pairing, but maybe not. But I think we have to at least ask that question.

Next week I start life as a Rubyist

Posted on September 9, 2010

My current assignment is wrapping up this week and next week I will be joining a team doing Ruby on Rails development. I’m really excited about this for several reasons:

  • I want to see if Ruby on Rails really helps me get things done easier and faster, as I suspect it will.
  • I’m anxious to learn more about doing things the Ruby Way.
  • I know half of the team and I like them, so that has to count for something!

The project I’ll be working on is a large application that has been around since 2006, so it’ll be a good example of a mature RoR application. It will be interesting to see how dealing with a mature RoR application compares to dealing with a mature .NET application.

Don’t worry, I am not forsaking my .NET roots! I’m looking forward to my Ruby on Rails experience and I’ll most likely be blogging about life as a .NET developer in a Ruby world.

Planning for success

Posted on September 8, 2010

We all want to succeed at something, whether it’s your career, a sport, being a good parent, or whatever else you’re working at. But do you have a plan for succeeding?

The fact of the matter is that if you just hope that you’re going to succeed without doing something to make sure that you actually do succeed, it’s unlikely that you will achieve your goals. Most people do not succeed accidentally, they do it through many small decisions and actions over the course of time that lead them to success.

First, think about your personal mission statement in life. What are your priorities, and what is most important to you? Consider everything — your family, God, friends, activities, work, etc. This way when you set goals for yourself, you can make sure that they line up with your priorities. For example, maybe your work goals involve spending 20 hours a week doing something and as a result you don’t have any time to spend with your kids. If your list of priorities says that your family is more important than work, maybe you need to think about the goals that you’re setting to make sure that it’s the right thing to do.

Once you write out your personal mission statement and your priorities, it’s time to think about your goals. Do you want to learn how to do mobile development? Be a better spouse? Get to know your kids better? Be able to run a half-marathon? Lose 20 pounds? Brainstorm and write down a bunch of ideas.

Now that you have your ideas, evaluate them all and figure out which ones are most important. Think of your life and career like a business. What adds the most value to your life at this point in time? You can have different goals for different areas of your life (e.g. your marriage, your kids, your career).

Once you have your goals, think about the steps that you need to take to get there. Write them down and share them with someone else so that they can help you stay on track.

Now you have to execute. When you have to make a decision about what to do with your time, remember your goals and priorities and make the decision based on that. You certainly don’t want to make decisions solely based on things like feelings, what others might think, or what others say you should do.

This is what I do to make sure that I’m making the most of my life and it’s really helped me keep my priorities straight and be a better husband, father, and software developer.

What’s in my AutoHotKey file

Posted on September 7, 2010

I was asked awhile back to blog about what is in my AutoHotKey script file. If you don’t know what AutoHotKey is, it allows you to remap keys on your keyboard or create macros that are associated with keystrokes or key combinations. So here’s what I got.


#SingleInstance says that if I load up my AutoHotKey script and there is already one loaded, then just use the new one without prompting. If you make changes to your script file, you can double click the file to reload it. This way you won’t get annoying prompts when you do so. This has to be the first line in your AHK file if you use it.

SetKeyDelay, -1

By default, AHK puts a slight delay between each keystroke in a macro. I have no idea why you would normally want this, so the above line removes that delay and it will execute the keystrokes as fast as possible.

Send {End}

Remaps Caps Lock to End. The Caps Lock key is in such a prime location in the home row, and you don’t usually need to use it. So I remap it to End, which I use a lot when I want to go to the end of a line of code. This way, I don’t have to take my hands off the home row and stab at the End key (and often miss). This was my first AutoHotKey shortcut and it still my favorite.


Shift-Caps Lock will now toggle Caps Lock. Because sometimes you actually do need Caps Lock.

#j::run explorer c:proj

Windows+J opens the folder where I keep all of my code. The “run” keyword allows you execute whatever you want.

Send {Up}{Up}{Up}{Up}{Up}

Send {Down}{Down}{Down}{Down}{Down}

Send {Left}{Left}{Left}{Left}{Left}

Send {Right}{Right}{Right}{Right}{Right}

When I hit Ctrl-Alt-arrow key, it will go 5 characters/lines in that direction. This really helps you move around faster in a code file. Ctrl-left arrow or Ctrl-right arrow will go to the beginning/end of the current word, which is nice, but sometimes you want to go to a spot in the middle of a long word, so the Ctrl-arrow doesn’t really help. This is another favorite of mine.

SendEvent select * from `

When I type “ssf]”, it will change it to “select * from “. The tick at the end of the second line tells AHK that the space at the end of the line is important and should be included.

SendEvent if exists (select 1 from sysobjects where name = 'TableName' and xtype = 'U'){Enter} drop table [dbo].[TableName]{Enter}{Backspace}go

SendEvent if exists (select 1 from sysobjects where name = 'ViewName' and xtype = 'V'){Enter} drop view [dbo].[ViewName]{Enter}{Backspace}go

SendEvent if exists (select 1 from sysobjects where name = 'TriggerName' and xtype = 'TR'){Enter} drop trigger dbo.TriggerName{Enter}{Backspace}go

SendEvent if exists (select 1 from sysobjects where name = 'ProcName' and xtype = 'P'){Enter} drop procedure [dbo].[ProcName]{Enter}{Backspace}go

SendEvent if exists (select 1 from sysobjects where name = 'ProcName' and xtype = 'P'){Enter} drop procedure [dbo].[ProcName]{Enter}{Backspace}go{Enter}{Enter}create procedure dbo.ProcName{Enter}({Enter}{Enter}){Enter}as{Enter}begin{Enter}{Enter}end{Enter}go{Enter}{Enter}grant execute on dbo.ProcName to EdwardsSteelUser{Enter}go

Prints out the following code when I enter “ietable]”:

if exists (select 1 from sysobjects where name = ‘TableName’ and xtype = ‘U’)
drop table [dbo].[TableName]

I put this at the top of the file every time I create a new database table. Also included are similar macros for views, triggers, functions, and stored procedures.

SendEvent ShouldEqual(

When I write tests, I’m often writing things like “employee.Name.ShouldEqual(“Jon”);”. When I’m typing this stuff, I can just type “se]” and get “ShouldEqual(“. Sure, Intellisense could do it for me, but AHK is a lot faster than waiting for Intellisense to figure out what I’m doing.

SendEvent c:

Because I often screw up when typing “c:” and type “c:|” instead. You can do similar things for common misspellings that you often find yourself typing.

I have some other project-specific macros in my AHK file too. If you find yourself typing the same class name, database table name, or anything else over and over, create a macro for it. It’s a small thing but it will help you go a lot faster.

I wanted a way to add stuff to my file quickly because I knew that I would be more likely to do it if it were easier. This led to the AutoHotKeyShortcutAppender, which is a small console app that takes in two arguments: the key combination for a macro and the output. Now I can hit Windows-Q to bring up SlickRun and type “asc scn] SomeClassName” and instantly it adds the macro to the end of my AHK file and reloads it. (If you use the code, you have to edit the app.config file and set the path to your AHK file.)

Have any other AHK favorites? Please post a comment and let me know!

I have over 15 years of software development experience on several different platforms (.NET, Ruby, JavaScript, SQL Server, and more). I recognize that software is expensive, so I'm always trying to find ways to speed up the software development process, but at the same time remembering that high quality is essential to building software that stands the test of time.
I have experience leading and architecting large Agile software projects and coordinating all aspects of a project's lifecycle. Whether you're looking for technical expertise or someone to lead all aspects of an Agile project, I have proven experience from multiple projects in different environments that can help make your project a success.
Every team and every situation is different, and I believe that processes and tools should be applied with common sense. I've spent the last 10+ years working on projects using Agile and Lean concepts in many different environments, both in leadership roles and as a practitioner doing the work. I can help you develop a process that works best in your organization, not just apply a prescriptive process.
Have any questions? Contact me for more information.
From Stir Trek 2017
Iteration Management - Your Key to Predictable Delivery
From Stir Trek 2016 and QA or the Highway 2015
From CodeMash 2016, QA or the Highway 2014, Stir Trek 2012
The Business of You: 10 Steps For Running Your Career Like a Business
From CodeMash 2015, Stir Trek 2014, CONDG 2012
From Stir Trek 2013, DogFoodCon 2013
(presented with Brandon Childers, Chris Hoover, Laurel Odronic, and Lan Bloch from IGS Energy) from Path to Agility 2012
From CodeMash 2012 and 2013
(presented with Paul Bahler and Kevin Chivington from IGS Energy)
From CodeMash 2011
An idea of how to make JavaScript testable, presented at Stir Trek 2011. The world of JavaScript frameworks has changed greatly since then, but I still agree with the concepts.
A description of how test-driven development works along with some hands-on examples.
From CodeMash 2010
From CodeMash 2010