isn't quite ashamed enough to present

jr conlin's ink stained banana

2003-04-21

::Code Stupid

Can i ask a favor of you? Can you try not to be clever when you code?

i'm in the process of trying to reform a module for work. The change is actually pretty simple, but i'd like to test it out to make sure that things work correctly. Unfortunately, that's far from simple.

In order for me to test what's going on, i need to bounce back and forth between two directories (one of which inexplicably has templates located beneath the code instead of oh, say, where the other templates are) decipher if i should call "dall" or "t_all" (i actually need to call both of them it turns out), and generally spelunk through reams of code only to discover that the only way for me to apparently test my change is to make it available on production servers. Live.

This is generally not what "Testing" is for.

i'm quite sure that the code itself is very clever and able to do all sorts of things, but you know what? i'm not using a stitch of it. It fails my simple need to display a modified form on a back end machine.

You know what would be an even more clever way of coding?

How about a simple way to have a program list the various views available in a given target directory, allow a toggle to display locally or remotely and use function names like "debug_all" or "test_display_all" instead of cryptic shit. This means that your clever efforts won't be erased by the next person who doesn't feel like trying to figure out just how clever you were.

i still think that anyone brought into a company should have to spend a minimum of six months doing maintenance on other people's code. Let them discover what a real pain in the ass "clever" coding really can be and why simple, straight-forward design is far more elegant than popshifting variables on an unlabled hash you're accessing as an array.

(And people wonder why code optimizers are flakey…)

Hey, delicious user, Save This Page
Blogs of note
personal that's my blog
(The Official Blog of the Internet)
memoirs of hydrogen guy matthew shepherd (quebec) rhapsodic.org j$ (right) Henriette's Herbal Blog fanatical apathy lynne ydw i iconophobia slumbering lungfish
geek Y!Cool Thing michael j radwin jeremy z
(The Official Website of the Internet)
dave's picks ultramookie Josh Woodward derek balling j$ (left) simon willison Yahoo! Search Blog
news ars technica search engine watch webmaster world.com
forums uh.net man-man killroy & tina

experimental

Firefox search plugins for Yahoo!

My Living Room media box config

The Official "Official" Registry of the Internet

Powered by WordPress
Hosted on Dreamhost.
And Steveo's page is Totally Fucking Awsome.