Tuesday, September 29, 2009

Off-Hours Work: A Guide For Managers

If you work in software development or IT long enough eventually you're going to find yourself in a situation where you have to work during off-hours; it's just the nature of the job and can happen for a variety of reasons like: hardware failure, a new client is brought on that spikes CPU or bandwidth, or maybe you're just really behind schedule and need to catch up.

It's happened to me a few times in my career (and will happen again, no doubt), and after the most recent occurrence I started thinking about the best ways to deal with the situation. Today I'll share how I think managers should approach off-hours work.

Set expectations
You don't always have the luxury of time at your disposal (e.g. when hardware fails), but when you do the more advance notice you can give people so they can make plans the better. If you're telling people they need to work outside of normal hours then level with them, let them know what you expect, and be honest about it. Make sure they know that you realize the circumstances aren't ideal and appreciate their help. "Look, I know you don't want to work on Saturday, and neither do I, but we need to meet the commitments we've made. I need everyone here on Saturday from 9 AM until at least 5, maybe later if we're not done" will go over a lot better than "Be here at 9 AM Saturday and I don't want to hear any excuses!". Be sure to deliver the message in person or by phone, not by email.

Take care of people
If people are giving up their personal time for work you need to take care of them. Provide breakfast\lunch\dinner if they're working through those hours (and tell them in advance that you've got that covered). Make sure coffee\sodas\snacks are available. If the dress code is usually business casual then let everyone wear shorts to work if they want to. If everyone feels comfortable they'll be more productive and less hung up on the fact that they're working when they'd rather be somewhere else.

On the other hand, if people feel like you're forcing work out of them without concern for their well being you're not only going to have a bunch of unhappy people to deal with but you may end up causing long term damage to your credibility\working relationship with them. Reasonable people will only put up with that kind of treatment for so long before they move on.

Focus on the task at hand
The last thing people need is you standing over their shoulder saying "WTF" or to see finger pointing and hear blame. Likewise avoid the temptation to get distracted by talking about what you're going to do to keep from getting into the same situation again. Save all that for a post-mortem when you're back in the office during normal hours. People will be much happier if you help them finish what they came in to do so they can get back to whatever they really wanted to be doing in the first place.

Don't ask your team to do anything you wouldn't do yourself
I once had a manager tell me at 2 PM that I had to stay that evening to do a release to production. It was something he knew about for a week but didn't tell me about until that day. To add insult to injury, while I stayed until 2 AM to get the work done, he went home. He lost a measure of my respect that day that he never gained back. Don't be that manager – if you're going to ask your team to work during off-hours, be prepared to come in too.

The Big Picture
You've called in your team because you need something done that can't wait until everybody is back in the office during normal hours. You're asking them to make exceptions so be prepared to make a few yourself. If you handle the situation right at worst you've got some slightly unhappy but understanding team members. Handle it poorly and you'll likely be dealing with more problems than you started with. Seems like no-brainer stuff, right? Amazingly, some managers don't get it. On the other hand, neither do some employees. In my next post I'll flip the coin and talk about how I think about how they should deal with having to work during off-hours.

Thursday, September 17, 2009

SSMS "Connect to Database Engine" Prompt Behavior When Dragging And Dropping Files

A minor annoyance of mine for a long time has been how SSMS will sometimes prompt you to connect to a server and sometimes just connect automatically when a file (or files) gets dragged into the window. Thanks to an "aha!" moment with a coworker I've finally figured out why.

A connection is automatically made when SSMS is run for the first time and a server is highlighted in Registered Servers or Object Explorer. The connection is made to the server highlighted in the most recently viewed panel. If no server is highlighted in either panel and multiple files are dragged into the window SSMS will prompt you to connect for the first file and all other files will open with a connection to the same server. However, once you open a new query or a file using the File\Open dialog SSMS will no longer automatically connect when files are dragged into the window and you will always receive the dialog prompting you for server information.

I know, this sounds like a trivial tidbit of information, but imagine you need to open a bunch of scripts to run. Now you know how to avoid the frustration of having to deal with a new dialog box for every single file. Enjoy!

Tuesday, September 15, 2009

Networking While On Vacation

There's been a lot of attention given to professional networking (e.g. Andy Warren's blog posts) recently and if you recall I'm planning on kicking off my PASS Summit experience this year by attending Don Gabor's pre-conference session on starting conversations. It's perfectly reasonable to go to a conference, code camp, or SQL Saturday with the expectation that you're going to meet people who share a common professional interest and that you'd like to connect with, but how many of us put those networking skills to use outside of that context? For example, say you're going on a vacation...does your networking mojo go on one of its own too?

I just got back from a cruise celebrating my 10th wedding anniversary and on a whim before I left I grabbed a handful of business cards. Cruising can be a very social event if you want it to be – think thousands of people in the same setting for several days, and in most cases you run into the same people repeatedly at dinner, ports of call, and other activities around the ship. It's a perfect setting to practice conversation\networking skills. It turned out to be a good thing that I grabbed those business cards because I ended up meeting a sales rep for a large software company, a developer for a well known tax software company, and sat at dinner every night with a fellow IT person for a home hardware company. Will I gain anything from having given them my card? That's hard to say, but the chances are much better than had I not given them anything at all. One interesting note – of the three that I met, only one had a business card to give back to me.

The moral of my story – and the lesson I learned for myself – is to always keep those business cards with you, even when you go on vacation, because you'll never know who you may run into that you'll want to stay in touch with.

Wednesday, September 2, 2009

How To Get Table Row Counts Quickly And Painlessley

Just a quick note to call out that I've had an article posted on SQLServerCentral that shows how to retrieve table row counts by using sysindexes & DMVs instead of select count(*). It's a 2 minute read – check it out here (free registration required) and if you like it let me know!