Last minute geek

last minute tech news from around the net

Saturday, Jun 23rd

Last update01:00:00 AM

You are here: English WTF CodeSOD: Robotic Implementation

CodeSOD: Robotic Implementation

User Rating: / 0

Pearl’s employer couldn’t find an off-the-shelf product that handled their call-center needs, so they developed one in house. One department didn’t want to use that front-end, so they developed a different one in house, but it still used the same backend… mostly. Another group did the same thing, adding some fields and extending the database. And then another.

Then there was an organizational restructuring, and suddenly the call-center reps found themselves in the annoying position of needing to do double- or sometimes triple-entry, in order to get all the right columns and fields filled out based on the current business rules.

Now this is a textbook example of where one might want to engage in some business process improvement: identify the actual needs of the organization, and implement software suited to those needs (chucking out any legacy kruft that you don’t need). Doing this, of course, takes some work, it takes some analysis, and it takes an organization willing and ready to make changes.

Pearl’s organization was not ready and willing to make changes. Instead, one of the PHBs had recently read an article on “robotic process automation”, which is a fancy way of saying, “we’re gonna screen-scrape using a fancy drag-n-drop workflow tool.” Instead of spending time and money training the in-house developers to use the tool, the company could outsource it to a much cheaper team that already had experience.

Now, one-size-fits-all drag-n-drop scripting usually fails on the difficult edge cases, and Pearl’s company had lots of difficult edge cases. No problem, the offshore team could just write some C# scripts to do the job, and call them from the workflow tool.

This is the script CheckFallingDate.cs which does… something.

DateTime PaymentDate = Convert.ToDateTime("10/05/2016");
string strPaymentDate = PaymentDate.ToShortDateString();
DateTime P = Convert.ToDateTime(strPaymentDate).Date;
string strCurrent = DateTime.Now.ToString();
string[] ds = strCurrent.Split(' ');
DateTime CurrentDate = Convert.ToDateTime(ds[0]);
string strCurrentDate = CurrentDate.ToShortDateString();
DateTime C = Convert.ToDateTime(strCurrentDate).Date;
string res = (P - C).ToString();
string[] Value = res.Split('.');
int x = Convert.ToInt32(Value[0]);
if (x > 10)
           return true;
           return false;
[Advertisement] Otter enables DevOps best practices by providing a visual, dynamic, and intuitive UI that shows, at-a-glance, the configuration state of all your servers. Find out more and download today!

Read all
Comment Policy:
We pre-moderate any comments and welcome all kinds of thoughts, supportive, dissenting, critical or otherwise. We delete or censor comments that are:

* abusive
* off-topic
* contain personal attacks, or against any company or organization
* promote hate of any kind
* use excessively foul language
* is blatantly spam or advertising

We do not discriminate based on the person who is posting, and we never censor comments for political or ideological reasons. We never delete an appropriate comment because we disagree with its viewpoint or ideology, and we never publish an inappropriate comment because we agree with or support its viewpoint or ideology.

Attention spammers: we manually approve all comments. Spamming and blatant advertising will NOT be published on this site and is deleted immediately, you've been warned, do not waste your time here.

Add comment

Security code