Metadata

I have an action item for my yearly review to propose a major change to any of our systems. That should be easy. I want to make my proposal beneficial to me. So I looked around for a pain point. I got a lot of yearly maintenance to do with our hard coded SQL. Maybe I could address that.

Metadata to the rescue. I could store all the info about the tables and columns in a metadata store. Then a query builder could interrogate the metadata and build up my SQL strings on the fly. Maintenance of the metadata will be a whole lot easier than going through all the hard coded SQL.

Had a manager call me up today to discuss my proposal. He tried to drill down into the structure of the metadata. Unfortunately he did not fully understand the problem being solved. He also pitched a very verbose metadata structure. I want my job to be a whole lot easier. Don’t want to shift all the hard work from code changing to metadata maintenance. Got to formulate a plan to get him to see things my way.

Methodology

A developer asked me for some help today. He tested out his code and threw it over the wall to the test team. They said his stuff did not work. Then he tried his code again. Sure enough it was broke. He could debug the C++ code using his Microsoft IDE. However he was stuck once it called some stored procedures in Oracle.

I told him the thing to do would be to activate some logging so he could build a bread crumb trail. That way he could figure out what was going on in the stored procedures. I call this the old printf style of debugging. So we sprinked some logging to a database table in his routines. Then we ran the code again.

Sure enough, some output was generated in the database table. We traced it down to the code he wrote. Then we iterated and added more logging in the local area where he thought the code was not working. All of a sudden, the application started working correctly. Wait what? I could not imagine just adding logging would fix the problem.

I gave it some thought. The logging did not magically fix his code. He was just not running the same version of the code that he was looking at. He just assumed that the version of code he worked on was what was deployed. Next time I should have him extract the source code of the stored procedures right out of the database. That would prevent this surprise.

Debugging Skills

I have not taken much time off this summer. Last week I took a day off from work. Needed to help a friend with some heavy lifting. Got a call while I was out. Apparently a system that I maintain had problems. I told my boss that I would be in the next day. However someone else could surely resolve the issue.

Turns out my normal backup was also out of the office. That's okay. I trained the new guy on this system. Unfortuantely he told the managers that he knew nothing about the operations. Fail. I guess I trained him up but he did not use that knowledge. So he forgot it all.

Today I was scheduled to give a one hour session on the system. I did so. Took around 30 minutes to give a high level overview plus a hands on demonstration on how all the pieces get run. Then a manager asked me to prep the audience to respond to problems. Another manager asked that I give them the steps to "reset the data".

Unfortunately the only way to get familiar with the system is to get your hands dirty. You got to resolve a bunch of trouble tickets. Only then will you get the chance to dig deep and understand what the heck is going on. That's how I learned. That's how my backup learned. And that's how everyone else is going to need to learn. Sorry. Once again there is no silver bullet here.