If only there were a function for this



  • Below is some representative Perl (yeah I know, TRWTF) written by a colleague of mine:



    [code]
    my $WEEKDAY=date +%A;

    chomp($WEEKDAY);



    my $DATE=date +%y-%m-%d;

    chomp($DATE);



    my ($Y, $M, $DOM) = split(/-/, $DATE);
    [/code]



    The entire thing is like this: shell escapes everywhere followed by a bit of Perl to do something that could have been done just as easily in Bourne Shell, or is only necessary because he's calling out to the shell and then has to post-process the output, rather than just using the functions and modules that Perl provides.



  • Ugh. Probably the only reason this pile of dung got accepted, is because computers have become so gddmn fast that a couple of hundred forks and execs are unnoticeable.



  • @Vanders said:

    Below is some representative Perl (yeah I know, TRWTF) written by a colleague of mine:



    <font face="Lucida Console" size="2">
    my $WEEKDAY=date +%A;

    chomp($WEEKDAY);



    my $DATE=date +%y-%m-%d;

    chomp($DATE);



    my ($Y, $M, $DOM) = split(/-/, $DATE);
    </font>



    The entire thing is like this: shell escapes everywhere followed by a bit of Perl to do something that could have been done just as easily in Bourne Shell, or is only necessary because he's calling out to the shell and then has to post-process the output, rather than just using the functions and modules that Perl provides.

    Clearly the content of the backquotes should be stored in XML config files in case the script is "ported' to a different O/S.



  •  Not enough use of $_ for my liking!



  • @Speakerphone Dude said:

    Clearly the content of the backquotes should be stored in XML config files in case the script is "ported' to a different O/S.
    Which of course should be stored into a SQL DB and retrieved using a sproc. Yes I've seen it done.



  • @Mole said:

    @Speakerphone Dude said:
    Clearly the content of the backquotes should be stored in XML config files in case the script is "ported' to a different O/S.
    Which of course should be stored into a SQL DB and retrieved using a sproc. Yes I've seen it done.

    Not so fast, John von Turing: I'm the Chief Architect on this project! This is only gonna work if the XML is stored in a MySQL database which has its datadir on a FUSE filesystem backed by an Oracle database. That way it's scalable.

    Don't talk back. We've already bought the Oracle licenses.


    On a completely unrelated note: have any of you guys tried the mozz sticks at Chili's? That's where the Oracle sales people took me for lunch. They even sprung for a thirty dollar bottle of peanut gree-gee-o; I think it's French. I've never felt so alive.



  • @morbiuswilters said:

    We've already bought the Oracle licenses.

    This is the norm nowadays, it's called VOA (Vendor Oriented Architecture)

    @morbiuswilters said:

    On a completely unrelated note: have any of you guys tried the mozz sticks at Chili's? That's where the Oracle sales people took me for lunch. They even sprung for a thirty dollar bottle of peanut gree-gee-o; I think it's French. I've never felt so alive.

    Definitely "free as in free beer" - the real bill will come later when you try to get relevant information on the OTN...



  • @Speakerphone Dude said:

    the real bill will come later when you try to get relevant information on the OTN...

    OTN? Is that the new martini bar the Oracle people promised to take me to?



  • @morbiuswilters said:

    @Speakerphone Dude said:
    the real bill will come later when you try to get relevant information on the OTN...

    OTN? Is that the new martini bar the Oracle people promised to take me to?

    When they invite you to spend a week in Monte-Carlo to view a product demo, and they fly you first class (Air France, not Continental), put you in a 5-star hotel that comes with a bathroom hooker and coke on the living room table, and give you a line of credit in the casino, then you can say that it was worth bringing in Oracle. A martini for years of hair-pulling and nervous system disruption? Not a good deal.



  • @Speakerphone Dude said:

    @morbiuswilters said:
    @Speakerphone Dude said:
    the real bill will come later when you try to get relevant information on the OTN...

    OTN? Is that the new martini bar the Oracle people promised to take me to?

    When they invite you to spend a week in Monte-Carlo to view a product demo, and they fly you first class (Air France, not Continental), put you in a 5-star hotel that comes with a bathroom hooker and coke on the living room table, and give you a line of credit in the casino, then you can say that it was worth bringing in Oracle. A martini for years of hair-pulling and nervous system disruption? Not a good deal.

    If FOSS bought me hookers I'd be right there on the front lines, extolling its virtues and picking the scraps of food out of Stallman's beard that his helper monkey missed.



  • @morbiuswilters said:

    @Speakerphone Dude said:
    @morbiuswilters said:
    @Speakerphone Dude said:
    the real bill will come later when you try to get relevant information on the OTN...

    OTN? Is that the new martini bar the Oracle people promised to take me to?

    When they invite you to spend a week in Monte-Carlo to view a product demo, and they fly you first class (Air France, not Continental), put you in a 5-star hotel that comes with a bathroom hooker and coke on the living room table, and give you a line of credit in the casino, then you can say that it was worth bringing in Oracle. A martini for years of hair-pulling and nervous system disruption? Not a good deal.

    If FOSS bought me hookers I'd be right there on the front lines, extolling its virtues and picking the scraps of food out of Stallman's beard that his helper monkey missed.

    I'm not sure I'd want an "Open Source" hooker, I'll be honest.



  • @Vanders said:

    I'm not sure I'd want an "Open Source" hooker, I'll be honest.

    But what if you need to branch her?



  • @serguey123 said:

    @Vanders said:
    I'm not sure I'd want an "Open Source" hooker, I'll be honest.

    But what if you need to branch her?

    What does that even mean? You can just plug in open-source-y words, they have to actually make sense to make a proper joke.



  • @serguey123 said:

    @Vanders said:
    I'm not sure I'd want an "Open Source" hooker, I'll be honest.

    But what if you need to branch her?

    "Fork" would have been better.



  • @Vanders said:

    I'm not sure I'd want an "Open Source" hooker, I'll be honest.

    Dude, it's just like real life: nobody uses the Open Source ones* so they have fewer viruses.


    • Probably because, like Open Source, they are hideous to look at. But you're not marrying the gal, just trying to crank one out.


  • @blakeyrat said:

    @serguey123 said:
    @Vanders said:
    I'm not sure I'd want an "Open Source" hooker, I'll be honest.

    But what if you need to branch her?

    What does that even mean? You can just plug in open-source-y words, they have to actually make sense to make a proper joke.


    So... not like Open Source Software?

    If you read the tag it makes more sense, Morbs got the right idea

    @morbiuswilters said:

    "Fork" would have been better.

    Yeah, blame my sucky english


Log in to reply
 

Looks like your connection to What the Daily WTF? was lost, please wait while we try to reconnect.