Problems displaying this newsletter? View online.
SQL Server Central
Featured Contents
Question of the Day
The Voice of the DBA
 

A Programmer's Attitude

I caught this piece on the need for programmers (developers) to not trust anyone, including themselves. It is written by a software developer for other software developers, but I think it can also apply to database work as well. It is a bit long, but it starts with the nature of abstractions in the world and how they let us work with simpler models of a situation or environment. However, most abstractions are leaky, and our assumptions about them can cause our systems to fail.

The leap from trust to abstractions seems a bit funny, but it makes some sense. We ought to simplify our situations so that we can generalize how to solve them, but we also need to verify things. There are a few examples, one of which is we ought to use tests to ensure the code does what we think it does, including using a wide variety of data. We ought to ensure that refactoring something doesn't break the system, or more often for databases, we return the same results. Changing a query to run more efficiently with joins or a window function instead of a loop or subquery should return the same results. Not just for one row but all rows, and across different inputs.

One I especially like is the check on deployments. If we changed our code and had a deployment, did our code actually get deployed? In today's world where different people might be responsible for merging and deploying code than those writing the software, we might want to verify that our changes actually got deployed. Perhaps reviewing deployment reports or logs can help ensure that we know the state of our live systems in addition to those in development.

There are some suggestions for how to become a better software developer, and as you might guess, this requires learning. I think in today's world, some group exercises (katas) or reviews can be helpful as well. Maybe even practicing new techniques in a sandbox and running them through a PR process to let others see them. It can be scary to ask others to review your code when you are learning, but they might teach you something, or you might teach them something. We build in teams; we should think about learning in teams, at least periodically.

Becoming a successful software professional, data or application, takes regular work to improve our skills. Just as a woodworker might practice with their tools or a chef with recipes, we ought to practice with our tools. I'd hope that many organizations would also see this as something that needs to be encouraged with some amount of time allocated towards ensuring your staff continues to improve and produces high-quality results.

Steve Jones - SSC Editor

Join the debate, and respond to today's editorial on the forums

 
 Featured Contents
SQLServerCentral Article

Notebook Jobs in Azure Data Studio

Steve Jones - SSC Editor from SQLServerCentral

This next article in the series looks at notebook jobs in ADS.

External Article

Deleting Documents from a MongoDB Collection

Additional Articles from SimpleTalk

So far in this series, we’ve looked at different ways that you can add, retrieve, and update documents in a MongoDB collection. This article continues that discussion by explaining how to use MongoDB Shell to delete documents from a collection.

Blog Post

From the SQL Server Central Blogs - Only Capture Extended Events For a Given Time

Grant Fritchey from The Scary DBA

It’s a great question. Let’s say you want to capture stored procedure completions. But, you only want to capture them between 3AM and 4AM. Can you do it? Output...

Blog Post

From the SQL Server Central Blogs - Not Selected for the PASS Data Community Summit 2024

Steve Jones - SSC Editor from The Voice of the DBA

I got this in an email about a week ago from the PASS Data Community Summit. There’s more to it, but essentially I submitted 3 talks (2 on deployments,...

Pro T-SQL 2022: Toward Speed, Scalability, and Standardization for SQL Server Developers

Site Owners from SQLServerCentral

Learn how to write and design simple and efficient T-SQL code. This is a hands-on book that teaches you how to write better T-SQL with examples and straightforward explanations.

 

 Question of the Day

Today's question (by Steve Jones - SSC Editor):

 

Synapse Analytics History I

Before Synapse Analytics was a service in Azure, what was the name of the analytic data warehouse platform in the Azure cloud?

Think you know the answer? Click here, and find out if you are right.

 

 

 Yesterday's Question of the Day (by Steve Jones - SSC Editor)

Query Store for DDL

How do I configure Query Store to capture plans for CREATE and ALTER DDL commands in SQL Server 2022?

Answer: Query Store does not capture DDL plans

Explanation: Query Store does not capture DDL plans. Ref: Information in the Query Store - https://learn.microsoft.com/en-us/sql/relational-databases/performance/monitoring-performance-by-using-the-query-store?view=sql-server-ver16#About

Discuss this question and answer on the forums

 

 

 

Database Pros Who Need Your Help

Here's a few of the new posts today on the forums. To see more, visit the forums.


SQL Server 2017 - Administration
what are the software' required for sqlserver dba in laptop to install - HI Team, what are the software's required for sqlserver dba in laptop to install in new company can you list out things where i dont have access need to reach access team to install , i need to provide the list of software's required  
SQL Server 2016 - Administration
log shipping switchover and switchback - I have log shipping in my environment. Could you please let me know steps to switchover and switchback for doing DR  drill
SQL Server 2019 - Development
needing to insert 2 sets of numbers to a table to use as ranges for a query - the ranges (a lot) need to have a preset spacing between each set of numbers. value1, value2 -999999999,-998999999 -998999998,-997999999 -997999998,-996999999 and so on until i reach the limits of +999999999 not a gap/island thing have a query for between those ranges, don't care how long it takes to add the ranges or query the ranges.
UPSERT question for performance and efficiency - Hello SSC! First, I would like to thank everyone for responding to my posts. It is greatly appreciated! I have a question about an UPSERT proc that I am in the process of writing. I have a table with over 200 columns that I basically need to perform a MERGE on. The DELETEs are already […]
Reporting Services
Is this format of reporting possible in SSRS - Hi All, I am trying to mimic an excel report in SSRS using VS. Please see the below screen shot. Can I exactly mimic this in SSRS?  Will it be a tabular or matrix and how can I get the Qtr1 Qtr2 Qtr3 and Qtr4 fields. I have a date field in the dataset. Your […]
Calculated Field expression is not showing - Hi All, I have created few calculated fields like Quarter, month and few others. I have saved the report. This I created using VB Studio. When I logged back in I can see the calculated fields but I do not see the "fx" expression editor. Any idea what might have happened? Thanks
General
Add custom toolbar to SSMS - Hi all   I'm fairly certain I've done this before but can't figure it out.....   99% certain of our work is in SSMS. We do, however, use a couple of PowerShell scripts and it's getting annoying to have to go to the scripts and run them outside of SSMS. I want to add a […]
Add custom toolbar to SSMS - Hi all   I'm fairly certain I've done this before but can't figure it out.....   99% of our work is in SSMS. We do, however, use a couple of PowerShell scripts and it's getting annoying to have to go to the scripts and run them outside of SSMS. I want to add a custom […]
Powershell
Pase keywords in text string - I've been trying to find an example to parse a record that looks for a Beginning keyword then based on that finds another keyword on the same line then pulls the next x  values that are quoted. example: $data = @" this is a sample cstsums record with Values('xxxx','ppppp','45gheeet','pperere') $data = @" this is a […]
Integration Services
Buffer failed - I am fairly new to SSIS and working on executing the existing package which is very complex. The last step of this package executes a child package, which reads the data from the source, adds some logic, and gets the data into the staging. All the steps are running fine except when the last step […]
SQL Saturday and User Group Organizers
SQL Saturday Pittsburgh 2024 (#1094) - Call for speakers and other event details - Please see the following link. https://sqlsaturday.com/2024-10-12-sqlsaturday1094/ Note that the "Call for Speakers" is in-progress and ends on 31 July 2024. (See the clickable link on the page above. With some luck, one of the sessions I submitted will be selected and I'll "make the trip" to Pittsburgh!
Events
SQL Saturday Pittsburgh 2024 (#1094) - Call for speakers and other event details - Please see the following link. https://sqlsaturday.com/2024-10-12-sqlsaturday1094/ Note that the "Call for Speakers" is in-progress and ends on 31 July 2024. (See the clickable link on the page above. With some luck, one of the sessions I submitted will be selected and I'll "make the trip" to Pittsburgh!
SQL Server 2022 - Development
Updated Table Not Displaying Data - I have a table that contains data only to Financial Year/FY 2024: CREATE TABLE [Prod].[IMETA - Calendar Days Data_Table_Temp]([Date] [datetime] NULL,[FY] [nvarchar](255) NULL,[Period] [nvarchar](255) NULL,[Quarter] [nvarchar](255) NULL,[Day] [float] NULL,[Month] [float] NULL,[Year] [float] NULL,[Loaddate] [datetime] NULL) ON [PRIMARY]GO   New table: CREATE TABLE [Prod].[IMETA - Calendar Days Data_Table_Other]( [Date] [datetime] NULL, [FY] [nvarchar](255) NULL, [Period] [nvarchar](255) […]
TSQL Help, Possible a recursive CTE - Hi I have 2 tables Table A JoiningID, MainID 1010619, 646703 991840, 238649 991840, 577578 991840, 222063 991840, 564824 991840, 223543 Table B MainID, JoiningID 646703, 991840 675515, 1010619 These tables are obviously a lot bigger with lots of sets of IDs, this is just one example of where there is a relationship and the […]
Calendar & Fiscal Year Table - I have a Calendar table that need to be displaying Fiscal Start and End Date as in below: The Calendar is currently have data for years 2023 - 2028: -- Calculate the number of days per year in the IMETA_Calendar table SELECT YEAR([Date]) AS [Year], COUNT(*) AS [NumberOfDays] FROM [Prod].[IMETA_Calendar] GROUP BY YEAR([Date]) ORDER BY […]
 

 

RSS FeedTwitter

This email has been sent to {email}. To be removed from this list, please click here. If you have any problems leaving the list, please contact the webmaster@sqlservercentral.com. This newsletter was sent to you because you signed up at SQLServerCentral.com.
©2019 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved.
webmaster@sqlservercentral.com

 

- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -