• (cs)

    OMG! ..can't.....think....straight..... ~ instant digression...

    Getting tired of typing the same responses in your forum software?

    Get ready for eDUMP (an esteamed part of the Trusted Grunt Network)!

    Click one of the following response titles along with appropriate eTAGS and let the software take care of the rest!

    eDUMP Titles:
       "The real WTF is..."
       "Brillant!"
       "No WTF!"
       "Needs XML!"
       "That Dang Forum Software"
       "This just needs a little rework"
       "First!"
       "But I was wearing the juice!"
       "I can see the logic, but still agree it's a WTF"
       "Enterprise, can you here me?"
       "Web Version X!"
       "OMG!"
       "Now I'm A-noid!" :-P
       "I'm a Pepper, You're a Pepper, ..."

    eTAGS
       Include:
          Sarcasm - Biting or Witty?
          Charisma - Sprinkled on or Dripping with?
          Bashing - Choose from OS, Programming Language, Database, or Nationality!

    Get your eDUMP going today!

  • EVOL (unregistered) in reply to RJ

    The real WTF is that <font face="Courier New">$check</font> will ALWAYS equal 1, because you used the assignment operator <font face="Courier New">=</font>, instead of <font face="Courier New">==</font>.

  • ishkandar (unregistered) in reply to GalacticCowboy

    Ooi !! Stop shooting those animals !! What a waste of good meat !!

  • Slacker (unregistered) in reply to Mr_Daemon

      Not to be picky, but wouldn't ps waux | grep [s]quid | awk '{print $2 }' | xargs kill -9 have worked as well?

  • SuperDave (unregistered) in reply to RJ

    I think you should rewrite all of the text manipulation scripts into one long obfuscated C function.  With the code on one line.

    Just for the hell of it.

  • Rube Goldberg (unregistered)

    I resent this entire discussion.

    -Rube

     

    Jake Vinson:

    Ahh, The Incredible Machine.  What a great video game.  A basketball would roll down the slope, hit a bucket attached to a rope which was networked through a complex system of pulleys, pulling a lever that would turn on a motor, sending a conveyor belt in motion, carrying a baseball into a seesaw connected with string to a gun that shoots a cat in the face.

    Shooting a cat in the face, incidentally, is more humane than subjecting an innocent developer to a horrible, Rube-Goldbergian system that our poor friend RJ had to maintain.  I'll step aside and allow him to explain.

    Now I like Unix as a concept as much as the next techie, but one set of shell scripts left by a predecessor gave me a whole new appreciation for how much work some will do to imagine they are working in the Unix tradition:

    I had just taken over as IT Director (read: developer and administrator) of a small web-based company which provided online money transactions (similar to systems developed by another company whose name rhymes with "Hey, pal"). One of the main daily processes was an ACH banking script that had to run once a night to read all pending transactions and actually transfer the "real banking" money behind the online fund activity. I had been asked to update this code for our DBMS migration, and the anxious look on the Operations Manager's face struck a death knell of fear into me. Apparently, this script had taken weeks to produce, and was the most revered "mission critical" piece of the system. I was a little intimidated, what with the serious nature of banking transfer and all that.

    After a few questions, I began to piece together how this thing actually worked: once a day the manager (a non-technical employee) would log into the main Linux server *as root*, cd to a directory inside /usr, run a certain shell script, and pipe the output to the Unix 'mail' utility to email it to his own desktop. From there, he would copy the text into Wordpad, make sure all formatting was correct, and then run that classic Windows dial-up console, Hyperterminal. He would dial the bank system, log in, and finally paste the ACH text from Wordpad into Hyperterminal to finalize the transactions.

    I was already counting on both hands the number of failure points in this system when I decided to have a look at the shell script. Did I say script? No, it turned out to be a collection of scripts. Now, ACH is a simple fixed-length batchfile structure. You have a header, a group of individual transaction records, and then a footer. A simple matter of querying the database and piecing together the values, right? Nothing could have prepared me for what I saw.

    The first script would build an SQL query and then 'cat' that string to a text file. Then it would run a second script which piped *back in* that SQL query from the textfile, running the query in the database, and outputting the query results (in console form with "|" delimiters and all) to another text file. Then that script would run another script to cat the query results to yet another script that ran a series of calls to various Unix text-processing utilities: 'grep' that, 'sed' this, 'awk' the other, creating another SQL script for the individual record subquery, pipe those results to text *also* to be parsed, trimmed, padded, calculated, etc... In the end it created at least 8 different text files in the process, and then *finally* ran a script that combined these text files into the complete ACH batch format. And by the way, there was not a single comment in any of these scripts. I realized I was facing nothing less than a complete rewrite. Then I pondered: hmm... doesn't SQL have text manipulation functions? Doesn't it have LPAD, RPAD, concatenation operators, etc... On thinking it through, this whole thing could be done with a 10 line script running 3 SQL queries. But that wouldn't be very Unix-ish, would it? Did I mention that the person who did this took weeks...?

  • Ahmed (unregistered)
    Jake Vinson:

    Ahh, The Incredible Machine.  What a great video game.  A basketball would roll down the slope, hit a bucket attached to a rope which was networked through a complex system of pulleys, pulling a lever that would turn on a motor, sending a conveyor belt in motion, carrying a baseball into a seesaw connected with string to a gun that shoots a cat in the face.

    Shooting a cat in the face, incidentally, is more humane than subjecting an innocent developer to a horrible, Rube-Goldbergian system that our poor friend RJ had to maintain.  I'll step aside and allow him to explain.

    Now I like Unix as a concept as much as the next techie, but one set of shell scripts left by a predecessor gave me a whole new appreciation for how much work some will do to imagine they are working in the Unix tradition:

    I had just taken over as IT Director (read: developer and administrator) of a small web-based company which provided online money transactions (similar to systems developed by another company whose name rhymes with "Hey, pal"). One of the main daily processes was an ACH banking script that had to run once a night to read all pending transactions and actually transfer the "real banking" money behind the online fund activity. I had been asked to update this code for our DBMS migration, and the anxious look on the Operations Manager's face struck a death knell of fear into me. Apparently, this script had taken weeks to produce, and was the most revered "mission critical" piece of the system. I was a little intimidated, what with the serious nature of banking transfer and all that.

    After a few questions, I began to piece together how this thing actually worked: once a day the manager (a non-technical employee) would log into the main Linux server *as root*, cd to a directory inside /usr, run a certain shell script, and pipe the output to the Unix 'mail' utility to email it to his own desktop. From there, he would copy the text into Wordpad, make sure all formatting was correct, and then run that classic Windows dial-up console, Hyperterminal. He would dial the bank system, log in, and finally paste the ACH text from Wordpad into Hyperterminal to finalize the transactions.

    I was already counting on both hands the number of failure points in this system when I decided to have a look at the shell script. Did I say script? No, it turned out to be a collection of scripts. Now, ACH is a simple fixed-length batchfile structure. You have a header, a group of individual transaction records, and then a footer. A simple matter of querying the database and piecing together the values, right? Nothing could have prepared me for what I saw.

    The first script would build an SQL query and then 'cat' that string to a text file. Then it would run a second script which piped *back in* that SQL query from the textfile, running the query in the database, and outputting the query results (in console form with "|" delimiters and all) to another text file. Then that script would run another script to cat the query results to yet another script that ran a series of calls to various Unix text-processing utilities: 'grep' that, 'sed' this, 'awk' the other, creating another SQL script for the individual record subquery, pipe those results to text *also* to be parsed, trimmed, padded, calculated, etc... In the end it created at least 8 different text files in the process, and then *finally* ran a script that combined these text files into the complete ACH batch format. And by the way, there was not a single comment in any of these scripts. I realized I was facing nothing less than a complete rewrite. Then I pondered: hmm... doesn't SQL have text manipulation functions? Doesn't it have LPAD, RPAD, concatenation operators, etc... On thinking it through, this whole thing could be done with a 10 line script running 3 SQL queries. But that wouldn't be very Unix-ish, would it? Did I mention that the person who did this took weeks...?

  • William (unregistered) in reply to Derek

    Yes, I quite frequently run across people, especially in the Unix environment, who believe that everything must be done the complicated way. In fact, if I suggest an easier way to do it, I am looked at as someone who clearly doesn't know what they are talking about. I don't know what it is, I just take it that most people either don't know what they are doing, or are specifically trying to make it complicated, so that that they look smart for having figured out a complicated process.

  • Kinsey (unregistered)

    i hate it

  • erci (unregistered)

    this site suck it

  • aaron (unregistered)

    i hate life

  • aaron (unregistered)

    i hate life

  • aaron (unregistered)

    i hate life

  • nina (unregistered)

    i hate this site

  • K-nubbz (unregistered)

    I admire Rubes designs they look very fun and easy at the same time.

  • Steve Urkel (unregistered) in reply to Shakes

    Nah. Even Perl isn't that bad. Don't get me wrong, I hate Perl as much as anyone, but this sounds even worse - it sounds like shell scripts.

    Why do things in tedious, roundabout and inelegant ways (such as Perl or shell scripts) when they can be done in half the number of lines (and coding time) in a proper scripting language like Python.

  • Frodo Baggins (unregistered) in reply to RJ
    RJ:
    6. Code in about half of the PHP files had about 5 or 6 (or 7) spaces between lines. I guess someone wanted to inflate their LOC.
    Blank lines do not count towards LOC.
  • Joey (unregistered) in reply to ParkinT
    ParkinT:
      Scripts that call other scripts ad infinitum...WHOA!!

    #!/bin/sh $0 & exec $0

  • virtualinemn (unregistered)
    Comment held for moderation.
  • Russellcow (unregistered)
    Comment held for moderation.
  • codeiherbEncub (unregistered)
    Comment held for moderation.
  • promojep (unregistered)

    It is a pity, that now I can not express - there is no free time. But I will be released - I will necessarily write that I think.

  • Williamcap (unregistered)
    Comment held for moderation.

Leave a comment on “More Rube Goldberg design”

Log In or post as a guest

Replying to comment #:

« Return to Article