The Bit Bucket

Opinion: iPhone12 Pro is an interesting device but a lousy phone

I’d been using an iPhone6+ for quite a while, and it still worked fine. Lately though, I’d been running into things that needed a later version of iOS than what was supported on that phone. So I changed to an iPhone12 Pro.

So far, that’s been a big mistake.

One thing I’ve seen over the years while working with technology, is that development teams often get enamoured with the new features. And they forget to make sure that core functionality works as expected. The core functions seem to get lost in the weeds.

2021-02-09

SDU Podcast 82 with guest Kamil Nowinski now released

I recorded another podcast with an old friend recently. I met Kamil Nowinski in Poland when I was invited to speak at SQL Day. That event is on again this year, but as a virtual event only.

In our consulting work, we use Azure Data Factory frequently. Deploying it, can be a real challenge. Microsoft has a supplied method with ARM templates but that has issues. Kamil produced free tooling that’s in the Azure Marketplace and makes it much easier to work with.

2021-02-08

SDU Tools: Check if Lock Pages in Memory is Enabled on SQL Server

In our free SDU Tools for developers and DBAs, we have a lot of procedures and functions for checking system and database configuration details. One that we were asked for a function for, was the ability to check if the LockPagesInMemory (LPIM) setting was enabled, so we added that.

The function is called IsLockPagesInMemoryEnabled.

It takes no parameters, and returns a bit to indicate if the value is enabled or not.

2021-02-05

SQL: Global temporary tables are almost never the answer in SQL Server

I was doing some consulting recently and reviewing a developer’s code. I was surprised to find extensive use of global temporary tables. Let me start by saying this: global temporary tables are almost never what you should be using.

When I asked why he’d used them, he told me that he wanted the temporary tables that he created in his procedure, to be available to other procedures that were run from within the procedure. So in PROC-A, he was running PROC-B and PROC-C. A temporary table was created in PROC-A and he wanted to be able to use it in PROC-B and PROC-C.

2021-02-04

Book Review: Deep Medicine: How Artificial Intelligence Can Make Healthcare Human Again

I have a deep interest in artificial intelligence and how it will change the world. I regularly present sessions on what I see coming, technology-wise. Many examples in those sessions are based on breakthroughs related to medicine. So I was pleased to get to listen to Eric Topol’s book Deep Medicine: How Artificial Intelligence Can Make Healthcare Human Again.

Eric spends time discussing how much of existing medicine is functional yet quite broken. Very few doctors now really connect with and relate to their patients. Worse, misdiagnoses are becoming far too frequent, arguably because of this disconnection.

2021-02-03

DevOps: Fix: Can't clone an Azure DevOps repository in Visual Studio and SSDT

I’ve been working at a site that uses proxy servers for Internet access. And we were unable to clone a Git repository in Azure DevOps (AzDO) from within Visual Studio (VS). It was quite frustrating.

Visual Studio has got proxy settings and I had configured those:

They live in the system.net node within the settings.

VS was able to get out to the Internet, and I could find and try to connect to projects in AzDO but I couldn’t clone them from within there.

2021-02-02

T-SQL 101: 83 Determining if a string is a number or date with ISNUMERIC and ISDATE

Sometimes we need to determine whether a string is a date or whether it is a number.

In the first example above, I’m asking if the string ‘20190229’ is a valid date. You can see from the response (0) that it isn’t. That’s because even though it’s a valid date format, February in 2019 doesn’t have a 29th day. It’s not a leap year.

The value returned from the ISDATE function is a zero or a 1.  Curiously, the return value is of data type int. You’d think that a function that starts with Is and tests something would return a bit data type instead. But that’s just one of the curiosities of T-SQL.

2021-02-01

SDU Tools: COBOL-CASE in SQL Server T-SQL

I’ve had a lot of good feedback about the options that we’ve provided in our free SDU Tools for developers and DBAs for formatting strings. Someone recently asked for a format with all capitals and dashes in between. I realised we didn’t have that, and we’ve added it. Generally, in the industry, this is referred to as Cobol Case.

So, we added a function CobolCase.

It takes one parameter:

@InputString - the string to be formatted

2021-01-29

Book Review: Atomic Habits

Another book that I listened to recently, also fits into the “I nearly didn’t get past the first chapter” category. It was Atomic Habits by James Clear. By the end of this book though, I realised just how much I’d enjoyed it.

James makes a really interesting study into habits. Far more than anything I’d ever read before.

He makes it so clear how the compound effect of hundreds of small decisions leads to profound life changes. That was already pretty obvious to me but I loved the way he made this so practical. He calls the habits that are formed Atomic Habits.

2021-01-28

ADF: Keep linked service names the same across environments for Azure Data Factory

I recently recorded a podcast with Kamil Nowinsky. Kamil is well-known for creating some tools that make it easy to publish individual Azure Data Factory pipelines. It’s a far better method that the standard ARM (Azure Resource Manager) template deployment that’s provided by Microsoft.

However, if you use this method (and I recommend you do), you’ll be publishing pipelines separate to the linked services that your datasets connect to.

One mistake I’ve seen a few clients making lately, is that when they created the linked services in different environments, they did so with slightly different names. Because of that, they needed to modify the deployed objects after deployment. You don’t want to be doing that.

2021-01-27