Common nightmare



  • If not for this website, I don't think I would have been prepared for this.

    PHP code base

    Sequential/non-object oriented

    Documentation - 6 page MS word doc

    1 Website docroot = 1.2+ Gigabytes of repeated text/code

    Includes everywhere and sometimes 10 links deep

    A good example -> 4-6 page long code with outdated comment header, no other comments

    Except "//END OF FILE"

     

     

    What went wrong?  1 programmer who was overworked/overloaded, poor coding discipline, and suddenly a successful product led to a code snowball that eventually turned into the scariest goddamn thing I've dealt with this year.
     



  • We fell with you. You are strong, stronger than this WTFness. You can do it.



  • Not to bash PHP programmers (I actually like PHP a lot myself) but I once worked with a PHP only programmer who didn't know what the 'function' keyword was for.  He seriously did not see any use for it.



  • Makes me think of another situation where everything was in one file, brought me back to my time as a kid learning basic.  Seriously though these people need to RTFM!



  • As far as WTFness goes, this isn't bad. Except for the includes 10 links deep... brrr! And 1.2 GB of code. Are you sure it's all code? No heavy Photoshop files left in the 'images' directory?

    It does seem sometimes that PHP developers are the direct descendents of those old time BASIC programmers, or people who make entire applications out of shell scripts. And PHP seems to practically want to punish you for wanting to use objects. Well, maybe it's not that bad. But the OO was tacked on in version 4 or 5, and PHP developers seemed to take it as an unwanted intrusion. 

     Six pages of documentation? You got six whole pages?! You lucky, lucky bastard...
     



  • @Ion9 said:

    Documentation - 6 page MS word doc

    I can beat that. I had a total Cowboy Methodology project where my boss gave me a single hand-written page of notes that made up the "requirements" for the system.



  • [quote user="R.Flowers"]It does seem sometimes that PHP developers are the direct descendents of those old time BASIC programmers, or people who make entire applications out of shell scripts. And PHP seems to practically want to punish you for wanting to use objects. Well, maybe it's not that bad. But the OO was tacked on in version 4 or 5, and PHP developers seemed to take it as an unwanted intrusion. [/quote]

     

    I wrote C and Java before I got into PHP, which I've been using for the last two years at work.  However, I just discovered that PHP5 doesn't properly free objects for re-use by the OS until script shutdown.  Which means any sufficiently complex object-based CLI script will eat up all the memory on your server.  The best part is the folks over at PHP.net think this is a total non-issue, 'cause they seem to think no one could possibly want to keep a PHP script running for more than a few seconds.

    We're abandoning PHP for Perl.



  • [quote user="djork"][quote user="Ion9"]

    Documentation - 6 page MS word doc

    [/quote]

    I can beat that. I had a total Cowboy Methodology project where my boss gave me a single hand-written page of notes that made up the "requirements" for the system.[/quote]

     Luxury!  In my day, my mum and pop would give me requirements in the form of an ELIZA program!
     

    Me:
    What are the requirements for the system?

    Eliza: Does that question interest you?

    Me: I need to know how the system works.

    Eliza: Why do you want to know what the system works?

     

    And that was if I was lucky! 



  • [quote user="Colin McGuigan"]

    Me:
    What are the requirements for the system?

    Eliza: Does that question interest you?

    Me: I need to know how the system works.

    Eliza: Why do you want to know what the system works?

     

    And that was if I was lucky! 

    [/quote]

    You got off easy.  I had Eliza tell me once that she hated me and my mother. 



  • [quote user="merreborn"]


    However, I just discovered that PHP5 doesn't properly free objects for re-use by the OS until script shutdown.  Which means any sufficiently complex object-based CLI script will eat up all the memory on your server.  The best part is the folks over at PHP.net think this is a total non-issue, 'cause they seem to think no one could possibly want to keep a PHP script running for more than a few seconds.

    We're abandoning PHP for Perl.

    [/quote]

    That would explain a bug I recently spent a few hours working around.  I had a PHP data-importer script, and a 40 GB dataset to import into a database.  The PHP importer, if run directly on the dataset, would use up all available memory after about an hour and crash, having imported less than 0.1% of the dataset.  My fix was to write a Perl script that would break up the dataset into thousand-record chunks and run the importer on those.  Still took ten days to import the data, but at least it kept memory leakage down to a sensible level.



  • [quote user="djork"][quote user="Ion9"]

    Documentation - 6 page MS word doc

    [/quote]

    I can beat that. I had a total Cowboy Methodology project where my boss gave me a single hand-written page of notes that made up the "requirements" for the system.[/quote]

     

    You got written notes?! a whole page?

     

    Lucky bastard. 



  • [quote user="merreborn"]

     However, I just discovered that PHP5 doesn't properly free objects for re-use by the OS until script shutdown.  Which means any sufficiently complex object-based CLI script will eat up all the memory on your server.  The best part is the folks over at PHP.net think this is a total non-issue, 'cause they seem to think no one could possibly want to keep a PHP script running for more than a few seconds.
    [/quote]

    This must be specific to PHP5.  In my last place of work we had several PHP4 processes running 24/7 for months on end. 

     



  • [quote user="R.Flowers"]

    It does seem sometimes that PHP developers are the direct descendents of those old time BASIC programmers, or people who make entire applications out of shell scripts.

    [/quote]

    PHP is definately the 'gateway' language into programming that basic was in the past.  Its very productive and easy enough for newbies to pick up.  I've seen some really atrocious PHP code being spit out by college kids who considered themselves programming 'gurus'.  But, on the other hand, I've seen some really excellent object oriented, professional PHP applications created by experienced developers. 

     

     



  • [quote user="Ion9"]

    What went wrong?  1 programmer who was overworked/overloaded, poor coding discipline, and suddenly a successful product led to a code snowball that eventually turned into the scariest goddamn thing I've dealt with this year.
    [/quote]

    Are you working for... oh, wait, 6 pages of MS Word documentation.

    I never wrote documentation on that project.

     



  • [quote user="djork"]

    I can beat that. I had a total Cowboy Methodology project where my boss gave me a single hand-written page of notes that made up the "requirements" for the system.

    [/quote]

    I have on two occasions - from different clients - received a digital picture of a whiteboard in my email when I asked for their proposed system's requirements.

    But I honestly don't know if a 640 by 480 JPEG beats a single handwritten page or not. Anybody have the list handy?

     



  • [quote user="CDarklock"]

    [quote user="djork"]

    I can beat that. I had a total Cowboy Methodology project where my boss gave me a single hand-written page of notes that made up the "requirements" for the system.

    [/quote]

    I have on *two* occasions - from different clients - received a digital picture of a whiteboard in my email when I asked for their proposed system's requirements.

    [/quote]

     You should type up your proposal, put it on a wooden table*, take a picture of that, and send it back.

     [quote user="CDarklock"]

    But I honestly don't know if a 640 by 480 JPEG beats a single handwritten page or not. Anybody have the list handy?

     [/quote]

     The real WTF is that they got their camera in a Happy Meal.

     

    * I know - everyone's jealous that I got there first. 


Log in to reply
 

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