Giant Robots Giving Me Flashbacks.

Posted by trevor Mon, 07 Jan 2008 23:00:12 GMT

This morning I checked my feed reader and was instantly transported back to 1992, when I was working for a small independent software vendor.

So please indulge me while I tell you a little bit about the company, what I learned, and what brought it all rushing back.

The (un-named) Company

At its peak I believe there were close to 200 people actively developing, porting and translating the company’s software. The remaining 300 people (including me) did support, sales and training.

The product itself was enormous and ran on hundreds of versions and flavors of Unix. In fact, the company was so good at development and porting that they often entertained visitors from other independent software vendors who were desperate to learn how to do it well.

Even though my job allowed me to do some development and customization work, my primary role was a post-sales support engineer. I was desperate to be a ‘proper’ software developer so I enthusiastically attended any “brown bag lunch” talks that had to do with core product development.

Two of those talks, given one week after the other, are still fresh in my mind 15 years later.

Week 1

The first was a talk given by the company’s Chief Architect on the topic of “Object Orientation and C++”.

Now, I had no formal development training and this was my first ‘real’ industry job so I have no idea how popular “Object Orientation” was at the time for the industry as a whole. Of course, today it’s pedestrian. But at the time, in that room, it was revolutionary.

Inheritance, public, private… my head was spinning. It wasn’t just a new syntax, it was a different way of approaching the problem.

In my beginner’s mind, there was just no contest between K&R C and C++. I instinctively understood object-oriented code – it was virtually self-documenting.

This talk was very well received and I can remember ranting to a colleague: “It just makes sense! If you want to talk to a printer you just create a Printer object. Here’s the functions you can call, here’s the stuff you can’t touch.”

Week 2

The very next week, the lead software developer for the company gave a talk on “Object Orientation, C++ and [Company Name]”.

Boy was I stoked. I expected to learn about how the propellerheads were going to retool everything (back then I didn’t know how frightful that idea is) for C++.

The talk was shocking and confusing. For a solid hour he ripped into the ideas that had been presented in the previous week, knocking them down one by one.

I can paraphrase his talk like this:

There is nothing that C++ offers that well-written K&R C doesn’t offer.

If you name your structs, variables and methods correctly then your intentions will be communicated just as effectively as using C++ syntax.

If you want to bind functions to data then put function pointers in structs.

Any programmer worth his salt will have a solid set of practices for software development based on K&R C and there is no point moving to a new language for features that you either don’t need or already have available.

Move along, nothing to see here.

He didn’t say “it’s not a good fit for this company”, or “yeah, we should look at in more depth when C++ is more pervasive”. He said “it simply has no merit”.

This talk was also very well received and again I can remember ranting to a colleage: “What is wrong with these guys? Can’t they see how much simpler Object Orientation is?”

Week N

A few years later the company did move to C++ for a completely new generation of their main product offering.

They attempted the “big rewrite”, expecting to recapture the features and lessons learned from years of work on a mature codebase and reproduce it in C++ (with a six month deadline).

I’ll never know whether they would have survived the schedule slippages and cost overruns on that project. They bet the farm on Unix and almost overnight they lost their market, and all prospect for growth, to Microsoft Windows and Office.

By 2000 most of the company’s assets had been sold off and the only mention of [Company Name] on the web was someone offering support contracts for the now-dead software.

A Little Perspective a Lot of Years Later

Aside from getting to witness first-hand the dangers of “the big rewrite” very early in my career, the most indelible marks were left by those talks back in 1992 and by the efforts to knock down C++ and “Object Orientation”.

It took me a long time to understand the negative reaction.

It would be a disservice to say that the lead developer “just didn’t get it”. He was a gifted developer, able to slice through tricky problems like butter. I admired his code for its clarity and succinctness and I read as much of it as I could. When I did, I always learned something valuable.

So why did I, a complete newb with hardly any experience at all, see something beautiful in Object Orientation, while he could not?

Because I was a complete newb, with hardly any experience at all – that’s why. Writing code was a struggle for me and I had to work hard to translate my mental-models into code. Anything that made that easier was a godsend.

The lead developer, on the other hand, was fully tooled-up. Expressing his intentions in code was simple and natural in K&R C. He didn’t need any new language constructs or syntax to help him conceptualize solutions. I can understand why he felt that C++ had nothing new to offer him.

But I think on the day he gave his talk he missed something important. It’s all just syntax and language constructs. Whether you can do something with tool X or language Y doesn’t address whether it’s natural to do so.

Saying “there is nothing that C++ offers that well-written K&R C doesn’t offer” isn’t the point. Sure you can put pointers to functions in a struct, but how much more natural does it feel to just define a method for an object? When you’re staring at a blank screen and about to start coding, does the syntax implicitly nudge you in the right general direction?

If you were a beginner, would this new syntax seem natural to you? Would it speak to you?

Even with 15 years of hindsight I’m not sure I know how I would have convinced him to disregard his hard-won K&R skills and techniques and to evaluate “Object Orientation” and C++ with a beginner’s mind.

I think I struggle with it because he was right to reject C++ for the company at that time, but the reasons he gave (that you could achieve the same thing in K&R C) were wrong.

So why the flashback today?

Over on the Giant Robots blog there is a discussion going on about BDD. It’s entitled “Not Worth It”. The names may have changed but it’s the same debate I witnessed in 1992.

And all I can think to do, when presented with guys that are fully tooled-up with TDD and Test::Unit skills and just see BDD and RSpec as (paraphrasing) “just another syntax to achieve the same results” is to say “let me tell you about a couple of ‘brown bag lunch’ talks I attended back when I first started out”.

Comments

  1. Tammer Saleh said about 15 hours later:
    This is absolutely the best response to that post that we've gotten so far. I'm not sure that completely agree with the analogy, though. OOP via C++ was much further removed from procedural programming via C than BDD is from TDD. The differences between rSpec and bare Test::Unit are huge, and fantastic in a syntactic sense, but I'm not sure I see a real philosophical difference. I guess I still feel that the distinction between BDD and TDD is mostly one of hype.
  2. Ted Henry said 5 days later:
    Please write a post explaining why you think BDD and TDD are so different and why BDD is so much better. I like the simplicity of TDD and the sugar in BDD syntax is too sweet. I don't see the benefit.

(leave url/email »)