Twitter

Follow SQLQuill on Twitter

Subscribe

MN Pass

Top 10 Technological Time Savers to Keep in Touch

Social media these days can be a full time job – at least I could easily kill many hours per week in this area.  My job doesn’t allot any time for twitter, blogging, reading blogs, etc.  Therefore if I want to network, read blogs, blog, keep an eye on what’s happening in the SQL world in general, I’ve got to be smart about it, stay organized and make some shortcuts.  Here’s a list of my top 10 time savers to keep my finger on the pulse and interact with the SQL Community.  Note, all of these apps/services are free – at least at the basic level, which works fine for me.

time

  1. Google Reader – Anytime I’m on a computer, Google Reader is usually up.  Anytime I am browsing the web, I’m looking for feeds.  My three Google Reader tips:
    1. Learn the keyboard shortcuts
    2. Use folders to organize your feeds
    3. If you don’t know how Google Reader works, watch this video, or here’s a slightly deeper explanation.
  2. Google Chrome – every browser has it’s strong and weak points – I’ve learned the ins and outs of Google Chrome and it works for well me.  I know the keyboard shortcuts and I love the fact that the address bar is a built in Google search box with instant results.
  3. Paper.li – This creates a daily paper from the shared links on Twitter.  I try to set aside 5 minutes a day to read up on what’s happened in the last 24 hours.  I’d recommend these two papers:
    1. The PASS MN Paper
    2. The SQLQuill Daily
  4. Tweetdeck – newest version has a better ability to manage columns, list management and I like the chrome app.
  5. ifttt – “Put the internet to work for you” – this site/service is amazingly simple.  It allows you to create custom tasks from things that happen.  Here’s a good explanation of how it works from LifeHacker.com.
  6. Buffer – This site allows you to schedule tweets (and facebook updates), but the really cool thing it provides is the analytics of the links you send via twitter.  I was quite surprised – a few things I thought people loved, nobody clicked on.  A few things I thought was no big deal, tons of people clicked on.
  7. Dropbox – Is a simple, easy to use file synchronization tool.  I install it in the same location on all of my computers for consistency sake.  This also allows me to make bookmarks in chrome to dropbox files, sync my chrome bookmarks and have them work.  It also works well for tasks in ifttt.
  8. Keepass – Password manager – works great, I keep it in my dropbox folder and thus it’s on all my computers.
  9. TrueCrypt – Creates encrypted volumes, which looks just like a file.  Anything in my Dropbox folder that I want extra security on, I mount an encrypted volume in my Dropbox folder and add the files there.  Okay, I know on the surface it doesn’t look like it has much to do with Social Media, but I can use this to secure files for presentations, upcoming blog posts, presentations, etc – plus I also have created drives using truecrypt for data files on my local machine to mimic the drive layout of a server.
  10. Windows Live Writer – My blog editor of choice because it’s fast, free and easy to use.  It’s just like MSWord.  You can also customize it and add plugins to it.

I hope this has helped – I know they help me all the time.  In fact, I started this post on a different computer, put the notes in my dropbox folder and posted via Live Writer on a different computer.  Hopefully it will at least introduce you to one tool that will help you get organized, be more productive or interact with the SQL Community.

TimeMindMap

Create a List of Links from Google Reader Starred Items with Powershell

Inspired by Jason Strate’s (Blog| Twitter) post “PowerShell: Download List of SQL Server MVPs”, which was inspired by John Samson’s (Blog| Twitter) post “The Best Database Administrators Automate Everything” – which also inspired me.  I decided to create a Powershell script to grab my starred items in Google Reader and format them into an HTML Page with links for my Weekly Challenges/Good Reading Posts.

The Set Up

I had an HTML template created for these pages, so I split it into three parts:

  1. The portion above the Good Reading and Links – I saved this to a text file located at “c:\temp\TopTemplate.txt”
  2. The Good Reading and Links
  3. The portion below the Good reading and Links – I saved this to a text file located at “c:\temp\BotTemplate.txt”

I then looked at my public page for Starred Items on Google Reader.  Note this script works for any public listing on Google Reader, so I can create a Public Page and change the URL in this script and it still works.

The Code

##------------------------##
##--Reader Starred Items--##
##------------------------##
$webclient = New-Object system.net.webclient
$SourceFile = "c:\temp\Reader.txt"
$HTMLPage = "C:\temp\GoodReading.txt"
$TopTemplate = "c:\temp\TopTemplate.txt"
$BotTemplate = "c:\temp\BotTemplate.txt"
$url="http://www.google.com/reader/shared/user/14135896925018987441/state/com.google/starred"
$webclient.DownloadFile($url,$SourceFile)
#Get the titles with links
$itemtitle = Select-String $SourceFile -pattern "h2 class=""item-title""" |
% {$_ -replace "<div id=""items""><div class=""item""><h2 class=""item-title""><div class="""">", ""} |
% {$_ -replace "</div></h2>", ""} |
% {$_ -replace "<div class=""clear""></div></div></div> <div class=""item""><h2 class=""item-title""><div class="""">", ""} |
% {$_ -replace "c:\\temp\\Reader\.txt:[0-9]*:", ""}
#Get the details with links
$iteminfo = Select-String $SourceFile -pattern "<div class=""item-info"">" |
% {$_ -replace "c:\\temp\\Reader\.txt:[0-9]*:<div class=""item-info"">", ""} |
% {$_ -replace "</div>", ""}
$i=0
$FinalContent = " "
foreach ($t in $itemtitle)
{$FinalContent= $FinalContent +"<li>"+ $itemtitle[$i] + " " + $iteminfo[$i]+"</li>" + "`r`n "
$i++}
$FinalContent = "<p><strong>Good Reading from the Week</strong>:</p>" + "`r`n" + "<ul>" + "`r`n" + $FinalContent + "`r`n" + "</ul>"
$TopTemp = Get-Content $TopTemplate
$BotTemp = Get-Content $BotTemplate
$FinalContent = $TopTemp + $FinalContent + $BotTemp
Set-Content $HTMLPage $FinalContent
invoke-item $HTMLPage

When the script completes, I simply update a couple of statuses and change the photo and it’s good to go!

T-SQL Tuesday #009: An Ounce of Prevention

TSQL2sDay150x150

This month’s T-SQL Tuesday, “T-SQL Tuesday #009: Beach Time” is hosted by Jason Brimhall (Blog/Twitter) aka the sqlrnnr.  The topic is: What do you do as a DB professional to earn a little “Beach Time?”  What do you do prior to “Beach Time” to ensure that the beach time will not involve work?

Most of my vacations involved traveling out of cell range, so my vacations are usually guaranteed to not be interrupted by work.  My college buddies and I go on an annual trip to Canada’s Quetico Provincial Park, my parents have a cabin on the Gunflint Trail in northern MN.  Being out of cell range is a bit more stressful than it sounds, but that’s why I’ve worked out a system to ensure things run smoothly when I’m gone.  My system is all based on taking care of things before I leave the office because – I believe it was Ben Franklin who said, “an ounce of prevention is worth a pound of cure.”

First, I always let the people who I’m working with know I’m going on vacation weeks before.  I tell them in meetings and email my boss once plans are firmed up and dates are set.  One thing at my current job which I couldn’t stand at first, but now I find useful is that we send out meeting requests to each other saying when we are out of the office.  The big keys to sending these out is to disable the reminder, set the time as free time and do not request responses.  This way it’s on other’s calendar as a reminder, but that’s about it.

Vacation

Next, and this is the hard one for me, at times, is I tell people no.  No, I can’t get this done before I leave.  No, I can’t make your meeting, I’m finishing up Project A.  etc.  I also decline all meetings and block out my calendar (set to busy) for the days I’m going to be gone.

Finally, I’m a big list maker.  I usually list out what I’ve got to do everyday, when I’m going on vacation I’ll add a column to my list and put a secondary name by it.  I go over everything I can with the secondary person, so they know what’s going on and if there is an issue while I’m away, they can be contacted.  Because I’m a list maker, I’ve also got a checklist of “Things to do for Vacation”.  Most of the items are for issues with specific environmental tasks around here, but the big one is to turn on my out of office assistant.  I did forget once and had a few of upset users know the best way to get a hold of me is via email and I wasn’t responding.

These things don’t really take too much time to do.  If you do these simple things, there will be not only less hassle when you get back in the office – making your vacation stick a bit longer, but also it will give you a chance to fully relax when your on vacation.  It’s just an ounce of prevention!

Sunset Quetico July 2000

Code Reviews – What good are they for?

  1. All database changes go through me. 
  2. Do or Review, do or review.

These have been my catch phrases since taking on the lead SQL developer role at my company, on my team.  There have many changes that I’ve had to review – many, many changes, most of them are fine, but occasionally I get a real head scratcher.

Things that I’ve caught reviewing code in the last three weeks (note these are also justifications I’m taking to my boss for more help):

  • VARCHAR(MAX) column – we avoid these for online reindexing
  • A cursor – we avoid these for performance sake – it also didn’t need it
  • Missing comments and Headers in stored procedures – we’ve got a standard header we use
  • An infinite loop – a testing procedure that uses service broker that would have been looping forever.
  • A date that should be UTC Date, but Getdate() was used

Is this good for the company?  This is the question I’m asking myself…all the time actually.  Running the numbers, how much time and money has my reviews saved the company?

For the next six months a guess would be:

varchar(MAX) column 

  • 10 hours of operational DBA/contractor time to write exception statements and meet on how to handle the online re-indexing
  • 10 hours development DBA time to migrate the data on the next release
  • 5 hours testing time

The cursor

  • 10 hours development DBA time to rewrite and test the change
  • 5 hours testing time

Missing Comments and Headers in stored procedures

  • 5 hours developer time

An infinite loop

  • 1 hour to troubleshoot and fix on release night with 30 people waiting around – 30 work hours total

A Date that should be UCT instead of Server time

  • 2 hours development DBA time to locate and fix

48 work hours total for about that the same amount of time reviewing code. 

Note these are just estimates, so I may be way off, but the old saying, “Pay me now or pay me later” really comes into play here.

There are a quite a few intangible benefits as well:

  • I know what’s going on with the changes and I’ve tried to communicate to the other DBAs the changes coming.  That should save lots of time for others
  • I have got to know a lot of developers who I normally wouldn’t talk to.
  • I’ve taught a few developers a few things about SQL.  Hopefully this will save tons of time down the road.
  • I’ve showed this site off to a fairly new SQL guy and he’s used the generate random data script a lot and it’s saved him some testing time.

 

Milt

The Lohn BOER Time Management System

Here’s a confession:  I consider myself a timeStopWatch management guru.  I think about time management and ways to improve efficiency and effectiveness all the time.  It drives my wife crazy.

It all started when I read The Seven Habits of Highly Effective People about 10 years ago.  Then one Saturday when I was single, I had a ton of stuff to do/wanted to do – so I made a list of everything.  I then prioritized it, crossed some items off, added a couple of related items and to my shock, I got most of the list completed.  I really couldn’t believe it, so that really got me thinking about how to do the mundane things quickly, so I can have time to do fun stuff.

Naturally working as a DBA for the last 13..14 years, I’ve been in many time crunches.  I think to survive as a DBA, you need to have some strategies for dealing with time crunches.

Here’s a method I came up with a while back.  I use it all the time, especially when I’ve got a bunch of work to do.  This is more for the “let’s get stuff done because we’ve got a lot to do” time rather than the “let’s sit down and figure out what needs to be done” time.  It’s called the Lohn BOER Time Management System and it’s a process that is done once per day for about 10  minutes, first thing in the AM.

B – Brainstorm

  1. No holds barred brain dump
  2. Look at Yesterday’s tasks to remember
  3. Look at meetings coming up
  4. Ask yourself, what do I really want to accomplish today?

O – Organize

  1. Move and delete brainstormed items to things that fit together and create your list for the day
  2. This is a combination of prioritizing and linking tasks
  3. Keep in mind what you really want to get done – those move to the top of the list
  4. Balance between big rocks (tasks you want to complete) and low hanging fruit

E – Execute

  1. Things are simple at this point – just follow the list
  2. Stuff will come up, try to stick with your list, but it is flexible, so you may have to go back a step to the organizing phase

R – Review

  1. Either at the end of the day or the beginning of the next day, take a couple of minutes to review your list.
  2. Some tasks won’t get done, others will need to be followed up on and others will also need follow through

So there it is.  I actually presented this system in a class I took a couple of years ago.  Some of the benefits of following this system are:

  1. Following through on tasks – some task are listed as complete, but need the follow through
  2. Marketing yourself by showing what you’ve done
  3. Do things more efficiently
  4. Do things more effectively
  5. Accomplish more

Give it a try – let me know if it works out for you.