Beefy Boxes and Bandwidth Generously Provided by pair Networks
Perl: the Markov chain saw
 
PerlMonks  

comment on

( #3333=superdoc: print w/replies, xml ) Need Help??
The worst thing I ever coded in Perl was also done for the worst reason: avoiding doing my job. I worked in a call center that had a web page showing how long each CSR had been in their current state (on a call, in idle, available to take a new call). It was organized alphabetically by CSR name, and refreshed every 10 seconds using an ASP link to an Aspect database.

My code telnetted to the web server on port 80 using Net::IO, Net::Socket, or something like that, manually issued an HTTP get command, retrieved the response into an array, and rewrote the page to sort by who had been available to take a new call the longest (i.e., when your name was at the top of the list, you would get the next call).

Naturally I shared it with a couple buddies, and we would all wait until our name got close to the top, then put our phones in idle, and then back into available, moving us down to the bottom of the list again.

Management caught on eventually, but I had the foresight to add in useful tracking information, like each CSRs ratio of available+call time to idle time, total number of inbound and outbound calls, etc. These are stats that CSRs needed, but would normally have to take their phone out of available in order to view. I had it on a web page, and it would help out the call center by not having CSRs need to stop working to check their times, calls, etc. So I was praised instead of repremanded/fired.

Anyway, the code. Scheisse. The whole thing was wrapped in a while(1) loop with a sleep(10) at the end, and ran on Active state Perl on my Windows 98 machine. It had no way to recover from a timeout connecting to the web server, and I had to share a folder on my local drive so that people could access the re-written HTML file as //curtis's machine/web stuff/stats.html. Between my poor coding, Win 98 lockups, and my machine taking constant share hits in addition to its other duties, the thing was down almost as much as it was up.

I eventually abandoned the project and the maintainer of the page I was stealing added my stats to his page. After that I had to start doing my job again.

That was about 4 years ago. My code is much better now, and so is my job.


In reply to Re: Worst thing you ever made with Perl by delirium
in thread Worst thing you ever made with Perl by Juerd

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post; it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others lurking in the Monastery: (3)
    As of 2021-03-01 03:06 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      No recent polls found

      Notices?