Jul 142015

I’m so happy to be able to contribute to this month’s T-SQL Tuesday! Andy Yun picked an excellent topic: default settings. Defaults exist for a reason: in the absence of a user’s preference, they represent the option that the application’s author(s) believe will generally work the best for the greatest number of people.

All that being said, if you’re reading this blog, you probably aren’t the average computer user, and you probably aren’t a fan of all the default settings your applications choose. I’ve got plenty of defaults for different applications that I despise and do my best to change as quickly as possible. Here’s a few that really grind my gears:

Windows File Extensions

I like to see the full names of my files, including the extension (the “.”, typically followed by 3 or 4 characters after the file name).  Windows tries to be helpful and by default doesn’t show the extension if it recognizes the file type. For example, the Microsoft Word document “Letter to Grandma.docx” would be shown as simply “Letter to Grandma”. This may be fine for many, but I’m not a fan.

No file extensions. Boooo.

File extensions. Much better!

To enable their display in Windows 7 (yes, that’s what I use at home) from any Windows Explorer window, go to “Organize” > “Folder and Search Options”, then the “View” tab. Here you’ll find a list of checkboxes, one of them is called “Hide extensions for known file types”. Uncheck this box and you’ll be able to see the extensions for all files, not just the ones Windows can identify.

Hidden Files

Not only do I like to see file extensions, I also like to see all my files. Windows allows files to be marked as hidden, which means they still exist on disk, just they are not displayed in Windows Explorer. While this can be useful to keep prying eyes away from files, it is not a security feature in any way, shape, or form.

To enable the display of hidden files, go back to the very same window we found the file extension option in (“Organize” > “Folder and Search Options” > “View” tab). The list of checkboxes has a section for “Hidden files and folders”, and its options are “Don’t show hidden files, folders, or drives” or “Show hidden files, folders, or drives.” Now you’ll be able to see everything.

Line Numbers in SQL Server Management Studio

This is primarily a SQL Server blog, after all, so I had better include something SQL-specific. SSMS has plenty of default options that are worth changing, but one of the first ones I take care of is adding line numbers. I like to be able to quickly see what line I’m on by glancing at the left margin of the query window. I understand why the default doesn’t include them, but being a programmer at heart, I like to see them. They comfort me.

To add line numbers in SSMS, go to Tools, then Options. Under “Text Editor”, select “All Languages”, then check the box to display line numbers.

(click to enlarge)

So there you have them, arguably my top 3 favorite defaults to change. I hope you found this helpful, and thank you Andy for the excellent topic!

May 132014

This month’s T-SQL Tuesday (the 54th!) is brought to us by Boris Hristov (@BorisHristov), and he’s asking us to write about interviews and hiring. I think many of us have at least one tale of an interview or interaction with a recruiter that’s gone good, bad, or ugly. I know I’ve got plenty of them, two of which I’ve shared before.

This time, I have a story of an interview that went well, but with an epilogue that completely threw me for a loop.

A while back I was contacted by “Shirley” (not their real name), a DBA at a company that had an opening for a Senior SQL Server DBA. They were wondering if I would be interested in applying, and sent a job description that was fairly vague, but with the potential to be something interesting. While perfectly happy in my current position, it never hurts to see what other opportunities are out there. I submitted my resume and was quickly granted an interview.

At the interview I talked to a few different people and got a much better idea of what they were looking for than the job description provided. I also spoke with Shirley and of course got that tour of the office where I saw the kitchen and the room with the Xbox and foosball table. After the tour, I did the standard wrap-up with human resources where they ask things like “tell me about a time where you had to work with others towards a common goal” or “what would you say is your biggest flaw?” They asked what my current salary was. They did not ask what my salary expectations were, but that’s ok because I probably wouldn’t have told them anyway. I tend to answer that question with a statement like “an increase based on my experience and the value I and my skills would bring to your company.” That was pretty much the end of the interview. My opinion at this point was that I wasn’t particularly impressed by the position, but the right amount of money might persuade me (but probably not).

Fast forward a few days, and I got a call extending me an offer. As is my standard practice, I never accept an offer immediately. I always give myself at least one night to think about it and confer with my wife. I considered this offer to be a non-starter: the position didn’t excite me and the pay wasn’t compelling. They offered me more than my current salary, but only a tiny bit more (less than 1%). In some circumstances I might have taken it, after all there’s way more to a job than the pay. But this place totally wasn’t worth it.

Having slept on it and talked it over with Michelle, I called their HR manager back and declined the offer. I thanked them for their time, their consideration, and for extending the offer to me, but said I am happier staying where I am at this point. HR was equally polite, thanked me for getting back to them, and wished me well. I’m sure in the back of their mind they weren’t quite so happy because it’s their job to fill positions and now they had to find someone else to offer it to, but (in my mind) a HR professional will never let that show. A job offer is just that, an offer, and the person it is extended to is under no obligation to accept.

That was that. Or so I thought. A while later I got an email from Shirley. All it contained was the following:

“So you did not what [sic] to negotiate with us but simply use it as leverage to get a salary bump? Good luck in the future.”


First of all, the “salary bump” comment was totally unfounded, but even if that were the case, it’s none of Shirley’s business.

Second (and more importantly), as an interviewer, I would never ever contact a candidate for any reason, especially in a negative tone like that. I consider communication with candidates outside of the interview room to be completely within the domain of human resources.

I wanted so badly to be the bigger person and just brush it off, but a few hours later I was still taken aback by tone of that email. I forwarded it back to Shirley’s HR and told them I was very sorry Shirley felt the need to send that to me, as their remarks did a rather poor job of representing the company. I added that if that’s the kind of person Shirley is, then I’m very glad I won’t be working with them. HR replied and thanked me for bringing it to their attention. The end.

Why not negotiate?

As wrong as Shirley’s email to me was, they did make a valid point. I certainly could have negotiated and probably would have gotten closer to my desired salary. But I wasn’t interested enough in the job to do so. If you’re not interested in taking a job at any price, there’s nothing to negotiate. Not to mention if you ask for $x and they got the approval to raise the offer to that amount, it would be really unprofessional to say no at that point.

Final Thoughts

As an interviewer, whether individually or as part of a team, you are the face of your employer. In addition to vetting candidates and trying to determine if they would be successful in a position, it’s your job to portray your workplace in the best possible light. If you can’t do that, you probably shouldn’t be taking part in interviews.

Mar 112014

T-SQL Tuesday LogoThis post is part of T-SQL Tuesday #52, which is being hosted this month by Michael J. Swart (@MJSwart). Michael is asking us to argue against a popular opinion, and I’m more than happy to do so, as this is a belief that I’ve kept to myself for quite a while.

SQL Server’s row compression feature can be an amazing tool. Not only is it lightweight on CPU usage, especially when compared to page compression, but it can save a significant amount of disk space as well. Your data also remains compressed while in the buffer pool, meaning more rows can be stored in memory, reducing the need to make slower requests to disk. On top of all that, some queries (especially those involving index scans) can see dramatic performance improvements.

In fact, row compression is so good that Microsoft’s whitepaper actually states “If row compression results in space savings and the system can accommodate a 10 percent increase in CPU usage, all data should be row-compressed.”

Yes, row compression is a wonderful thing, and the databases I maintain frequently benefit from its use.

But I hate it.

Why? Because all too often, features designed to help make things easier also make people lazy.

By far, the biggest issue that row compression addresses is poor data typing, the use of a data type that isn’t appropriate for the values at hand. For example, if a column is only going to store the values 1 through 5, an integer data type is not necessary. A tinyint data type would be just as effective, and would consume only one quarter of the space. However if you are unable to change the data type, perhaps because the database is part of an application written by a third party, row compression can be a big help.

Row compression allows the storage engine to treat fixed-width data types as if they were variable-width. This means the disk space that isn’t needed to store a value in a fixed-width column and would typically go unused can be put to work. The savings can be tremendous, and SQL Server’s data compression features are completely transparent to end users or applications – all the magic happens behind the scenes, which is why a third party application would be none the wiser.

But what if you are able to change those data types, and just don’t feel the need to do so anymore? Data compression gives you most of the advantages of proper data typing, but all you have to do to get them is flip a switch – no pesky forethought necessary. And that’s why it’s terrible. Because for every person out there who designs their databases and data types with care, there are many more who aren’t interested, don’t care, or don’t even realize it’s an option. Features like row compression that mask these issues aren’t going to interest anyone in solving them the right way.

So while row compression is a wonderful tool and can do amazing things when used properly, don’t forget it’s also an enabler.

Apr 262013

A huge thank you to all who took the time to write posts for T-SQL Tuesday #41. I was overwhelmed at the number of replies! I had a ton of them to read, as well as back-to-back SQL Saturdays in Madison and Chicago that have kept me busy the past few weeks, hence the delay in posting this. Without any further ado, here are all the great replies in the order they appeared in the comments section.

Boris Hristov (@BorisHristov) tells the tale of SQL Saturday #152 in Sofia, where he had several obstacles to overcome, including sleeping in, his first attempt at presenting on a MacBook Pro, and having to migrate everything to his manager’s PC when he ran into issues. Despite the technical difficulties, Boris still believes this was one of the best presentations he’s ever given.

Michael J. Swart (@MJSwart) says that he’s “not much of a presenter” and that he’s actually giving his third presentation _ever_ the same day that his post went live. (I had no idea!) He also gives us advice in the form of things he’s done to prepare for it.

Rob Farley (@Rob_Farley) admits that presenting is his drug and he’s addicted to it. Rob loves presenting because “at least one of the people in the audience will benefit from it. And that’s addictive.” I couldn’t agree more, Rob!

Matt Velic (@mvelic) got started presenting by reading at his church, and later through music and debate in high school and college. He credits presenting with helping to boost his self-confidence, and likens it to a tool for helping others.

Richard Douglas (@SQLRich) was also giving a presentation the night his post went live, so Michael J. Swart is in good company! Richard answered all my questions individually; he too says some of his earliest “presentations” came in the form of musical performances. He also says that attending SQLBits was a real game-changer for him.

Jim McLeod (@Jim_McLeod) was not a fan of presenting at first. (I think most of us fall into that bucket.) His opinion changed though when he started working at a laser tag centre, and had to give pre-game briefings to groups of up to 60 people. Technical presentations are of course a bit more involved than laser tag, but he still really enjoys them. Jim’s advice is to respect the audience – they are giving you their time so make sure it’s worth it.

Frank Gill (@SkreebyDBA) tells us that his volunteering as a tour guide at the Art Institute of Chicago has been a tremendous experience and he’s learned something new every time he gives a tour. He says his experiences with SQL Saturdays and user groups have been every bit as enjoyable.

Jes Schultz Borland (@grrl_geek) tells us about the steps she takes to ensure that her presentations are successful. These include writing out detailed goals of the presentation before working on slides or demos, and lots of iterative practicing. As Jes puts it: “Simply, be prepared.” If it’s good enough for the Boy Scouts and for Jes, it’s good enough for me!

Ted Krueger (@onpnt) makes excellent points about choosing topics and practicing. Picking topics that interest us aren’t necessarily what will interest an audience – striking a balance is key. Similarly practicing does not ensure an error-free presentation – plenty of things outside of your control can go wrong, or the audience may not respond well. Being quick on your toes and adapting your talk to keep everyone interested can be very beneficial.

Richie Rump (@Jorriss) wrote about how he was inspired to start presenting while at TechEd 2011, where he realized the he really enjoyed the networking opportunities. After receiving more encouragement on twitter, he submitted to speak at the 2011 South Florida IT Camp, was accepted, and had a blast!

Stuart Moore (@napalmgram) felt like his career was stagnating. After discovering the rest of his team had similar feelings, they all decided to start giving presentations at work about the systems they each were responsible for. Stuart says it was awesome, but the thrill disappeared after a while, but then he discovered his local SQL user group, which he really enjoyed presenting at. At this point he has presented at 2 user group meetings and has submitted abstracts for a few SQL Saturdays.

Steven Ormrod (@SQLAvenger) made note of the interesting fact that he hasn’t participated in a T-SQL Tuesday since the last time I hosted, nearly two years ago. Glad I can inspire you to take part!! Steven has an impressive list of experiences, including some time as a high school teacher. Back in the IT world, Steven wasn’t all that happy with how his career was progressing until he discovered PASS, and got hooked on speaking after presenting at his first user group meeting.

David Gardiner (@DavidRGardiner) thinks his first time in front of a group was probably when he taught Sunday School as a teenager. He makes a great point by saying that presenting can be a two-way street. “Sometimes you end up learning just as much from those you’re presenting to as you hope they did from you.”

Allen White (@SQLRunr) got his start in public performance in the theatre, and I was surprised to find out he was a theater major in college! He started attending Cleveland SQL Server User Group meetings about 8 years ago, and was presenting soon after that. Allen considers presenting to be “one of those magic activities in which everyone benefits”, and I couldn’t agree more!

Lance England (@lanceengland) explains how he prepared to give a recent presentation on MDX, and how much he enjoyed learning more about the language and building his confidence in the process. Sometimes getting forced out of one’s comfort zone is a great way to really learn a subject, because as Lance mentioned, “if you can’t explain it, you don’t know it.”

Mickey Stuewe (@SQLMickey) tells us how she got her start right out of college teaching Microsoft Office and became an MCT soon after. She also mentions how she wanted to motivate people to ask questions, so she started tossing out candy to those that did. (Great minds think alike, Mickey – I’ve actually used this method at a few SQL Saturdays!) She says the reason she loves presenting is the same as it’s been all along – she loves answering questions and helping people.

Robert Pearl (@PearlKnows) makes some excellent points, like accepting constructive criticism from the audience will make you a better presenter, and that just becuase you’re speaking doesn’t mean you are the smartest person in the room. Also on the topic of preparedness I’ve seen a few times now, Robert mentions that “when [unforeseen events] occur, it’s all about how you handle them.”

Mike Donnelly (@SQLMD) states quite simply that speaking makes him happy. He shares a point from a blog he reads which says “Novelty and challenge bring happiness”, and public speaking gives him all those things.

Sean McCown (@MidnightDBA) who always makes me smile, walks us through a presentation from the idea to the abstract, and the big day itself. He also manages to mention Blazing Saddles and The A-Team, both of which I watched at way too young an age. After reading this it’s clear that Sean and I both love it when a plan comes together, and it sounds like that’s just what happened in this presentation.

Gethyn Ellis (@gethyn_ellis) tells how speaking didn’t come easy to him at first, but he now makes a living teaching SQL Server learning courses. He offers the following advice: 1) you will always be nervous. 2) Nerves are a good thing – they make you prepare. 3) Being prepared is important – without it you will fail.

Tim Ford (@SQLAgentMan) recalls the tale of how he was thrust into the spotlight at the 2005 PASS Summit when the host for the Quizbowl suddenly had to cancel. Since then he’s presented at many events, both large and small, and even started SQL Cruise! Sounds to me like a great example of the awesome things that can come from bring thrown a curveball. Thanks, Tim!

Bradley Ball (@SQLBalls) got his first taste of the SQL community through 24 hours of PASS, and attended SQL Saturday Orlando shortly thereafter. His first speaking experience was at SQL Saturday in Tampa, and from there he was hooked. He also apparently worked at the White House, which I’ll totally have to ask him about sometime.

Kendal Van Dyke (@SQLDBA) didn’t think his first presentation about SQL Server XML in 2006 was a very big success, but it ended up earning him the ability to speak at SQL Saturday #1. Now he’s on the PASS Board and is Director of the SQL Saturday portfolio! Kendal says his career is very different than it was back in 2006, and that’s largely due to presenting. He advises new presenters to “be careful, because you might just walk away wanting to do it again!”

Mark Broadbent (@retracement) gave his first-ever presentation at SQLBits 7, and considers it to be “one of the most frightening, exhilarating, scary and rewarding experiences” he has ever had. Mark also credits the preparation for that event with improving his technical skills exponentially from where they were before. He has presented at every SQLBits since then.

Steve Wake (@stevewake) is contributing to T-SQL Tuesday for the first time! Steve got his start doing technical presenting at the Denver Visual Studio User Group and received lots of positive comments. From there he sought out other user groups and found the Denver SQL Server User Group. Since then he’s also started doing the SQL Saturday circuit, and presenting is now an integral part of his career.

Ed Watson (@SQLGator) tells us that he’s not in love with presenting – yet – but he’s getting there. He used to avoid it like the plague, but the SQL community and the great experiences he’s had at SQL Saturdays have really been helping him conquer his aversion. Thanks for sharing, Ed!

Paul Timmerman (@mnDBA) is not only making his first T-SQL Tuesday blog post, but his first blog post in general! Paul says he’s never really been afraid of speaking, just often found himself lacking the motivation to get up and do it. The SQL community has changed his mind, though, and he recently presented at both the PASSMN user group and SQL Saturday Madison. He is happy to report having excellent experiences both times, and I’m sure will be presenting more in the future!

Jim Dorame (@DBAJD) is also making his first T-SQL Tuesday contribution. He recently gave his first presentation at SQL Saturday in Madison and was surprised by the positive reaction he got from attendees. He’s presenting again at SQL Saturday in Fargo this weekend and really looking forward to giving back to the community that has helped him throughout the years.

Wayne Sheffield (@DBAWayne) cut his teeth presenting when he was in the US Navy and had to conduct training for his entire division. (That sounds it was in front of a lot of people, Wayne!) Later he was writing articles for SQLServerCentral.com and was encouraged to turn an particularly popular one into a presentation. Not only was the presentation a success, but Wayne discovered that he really enjoys watching others learn.

Luke Jian (@sensware) says “a journey of a thousand miles begins with a single step” which is an excellent quote, though I must admit the first time I heard it was when Wilson said it on Home Improvement. In Luke’s case this single step was at SQLskills IE1 2011 in Chicago, which I was very fortunate to be attending. I remember Luke getting up there and schooling us all in the ways of SSDs and think it’s awesome how many events he’s presented at since.

Erin Stellato (@erinstellato) and I have even more in common than I previously thought – it turns out she was a campus tour guide in college just like me! As a graduate student in Kinesiology, Erin had the opportunity to teach an introductory course, which helped her realize that she loved teaching. Watching one student “get it” during her first rotation was particularly gratifying. Erin also makes the comment that the term “teaching” is a lot less scary than “presenting”, and I totally agree!

Mike Fal (@Mike_Fal) tells us about the “hook”, which for him is more than a catchy Blues Traveler song. After his first ever presentation at the Denver SQL User Group he was told that “I’ve been a DBA for over twenty years. You taught me something new tonight.” Not only is that excellent, but in my opinion that’s exactly what the SQL community is all about.

Julie Koesmarno (@MsSQLGirl) started doing one-on-one tutoring for high school students, and later found herself doing the same for college students. After graduating, she started presenting and found she loved the discussion aspect and how we can all learn from each other.

Steve Jones (@way0utwest) was apprehensive about speaking in front of strangers as many of us were, but much of this was overcome by working in the restaurant business and constantly meeting (and talking to) new people. His first technical presentation was at a PASS Summit, and while he didn’t jump in right away, a few years later he was presenting regularly. Steve really enjoys the chance to teach people and help them improve their careers.

Doug Lane (@thedouglane) argues that presenting is essentially the same as performing, which he did a lot of when younger, especially through band. He makes the point that presenting is a lot like doing an improv solo – there’s a framework (key, tempo, measures) but the rest is filled in on the fly.

Robert L. Davis (@SQLSoldier) says he has never loved presenting more than when someone pinged him for advice. He was able to give guidance on how to submit, and after the person was selected he advised them on giving the actual presentation as well. Robert also was honored to be asked to sit in on the presentation for moral support, which he did. Not only does Robert mention bacon, but he also references Revenge of the Nerds, another movie I watched at way too young an age. (My grandmother let me get away with murder when I would spend Saturdays at her house.)

Jason Strate (@StrateSQL) had no interest in presenting in front of groups for any reason until he went to work for his first consulting company, where one of his co-workers gave him the necessary kick in the rear to try presenting at the Minnesota SQL Server User Group (PASSMN). Jason says this presentation is widely regarded as the worst talk in the history of the group, but he was convinced that he could do better than that, so he kept speaking.

And last but not least, me! Yes, I participated in the T-SQL Tuesday I hosted.

Once again, thank you to everyone who participated! By my count there were 38 posts in all. Of those, 3 were from people participating in T-SQL Tuesday for the first time, 1 was a first blog post ever, and 2 were by people who were giving presentations the same day their post went live. How awesome is that?!?

Apr 092013

This month’s T-SQL Tuesday is hosted by…ME! I asked everyone to share stories of how they came to love presenting, and I have not one but two tales of my own. They both took place at about the same time: my freshman year at the University of Illinois. I can’t remember which one came first, so you get to read both!

Physics Van

Shortly after classes began, my Physics 111 lecture was visited by Professor Mats Selen, who got everyone’s attention by putting a small amount of liquid nitrogen into a soda bottle. He capped it, threw it into a large plastic garbage can, and fastened the lid. Seconds later the lid touched the 20+ foot ceiling from the force of the explosion. He then explained if we were interested in doing things like this more often, come speak to him about joining the crew of the Physics Van. I was at his office within a day or two.

Demonstrating the power of atmospheric pressure with Magdeburg Hemispheres

The Physics Van is an outreach program that brings a free traveling science show to elementary schools and community groups, typically within an hour’s drive of campus. The hour-long program gets kids excited about science by demonstrating basic physics experiments, many with audience participation. Of course no science show would be complete without a few explosions thrown in as well!

Not only did I have an amazing time and meet some wonderful people, but Physics Van taught me a ton about stage presence and engaging an audience. I also learned how to be comfortable speaking in front of large groups, and that making something appear spontaneous takes lots of rehearsing. I’ll admit that getting up and talking in front of hundreds of people is much easier when your audience is in the 4th grade or younger. It’s also nearly impossible to not get kids that age excited about whatever you’re going to be doing. Whether they really enjoyed the show or were just happy to not be in class, we always saw tons of smiles from the audience. In my mind, it was the perfect environment to get comfortable with speaking.

Bonus! You may or may not find yours truly (circa 2003) in this video of a show. Disclaimer: it appears to require Internet Explorer (again, this was 2003.)

Being a Campus Tour Guide

One morning early in the year, my roommate and I were startled awake by the door to our room being unlocked. It opened quickly, we heard an “OHMYGODIMSORRY!”, it closed in an instant and we heard lots of people being shuffled out of the hallway. My dorm room had previously been the “model” room shown to tour groups (I knew this because I saw it when I cam for tours) and apparently some of the tour guides never got the memo.

My lava lamp collection was always a hit with tour groups. (And hey, check out those books I had even 12 years ago!)

This really didn’t bother me or my roommate. In fact, I went to the Campus Visitors Center and encouraged them to send tour groups to our room, as we could show them what a real, lived-in dorm room looks like. They liked that idea, so our room became a regular stop on the campus tour. The model room looked so fake anyway, with perfect furnishings all straight from the store. Ours may have been totally cluttered, but at least it was authentic!

Over the course of my freshman year, I made more contacts in the Admissions and Records office, and applied for a job as a tour guide for the following year (they don’t allow freshmen to give tours.) This ended up being my job for the next 4 years, and I loved it. Getting paid to share my love of the University with prospective students and their parents was awesome, and there were never any dull moments. I remember one time in particular where I was walking a tour group down the street and a good friend of mine saw us going by. She came up to me and started hitting on me like crazy in front of them. Told me to come by her place because she needed my help studying for her anatomy exam that night. The look on everyone’s faces was priceless! Another time I was taking my tour group into the dorm to show them my room, and my neighbor was standing at the front desk wearing nothing but a towel. He asked if he could speak to the group for a second, and then explained that his current state was a prime example of why you never forget your keys when going to shower, as his roommate had left and locked the door, leaving him waiting for the front desk to get him a copy!

Tour guides at U of I developed some great skills, like the ability to talk very loudly for an hour or more while walking backwards and not running into people or obstacles. We also had to be good at answering unexpected questions. Before or after each tour there was a formal question/answer session where several tour guides went in front of a room full of people and answered literally any question about the school that the audience could throw at us. As I’m sure you can believe, most questions weren’t simple ones, like “What’s a good place to eat?” The kids would ask questions like “Can we have members of the opposite sex in our dorm room?” Parents would ask “There seem to be a lot of bars near campus – how do I know that my Timmy isn’t going to become a drunkard?” It was an excellent exercise in coming up with appropriate answers with a positive spin, no matter how much we really wanted to say that as long as your roommate is cool with it, resident advisors aren’t going to care if your significant other spends the night or not.

So those are my stories. In both cases I had very positive experiences getting up in front of groups of people and speaking about things I love: science and the University of Illinois. When I think about it that way I guess it’s no surprise that I enjoy giving presentations about SQL Server as well.