The Clean Code Blog

by Robert C. Martin (Uncle Bob)

The New CTO

06 September 2012

“So, what did you think of that?” I asked as we sat down at our regular table in the cafeteria. As I scanned the other tables in the lunchroom I could see that many other teams were leaning in to their conversation and speaking in semi-hushed tones. The normally light-hearted lunchtime banter had been replaced with a new intensity.

“It started pretty well.” said Jasper. “I mean he was nice enough at first, introducing himself as the new CTO and all.”

“Yeah, but then it started to get weird.” said Jasmine. “I mean, how dare he imply that we’re not behaving professionally? We’ve been working our asses off!”

Jerry shook his head and said: “Yeah, on the other hand, you’ve got to admit that the last few releases haven’t gone so well. I mean, he was right about the schedule slips and defect rates and all.”

“The last few releases…” I blurted, “…you mean the last few dozen! Hell, it’s embarrassing! I think it’s been over a year since any of the business analysts or testers have even made eye-contact with me.”

“Yeah, OK, so things haven’t been perfect”, Jasimine responded, “but he didn’t have to call us ‘unprofessional’. He didn’t have to say our releases were ‘shit’!”

Jasper looked up from his salad and said: “Well, he didn’t really say it quite that way. He said that from now on we are all going to behave as professionals. And then he said: ‘We will not ship shit!’ I, for one, would like to stop shipping shit.”

“Yeah, me too.” Jasmine retorted. “But we’ve got deadlines! It’s not our fault that we have to rush all the time.”

“Yeah, but did you hear what he said about that?” I asked “He said that from now on he expected honest estimates, and that he expected us to say ‘No’ if we thought something couldn’t be done.”

“If we did that, “ Jasmine shot back, “we’d be saying ‘No’ every damned day!”

“Well maybe we should.” said Jerry, staring ahead at nothing. “Maybe we always should have. Maybe that’s been the problem. Maybe the reason we’ve been shipping shit (and it has been shit) is because we’ve been saying ‘Yes’ all the time.”

“Or: ‘We’ll try.’” said Avery. “We’re always promising to try, as though that’s going to change anything.”

Jasmine slammed her fork down on the table. “Well we’ve got to say something to get those managers off our backs!”

“Maybe we should just tell them the truth and stick to it.” said Jerry. “That’s what he was saying, wasn’t it? He just wants us to tell the truth. I think that might just be a good idea.”

Jasper changed the subject. “Did you hear how the QA folks cheered when he said that QA should find nothing? What a hoot that was.”

“How in hell is that supposed to work?” asked Jasmine angrily. She picked up her fork and started jabbing it towards Jasper. “Are we supposed to write the system and test it? How are we going to get anything done on time if we have to do it right all the time.”

Jasmine froze with the fork still pointing at Jasper. Her eyes were wide in astonishment, and then disbelief. Everyone else fell silent for a second or two just staring at her. Then her face got red as she lowered her fork, looked away, and mumbled: “Yeah. Well, … yeah. Maybe we ought to be doing it right all the time. Maybe…”

Avery broke the spell. “Did you hear him say that stuff about going fast and going well?”

“Yeah,” I said, and I assumed a posture imitating the new CTO. “(ahem) The Only Way To Go Fast, Is To Go Well!”. Everyone chuckled.

“Do you think that’s true?” Avery asked. “Do you think we’ll go faster if we write better code?”

“Well,” Said Jasper. “I know I’ve been slowed down by some of your bad code, Avery. And your’s Jasmine. Hell, just yesterday I was slowed down by my own bad code.” He flashed that toothy grin at us.

“Yeah, yours is the worst, Jasper.” Jerry said as he used a spoon to launch a grape at him.

Jasper picked up a tomato slice and feigned a throw back at Jerry, but then he smiled and put it back in his bowl. Everyone laughed for a second. Even Jasmine smiled.

“And then there was that thing about covering for each other.” Jasper continued.

“Yeah, that was cool.” I said. “It was like he wanted us to know a lot about each other’s work so that if one of us gets sick, or goes on vacation, the rest of us can pick up where they left off.”

Jerry reached over and nudged Jasmine on the shoulder: “Yeah, Jasmine, remember that time you took a week of leave and none of the rest of us even knew where your source directories were? It took us nearly the whole week just to find them.”

“Yeah… That was a bad release.” said Jasper. Everyone nodded. …Even Jasmine.

“And what was that bit about being afraid of the code?” asked Jasper.

“You know exactly what that was.” Jerry said. “We don’t clean our code, because we’re afraid that if we do we’ll break it, and then we’ll be in trouble.”

“Yeah,” replied Jasper, “he said that was really unprofessional…”

The conversation lulled and we all just stared at our plates for a few seconds.

“OK”, said Jasmine. “So how are we going to do all these things he said he expects of us? It’s not like he told us how. I mean… What was the list, anyway?”

We all grabbed our notes and scribbled a list on our napkins. Jasmine gathered all the napkins and assembled a final list.

“OK, here’s the list of things he expects:”

  • QA will find nothing.
  • We will cover for each other.
  • We will make Honest Estimates.
  • We will say ‘No’.
  • We will not be afraid of our code.
  • The only way to go fast is to go well.
  • We will not ship shit.

“That wasn’t everything.” I said.

“No, but it’s enough for now.” Jasmine shot back. “So, how do we actually do these things he expects.”