web counter

WTF Refactoring

by The Cranky Product Manager on November 5, 2008

in Development

Scene: War Room. 2 days until Code Freeze.

LEAD DEVELOPER:
So, unfortunately, we’re going to have to pull FavoriteFeature out of the release in order to meet the schedule.

THE CRANKY PRODUCT MANAGER:
Huh? That feature’s been in the product for 3 releases now. Customers love it. Why do we have to pull it?

LEAD DEVELOPER:
Well, we had to refactor the code, but unfortunately we just don’t have the time to write unit tests.

THE CRANKY PRODUCT MANAGER:
Why do you need new unit tests? Can’t you just use the old ones?

LEAD DEVELOPER:
We can’t. We don’t have them.

THE CRANKY PRODUCT MANAGER:
Why?

LEAD DEVELOPER:
Because they weren’t working with the new code.

THE CRANKY PRODUCT MANAGER:
(pause)
Refactoring means cleaning up the code while preserving existing functionality, right?

LEAD DEVELOPER:
Yes…

THE CRANKY PRODUCT MANAGER:
(pause)
So, if we’re preserving existing functionality, why did all the old unit tests fail?

LEAD DEVELOPER:
Well, I, uh…. Well, …while the guys were in there modifying, you know, the CODE, well, they, uh, figured they could, uh…, well…, add some stuff to create some WICKED cool Hologram broadcasting stuff. It affected the old tests.

THE CRANKY PRODUCT MANAGER:
(pause)
First, Hologram what? That’s not in the backlog!

LEAD DEVELOPER:
We thought it would be cool.

THE CRANKY PRODUCT MANAGER:
No one agreed to it or even discussed it! Seriously, dude, what the effing eff!?

LEAD DEVELOPER:
 (looks at his shoes)

THE CRANKY PRODUCT MANAGER:
Second, how can you look me in the eye and call this refactoring when you SO did NOT preserve existing functionality? The Cranky Product Manager calls BULLSHIT. You did a rewrite or rearchitecture or whatever, in a risky piece of code without telling anyone, and then you try to claim it’s a “refactor”. How the FRAK is the Cranky Product Manager ever to believe you again when you tell her you’re refactoring something for readability and ease of future maintenance?!? Do we need group reviews of your code on a daily basis to make sure you’re not slipping Warp Drive into the product?

LEAD DEVELOPER:
(looks at someone else’s feet)

THE CRANKY PRODUCT MANAGER:
Third, can you tell me what the POINT of even having unit tests IS, if all you do is DELETE them when they fail?

LEAD DEVELOPER:
(Looks at watch)

THE CRANKY PRODUCT MANAGER:
(Sweet smile)
And forgive me for pressing on this point, but you’ve said, and I quote, ‘John McCain will reform the way Wall Street does business….’  Can you give us any more examples of McCain’s leading the charge for more oversight? … Specific examples in his 26 years of pushing for more regulation?

LEAD DEVELOPER:
Well, I’ll try to find you some and I’ll bring them to ya!

CPM smiles genially, then slowly pulls every single last hair from her head.

Be Sociable, Share!

{ 12 comments… read them below or add one }

1 Tsahi Levent-Levi November 6, 2008 at 12:36 AM

How would you categorize the lead developer in your 7-types-of-engineers?

Reply

2 The Cranky Product Manager November 6, 2008 at 12:41 AM

As a wannabe hotshot.

Reply

3 William Pietri November 6, 2008 at 1:33 AM

This is so exactly right, CPM. Refactoring is just a set of techniques for keeping code tidy. But the word has mutated into some sort of universal excuse / infinite time sink. That’s bullshit.

If somebody claims that they had to cancel a party because they needed to spend a week tidying, then you would know they were lying. When it gets that large, it’s not tidying, it’s removing the evidence that they spent years living like a pig. If they had actually been tidying all along, there would be no problem, no canceling the party.

Similarly, if somebody said that they were just doing a bit of tidying in your living room and whoops, they took out three load bearing walls, then the right answer isn’t, “Oh, tidying is good, I guess that’s fine.” It’s to grab them firmly by their earlobe and shout, “You did what?”

So, CPM readers, if an engineer uses the word “refactor” in a way that you can’t substitute “tidy”, beat them like a rug. And if you’re shy, let me do it, as that’s a word I want to keep valuable.

Reply

4 kch November 6, 2008 at 9:47 AM

OK, I have to call bullshit on your political bullshit. Is PM for product management or political maverick, or are you just PMsing?
Don’t get all mavericky now!

More than the one big one that little Katie Couric dismissed and Palin leaned on, here are two more they didn’t know…

I don’t do policy research so there could be more, just web search…

From here:

http://www.washingtonpost.com/wp-dyn/content/article/2008/09/18/AR2008091803159.html

However, when it comes to regulating financial institutions and corporate misconduct, Mr. McCain’s record is more in keeping with his current rhetoric. In the aftermath of the Enron collapse and other accounting scandals, he was a leader, with Sen. Carl M. Levin (D-Mich.), in pushing to require that companies treat stock options granted to employees as expenses on their balance sheets. “I have long opposed unnecessary regulation of business activity, mindful that the heavy hand of government can discourage innovation,” he wrote in a July 2002 op-ed in the New York Times. “But in the current climate only a restoration of the system of checks and balances that once protected the American investor — and that has seriously deteriorated over the past 10 years — can restore the confidence that makes financial markets work.”

Mr. McCain was an early voice calling for the resignation of Securities and Exchange Commission Chairman Harvey Pitt, charging that he “seems to prefer industry self-policing to necessary lawmaking. Government’s demands for corporate accountability are only credible if government executives are held accountable as well.”

In 2006, he pushed for stronger regulation of Fannie Mae and Freddie Mac — while Mr. Obama was notably silent. “If Congress does not act, American taxpayers will continue to be exposed to the enormous risk that Fannie Mae and Freddie Mac pose to the housing market, the overall financial system, and the economy as a whole,” Mr. McCain warned at the time.

Reply

5 The Cranky Product Manager November 6, 2008 at 2:03 PM

Point taken, kch.

The CPM meant the Palin “Well I’ll try to find some and bring em to ya!” to be the punchline of the post. Why? Because that type of weak response is so typical when people have no clue or no good explanation for what they did when THEIR freakin’ JOB is to know it. So, the Lead Dev’s response was similar in the CPM’s mind.

The CPM would have felt the same about that answer if Biden or Obama or said it. It was the weakness of Palin’s response that the CPM found funny (and depressing), NOT what the true answer to Couric’s question would be.

Anyway, for this joke work (which clearly it didn’t, but whatever), the CPM had to let people know what the heck she was alluding to. And thus, she felt she had to preface it with the Katie Couric question about McCain’s reg/dereg votes.

Believe it or not, the CPM does not have a firm opinion on how good or bad McCain’s track record in the reg/dereg area is. The whole point was to give context for the joke.

Clearly, the joke didn’t work. And even if it did for some people, the CPM’s long-winded explanation right here is gonna kill it.

Rest assured, political-related humor is unlikely to appear in this blog again for at least a long time. The CPM just had to get the last little bit out of her system. Blame it on post election trauma disorder (PEST).

Reply

6 Cranky Product Mgr November 6, 2008 at 2:51 PM

Wrote new post on the hazards of so-called reFACToring. http://tinyurl.com/6nwogu .(Misspelled as reFRACtoring in last tweet).

Reply

7 Dr. Jim Anderson November 6, 2008 at 4:04 PM

So when did pulling a feature become a bad thing? Due to the time of the year, I am reminded of the line from Dr. Seuss’s “How the Grinch Stole Christmas” when the Grinch must explain why he is stealing a Christmas tree to a small Whoville girl and he does so by saying that he’s just taking it away to fix one small light, up by the top. Seems like the same could be said of a product feature: we pulled it because the next version of the feature is going to be so cool that we didn’t want to spoil the surprise.

Or something like that.

BTW: Holograms are cool, don’t knock ‘em.

- Dr. Jim Anderson
The Accidental PM Blog
“Learn How Product Managers Can Be Successful And Get The Respect That They Deserve”

Reply

8 The Cranky Product Manager November 6, 2008 at 5:04 PM

Jim, my sweet accidental product manager, the issue is not feature pulling. It’s having engineers artibratily do so on their own, with no one else’s knowledge. Remember, we’re talking about a feature that has been in the product a long time (3 releases) and that customers love. No way is pulling the feature going to go over well with the customers.

The decision of what features to include and not needs to be a thoughtful, deliberate exercise. It can’t be left to the arbitrary whims of a midnight coder who doesn’t know/care about the customer problems, the market environment, the competive offerings, etc.

Further, out of respect for the customers, it is just plain WRONG to remove a key, beloved feature without giving them advanced notice, explaining why the feature will be cut and how to work around its absence. Notifying them two days before a release ain’t going to cut it.

And of course, WHO do you think is going to have the fun job of telling the customers their feature was dropped last second or handling the irrate masses? The Lead Developer who caused this situation? No way – he’s too busy ‘refactoring’ some other piece of code somewhere. Instead, The Cranky Product Manager gets to be the whipping boy/grrl on this one.

Reply

9 The Other Eric November 6, 2008 at 5:20 PM

Get the Hotshot back by actually running the pre-release software while watching sitting in your favorite chair, watching the election returns. Wiggle your toes in glee as you listen to the speeches and file upwards of 40 P1 and P2 bug reports against the software. Not that I did that…

Reply

10 Howard Pressman November 7, 2008 at 8:46 AM

The question of whether or not it is acceptable for engineering to pull features is moot. It is obviously no, without the express written consent of the team. (been there, sux)

What amazes me, and is completely inexcusable is why all of this was masked until 2 days before code freeze. Something has to be done to fix this and reprimand the team from keeping secrets, or else this will result in chaos and you will never have predictability, or the ability to ever control your own product. (been there, really really sux so much that I had to find another job)

Reply

11 Kerry November 10, 2008 at 11:31 AM

I got the joke, and yes, even without the context of McCain’s statement last March that he is always for less regulation, it’s still funny because it’s a weak cop-out response that someone gives when they HAVE no resonse.

Fortunately, the developers in my company are pretty good about coding to the specification requirements, and not adding or removing things on a whim. We have more trouble with this when we work with outside vendors – their developers have been more prone to do this. Recently we made requests to many of our vendors that we don’t want to work with certain developers that have a history of this type of thing, so hopefully that should help.

Reply

12 Helene Barrette February 9, 2009 at 4:16 PM

@adam_edmonds @robtyrie @gregfenton must read http://tinyurl.com/5gtvvj

Reply

Leave a Comment

Previous post:

Next post: