Write code to write code
I was on a project once that required triggers to be built for about 200 tables, these triggers were dependent on the structure of the table, so any change meant rebuilding them. The team members that were in charge of the database, were projecting later and later completion dates as changes were made to both the trigger’s output and the tables. (At this point, they were projecting they would complete about a month after the product shipped.) I was on another part of the project and was ahead of schedule.
The manager over the project assigned me to help them “get back on track”. I was less than welcome because they didn’t want some fancy pants know it all to show them up. They had been building all the triggers by hand. I asked for a backup of the current DB, and was told no, so I asked for access so I could try a few things… I got my backup copy.
I went back to my desk and wrote a Trigger writing program. The next day, I went over to their area and asked them to back up their database, they were reluctant, but I threatened to run my test on their live, un-backed up database, and they backed it up.
I ran my program and with a single button click dropped all the triggers they had created so far. Then selected all the tables from a list and generated the triggers with another click. Poof, they were now “caught up”. I showed them how my tool worked and handed the lead for the group a CD with the source. Then I asked, so, do you guys need me anymore? (They were glad to tell me no.)
At the meeting later that day, the database team reported that they had caught up. The manager looked at me and said what happened (and the DB team was glaring at me) I said they had a brilliant idea, and they didn’t need me after all. My manager looked suspicious, but let it go, the DB team looked shocked that I had not taken “credit” and made them look bad.
Later the Manager said, “You had the idea didn’t you”. I responded “Prove it, besides do you really want them to resent my help whenever you offer it?” He said “No… Never mind”. The DB lead came over and asked for some advice on building tools when he was handed a tough assignment later. Success and the DB team didn’t end up hating me after all, success X 2.