0

Forcing your solution on a problem

Deep thoughts

There is a something that I think many of us are guilty of from time to time. When you become proficient in a particular language or technology, it is very tempting to want to apply your tool of choice to solve whatever problem that comes along, even if a more objective perspective might show that there is a far more appropriate solution.

My Uncle John is in town visiting from New Hampshire, so I stopped at my parents' house yesterday after work to chat with him for a bit. He and my father have at least 60 years of combined electrical engineering experience, and it is always interesting to me how many parallels there are between the problems and solutions in their industry when compared to the problems and solutions that I experience in software development. My uncle was talking about the problem of choosing the solution before you understand the problem, and how designer engineers often try to force their particular niche into circuitry design, whether it is the right solution or not. Obviously as a programmer I have seen the same behavior, and have certainly been guilty of it myself. He told me that when doing presentations, he has often told this story:

"So last night I was on my way out to the parking lot and I came across this guy under the big light out there. He was down on his hands and knees looking around. When I asked what he was doing, he told me that he had dropped his keys and was looking for them. Having a few extra minutes I figured I would help out so I asked him 'OK, how big of a radius are we looking in here?' while spreading my arms out in the area he was looking. The guy looked up kind of perplexed and said 'No, the keys are over there...' pointing across the lot '... but the light is much better over here'."

It didn't matter what the problem was. The guy had his solution whether it fit or not. I think it is healthy for us to remind ourselves not to fall in that trap.

 

Cozmo said:
 
Excellent point! Here is an example that I ran into. A few years ago I was parsing out a 20+ meg XML file and sticking it into a database. I wrote a script to do it in CF, it being my favorite language. Well, CF sucked up 700+ megs of ram (the server had 512) and the server ran for ½ hr before it keeled over and locked up. So I tried it using PHP, my second favorite language, and that took 10 minutes It only took up 20 megs of ram but it pegged the processor and took 10 minutes to run. The app had to run in a shared hosting environment so that was out of the question.

Then I did some research and ended up writing an ActiveX script for SQL Servers DTS. Well, the ActiveX script ran in under a second and used almost zero ram. It was literally a tiny little blip when you looked at it in Task Manager.
 
posted 1031 days ago
Add Comment Reply to: this comment OR this thread
 
Aaron Longnion said:
 
I agree and am also guilty of this... but for me it's partially cuz I don't have a CS degree or background, and I haven't really done much in Java, .NET, or certainly not any C+, etc. My experience is with CF 5-7, classic ASP (ugh), and a little dabbling in other things. But while I'm thinking of it, I do like to try to get the DB (SQL Server or Oracle is my only experience) to do some of the hard work when it makes sense; and as we know, some folks (including me) have been guilty of trying to make CF unnecessarily do all the work.

Thank Uncle John for the excellent analogue. And thanks for the thought-provoking post!
 
posted 1031 days ago
Add Comment Reply to: this comment OR this thread
 
 
This is a test comment. Sorry for the email notification.
 
posted 1031 days ago
Add Comment Reply to: this comment OR this thread
 
Rob Wilkerson said:
 
You going Jack Handy on us? Can we expect more of these? :-)
 
posted 1028 days ago
Add Comment Reply to: this comment OR this thread
 
 
It is such a rare event in which I have a complete and at least semi-coherent thought. I thought it was worth documenting.
 
posted 1028 days ago
Add Comment Reply to: this comment OR this thread
 
Rob Wilkerson said:
 
Lucidity, even if infrequent and random, is always a treat.
 
posted 1028 days ago
Add Comment Reply to: this comment OR this thread
 
MAULIKI said:
 
MY SON JOHN HAS JUST JOINED MY FAMILY BUSINESS RECENTLY AFTER COMPLETING HIS BACHELOR DEGREE IN BUSINESS MANAGEMENT.DURING THE FIRST WEEK I CAAL HIM AND SAID THAT I M OBSERVING THAT U R TOO NICE TO PEOPLE, I KNOW THAT THEY TAUGHT U THAT HUMAN BEHAVIOUR STUFF,BUT IT DOESNT WORK HERE.I REMEMBER THAT DOING HAWTHORN STUDIES WE ALL GET EXCITED BUT THERE IS MORE TO MANAGING PEOPLE THAN JUST BEING NICE TO THEM.

WHAT IS UR COMMENT ON THIS ?
DO U THINK I INTERPRETED THE HAWTHORNS STUDIES CORRECTLY ?
 
posted 960 days ago
Add Comment Reply to: this comment OR this thread
 

Search

Various Links

HikeTheCanyon.org - Rim-to-Rim hike of the Grand Canyon.
Dave Shuck on Twitter - Follow me on Twitter.
Scriptalizer - Minify your Javascript and CSS