"Can't you just..." -or- there are no simple obvious answers

petdance on 2002-09-06T19:55:49

I grate my teeth any time I hear a sentence that starts ``Can't you just?'' If those words come out of your mouth, stop and think. You're missing something important.

``Can't you just'' is usually said when discussing a problem with someone else. The other person will explain the problem, and you'll jump in with the handy, simple and obvious answer. Some examples:

In each case, someone has a complex problem, with the not-very-helpful suggestion of an obvious, quick-win solution. The suggester has undoubtedly not taken all the issues into account. The response in each case will be one of the following:

It's extremely rare that a complex problem has a simple solution, or that the simple solution doesn't have far-ranging side effects. Running an extension cable adds to the rat's nest of cabling in the server room, or the user flag will soon have to be a set of flags that become a maintenance headache, or the Linux server causes problems in an all-NT shop.

As programmers, we're used to doing magic and making things work right. As Perl programmers, especially, we are Lazy and Impatient, and expect the problem to be easily solved. However, if someone has been struggling with the problem for a while, the chances that they've missed an obvious, painless solution are small. It's also somewhat insulting to presume that the answer is right there in front of the person, unseen. Rephrase ``Can't you just'' as ``Have you not noticed that the obvious solution is to'', and you'll see what I mean. You're probably not that much better of a problem-solver than the other person.

There's nothing wrong with being helpful when colleagues are faced with a problem. Just keep the enthusiasm for your solution balanced with a healthy amount of skepticism, and expect that they're not blind.


Wow

jdavidb on 2002-09-06T20:17:55

This is destined to become a classic essay. I think I'll be referring people here often.

The dangers of 'just'.

pdcawley on 2002-09-07T05:48:45

Whenever I hear myself saying 'just ...' I have to check myself. Either what I'm proposing is blindingly obvious or (more commonly with me I'm afraid) it comes at the end of a long chain of thought. "So... after all the aggro and grief of reblessing other people's objects into managed classes and keeping track of things using a couple of address index hashes and some careful DESTROY methods, we realised that we can use sv_magic to hang and arbitrary scalar off an arbitrary object, then we just stick our out of band information in that and the GC problem goes away".

Or, "So, we just rewrite that Sieve routine not to take the square root of the upper bound, and it works in constant time!" Or, "It's simple, you just use the float and trowel and apply the plaster smoothly and quickly to the wall", "Photographic composition is just a matter of knowing where to stand and where to put the edges"...

On the flip side..

dws on 2002-12-06T19:53:59

I've worked with many bright people who love to tackle complex problems. Quite often they pull out the "complex problem" label too early, missing semi-obvious easy solutions. Or they're reaching for an excuse to try out a design pattern they just read about, making the problem much more complex in the process. (This seems to be less of a problem know than it was for the first two years Design Patterns was on the streets.)

Part of my jobs as a Project Manager is to vet people's proposals and designs, which often means asking a set of "Can't you just ..." questions (which are better phrased as "Have you considered ...", or "Wouldn't it be simpler to ...", or, in some cases "Are you sure you're solving the right problem?"). And yes, this often reveals more about the complexity of the problem. But the "D'oh!" yield is more than enough to pay off for asking stupid questions.

And it helps to have made a lot of mistakes.