I enjoyed “strong statements” in Shannon Behrens’ SF Ruby talk tonight. I didn’t agree with all of them, but not vehemently so. I do strongly agree with the following.

  • Not all tests have the same value
  • Some tests don’t provide enough value to justify their existence
    • perhaps they take too long to write
    • perhaps they are too brittle
    • perhaps they test things that you don’t actually care about
  • Blackbox testing the behavior of code by using its public interface is much more valuable than whitebox testing its implementation
  • A strong emphasis on testing is no substitute for good design (attributed to Yehudah Katz)
  • Not testing error handling code is as bad as not writing error handling code
    Exploratory testing by someone else is crucial

Shannon states that “integration tests have more value than unit tests.” I would say instead that some unit tests that rely heavily on mocking have a high risk of not achieving their goals, and in these cases integrations tests have more value. (For example, I typically test Rails controllers through integration tests rather than unit test.) However, when a class is relied upon as the foundation for my app, unit tests for that class are more valuable than integration tests because they help me find and fix bugs faster than the integration tests. But I agree that integration tests are essential.

Over the past year I’ve taught about a dozen sessions of Ruby language or Ruby on Rails programming classes. I’ve been using a combination of presentation, live coding demonstration, follow along with irb (Ruby’s interactive scripting environment) and test-first teaching exercises. I’ve reflected on what works well and experimented with curriculum and teaching style modifications for the sections where students struggled. I’ve found a sequence which works very effectively. I believe it could be applied to teaching any programming language, and perhaps to teaching anything.

  1. Conceptual Overview A presentation of the concept: why it is important, what it can do, how it works. How it fits into the bigger picture (if applicable). Pictures and diagrams are great here.
  2. Experimentation (Play) My goal in this section is to create a feeling of play… at best, with grown-ups, I think I’ve achieved a sense of experimentation or, perhaps, what the Talent Code calls “deep practice”
  3. Demonstration of a Real-World Example A live coding demonstration that solves a real problem. I often use this as an opportunity to test-drive the example, which illustrates the concept from two angles: the test (expectation) and implementation.
  4. Simple hands-on exercise Test first teaching examples where the student is given a test that fails and they have to apply what they just learned to write code and make the test pass.

This was the context of my talk tonight at the East Bay Ruby Meetup. I talked about teaching methodologies, demonstrated a test-first exercise, then talked about moving on to test-driven development.

Slides posted:

It was amazing to have lunch today with Angie Chang of Women 2.0 and Bay Area Girl Geek Dinners and Jen-Mei Wu who is currently working with me at Blazing Cloud.
Angie, Jen-Mei and me
Since I’ve been working with Jen-Mei, she has spent most of her time at Honk and it was a treat to spend some time talking about our different experiences as software developers and swap stories of running our own businesses. We all brainstormed techniques about how to support more women as engineers and as founders of companies.

We talked about pros and cons of having a specific social network for women. Angie pointed out that a lot of networks and resources already exist — can we leverage those? Is it just that women don’t take advantage of what is available to them? Does everyone know how willing successful women (or really most people) are to have a conversation with someone seeking advice? Do people know how you can really go far if you are just willing to ask for what you need/want?

We all had read the book Women Don’t Ask and Angie had the idea to give one to every attendee at the next Girl Geek Dinner if she can find someone willing to sponsor the initiative. I think that would be just the thing to have an impact.

I talked about my hopes and aspirations for the SF Ruby Workshop project. I am so excited by the volunteers who are stepping up to lead workshops this year. Having read The Starfish and the Spider: the unstoppable power of leaderless organizations and inspired and encouraged by the men and women in the Ruby community, I believe that we can really make this thing self-replicating, provide opportunities for new leaders while drawing more women into (or back into) software development. I feel like there are some great stories that should be told and that we could do a better job of getting the word out. Angie suggested that post asking if anyone is interested in taking on social media / marketing. Doh! so… any one out there wanna help? It wouldn’t take a lot of work to make a big difference!

Lots of other ideas percolating from today’s meeting. It is inspiring to be in the company of other awesome women pursuing similar goals.