View Single Post
Unread 09-19-2002, 04:00 PM   #38
airspirit
Been /.'d... have you?
 
airspirit's Avatar
 
Join Date: Jul 2002
Location: Moscow, ID
Posts: 1,986
Default

This reminds me of an assignment I had in an early CS class. The instructor was extremely full of himself, even though he was lacking in understanding of the language he was teaching (a Fortran guy teaching an introductory C course). He gave an assignment early on that required that we took as input a 3-15 digit number and output it completely reversed. He recommended that we use the % operator and various math techniques to do it. At this point we hadn't covered strings or arrays, so that SHOULD have been the only way to do it. Seeing the loophole, I wrote the entire program (excluding an #include call and the main() function) in one extremely ugly and convoluted line of code that included all of the calls and definitions for the variables. Even though the solution was perfectly correct (and quite a bit more efficient), he got his panties in a bunch because I didn't use his method. After he demanded I do it "right" I rewrote it using strictly math and when printed, the code (including comments) was over 30 pages long (imagine 10-20 lines of comments per line of code). The sad part was that when it all boiled down to it, he just didn't understand what I had done and went nuts. There is a trap that over-dependance on equations and methodology will snare you in. We can talk about laminar layers and the mineral content of the coolant and the gravitational pull of the moon on the system until we're blue in the face, but if you use the same radiators and blocks with the same pump and assorted other gear, most of those things don't have any bearing on this particular situation. The issue is that they cancel out completely and you're left with a very few things that will have an effect. I'm sure, through physics, the fact that I haven't been laid in the last couple of hours will have some effect on the efficiency of my water cooling equipment (the minor raise in air temperature from excessive calorie consumption on my part, for instance) but as long as I'm equally "frisky" before each experiment, that particular effect will cancel out in both systems. Sometimes we put in too much effort in trying to get to the bottom of a situation because a textbook says to, even when it is completely unnecessary. I guess that was my whole point. It is easier and most of the time more effective to write the one line of targetted code rather than the 30 pages of redundancy.
__________________
#!/bin/sh {who;} {last;} {pause;} {grep;} {touch;} {unzip;} mount /dev/girl -t {wet;} {fsck;} {fsck;} {fsck;} {fsck;} echo yes yes yes {yes;} umount {/dev/girl;zip;} rm -rf {wet.spot;} {sleep;} finger: permission denied
airspirit is offline   Reply With Quote