Monday, August 10, 2009

eRubyCon Slides & Summary

I was at eRubyCon this last week, courtesy of Joe O’Brien and the great folks at EdgeCase who invited me to speak.

This was my first conference outside the .NET arena in years (excluding CodeMash) and I’m kicking myself for not doing this more often. I got some great insights on different ways to solve problems, and I met some amazing folks who inspired me to get to work on fixing a few things in my life that need addressing. I also got fired up about a few neat tools and some changes to our environment at work. (CodeMash is awesome for this, but as an organizer I get little or no time to actually participate in it.)

I gave my Leadership 101 talk as the first session of day 2. This is the second time I’ve given this talk, but it was in a completely different format than the 20 minute talk I gave at KalamazooX. KalX was amazing (and I hope I get invited back there!), but the longer format of eRubyCon gave me a chance to flesh out a few points. I also mixed in some examples from my background to lend some detail and color.

I always feel weird talking to a crowd about leadership because I don’t pretend to be a master of it, but the audience there was wonderful to speak to, and I got some nice feedback.

The slide deck is my usual funky style: 14 slides total, two pictures, one number, and (aside from the opening quote) six words total, three of which are repeats. There are even a couple blank slides just because. The deck’s here and there are some notes on it, but the best resource is really the Leadership 101 blog series that inspired the talk.

eRubyCon has been one of the best conferences I’ve ever been to. I’m definitely attending next year regardless of whether or not I’m on the speaking docket. It was an awesome weekend!

Tuesday, July 28, 2009

Looking for a QA Job? Come Work for Telligent!

UPDATED: It’s now December, 2010 and I’ve got another open position on my team! Everything below still applies. Contact info is at the bottom, or use the link on the blog’s sidebar. I’d love to talk with you if you’re interested!

Telligent is expanding our QA/testing team and we’re starting the process of looking for passionate, detail-oriented folks who might be a fit for the team. You’ll be working for me in my new role as the QA Team Lead, and you’ll be testing our neat products like Telligent Community, Telligent Enterprise, Telligent Analytics, plus a host of cool add-ons like our Mail Gateway and SharePoint integration products.

I don’t have a formal job description yet, but frankly, most job descriptions stink or don’t match reality.  Here’s my unofficial, completely unapproved description of what you’ll be doing:

  • Working hand-in-hand with our Product team to create testable acceptance criteria for each new work item (feature, user story, bug ticket).
  • Developing automated test suites using a number of tools like Selenium, Watir, Cucumber, and Visual Studio’s web test.
  • Creating, updating, and executing test plans for all our products.
  • Creating and updating matrices for supported platforms, then executing test plans against those. (You’ll be helping stand up and maintain those platforms in various virtualization environments.)
  • Working hard to exercise the systems through exploratory testing.

Below are some of the tools we’re using or exploring in our QA work right now. I’m all over using any tool that will bring value to our work, so if there’s something you’ve had success with then let me know.

  • UI testing: Selenium, Watir, possibly VS web test
  • Languages: C#, Ruby
  • Other cool toys: Cucumber, PowerShell

What you’ll need to bring to the table:

  • A detail-oriented mindset.
  • Passion about improving quality.
  • Passion about improving yourself – what else are you doing other than reading my blog?
  • Excellent communication skills in e-mail, written documentation, and verbally.
  • Critical thought. Talk to me about how you approach problems.
  • Patience and a pragmatic outlook. I plan on changing the world, but it will be a long haul. We’ll lose occasional battles but the war will be won. Fill in other over-used clichés here.

Notice I didn’t mention much about specific skills? What you’ve got in your head and heart are far more important to me. That said, it would be helpful, but not required, if you’ve got some exposure to the following:

  • Software development experience. Something .NET-ish best, other languages are fine too.
  • Experience with SQL Server 2005 and/or SQL Server 2008. (Exposure to SQL of any type helpful.)
  • Understanding of software development lifecycle.
  • Exposure to Lean and Agile development. (If you’ve decided neither of those disciplines are of value then please look elsewhere for an environment that will make you happy. I’m emphatic about both and you won’t be a good fit if you’ve looked Lean and Agile over and don’t care for them.)
  • Previous experience in a QA role.

Telligent’s located in Dallas, but we have remote workers scattered all over the country and a few overseas as well. I’m happy to work with remote folks, but you’ll need to demonstrate that you’re able to be productive from a home office.

You’ll be working for me, so you may want to do a little digging around the blogosphere, Twitter, and the region’s dev community to see if that’s for you or not. I’m strong coffee with strong opinions that I’m happy to change when a well-thought debate is put forth. I care deeply about my work and I care even more deeply about my teams. Look up some folks who’ve worked for me or with me and get their opinions. (Steve, James, Brian, Todd, Nate, Sean, Dave, Leon) I didn’t ask them if it was OK, but I think you’ll get varied, honest feedback from them. 

Still interested? Drop me an e-mail with your resume: JHolmes AT Telligent DOT com. Feel free to drop me a note via the contact link on the blog’s sidebar, too.

Tuesday, July 21, 2009

Is Software Engineering Dead? (Process, not Construction)

Tom DeMarco, author of the seminal book Peopleware has written a short, interesting article Software Engineering, An Idea Whose Time has Come and Gone?

DeMarco’s article is really around engineering as it refers to controlling the process of creating software, not the actual software construction itself. The article’s short and doesn’t start any in-depth discussion, but the general point is awfully good: working too hard to control the process of software construction is a bad thing. A great quote from the article:

For the past 40 years, for example, we’ve tortured ourselves over our inability to finish a software project on time and on budget. But as I hinted earlier, this never should have been the supreme goal. The more important goal is transformation, creating software that changes the world or that transforms a company or how it does business.

We can’t use this as an excuse for being sloppy with our clients’ time or money, be those clients internal or external. That said, the points DeMarco makes line right up with my own beliefs:

  • As an industry, we suck at estimation. Badly. The problems we solve are similar, but nearly always different from each other.  We make little or no effort to keep a good history of our estimates’ accuracy, nor do we do much to train folks on estimating.
  • Because estimation is a time sink, use velocity for projecting project pace and what you can build within the client’s budget. (Get your work item granularity small, though!)
  • Value is delivered to clients by creating software, not managing the project. Project management’s critical, but it needs to be a light hand. Oversight and correction versus harsh controls. (That means you’d damned well better spend a lot of time building great teams that are good enough to manage themselves, by the way.)
  • Value is delivered to clients by being flexible enough to change what you’re building in order to meet the clients’ changing environment. (Or the clients’ evolving needs as their understanding of the business problem evolves.)

DeMarco’s article is way too short, and I really wish he’d provided more detail on the metrics and measurements he’s decrying – but I think there’s some good conversation starters there.

Monday, July 20, 2009

Upcoming Speaking Gigs

I’ve got a number of upcoming speaking gigs through September:

Let me know if you’re going to be around for any of those meetings!

Friday, July 17, 2009

Book Review: Beautiful Security

Beautiful Security, ed. by Andy Oram and John Vega, ISBN 0596527489, published by O’Reilly.

Like O’Reilly’s Beautiful Teams, this book’s a series of essays by industry experts, this time focused on security. The various authors do a great job of covering topics from social engineering to forcing firms to focus on security. The chapters are all well-written, although a few do better jobs of keeping the material interesting and flowing.

You’ll find plenty of security-related history in the book. Phil Zimmerman’s chapter on PGP’s Web Of Trust is one example. Pieter Zatko’s discussion of his work on the LH0phtCrack is another. Both stories help expose mindsets which, sadly, haven’t changed a whole lot.

Security, as with testing or overall quality, is at its most fundamental roots a culture issue. Not every story focuses on this aspect, but pointing out bad culture is a common theme through many of the chapters. Zatko’s discussion of “Learned Helplessness,” John McManus’s Security by Design, and Jim Routh’s Forcing Firms to Focus are all great reads on this line. Many of the stories correctly emphasize that security isn’t just about someone hacking code – it’s a much broader issue.

As with any good security book, there’s plenty of well-done content which will likely scare you in to re-thinking how you and your company approach security. Beautiful Security can help you identify practices, problems, and mindsets which leave you, your company, or your clients at risk.

Overall it’s a very useful, highly readable book on a critical subject.

Thursday, July 16, 2009

Book Review: The Nomadic Developer

The Nomadic Developer by Aaron Erickson, published by Addison Wesley. ISBN 0-321-60639-6.

If you’re in the software consulting business, or considering going in to the consulting business, then you really, really need to read this book. It’s chock full of things too many consultants don’t stop to think about before joining consulting firms, or don’t pay attention to once they’re in.

Erickson does a great job covering critical issues like why one would consider going in to consulting, culture profiles of typical consulting companies, critical business aspects of consultancies, and a number of other things I wish I’d known before joining a couple of consulting firms I’ve worked for. Erickson’s writing style is clear, concise, and entertaining. He’s also pulled in a number of “annotators” who provide excellent counterpoints and additional insights throughout the book.  There’s also one chapter of short articles by experienced consultants like Ted Neward and Bruce Eckel.

While all of the book is highly useful to readers in the consulting line of work, several topics stood out:

  • Understanding critical concepts like sales pipelines, revenue, and margins
  • Learning how to ask questions during an interview, and learning which questions to ask
  • Figuring out how to survive and thrive at a client and at your consulting company

This book isn’t just for folks in the consulting line of business, it’s also good for independents. Moreover, the career, business, and interviewing advice are great reads for anyone, regardless of the sector they work in.

Wednesday, July 01, 2009

Book Review: The Manga Guide to Physics

The Manga Guide to Physicsby Hideo Nitta and Keita Takatsu. Published by No Starch Press, ISBN-10: 1593271964.

This book is an awfully fun, highly educational read. My last involvement with physics was 30 years ago in high school when I sat in the back row of Mr. Davis’s classroom with my best friend Ernie Fatta. I was more interested in trying to flirt with the pretty girl who sat near us, plus math wasn’t my strong suit, so I didn’t get much out of the course. Go figure.

This book uses a story line to expose readers to fundamental physics concepts like Newton’s Laws of Motion, vectors of force, and kinetic energy. A patient physics geek walks the main character through the concepts using practical demonstrations with tennis balls, bodies, etc.

All the concepts are laid out in very clear fashion, and the examples are really spot on and understandable. There’s math involved, but it’s kept at an understandable level and is presented in very short, progressive steps.

This was a really enjoyable read – and it was even educational. I loved the format and I really appreciated the effort and thought that went into laying out the material in such a clear fashion.

There’s an entire series of these Manga Guides covering everything from molecular biology to databases. If the others are as good as this one then I’d be happy to read them too!

Book Review: The Economics of Iterative Software Development

The Economics of Iterative Software Development, by Walker Royce, et. al., published by Addison-Wesley, ISBN 0321509358.

This is a lean book (small size, only 170 pages) which attempts to help managers and decision makers move to iterative approaches over waterfall.  The book’s well written and has some good, thought-provoking discussion in it.

You won’t find discussions of specific methodologies in this book, but you will find repeated emphasis on critical concepts like delivering running systems over useless documentation (not ignoring documentation, mind you, but delivering the right amount of it). Doing the right amount of planning at the project’s start is also emphasized: avoiding over-architecting and big design up front.

It struck me that much of the authors’ definition of “iterative” development is subtly scattered around the book. It’s not always In Your Face, and that’s actually OK because you’re able to better focus on their deeper points.

The economics part of the book’s title comes through some good discussion on ensuring you’re delivering business value, plus an entire section on measuring your project’s success. There’s good discussion in those sections to help you understand opportunity cost (if I do this, what else am I unable to do?), net present value, and a great example on prioritizing features based on their value to the business.

Some things in the book are a little vague for my tastes, but the authors did a nice job of keeping the book brief, concise, and on target.

Overall it’s a very good, useful read.

Thursday, June 11, 2009

Slides Posted for “Three Tips to Improve Your Process”

Last night I gave my “Three Tips to Improve Your Process” talk at at the Cincinnati Software Process Improvement Network (SPIN). There were some very good discussion-provoking questions – always good for me tuning up my talk for the next time!

The latest iteration of my deck can be found here.

Books I mentioned in the talk:

Thanks to the great folks at SPIN for letting me talk!

Monday, June 08, 2009

Book Review: Beautiful Teams

Beautiful Teams, by Andrew Stellman & Jennifer Greene. Published by O’Reilly, ISBN 0596518021.

This book’s a good read and a nice addition to your bookshelf, although its uneven writing style and fractured voice detract from some great tidbits.

Beautiful Teams is a collection of interviews and essays by various folks in and around the software industry.  Each chapter is a great interview with folks like Steve McConnell or Scott Ambler, or an essay-like article from Mike Cohn or Corey Doctorow. Chapters are slotted into broad sections dealing with individuals, goals, practices, obstacles, and music – as in how parallels can be drawn between musicians in a band and members of software teams.

The uneven writing style and fractured voice can be somewhat expected since each author wrote their own articles, but tighter editing could have really polished up the chapters and made the book more cohesive. The tone of many of the articles made it seem they were drawn directly from the authors’ blogs – another point for having had some tighter editing. I also wished that each chapter had an introduction/bio about the author. While these people are supposed industry leaders, there were quite a few authors I wasn’t familiar with, so I was left wondering what their accomplishments were that made them a target to get in the book.

Complaints aside, I got very good value from reading the book. The wisdom in several articles around dealing with team dynamics was exceedingly useful, and I also found it good backup to read industry leaders pointing out it’s important to move poor performers or negative influences off teams.

Several chapters really stood out for me: Grady Booch’s interview on creating team cultures, James Grenning’s article on implementing extreme programming (XP) in a heavily bureaucratic shop during XP’s early days, and Steve McConnell’s interview about improving team skills, morale, and practices.

Booch’s interview really struck home due to his discussion of working on geographically distributed teams. I’m a remote worker and am far away from everyone I work with at Telligent, so this was particularly interesting to me.  Booch’s comments on the importance of trust between team members and dealing with cultural issues really struck home – he emphasized that technology isn’t the limiting factor on poor-performing distributed teams.

Greening’s experience pushing for change was a great read. The tone and style are clunky, but the content’s gold. Greening was learning XP in its earliest days and worked hard to get an XP team going on a project in a very tight-laced, policy-ridden company. The number one takeaway from me from this article was something I’m already a huge believer in: culture change will utterly fail if you don’t have management and leadership that actively supports the change.

I’ve yet to read anything from Steve McConnell that wasn’t ridden with great wisdom, and his interview in this book certainly kept that tradition.  His points on helping establish a team identity were highly useful. I loved his commentary on the asinine failure (my words) of companies to budget funds for team and morale building. It makes no sense that companies will spend millions on payroll, yet do nothing to build and grow team morale.

Overall I’ve really enjoyed reading this book. It’s one of the few I’ll keep around on my bookshelf.

Thursday, May 14, 2009

Book Review: Making Things Happen

Making Things Happen: Mastering Project Management by Scott Berkun, pub. O’Reilly, ISBN 0596517718.

This book’s been enjoyable and useful to read. There are some sections which didn’t give me a lot of value, and I think some hard trimming to shorten the book’s length would have been useful, but overall it’s been a positive addition to my bookshelf.

I don’t line up 100% with Berkun’s approach to project management – he seems to be  heavy on loading up on extensive documentation up front, and he’s seemingly tepid about specs being a conversation vehicle between stakeholders and developers. I’m adamant that specs need to evolve with the stakeholders, analysts, devs, testers, and other team members being active participants in the process.

Those nits aside, I got great value out of a number of Berkun’s chapters, particularly those around leadership and trust, decision making, and recovering when things go wrong. He’s also got exercises at the end of each chapter which help get thought-provoking juices flowing.  Additionally, there’s a lot of small, useful details in this book as well, ranging from writing good e-mails to advice on running meetings.

Overall it’s been a good read and I’d happily recommend it.

Tuesday, May 12, 2009

Book Review: Implementing Automated Software Testing

Implementing Automated Software Testing by Elfriede Dustin, Thom Carrett, Bernie Gauf. Addison-Wesley. ISBN 0321580516.

This book isn’t for everyone, but everyone can get some value out of it. What I mean by that rather confusing statement is that folks working in Agile environments will likely want to throw the book across the room while folks in more bureaucratic environments like CMMI or other waterfall environments will likely get a great deal of value from the book.

I’m an Agile fanatic and I had a difficult time dealing with book’s approach which emphasizes spending large amounts of time creating documentation such as requirements traceability matrixes, detailed test plans, etc. My preferred approach is to have testers working side-by-side as part of a team, creating specifications from user stories/requirements and moving those right in to automated test suites via tools like Selenium, Cucumber, or RSpec.

That said, I did indeed get some good value from the book. I found the discussions on making hard evaluations on what to test very worthwhile reading: teams can easily vaporize large amounts of time creating large suites of brittle, unmaintainable automated tests. This book has several really good chapters on using business cases to drive return on investment (ROI) decisions for testing, understanding automated test pitfalls, and adjusting your testing as you progress through your project.

Additionally, one of the book’s high points was on building the test team: “Put the Right People on the Project – Know the Skill Sets Required.” This is a great chapter which emphasizes starting the search by focusing on how to interview test team members – and how those testers’ skills are greatly different than other members of the team.

The book’s very academic, dry tone makes for some difficult reading, and few concrete examples are used until very late in the book. Having spent a large number of years either in the DOD or working for DOD contractors, it quickly became apparent that much of the book seemed targeted to folks working in those environments – too many dry acronyms are scattered through the book, adding to the difficulty in reading.

The lack of examples using real tools frustrated me. While the appendices contain some examples of comparing various tools, the book doesn’t actually show how a real world testing environment would use those tools. One appendix, eight or nine pages in length, is touted as a “Case Study” but falls short, in my opinion.

Overall it’s a decent book. The dry tone and lack of real environments is balanced out by the excellent coverage of team skills and emphasis on selecting how and what you test.

Friday, May 08, 2009

.NET Work in Frederick, MD

Normally I don’t use my blog as a venue for job postings, but this one’s for a rather unique opportunity.

My wife works for Syracuse Research Corporation, a great company based out of, wait for it, Syracuse, NY. The company targets support and research work for the Department of Defense, and I’ve really, REALLY liked what I’ve seen for their culture, leadership, and employee support. If you’ve read my blog much then you may know how critically important those three things are to me.

They currently have an opening for a .NET person in Frederick, Maryland. The position requires a Top Secret/SCI clearance, so it’s a tough billet to fill.

If you’re in that area, or are willing to relocate, I’d encourage you to have a look at the job’s description. If you’re interested, contact me (see link on sidebar) and I can put you in touch with the right folks.

Friday, May 01, 2009

Dayton Code & Coffee, Tuesday 5/5

Following the neat idea of the Columbus Code & Coffee, Chris Schroll, Derek Hubbard, and I are going to meet up at the Panera Bread at Fairfield Commons on Tuesday, 5/5, at 8:00 am.

We’re thinking of working through some of the Ruby Koans from the geeks at EdgeCase, or maybe having a look at Sean Chambers’ SOLID stuff out on Git.

Stop by if you’re interested in gabbing about code or pairing up. Don’t worry about your skill level – just bring some interest!

Remote Retrospectives with Twiddla

I’m a big fan of retrospectives for teams. Retrospectives smooth out bumps in your team’s environment and it gives everyone a sense they’ve had a chance to air their gripes – or offer up praises, even!

Retrospectives for remote teams can be tough, simply because so much value for retrospectives is gained through the interaction of folks in a room. At Telligent the team I’m on is four guys scattered between Ohio and Florida. While I’d really like an excuse to travel down to see Sean near Jacksonville, that won’t quite work.

At yesterday’s retrospective we gave a shot at using Twiddla as a retrospective board. Twiddla, coupled with Tokbox for video/audio, turned out to be a great no-friction solution as a place to put our Good/Bad/Confusing topics. It was also stupid easy to move those topics around as we did our organization phase.

The red/yellow/green dots were my addition after we’d moved and voted on things – I realized that we didn’t have a way to remember which topics were in which category. (Green for good/Red for bad/Yellow for confusing) I think next retrospective we’ll simply preface each topic with G/B/C to keep those straight.

We had a great retrospective, and it was in part because we found a tool that didn’t get in the way. Low-friction, usable tools, FTW!

Wednesday, April 29, 2009

Challenge to MS Evangelists: Real Examples. Tests, Even

For some time I’ve been giving Jeff Blankenburg, our region’s Microsoft Developer Evangelist, a good-natured ribbing over the lack of tests or real-world architectures or design in his demos. This isn’t just a problem I have with Jeff, it’s a problem I have with our community of speakers in general, both inside and outside Microsoft.

Here’s the gist of my gripe: Our industry’s in an awful place right now regarding how we use the tools/platforms/whatever that Microsoft delivers. Don’t believe me? Brush up on software design patterns and practices (read Uncle Bob’s Clean Code or Bill Wagner’s Effective C# or McConnell’s Code Complete), then take another look at how you write your own code. Go look at various open source projects. Look at the examples and guidance that come out of Microsoft. Rethink how the last 100-level “Intro to <X>” session you saw was presented.

Take a look at a number of those and maybe you’ll see my point: We’ve got way too many examples and demos from way too many smart folks and groups which show zero tests or awful implementation practices. The 100-level introductory presentations we see at way too many user groups and code camps do nothing to help us software engineers decide HOW we should implement something.

Changing this situation requires a concerted, long-term effort on many parts:

  • User group leaders and conference organizers should start demanding this of folks presenting at their events
  • Speakers need to step up to the plate and speak to the real world sharp edges of implementing the latest, greatest tool or technology
  • Attendees at these events need to lose their apathy and get engaged. Demand better from speakers: “How would you test that? How does that fit in a real implementation? What lessons have you learned from solving problems with this?”

I understand the perceived difficulty of trying to get a topic introduced in a clear, understandable fashion while trying to show that topic’s real world implementation. Too bad. Step up to the plate and re-think how you’re doing your presentations. Scale back scope. Rethink how you demo things. This issue can and must be solved.

As part of this, I want to offer up a challenge to Microsoft evangelists anywhere, not just Heartland, who are presenting to companies, user groups, or events: step up to the plate. Speak to how the tools, frameworks, or whatever need to fit into the real world. Show tests. Show the hard edges. Encourage your audiences to use critical thought in fitting these technologies into their environments.

Why am I singling out MS Evangelists? Simple. Scalability. MS Evangelists speak to a huge number of folks in any given month. That’s their job.  I do four, maybe six presentations in a year (mostly because I suck, but that’s beside the point). Jeff Blankenburg  did seven gigs last month and 20 over the previous three.

Like it or not, what comes out of Redmond is too often taken as gospel. Bad examples or demos which show zero tests or have everything including data access wrapped up in a code behind are far too prevalent.  This isn’t anywhere near Microsoft’s fault – folks who blindly take those examples as gospel are failing to use any critical thought.  I’ve had long discussions with my pal Leon about this, and we even drew poor Mike Wood into the discussion when he was trapped in a car with me and Leon for nine or ten hours on the way to and from the Kalamazoo X conference last weekend.

Here’s the meat and potatoes of my challenge: I’m willing to step up to the plate with something on my side: Cold, hard cash. During the months of May, June, and July, I’m offering to donate my entire monthly discretionary spending budget of $200 to charities of your choice if you’ll meet my challenge.  Here are the rules:

  • Present at an event, company, or user group
  • Show a demo which includes unit, integration, or feature tests
  • Show a demo where you lay out real-world implementations with a solid architecture
  • Discuss pros and cons of the technology you’re presenting on

Do that, then mail me (contact info on right sidebar) a summary of your talk.  I’ll write out a check for $20 to your favorite charity.  I’ll do that each time until I’ve spent all my discretionary allowance for that month. That’s ALL my blow money for the next three months I’m putting on the line. No saving for the new home server I need. No beers after my .NET user group meetings. No purchases of MP3s from Amazon.com. No purchasing coffee beans to roast once I run through my remaining stash of unroasted beans.

Terms and conditions: Don’t be a nitpicker. Assert.IsTrue(true); isn’t the kind of test I’m talking about!  Make a solid effort to at least show some good tests. I don’t expect perfection, but I do expect a good shot.  No more than three contributions per evangelist per month.

Don’t get started on how this is only one tiny piece of the puzzle, or how we shouldn’t rely on Microsoft to do all our thinking for us, or … <insert_fave_argument_here>. I’m all over all those issues.  However, changing our .NET industry will take time. This is just one small kick in the rear to try and get that change happening a bit faster.

Wednesday, April 22, 2009

Nice Acceptance Test Framework: Cucumber

I’ve spent some time over the last month fooling around with using Cucumber to write some acceptance tests for bits and pieces of the next version of Community Server. Cucumber’s great advantage is its lovely expressive grammar – a clear grammar for testing is critical to my view because it helps ensure developers, analysts, and the customer are all on the same page with how the system should behave.

For instance, we need to ensure a role has the appropriate permissions set for it. In this case, the Site Members role, by default, has 25 separate permissions assigned to it:

I could write up a Selenium test to navigate through all this and do individual assertElementPresent or some variant on each one of those, but that would be time consuming and frankly, the test report wouldn’t be all that clear, even if I used good names for the Selenium test suite and individual cases like I do for other tests:

Flip this around. Imagine that the person owning the feature can write a simple text file with contents like this:

Feature: Default Member Permissions in a Public Open Group
  In order to ensure the system is properly secured
  As a site administrator
  I want to check that roles are assigned 
    the correct default permissions for Public Open Groups
  
  Scenario: Check default permissions for the Members role
    Given I created the PermTest group as a Public Open group
    When I examine the Members role for the PermTest group
    Then the total number of Granted Permissions should be 25
    Then Granted Permissions should include Blog - Create Comments
    And Granted Permissions should include Blog - Read Posts
    And Granted Permissions should include Forum - Attach Files Locally
    And Granted Permissions should include Forum - Attach Files Remotely
    And Granted Permissions should include Forum - Create New Threads
    And Granted Permissions should include Forum - Post Replies

That snippet clearly states the goal of the Feature, plus it gives an exact scenario to test with a specific Given/When/Then set of conditions.

I can use Cucumber to run that clear language snippet through a framework and run tests against each of the “Then” conditions laid out above. (Code below) I’ll get a nice output with familiar colors (red, green) for the state of my conditions:

To me, this is just huge. I’ve got a specification written by someone who understands WHAT the system is supposed to do and HOW it’s supposed to behave. I can do a number of very cool things with that spec. First off, it can and should live in the source control repository where updates can be versioned. Secondly, I might be able to link to that item in source control from whatever project management tool I’m using – why duplicate that text in a project system when I can pull it straight in from Subversion, Git, etc. ? Finally, that expressive language is a thing of beauty for crossing the communication/understanding barriers between devs and feature owners/stakeholders.

My level of excitement around this is very, very high, in case you haven’t figured that out already.

Here’s the details of the implementation behind that spec above.  First off, you obviously need the Cucumber framework. Secondly, you’ll need Ruby.  There’s some C# examples in Cucumber, but I’ve not fooled with C# yet.

The spec above is written in plain text and saved as “MemberInAPublicOpenGroup.feature” in a unique folder.  We’re going to use Watir to handle this test, so in a folder called “support” we’ll need to have an “env.rb” file which is responsible for firing up our Watir IE instance and doing a bit of work:

require 'spec/expectations'
 
#require 'firewatir'
#Browser = FireWatir::Firefox
require 'watir'
Browser = Watir::IE
 
# "before all"
browser = Browser.new
 
Before do
  @browser = browser
  @browser.speed=:zippy #for Watir with IE only. Also try :fast
end
 
# "after all"
After do
  @browser.link(:text, "Log Out").click
  @browser.close
end

Note that I’ve got two lines referencing Firewatir commented out. I’m able to easily switch back and forth between browsers without altering my test code!

Cucumber expects the actual implementation code to follow that convention: step_definitions\<FeatureName>_steps.rb. We’ll write the actual test code in a file called “MemberInAPublicGroup_steps.rb.”

require 'spec/expectations'
 
Given /I created the PermTest group as a Public Open group/ do
    @browser.goto "http://localhost/csfunctionaltests"
    @browser.link(:text, "Sign in").click
    @browser.text_field(:id, "ctl00_bcr_ctl03_ctl07_username").set("admin")
    @browser.text_field(:id, "ctl00_bcr_ctl03_ctl07_password").set("pa$$word")
    @browser.button(:id, "ctl00_bcr_ctl03_ctl07_loginButton").click
    @browser.link(:text, "Control Panel").click
    @browser.link(:text, "Group Administration").click    
end
 
When 'I examine the (.*) role for the PermTest group' do |roleName|
    @browser.link(:text, "Dashboard").click
    @browser.link(:text, "Group Administration").click
    @browser.link(:xpath, "//div[@id='Common']/div[3]/div/table/tbody/tr/td[1]/div/table/tbody/tr[2]/td/strong/a").click
    
    
    @browser.span(:xpath, "//span[text()='PermTest']").click
    @browser.button(:xpath, "//input[@value='Edit']").click
    @browser.link(:text, "Permissions").click
    @browser.select_list(:id, "ctl00_ctl00_ctl00_OuterTaskRegion_TaskRegion_TaskRegion_TaskRegion_ctl02_ctl02_GroupRoles_RoleList").select(roleName)
end
 
Then /^the total number of Granted Permissions should be (\d+)$/ do |numGrantedPermissions|
    selectListItems = @browser.select_list(:id, "ctl00_ctl00_ctl00_OuterTaskRegion_TaskRegion_TaskRegion_TaskRegion_ctl02_ctl02_GroupRoles_listGrantedPermissions").getAllContents.length
    selectListItems.should == numGrantedPermissions.to_i
    
end
 
Then /^Granted Permissions should include (.*)$/ do |permissionName|
    @browser.element_by_xpath("//select[@id='ctl00_ctl00_ctl00_OuterTaskRegion_TaskRegion_TaskRegion_TaskRegion_ctl02_ctl02_GroupRoles_listGrantedPermissions']/option[text()='" +permissionName+ "']").should_not be_nil
 
end

The main parts here are the blocks for Given, When, and Then. Cucumber looks for those blocks, then grabs the regular expressions after those keywords. Matching blocks are executed and asserts/expectations are checked. Passing expectations means the item is written back to the screen in green; failures in red.

Keep something in mind here: This particular _step and feature is using Watir to test at the UI level. There’s no reason whatsoever that you couldn’t use this tool for testing at the integration or even unit level. Joe O’Brien, wicked smart guy driving EdgeCase around, said via Twitter that they’re using Cucumber at all sorts of different levels in their testing.

There are some cons to consider: you can still have an implementation disconnect if the dev writing the _steps file does something wrong. If you’re at the UI level then you’re also hostage to the pains of Selenium, Watir, Firewatir, etc. I continue to run into troubles with timing, but I’m working around those.

One tip: When you’re first starting out, add a line in your scenario which should fail. When you run the feature through Cucumber you ought to see a red line. If not, you’ve goofed up something in your step implementation. I learned this the hard way…

Use something like this

Scenario: Check default permissions for the Members role
  Given I created the PermTest group as a Public Open group
  When I examine the Members role for the PermTest group
  Then the total number of Granted Permissions should be 25
  Then Granted Permissions should include Blog - Create Comments
  And Granted Permissions should include Blog - Read Posts
...
  And Granted Permissions should include THIS SHOULD FAIL

to generate this:

This has saved me some time after some initial self-inflicted wounds.

I’m still evaluating this, and I’ve not wrapped it into any automated builds or CI reporting process. I’ll pass on updates as we continue to explore this.

Monday, April 06, 2009

VS Missing TestDriven.NET’s “Test With” Menu

Problem: The “Test With” menu from TestDriven.NET isn’t showing up in Visual Studio’s context menu when you’re right-clicking in a test file. No debugging, no coverage, no other goodies. Bah Humbug!

Solution:

  1. Rename "%USERPROFILE%\AppData\Roaming\Microsoft\VisualStudio\9.0\1033\CmdUI.PRF" *.bak
  2. Start Visual Studio 2008
  3. Check the box the the left of TestDriven.Net on the 'Add-in Manager' dialog

Use “VisualStudio\8.0” if you’re using Visual Studio 2005.

Thanks to Jamie Cansdale, TDD.NET’s author, for reaching out to me directly in e-mail with this solution!

Thursday, April 02, 2009

Twitter Poll Results: Favorite Visual Studio Add Ons

Last night I posed the question on Twitter: Aside from ReSharper, what are your favorite add ons for Visual Studio?  Below are the responses – it’s a great list of tools which can really boost your productivity. Note that I asked to exclude ReSharper because I would have gotten a huge number of replies endorsing it!

Thanks to everyone who responded!

  1. Ivan Zhakovchemodax@JimHolmes Ctrl+Enter should help.about 5 hours ago from web in reply to JimHolmes

  2. Richie Hindlerichiehindle@JimHolmes Favourite Visual Studio addin: http://entrian.com/source-s... (partly 'cos it's great, and partly 'cos I wrote it. 8-)about 6 hours ago from web
  3. mgrovesmgroves@JimHolmes GhostDocabout 10 hours ago from PockeTwit in reply to JimHolmes
  4. Dan Hounshelldanhounshell@JimHolmes MRU Cleaner, Start Page Killer, TestDriven.NET, VisualSVNabout 10 hours ago from twhirl in reply to JimHolmes

  5. Rachel AppelRachelAppel@schambers @jimholmes +1 Visual SVN rocks!about 10 hours ago from web in reply to schambers

  6. Steve Hornstevehorn@JimHolmes Copy as HTML for blogging code snippets.about 10 hours ago from TweetDeck in reply to JimHolmes

  7. Sean Chambersschambers@JimHolmes visualsvnabout 10 hours ago from TweetDeck in reply to JimHolmes

  8. George Mauertogakangaroo@JimHolmes CodeRush Refactor Pro TestDriven.NET AnkhSVN but that's boring. Fun one: CR_ClassCleanerabout 10 hours ago from web

  9. Brian GenisioBrianGenisio@JimHolmes TestDriven.NETabout 10 hours ago from Tweetie in reply to JimHolmes

  10. Steve Schoonsteveschoon@JimHolmes CodeRush/Refactorabout 10 hours ago from web in reply to JimHolmes

  11. Steve Wrightunderwhelmed@JimHolmes CodeRush, Resharper Pro, VisualSVN, Copy to HTMLabout 10 hours ago from twhirl in reply to JimHolmes

  12. Steve J WallaceSteveJWallace@JimHolmes Gallio, AnkhSvn, CodeRush are the ones that pop into mind quickest.about 11 hours ago from twhirl

  13. Charlie SearsCharlieSears@JimHolmes VisualSVNabout 11 hours ago from twhirl in reply to JimHolmes
  14. Michael Eatonmjeaton@JimHolmes ViEmuabout 11 hours ago from twhirl

Here’s the list of add ons I’m currently a big fan of:

  • Cool Commands 4.0: It’s undocumented and you have to use a hack to get it in to VS 2008, but it’s a great set of commands to pimp up VS
  • GhostDoc: I work hard to make methods, classes, and parameters extremely clear when I name them. GhostDoc helps me get XML comments for APIs quickly built from those good naming practices.
  • VisualSVN: Just started using it, but I love it.
  • CopyAsHtml: It’s undocumented, and the bits for VS 2008 are hidden away or hacky, but it’s da bomb for pasting formatted code snippets.  Currently I’m using the Code Formatter for WLW for blog snippets. (See this post for great CSS additions.)
  • ReSharper: Can’t emphasize the goodness of this.
  • TestDriven.NET: Ultimate in low-friction test running.
  • CodeRush: I don’t use its templating. What I get from it are terrific visualizations of code, plus IN YOUR FACE! metrics for cyclomatic complexity on every method in the file in front of you. Absolutely something you should have in place if you’re trying to keep your codebase in order.
  • Visual NDepend add-in: Again, a great tool for quickly figuring out where your codebase needs attention.

There’s empirical data that I’m a tool whore, so you can imagine my list of widgets goes on quite a bit longer than this; however, these (at the moment!) are a few of my favorites.

Wednesday, March 18, 2009

Book Review: The Art of Lean Software Development

The Art of Lean Software Development by Curt Hibbs, et. al. Published by O’Reilly, ISBN 0596517319.

This is a concise work weighing in at around 120 pages.  Its point is to give people a 30,000 foot overview of many things relating to Lean software development, and it’s absolutely targeted to technical and business decision makers who are trying to learn a bit about how they can benefit from Lean.

The problem with the book’s approach is that the authors fly past points so quickly that there’s not enough serious discussion of the crucial topics central to Lean. I also think the authors spent the majority of the book covering topics which aren’t specific to Lean. I’m all over source control, continuous integration, test driven design/development, etc., but these are fundamentals for many other methodologies or approaches. The authors don’t spend enough time hitting hard the concepts of eliminating waste, tight cycles, etc.

Worse yet, in the authors’ attempts to give only high-level coverage of concepts they do a bad job of describing some critical issues.  As an example, I screamed, literally, when I found this passage in their section on Reuse Existing Software:

Software reuse exists in many different forms, each of which affects codebase size differently:
  • Copying source code from one component to another reduces coding time and debugging, but it actually increases codebase size. 

Dudes. Really. Copy and Paste development is awful for so many reasons, and increase in codebase size is utterly the last issue you should be talking about when discussing why you should never do it. Instead, focus on the impact of copy/paste on code complexity, violation of DRY principles, the loss of clarity, increased dependencies, and the replication of bugs throughout your codebase.

This isn’t an awful book, and the authors generally did a good job laying out the material. The problem is a lack of focus and a sacrifice of vital information in an attempt to turn an introduction to Lean into some sort of 30 minute infomercial.

I’d much rather point folks interested in Lean to Tom and Mary Poppendieck’s Lean Software Development or their follow-on Implementing Lean Software Development for a great introduction as well as solid details on adopting Lean. Folks interested in the broader Agile topic should run, not walk, and grab Shore and Warden’s The Art of Agile Development.

Tuesday, March 17, 2009

Central Ohio Day of .NET Registration Open!

Mike Wood has the registration open for the Central Ohio Day of .NET!

The event’s on 18 April at the Roberts Centre in Wilmington, smack dab in the middle of Dayton, Columbus, and Cincinnati. Lots of great speakers, lots of great attendees, lots of great discussions, lots of great content.

Keep in mind that we’ll be doing Open Spaces in addition to a bunch of great formal sessions. Open Spaces give you a great chance to have some highly valuable, unique discussions with your peers. Got a topic you’re interested in? Bring it up. Got a problem you’re looking for help on? You may find a solution! More details on the Open Spaces at the CODODN’s opening remarks.

Monday, March 16, 2009

April Speaking Gigs

I’ve got a semi-busy April lined up with talks at three events in the region:

4 April: .NET University in Grand Rapids, MI. I’m really pushing my own comfort zone by giving an extended workshop on .NET Fundamentals (200 level). Being the non-conformist I am I’ll be diverting lots of it to discuss my views on Lean, craftsmanship, and general software development lifecycle. Plus, being the tool whore I am, I’ll talk about all kinds of gadgets and widgets. Hopefully I’ll still have a few left in the audience by the time I’m done…

18 April: Central Ohio Day of .NET in Wilmington, OH. I’ll be doing a session on Acceptance Testing with Selenium.

25 April: Kalmazoo X Conference in, wait for it, Kalamazoo, MI. Michael Eaton and friends were foolish enough to give me a podium for my Leadership 101 talk plus my Three Tips for Improving Your Development Process gig.

Monday, March 09, 2009

Another .NET University Coming Up!

Chris Woodruff (AKA “Woody”) is putting on a .NET University in Grand Rapids on 4 April. Chris got inspired by the .NET U that I helped Jeff organize last year, and I’m excited to see another one firing off here in the region!

I’m even more excited because I’ll be presenting a 2.5 hour session on Intermediate .NET. There’s no session abstract yet, but this will be 100-level content around the following topics:

  • Managing your development environment
    • Extending Visual Studio with add-ons
    • MSBuild basics
    • Continuous Integration overview
  • Introduction to Generics
  • Introduction to LINQ
    • LINQ to XML
    • LINQ to SQL
    • LINQ to objects
  • Good sense in Software Engineering
  • Some next steps in self-improvement

That topic list will likely change as I finish up building the session over the next few weeks, but that’s what it’s shaping up to be.

.NET University events are a great thing. They’re a different beast than the code camps or Days of .NET we put on elsewhere. They’re not for regular community members who have some solid skills already, they’re for those folks who are new to .NET, thinking about getting in to .NET, or might even be new to development.

Spread the word if you’re in the western Michigan area and are interested!

Subscribe (RSS)

The Leadership Journey