Monday, August 31, 2009

two databases, one column

I feel fortunate that I don't experience a "WTF?!" moment on a daily basis. Although sometimes, it does feel like I'm in Groundhog Day, perpetually experiencing the same WTF?!s over and over again. Today was such a day.

The application that I'm working on talks to two databases. In one database, there's a table called user with columns like id, firstname, lastname, ssn, and so on. The information in some of the rows in this table has also been stored in the second database. This is done for reasons of efficiency, so that when querying the second database, we don't always have to dip into the first database to get user information.

This seems perfectly reasonable to me, except for the way that it was done. Way back in the stone ages of our application, someone decided to store all the user information in a single column in the second database. It is stored as a set of key-value pairs in a CSV string, in a column called user, like this: "user=3378,first=John,last=Smith,ssn=123456789,..."

Since I first encountered this, I've been cursing scratching my head about why someone would decide to store all of this information in a single column. It makes queries more difficult to read and write, because it requires regular expressions to extract single items like the social security number from the user column. I can imagine this is also a performance hit.

In addition, whoever decided on this format did not replicate the user table column names for the keys in the CSV string. So the user.firstname column in database 1 maps to first in the CSV, user.lastname maps to last, and so on. This makes life more difficult when searching the code base for all queries related to a particular piece of user information. I recently fixed a bug caused by this mapping difference.

I'd love to have a conversation with the person who decided to do things this way. It would either be enlightening, or just plain crazy.

Saturday, August 15, 2009

networking

I just laid down some serious cash out of my own pocket to go to a professional conference. I should do this more often, I guess. It's difficult to justify it based on results. Does the conference pay for itself, in the long run? I have my doubts. But I expect it will considerably improve my mood, at least for a little while, and I can really use that.

Before going, I should to do some reading about how to network effectively. Without feeling (or acting) like a leech.

Wednesday, August 5, 2009

please talk louder, I can't hear you

The personnel manager of my company is seated in an office near my cubicle. This morning, when I arrived, she was engaged in what turned out to be a lengthy conversation with her assistant. The conversation was loud, and large pieces of it drifted into my consciousness. Quite a lot of it was of a personal nature. At times the conversation would become muted, at which point I surmised they were talking about something (possibly work related) that they didn't want others to hear about. This was an indication to me that they were aware of the fact that people sitting nearby could hear every word of what they were saying.

Later, around 10 am, the guy in the cubicle adjacent to me began having a loud and detailed telephone conversation about his car loan. This went on for about five or ten minutes.

Then at around 2 pm, a guy further away began having a rancorous phone conversation, apparently with a car mechanic, about the unsatisfactory service he'd received. Despite the fact that he is two rows away from me, I could hear every word.

In between all this was the incessant chatter from two nearby cubicle dwellers who can't seem to stop free associating about non-work related topics for a large part of the day.

I think my number one complaint about my current job is the incessant noise due to inconsiderate coworkers who have different standards about what constitutes appropriate workplace discussion and the volume thereof.

I am a programmer, working at a software company. That means I spend long hours thinking in front of a computer. Ideally, I'd be sitting in an almost noise-free environment, with infrequent interruptions. For example, right now I am at home typing at my computer. There's a bit of noise from the apartment across the hall - I sometimes hear a child making, well, child noises. Sometimes there's car noise from the parking lot. Overall, it's pretty quiet, and there's no sound of people talking. At home, this is true all day long.

Normally, I am a very focused person, and I find I can frequently block out the conversation noise at work. After about a year at my current place, that no longer seems to work. I've noticed that several coworkers use headphones. I don't like headphones; they eventually begin to hurt my ears. Further, I do not focus well with background music drilling into my brain non-stop. I work much better with quiet, and it's frustrating being forced to take steps to block out noise which should not be there in the first place. Because these people are not even having work-related discussions. They are just blabbing about personal stuff during work hours.

The company culture overall encourages this. I'm within earshot of a couple of more senior people who have loud phone conversations (work related or personal) from within their offices. These are not cubicle dwellers, but they still find it necessary to leave their doors wide open when talking on the phone. What's amazing to me is that these people do actually sometimes close their doors when on the phone. Presumably this means something particularly private is being discussed. Don't they realize that no one wants to hear their non-private discussions, either? Just be considerate and shut the door when having a conversation, for crying out loud!

In my list of grievances at my current job, this ranks pretty high. The noise is bothersome, but just as aggravating is the apparent lack of consideration by numerous employees. Sometimes it seems like these people are deliberately talking loudly as a way of showing how important they are. Or maybe they're just thoughtless blowhards. Either way, I wish they'd STFU. But I guess that's not going to happen, so I need to put my ass in gear and start looking for a new job.

Saturday, August 1, 2009

how much time will it take?

I'm one of just a few developers working on a poorly supported software product. The product was barely maintained for the last several years, since it was first released. Many moons ago, it was decided to give the product a complete overhaul, front end and back. Meantime, the main caretaker of the product wisely decided to leave for greener pastures. He was tasked to add as many new features as he possibly could before leaving, and he did so.

He pretty much had free rein over the product while adding enhancements and rewriting code. So far as I can tell, there was no extra pair of eyes checking to see what he did. Management trusted this developer to do everything in the "correct" way. The problem with that lack of oversight is that you are trusting a developer to do everything the way you expect without much (or any) feedback. In many cases, even the product owner doesn't know what to expect, so this imputes impossible, magical abilities on a developer. Naturally, some things are not working correctly, and additions have to be made.

Next thing you know, I've been assigned to finish up the work that was started by the departing developer. There are areas of the application that are incomplete. The code base is quite large, and the application is complicated. I don't know what things work or don't work until I happen to run across them while debugging some other problem.

I've been asked to supply an estimate for how much more time will be required to take this project to completion. So far, I have equivocated, saying that it is very difficult to make that estimate at this point. I am still unfamiliar with a lot of the code base. No one knows how many bugs are in the current iteration of the product. I don't have a specification for what needs to be done, or a checklist of things that have been changed or are still needed.

Truth is, it looks to me like there is still a lot of work ahead, but I can't tell how quickly that can be done. It's even harder to make an estimate because one developer keeps getting pulled away to put out fires in another development effort, so progress is even more unreliable than it usually is in software development.

How do you make an estimate in a case like this? I have a gut feeling for how much more time is needed, but I can't justify it. I'd like to take a few days to run through every feature in the product and see just what is and isn't working. At least then I'd have an idea of how much stuff is still broken. But management would not approve that. I'm supposed to spend every minute developing or bug fixing.

So I can't come up with any justifiable estimate. Meantime, management decides to supply their own deadline. I believe this date was pulled out of thin air; it certainly is not realistic. I don't understand why you'd pull a deadline out of a hat and not expect to be disappointed. I've seen this happen with another project. They kept rescheduling the deadline for months. It makes no sense.