Sunday, October 29, 2017

The #SQLSAT Speaker Goodie Bag

Last summer, I heard about an awesome idea for speaker gifts at SQLSat Pensacola 2017 from organizer Karla Landrum and Tamera Clark (SQLSat Nashville). It was our 9th year of SQLSat Baton Rouge, we've had polo fatigue and were looking for fresh ideas for useful, memorable speaker gifts. SQLSat Nashville's speaker goodie bags, full of day-of-conference supplies, was an inspiration.

I personally heard that at least three speakers went to the bag during SQLSatBR, specifically for the Mini DisplayPort-to-everything video adapter common to laptops. It's an annual occurrence that someone with a newer laptop is dismayed to find they've left their adapter at home, and they don't have a way to hook up to the room's VGA or HDMI cable. I've heard other speakers mention it at user groups meetings since. And just today, my wife Christine (hrtact.com) mentioned that at work she pulls it out for the various useful items.

So in advance of the SQLSat Organizers meeting at PASS Summit this week, I figured I'd list out the contents and sourcing for the goodies that made it into the bag. For some of these, you can even "subscribe and save" via amazon for a huge discount... for one month. ;)

The idea is to give a useful pack of inexpensive things in a bag that sits nicely inside of a laptop bag. The goodies are small, bulk-purchased, inexpensive things that someone would need the day of a speaking event. Links to the items, almost entirely sourced from Amazon.com, are provided only as examples.
The total cost per bag ended up being around $31, or a little more than the cost of an embroidered polo shirt. The biggest single expense (and most often used) item was the mini DisplayPort, roughly half the cost of the entire bag.



Tuesday, October 03, 2017

VS Code: PowerShell and focusConsoleOnExecute

If you're used to the behavior of SSMS or PowerShell ISE where upon executing code in the script panel, your cursor stays in the script panel, then the behavior of Visual Studio Code's PowerShell default might be annoying. By default in Code, your cursor moves down to the PowerShell console terminal upon executing code.

Maybe that's your thing. If not, there's a preference you can change, immediately.

In Code, go to the File Menu -> Preferences to launch the User Settings screen. There's a setting to overwrite the default called powershell.integratedConsole.focusConsoleOnExecute, that's what you're looking for. Add it to the right-side of the Code settings window like this:
{ "powershell.integratedConsole.focusConsoleOnExecute": false,
}

It'll look like this:

The change takes place immediately.
Not using Code yet? Hop to! https://code.visualstudio.com/Download

My former long-ago colleague and PowerShell prize-winning guru Mike F Robbins has a good blog post and video getting you up to speed on Code, he discusses powershell.integratedConsole.focusConsoleOnExecute and more.



Thursday, September 14, 2017

Twilight Timezone: Date and Time Architecture in your Applications aka Use DateTimeOffset, Your Future Self Thanks You

Thanks to everyone at a joint meeting of the Baton Rouge .NET and SQL Server User Groups who joined my colleague Steve Schaneville and me for a presentation on date/time data architecture in modern applications last night.

We reviewed the SQL and .NET architecture for date/time storage an informative and thought-provoking talk about handling timezones in your application architecture. Dealing with Time Zones is disconcerting, rarely straightforward, and often complicated! In the end, our architecture recommendations lead to two likely best paths - either using datetimeoffset (and optionally also storing the Time Zone Name information in a separate field) or storing the date and time in separate fields. (But preferably datetimeoffset.) There are few advantages and major disadvantages to storing only UTC data or all-in-one time zone data.

Steve and I are the principal consultants for appdev and SQL Server respectively at Sparkhound, and have worked hard to put together a joint presentation on this topic that is valuable to both audiences. We got a lot of great questions and positive feedback, as well as more notes to add to our presentation the next time, which will likely be at Houston Tech Fest 2017 in October. Got questions/feedback for us, actual use cases or lessons learned? Please reach out to us, our emails are at the end of the slide deck below.

You can download the slidedeck and sample code here.