What Makes A Good Post?

Kevin Feasel

2016-01-05

Meta

Tony Davis tells us what makes for a compelling article:

As an author, it’s a mistake to make wild assumptions about what the reader already knows about the technology, and why it’s useful. Don’t just ‘show the rooms’, but explain why they are interesting and how they might be used.

Beyond these fundamentals, I’ve written before about the simple ‘rules’ for writing a compelling blog post, and of the need to avoid hyperbole, colloquialisms, and acronym-overload, in favour of simple, plain English that can be understood internationally.

I’ll take a moment to talk about what makes you likely to show up on Curated SQL.  My expected reader is someone who has a few minutes to kill during the day and is looking for technical content.  They might occasionally have more time to dig into interesting topics, but more frequently, I’m imagining somebody on a pre-lunch coffee break.  To make things easier for those readers, I’m looking for four things:

  1. Is the post concise?  Coffee breaks won’t last long enough to watch a webinar.  This is most flexible criterion; if it’s interesting but a bit lengthy, I’m still liable to include it.
  2. Is the post technical?  We’re geeks; we want to learn something even on coffee break.  Non-technical posts can be great, but they aren’t really in the Curated SQL purview.
  3. Is the post at least somewhat novel?  If I’ve linked to someone taking a cursory look at Querystore, I’m probably not going to link to another overview of that product unless there’s something new in there.  With that said, “novel” is a hard goal; what’s new to me might be old hat to you, so there’s a balancing act here.
  4. Is the post well-written?  Poor writing makes technical content more difficult to understand, so sometimes I’ll skip an otherwise-interesting technical post and wait for somebody else to post a better version.

With that said, I gladly accept submissions via Twitter (@curatedsql).

Trickle Migration

Richie Lee encountered a use case for trickle migration:

Recently I needed to apply compression data on a particularly large table. One of the main reasons for applying compression was because the database was extremely low on space, in both the data and the log files. To make matters worse, the data and log files were nowhere near big enough to accommodate compressing the entire table in one go. If the able was partitioned then I could have done one partition at a time and all my problems would go away. No such luck.

Best way to eat an elephant, etc. etc.  Read the whole thing; you might be in a similar situation someday.

Use Parentheses Wisely

Jen McCown plays around with the AND and OR operators:

Specifically, how is it evaluated when your where clause says “WHERE This AND That OR Something AND that”, without any clarifying parenthesis?

Let’s play around with this. The simplest test scenario is a SELECT 1. If I get a 1 back, that means my WHERE clause evaluated to true, right? Right.

Parentheses should clarify statements.  If I see an “AND” and an “OR” in a WHERE clause, I want to see parentheses, even if you’ve gotten it right.  It’s too easy to misinterpret precedence.

Think About Installation

Dave Mason implores us to think of the installation:

Every tsql command in your SQL script(s) has the potential to fail. It’s important to catch and handle tsql errors so that they don’t cause the entire installation to fail. This will require a lot of defensive, resilient, fault-tolerant coding on your part. Here’s an example for creating the database. Note the emphasis on permissions, which I touched on in another post.

This is important advice if you send installation scripts to customers (even if you’re using a packager to generate an install EXE).

Capturing Blocking Information

Erin Stellato shows us how to capture details when processes are blocked:

To view the output from extended events you can open the .xel file in Management Studio or query the data using the sys.fn_xe_file_target_read_file function. I typically prefer the UI, but there’s currently no great way to copy the blocking report text and view it in the format you’re used to.  But if you use the function to read and parse the XML from the file, you can…

If you can’t buy a tool which monitors long-term blocking, you can still build it yourself pretty easily.

Asking The Right Question

Buck Woody argues that the hardest thing about data science is asking the right question:

When I started down the path of learning Data Science, I was nervous. I have to work hard at math – it’s a skill I love but one that does not come naturally to me. I was nervous because I thought the most daunting task I would face in Data Science waslearning all the algebra, statistics, and other maths I would need to do the job.

But I was wrong.

Math isn’t the hardest thing in Data Science. Actually, since it’s so mature, and documented, and well-known, it’s quite possibly the easiest thing to conquer in the skillset. No, the hardest thing about Data Science is asking the right question.

I’ll lodge a bit of a disagreement here.  I’m okay with the argument that asking the right question is the toughest part, but the math’s not particularly easy either…  Knowing when to use which distribution, which model, and which parameters requires a definite amount of skill.

Multi-Tab Reports With R And jQuery

Matt Parker shows us how to create multi-tab reports using jQuery UI and R data:

But R is also part of an entire ecosystem of open tools that can be linked together. For example, Markdown, Pandoc, and knitr combine to make R an incredible tool for dynamic reporting and reproducible research. If your chosen output format is HTML, you’ve linked into yet another open ecosystem with countless further extensions.

One of those extensions – and the focus of this post – is jQuery UI. jQuery UI makes a set of JavaScript’s most useful moves available to developers as a robust, easy-to-implement toolkit ideal for adding a bit of interactivity to your knitr reports.

Generating a page from R is one of those good ideas that I probably don’t want to see in a production environment.

Conformity In Self-Service BI

Paul Turley has a nice post on some of the risks of self-service BI:

In some solutions with a manageable scale and a reasonable tolerance for a certain amount of data loss and inconsistency, this approach may be just fine.  There are very good reasons for inconsistencies between sets of data that come from different sources.  When 20 million fact rows are obtained from an online ordering system and .1% don’t have matching customers records that come from the system used to manage the master customer list, it may simply be a question of timing.  Or, maybe the definition of “customer” is slightly different in the two systems.  Chances are that there are also legitimate data quality issues affecting a small percentage of these records.

Whatever the case may be, a data conformity or potential data quality issue in this design scenario falls on the model designer to either fix or ignore.  Again, this may or may not be a concern but it is a decision point and might raise the question of ownership when questions about data quality are raised.

Paul then goes on to show how this gets fixed in a traditional model and where you need to watch out with SSAS Tabular.  Good essay worth reading.

Visualizing R In Power BI (Too)

Dustin Ryan is also looking at R visualization in Power BI:

Not only can we create and download custom visuals from PowerBI.com to extend the capabilities of Power BI, we can use R to create a ridiculous amount of powerful visualizations. If you can get the data into Power BI, you can use R to perform interesting statistical analysis and create some pretty cool, interactive visuals.

Dustin and Jan Mulkens are working on similar posts at the same time, so watch both of them.

Using NOEXPAND Hints

Paul White expands upon NOEXPAND:

There is another consequence of not using the NOEXPAND hint, which I mentioned in passing a couple of years ago in my article, Optimizer Limitations with Filtered Indexes:

The NOEXPAND hints are needed even in Enterprise Edition to ensure the uniqueness guarantee provided by the view indexes is used by the optimizer.

If you use indexed views in your environment, read this article.

Categories

August 2018
MTWTFSS
« Jul  
 12345
6789101112
13141516171819
20212223242526
2728293031