Jeff Moden wrote:
I've been working with a young developer for over a year on trying to get her to format any SQL she writes, SSIS or SSRS packages. Since I do most of her code reviews I thought that she was getting on board with it. She asked for help on an SSRS report she was working on, she sent me the SQL , it was all over the place as far as formatting. I asked her why it wasn't formatted correctly, she said it was the developer that worked on it prior to her. I know this is BS since I reviewed his code as well. I just wanted to scream at her "Why the 'F' isn't this formatted correctly?" Then she tries to use a MAX or ROW_NUMBER to get just one row back instead of taking the time to join the tables properly. I know the MAX or ROW_NUMBER is needed in certain situations but not EVERY WHERE. Sorry, just wanted to vent.
You made a mistake - you should have told her straight away that you had seen the code before she took it over and it was properly formatted then. Maybe she knew that anyway, but tried it on in attempt to make you give in without too much fuss - apparently a successful attempt, so you've probably encouraged her to invent false excuses again in the future.
Again, totally agreed. This would have been the correct spot set a mentor-like but very firm precedent and to let people know that, although you may have been born at night, it wasn't last night. 😉
I did let her know about the formatting issues, and this wasn't being submitted for code review, she wanted help because she wasn't getting the right results. I did point out the downfalls of using the MAX and I encouraged her to take another look at it to find a better way. I haven't seen the code for review yet, last I knew she was still working other issues out. My frustration is also in the fact that I've had to 'hold her hand' throughout the past year plus. After so much 'holding of hand' you want to smack them upside the head when they continue to do it wrong. And I was 99% sure I had reviewed the code before she started working on it, I doubled checked after the fact to make sure I was 100% correct, and I was. At that point I saw no need to say anything to her. I'll just make sure it meets our 'standards' before it moves to prod. She should know better by now, she's had to delay her moves to prod because I found things she needed to fix in the past. This is also one of the people that will spring the code review on my and say the code needs to go in the next day(like I have nothing else going on).
we travel not to escape life but for life not to escape us