Posts Tagged ‘computer programming’

Work Feb 3, 2010

February 4, 2010

Here’s what my day was like today.

Every month I run a long process that results in about 1.5 to 2 million dollars worth of checks being cut.

I wrote a new program that removes all unnecessary manual labor from the process, but it’s still being tested. (It went through one series of Quality Assurance and now it’s going through another.) So for now I’m running the process under an older application that I wrote, but it has a lot more manual steps in it and it’s slower.

Unfortunately, the unit that sends the raw data has started in recent months to use the delimiter field within the data field. This caused a problem last month, when it blew up another developer’s program. They asked me for assistance in tracking down the culprit and we solved it together. This month, they must have noticed the issue and dealt with it quietly, but I forgot about it. My program didn’t raise a stink about the bad data, it just pretended that it ran successfully. Meanwhile, I didn’t notice that more than half the data weren’t loaded into the database!
Today, I came in and prepared to do the final step in the process that would result in certifying the files were correct when i noticed that the amount of money we were sending was more than a million dollars less than usual! I had to rollback all the changes that the manual/automatic processes have done since Monday and then re-ran it with the debugger set to “STUN”. That’s when I saw that the old nemesis is back in business!
I hate when programmers don’t send urgent enough messages that something major has gone wrong in the program that needs immediate attention. But what can I do when the programmer is my younger self?
At least it uncovered a major bug that I need to make sure my newer program can either handle or trap. I will mention this to the Quality Assurance people so they can test this scenario.

Meanwhile, I’m working on a project that we are presenting to lower-upper management tomorrow. There’s a tremendous amount of pressure on it because a lot of people’s reputations are riding on its success or failure. This presentation has caused us to have at least 3 internal presentations and 3 other meetings.

And, since concurrent processes aren’t enough, I’m also responsible for a third project. This project has a bit more breathing room, since it’s not officially due until June, but my managers really want me to finish it by April. What I’ve done so far is define the data elements for a couple of the forms and created the tables and very basic Stored Procedures. Then I’ve asked a couple of interns to replicate the tables on a web page without worrying about look and feel. (I will ask my manager to do that, since he loves re-branding web pages.)
I’m hoping that we can move quickly even though they have almost no experience with ASP.NET and I’m only devoting about sixty to ninety minutes per day for this project. (To combat the experience issue, I’ve given them a lot of my previous web pages for them to copy and paste as needed to this site.)

Wednesday is going to be a crazy day! Preparing for the presentation. The presentation itself!
In the evening one of my sister’s is coming over to watch 500 Days of Summer. (She’s normally in school, but she’s in New York for this “weekend”.) After she leaves, I’ve got karaoke in Park Slope.

Delimiters

February 4, 2010

In case you never heard of or otherwise don’t understand what a delimiter is, I’ll explain briefly.

When a file is sent in plain text, you need to know how to split up the records. So, for example, if we wanted to automatically process a file of client information and it had a line like this:

Joe Smith 43 012345678 718-555-4321 4-1-66 11-87 11th St. Queens OH 23123 1-11-2001 9-13-2009

How should we process it? One solution would be to go based on “spaces”. We would end up with this data set:

First name:Joe

Last name: Smith

Age: 43

Client ID: 012345678

Phone #: 718-555-4321

DOB: 4-1-66

Address 1: 11-87

Address 2: 11th

Address 3: St.

City: Queens

State: OH

Zip Code: 23123

Client Join date: 1-11-2001

Client’s last visit: 9-13-2009

You can see from the bold portion above that in this case the address is going to cause problems. Also, consider what would have happened if there had been an apartment number?

When using plain old text files there are two main solutions to this problem. One is to use fixed length fields. This would require the sender and receiver to agree to use a designated sizes for each datum. So if we agreed that a first name would not be bigger than fifty characters, then even Joe has only three characters, the sender would still have to include 47 unused spaces (or other “filler” material). For example, if we agreed that the first name is a 10 character field and ‘%’ would be our filler, Joe would become:

Joe%%%%%%%

The other popular way of dealing with this problem is to agree to use a character that would never appear in the data be the “flag” that we have the entire data piece. For example, if we used ‘%’ as our delimiter, the line becomes:

Joe%Smith%43%012345678%718-555-4321%4-1-66%11-87 11th St. Apt C12%Queens%OH%23123%1-11-2001%9-13-2009%

First name:Joe

Last name: Smith

Age: 43

Client ID: 012345678

Phone #: 718-555-4321

DOB: 4-1-66

Address: 11-87 11th St. Apt C12

City: Queens

State: OH

Zip Code: 23123

Client Join date: 1-11-2001

Client’s last visit: 9-13-2009

For more information about this, you can try Wikipedia.