How to copy a file... or NOT!!!



  • So i have a new project I am working on, and I came across this process that seems to... well, not always work properly.

    The original developer needed to get some data from one server to another. The data is in a dbase table. So this is what the developer dreamed up.....

    1) Send request via http to a server that I need some data
    2) The server gets the request
    3) Selects the requested data form the table
    4) Exports the table structure and data to a plain old flat text
    5) Reports back that its done
    6) The main application then ftp’s the txt file from one folder to another (on the same machine)
    7) Converts the flat txt file back to a table
    8) And voila… we can now use the table we need.

     when i understood what was going on, and after my initial WTF's i ended up with WTF & OMFG

     



  • @chj124 said:

    So i have a new project I am working on, and I came across this process that seems to... well, not always work properly.

    The original developer needed to get some data from one server to another. The data is in a dbase table. So this is what the developer dreamed up.....

    1) Send request via http to a server that I need some data
    2) The server gets the request
    3) Selects the requested data form the table
    4) Exports the table structure and data to a plain old flat text
    5) Reports back that its done
    6) The main application then ftp’s the txt file from one folder to another (on the same machine)
    7) Converts the flat txt file back to a table
    8) And voila… we can now use the table we need.

     when i understood what was going on, and after my initial WTF's i ended up with WTF & OMFG

     


    Indeed. The lack of a wooden table in the process is outrageous.



  •  Needs more

    • Cowbell
    • Screenshots
    • Spam


  • @chj124 said:

    I came across this process that seems to... well, not always work properly.
    Out of morbid curiocity what's the problem when it doesn't work properly?



  • @chj124 said:

    The main application then ftp’s the txt file from one folder to another (on the same machine)

    Was this process at some stage split up between multiple machines? And how old is it? Given the lack of XML I am thinking that this entire process has grown organically rather than suffering from a lack of intelligent design



  •  I have some PHP coders around here and I'm affraid they'll pull out something like this. For the moment:

    • They use Dreamweaver for coding PHP
    • They know nothing about PHP debuggers (they think none exist)
    • Have never used a LAMP environment (uh oh, linux is hard... what does 'cp' do?)

     I'm really affraid because if their shit hits the fan I'm the only one able to support it and I'm sure I'll find something like this somewhere.



  • @chj124 said:

    So i have a new project I am working on, and I came across this process that seems to... well, not always work properly.

    The original developer needed to get some data from one server to another. The data is in a dbase table. So this is what the developer dreamed up.....

    1) Send request via http to a server that I need some data
    2) The server gets the request
    3) Selects the requested data form the table
    4) Exports the table structure and data to a plain old flat text
    5) Reports back that its done
    6) The main application then ftp’s the txt file from one folder to another (on the same machine)
    7) Converts the flat txt file back to a table
    8) And voila… we can now use the table we need.

     when i understood what was going on, and after my initial WTF's i ended up with WTF & OMFG

     
    I see this a lot in the old code I took over.  It seems to come from people who can't figure out parameters and return values.


  • @ubersoldat said:

    They use Dreamweaver for coding PHP

    Well then MAKE THEM STOP, because otherwise you are completely and utterly fucked. Don't you know that DreamWeaver has a built-in reality distortion field that turns anything non-design-related done in that app into shit?

    @Jaime said:

    @chj124 said:

    So i have a new project I am working on, and I came across this process that seems to... well, not always work properly.

    The original developer needed to get some data from one server to another. The data is in a dbase table. So this is what the developer dreamed up.....

    1) Send request via http to a server that I need some data
    2) The server gets the request
    3) Selects the requested data form the table
    4) Exports the table structure and data to a plain old flat text
    5) Reports back that its done
    6) The main application then ftp’s the txt file from one folder to another (on the same machine)
    7) Converts the flat txt file back to a table
    8) And voila… we can now use the table we need.

     when i understood what was going on, and after my initial WTF's i ended up with WTF & OMFG

     
    I see this a lot in the old code I took over.  It seems to come from people who can't figure out parameters and return values.

    You need to find these people, and you need to prevent them from ever writing code again, no matter what it takes.



  •  In some way, that's clever. I can honestly say that I would never have thought of doing anything that way.



  • @DOA said:

    @chj124 said:

    I came across this process that seems to... well, not always work properly.
    Out of morbid curiocity what's the problem when it doesn't work properly?

    curiosity for atrocity ? count me in.


  • @toshir0 said:

    @DOA said:

    @chj124 said:

    I came across this process that seems to... well, not always work properly.
    Out of morbid curiocity what's the problem when it doesn't work properly?

    curiosity for atrocity ? count me in.
     

    Given all the cats curiosity has allegedly killed, I think calling it an atrocity is entirely appropriate.


Log in to reply