T-SQL Tuesday #114 – Puzzle Party

Invitation this month from Matthew McGiffen.

A few years back I started running regular SQL workshops in my workplace. Teaching beginners the basics of querying databases with SQL, as well as more advanced topics for the more advanced.

During one session we were discussing the issue of knowledge acquired being quickly lost when people didn’t get the chance to regularly practice what they’d learnt. One of the attendees suggested that I should be assigning them homework.

I could see from the faces of everyone else present that the word “homework” struck an unpleasant chord. Perhaps reminding them of school days struggling to get boring bookwork done when they’d rather be at relaxation or play.

Okay, so homework maybe wasn’t going to go down well, but I figured everyone likes a good puzzle. So every Friday I started creating and sharing a puzzle to be solved using SQL. This went on for the best part of a year, then other things got in the way and gradually I stopped.

This is my invitation to you this T-SQL Tuesday. Write a blog post combining puzzles and T-SQL. There’s quite a few ways you could approach this, so hopefully no-one needs be left out for lack of ideas:

  • Present a puzzle to be solved in SQL and challenge your readers to solve it.
  • Or give us a puzzle or quiz about SQL or databases.
  • Show the SQL solution to a classic puzzle or game.
  • Provide a method for solving a classic sort of querying puzzle people face.
  • Show how newer features in SQL can be used to solve old puzzles in new ways.
  • Tell us about a time you solved a problem or overcame a technical challenge that was a real puzzle.
  • Or just make your own interpretation of “puzzle” and go for it!

There’s some great stuff out there already. Itzik Ben-Gan’s done a bunch of them. There’s Kenneth Fisher’s crosswords. The SQL Server Central questions of the day. Pinal Dave’s SQL Puzzles. And there’s a few on my blog too if you take a look back:

Let’s puzzle together, trying to solve the challenges each other sets, and make it a real puzzle party!

🙂

Have fun all

T-SQL Tuesday #113 – What Do You Use Databases For?

Invitation and follow-up from Todd Kleinhans.

This month’s T-SQL Tuesday is about what do YOU use databases for in your personal life that you are willing to share?

We work with data all day and sometimes all night long. When we turn off work, some of us continue to use data and databases to enhance our professional growth and learning. I know on some days the last thing I want to look at after work is- another screen full of data. Kinda of like how some auto mechanics have poorly running cars. How can that be? Because they work on cars all day long and they are tired of working on cars- including their own.

But I’m curious- outside of work and learning, what do you personally use databases for? Tracking books you have, recipes, collections, etc? While it can be said using databases for personal use could be either overkill or a hammer in search of nails on the other hand, it is exactly what they are for- storing data.

Years ago I challenged my daughter- I would give her $100 to go through a book about databases, sit her in front of SQL Server Developer Edition, and we would build a database to track our VHS collection. (VHS, heh, yes I’m old. Now get off my lawn).

We used a book called The Manga Guide to Databases.

Cover
Back

It was great except they used the non-ANSI syntax for joins…

non_ansi

We whiteboarded and created a simple database.

The experiment was a ton of typing. And linking to the movies in Wikipedia. And then capturing some information about personal family events based on date. BTW, she is now a film student in college.

More than twenty years ago I was into FileMaker Pro working for a defense contractor. We needed a way to store many pictures about launch site equipment. It was my first time trying to figure out: a) how to store pictures in a database b) how to store metadata about the pictures and c) how to search and retrieve the pictures. There was no auto-tagging, object recognition or any sophisticated technology to help me out. So I used what tools I knew about. The project was a success but took way more time than I would have liked.

I am into pictures and have been looking at ways to store and retrieve them for quite some time. Some things work and some things don’t work so well. On 06Apr19, I will be presenting in Colorado Springs, Colorado for SQL Saturday on Storing Images in a Database – Tips and Techniques.

As I learn more about Python I’ll be able to do more sophisticated things. Like the kind of things I couldn’t do twenty years ago. One of them I want to tackle is how to extract text out of images. Ever see people taking pictures during a presentation with their smartphones? Or see code in a YouTube video? How do you get the text of the code out? Most people I think would say they just re-type it. But what if you could use software to do that for you? So I’m fiddling with Python-tesseract.

So what do you use databases for in your personal life that you are willing to share? Blog about it. I’m curious to see the range of uses and even if you don’t use databases for personal stuff, what do you see as the future of organizing personal data?

T-SQL Tuesday #112 – Dipping into your Cookie Jar

Invitation and roundup from Shane O’Neil

I’ve been listening to audio-books on the way into work, and the current one struck a cord with me.

It’s “Can’t Hurt Me” by David Goggins and it is about his story from a rough upbringing “into a US Armed Forces icon and one of the world’s top endurance athletes“.

One part of the story that has stuck in my mind is where he talks about “dipping into the cookie jar“. It’s an analogy that is easy to follow when you understand it.

Dipping into the Cookie Jar is about when the going gets tough and you don’t think you can handle anymore, then you think back about your accomplishments and take some sustenance from them. You dip back into that cookie jar and use whatever energy that provides to keep going.

Things are going to be tough for everyone at some stage or another. There are going to be low points spread out among the highs. While I know that reaching out to the SQL Family is an amazing external resource to help lift the members up, I think it’s also important for people to remember those accomplishments and realise that they have an internal resource as well.

That is what I want from the contributors of this T-SQL Tuesday, those memories that they can think back on for sustenance. Like the humble cookie, I want a humble brag.

Share some cookies

This month’s T-SQL Tuesday is about finding those cookies and sharing them.

These cookies do not have to be massive. Like the various cookies out there, they can be big or small – or even technical.

So tell me about a time when you had an accomplishment that can keep you going.

  • About the time you made your first server specification for a new SQL Server instance.
  • About the first time you wrote out the syntax for a Recursive CTE by memory.
  • About the time you knew the answer to a technology question from someone else.
  • About after all the study you passed the certificate you were after.
  • About the time you created a PowerShell script, or a Python script, etc. and it worked.
  • About the time you created a PowerShell script, or a Python script, etc. and it didn’t work but you were able to fix it.
  • About how you inherited an unorganised instance and made improvements to it.
  • About how you stood, trembling and scared for your first presentation, but you did it in the end.

The above “cookies” are all technical but your ones don’t have to be. Whatever your favourite cookie is, let me know.

T-SQL Tuesday #111 – What is Your “Why?”

Invitation and roundup from Andy Leonard.

What is Your “Why?”

I enjoy math. I noticed a pattern learning math, perhaps you experienced something similar. I found arithmetic an exercise in memory. I have a good memory (well, I had a good memory…) so memorizing a bunch of rules was no big deal. 

When I learned algebra, arithmetic made more sense. In addition to the memorized rules, I saw why the rules existed. I understood the rules better as a result.

This pattern held all through my math education. I understand algebra better once I learned geometry. I understood geometry better once I learned trigonometry. I understood trigonometry better once I learned single-variable calculus.

An Axiom (for me)

I notice a similar pattern applies to my career (or careers, as the case may be). I’ve served in many roles: 

  • Farm laborer
  • Musician
  • Stockyard laborer
  • Truck driver
  • Service technician
  • Soldier (part-time in the Virginia Army National Guard)
  • Electrician
  • Electrical engineer
  • Electronics technician
  • Manufacturing automation integrator
  • Software developer
  • Author
  • Data professional
  • Entrepreneur

The similar pattern manifests itself in this manner: I’ve enjoyed the position – and more success in the position – when I had a reason to do the work; some reason other than a paycheck. In some cases, I had multiple “why’s” beyond remuneration. For example, I join the Virginia Army National Guard to learn electronics and serve my country – to especially protect everyone’s right to free speech guaranteed by the First Amendment. I may not agree with what people say, but I was (and still am) willing to fight and die to preserve the right of US citizens to say whatever they want. 

As a result, I enjoyed serving in the National Guard (for the most part). I learned more. I learned better, I think, because I enjoyed serving.

Entrepreneurship

Entrepreneurship can be challenging. I believe one needs a “why” – or perhaps several “why’s” to remain an entrepreneur. The “why” cannot simply be money. Money isn’t inconsequential, mind you, but I believe the best “why’s” are less tangible.

Passion plays a major role for me. When business isn’t going well or when business is going too well, a couple intangible “why’s” – passions for both entrepreneurship and the kind of work I am blessed to do – inspire me to keep a steady hand on the tiller.

What is Your “Why?”

That’s the question this month: Why do you do what you do?

I look forward to your replies.

T-SQL Tuesday #110 – Automate All the Things

Invitation and recap from Garry Bargsley.

Have you heard the phrase “Automate All the Things”?  That seemed to be the top buzz phrase of 2018 and means different things to different people.

Kicking off the T-SQL Tuesday season for 2019, I would like to ask, what does “Automate All the Things” mean to you?  Everyone’s environment is different, everyone’s day-to-day looks different, everyone is a fan of different technologies and everyone’s environment is of different size.  While I might want to automate checking of my backup success across my 500 servers, you might want to automate how new servers are provisioned.  This can be a very broad topic, that could include a broad range of technologies.  You might choose one type of technology to accomplish a task, where I might choose another.

So technically there are two tasks for this month:

  • What do you want to automate or what automation are you proud of completing?
  • What is your go-to technology for automation?

Possible suggestions/ideas:

  • PowerShell
  • Chef
  • Ansible
  • Terraform
  • DevOps
  • tSQLt
  • Containers
  • Cloud
  • VSTS
  • Python
  • Bash
  • Code Deployments
  • VS Code
  • dbatools
  • T-SQL (honorable mention)