Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Re: Worst thing you ever made with Perl

by delirium (Chaplain)
on Sep 28, 2003 at 22:45 UTC ( #294822=note: print w/replies, xml ) Need Help??

in reply to Worst thing you ever made with Perl

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.

  • Comment on Re: Worst thing you ever made with Perl

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://294822]
and the web crawler heard nothing...

How do I use this? | Other CB clients
Other Users?
Others imbibing at the Monastery: (4)
As of 2021-03-01 05:03 GMT
Find Nodes?
    Voting Booth?

    No recent polls found