T-SQL Tuesday #68: Defaults
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.
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.
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!