Daily Coping 9 Mar 2021

I started to add a daily coping tip to the SQLServerCentral newsletter and to the Community Circle, which is helping me deal with the issues in the world. I’m adding my responses for each day here. All my coping tips are under this tag. 

Today’s tip is to start today by appreciating your body and that you’re alive.

I spend a lot of time working on my body, getting exercise and movement, trying to stay fit for the future. I’m not as good with my diet, but I’m trying.

In any case, I have some hard days. My body is sore, or as I age, different parts just hurt. In the last year, I’ve had days where I struggled to get comfortable or even walk.

However, I appreciate that I’m fairly healthy, I can practice yoga, weight lift, or ski, as I did last week. I’m grateful I’m alive and well, when far to many have lost their lives in the last year.

I’m taking a few minutes today to appreciate where I am and that I am here.

Posted in Blog | Tagged , , | 1 Comment

Logging Messages with Raiserror – #SQLNewBlogger

Another post for me that is simple and hopefully serves as an example for people trying to get blogging as #SQLNewBloggers.

I recently ran across some people discussing how to log some information in a script. One person was using PRINT, which I often use for quick checks, but someone else noted the RAISERROR works well, and you can customize messages.

For example, I can have this type of script:

DECLARE @d VARCHAR(20);

-- do stuff

SELECT @d = CAST( SYSDATETIME() AS VARCHAR(20));
RAISERROR('%s - something happened at this time', 0, 1, @d)

This allows me to add information into an error message. I can certainly construct @d with other stuff and then use that in PRINT, but I could get out of order messages. If  I add NOWAIT, I can ensure my messages get returned immediately.

There are lots of options with RAISERROR, which I still use in place of THROW at times. While I like THROW, I think it doesn’t always give me the options I want for error handling, such as logging to the Windows lots.

SQL NewBlogger

When I saw this, I realized that I didn’t know, or remember, some of the ins and outs of RAISERROR, so I spent a few minutes looking through docs and playing with the code. I then wrote this quick post to help me remember a bit more.

Short and quick is a good way to structure posts. I didn’t walk about all the options or ways I can use things. I’ll do some of that in another post.

Posted in Blog | Tagged , , | Comments Off on Logging Messages with Raiserror – #SQLNewBlogger

Daily Coping 8 Mar 2021

I started to add a daily coping tip to the SQLServerCentral newsletter and to the Community Circle, which is helping me deal with the issues in the world. I’m adding my responses for each day here. All my coping tips are under this tag. 

Today’s tip is to set an intention to live with awareness and kindness.

The world changed a lot in the last year. I’m coming up on a year of coping with the COVID-19 pandemic, and a year of coping tips. Amazing to think about. Apart from the pandemic, we’ve had protests around the world, difficult political times, as well as individual challenges with more remote work and learning, as well as the difficulties in seeing our friends and family.

Throughout that, one thing I’ve tried to learn, and struggled with at times, is to be aware and understanding of other. I don’t walk in other’s shoes, nor do I have their perspective. I am trying to appreciate that what might be easy or hard for me, could be completely different for others.

I also try to be kind, and trust that others are doing their best, or at least the best they can at that time.

Today, I’m reminding myself to carry that forward in the coming weeks and months.

Posted in Blog | Tagged , , | Comments Off on Daily Coping 8 Mar 2021

Disclosing the How

Many of us have written a computer program of some sort. Maybe just a script to complete a task, maybe complex software the clients interact with. For all of us, I would guess that we’ve been asked to do something, or we’ve asked ourselves to build a program, and we use that request as a specification for our code.

When we do this, how many of us get this right the first time? I’m sure some do, and the simpler or narrower the task, the more likely we get it right. However, we also sometimes make mistakes and realize that our specification wasn’t correct or that we interpreted the specification incorrectly. Even when I write code for myself, sometimes I realize I haven’t described when I need clearly enough, even in my own head.

That happens when I control the entire process. When someone else is my client, there are plenty of ways in which we can make mistakes, especially in decoding the specification. As we use more and more software to make decisions for us and automate our world, I wonder how often we’ve assumed the software works in a way different than it actually does. With machine learning and artificial intelligence programs, I think there is an even greater chance of a misunderstanding.

Recently I saw that in New York City there is a proposal to disclose how software is used in hiring decisions. Humans are barred from discriminating by law, but what about software? What if there are bias that can come out in the software based on how someone enters data?

I think there are certainly potential issues in having software evaluate individuals, though I do think software will do a better job than many people, once we’ve worked out the bugs and we know how we want it to work, and then we can compare that to how the algorithm produces results.

These are tough issues, and difficult projects. I also think it’s important that we analyze the data that is used in testing software, to be sure that it doesn’t contain its own biases. Ultimately I think having public data sets that are evaluated by many individuals is important. I could see a reference set of data and the expected results, or some range of results being required to ensure software meets the goals we want as a society. This, along with the disclosure of how algorithms work will make our use of software better over time.

Steve Jones

Listen to the podcast at Libsyn, Stitcher, Spotify, or iTunes.

Posted in Editorial | Tagged , | Comments Off on Disclosing the How