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

Choose the Second One

I wonder if any of you have ever tried this. When faced with a problem, think of a solution using whatever comes to mind. For most of us in the data space, this is a SQL-based solution, hopefully a set-based on for MSSQL. For Oracle, you might approach things differently. In any case, solve the problem.

Then force yourself to imagine that you weren't allowed to implement the first idea for some reason. No funding, no time, whatever the reason, you can't implement it. Maybe it's your team hates your ideas and just won't approve the PR.

Now, come up with a second idea. Something new and different. This might be harder in the data space with SQL than in application programming (C#, Java, etc.), but the idea is expressed in A Philosophy of Software Design by John Ousterhout. It's how he has often taught his software design course at Stanford. His approach is to force students to think more deeply about their design, and he often finds that they build a better system the second time.

Hard to do, but arguably a good idea. He talks about this in this podcast with the Pragmatic Engineer, and how many smart people underperform when building their software. He says it doesn't necessarily take more time to do this twice, which I am skeptical of. This might be easier for students, but in the real world, is it even practical? Often we're not working on very hard problems; we're working to implement something that needs to get done, and often isn't that well-defined. In fact, many of the things I find developers are asked to build things that either aren't well thought through or are relatively trivial. There might not be a good second solution for a lot of vague ideas whose value is unclear.

I do think that often we go down a path that quickly becomes complex. Engineers will start to overcomplicate things, so perhaps slowing down, spending a short period of time thinking of a second solution, debating another approach with others is worth a little time. Maybe you wouldn't implement it, but at least think it through and game out the approach with pseudocode.

I haven't run into anyone who approaches software this way on a regular basis, but if you do it, let me know. If you think it's a good idea, maybe it's worth trying at the beginning of the next sprint when you tackle a new design requirement.

Steve Jones - SSC Editor

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

 
 
 Featured Contents
SQLServerCentral Article

PostgreSQL in action with Opensearch

sabyda from SQLServerCentral

Learn about using Opensearch with PostgreSQL to improve performance and quickly return results to your users.

External Article

How to run PostgreSQL in Docker

Additional Articles from SimpleTalk

Get PostgreSQL running in Docker in minutes with this step-by-step setup guide. Learn to pull the image and run a container

Blog Post

From the SQL Server Central Blogs - Power BI Fun With Travels

Steve Jones - SSC Editor from The Voice of the DBA

I’m back from a great vacation. I had the chance to visit two new countries (for me and my wife) and many new cities as we cruised around the...

Blog Post

From the SQL Server Central Blogs - The flight recorder: Replaying what an AI agent did on my SQL Server

BLOB EATER from All About SQL

“What exactly did it do on my server?” is the first question a DBA should ask about any AI agent. AgentDBA answers it from its own records: every decision...

Delta Lake: The Definitive Guide: Modern Data Lakehouse Architectures with Data Lakes

Site Owners from SQLServerCentral

Ready to simplify the process of building data lakehouses and data pipelines at scale? In this practical guide, learn how Delta Lake is helping data engineers, data scientists, and data analysts overcome key data reliability challenges with modern data engineering and management techniques.

 

 Question of the Day

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

 

DML Trigger Types

How many types of DML triggers are there?

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

 

 

 Yesterday's Question of the Day (by Grant Fritchey)

PostgreSQL psql Meta Commands: Tables

Which of the following psql meta commands (also called backslash or slash commands) will provide information about tables within a database?

Answer: \dt

Explanation: The correct answer is \dt. You can also use \dt+ to get a list of tables with more detailed information about the tables. You can also use \dt with a pattern. So, if you wanted to list all tables starting with 're' you would run the command: \dt re*. The other commands are: \t - toggle Tuples only on and off \l - list all databases \dl - list all Large Objects in the database There's even more you can with meta commands in psql. Read all about it in the PostgreSQL documentation: https://www.postgresql.org/docs/18/app-psql.html

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.


Editorials
Communication, For Incidents and Life - Comments posted to this topic are about the item Communication, For Incidents and Life
Training the next generation - Comments posted to this topic are about the item Training the next generation
Risk Vs Reward, The never ending ROI discussion. - Comments posted to this topic are about the item Risk Vs Reward, The never ending ROI discussion.
I Struggle - Comments posted to this topic are about the item I Struggle
The DBA is Dead! Long Live the ! - Comments posted to this topic are about the item The DBA is Dead! Long Live the !
Article Discussions by Author
PostgreSQL psql Meta Commands: Tables - Comments posted to this topic are about the item PostgreSQL psql Meta Commands: Tables
Building a Support Ticket Triage Report with IIF() and CHOOSE() in SQL Server - Comments posted to this topic are about the item Building a Support Ticket Triage Report with IIF() and CHOOSE() in SQL Server
Reusing Customer Specific Order Filtering Logic with CROSS APPLY and an Inline TVF (Part 4) - Comments posted to this topic are about the item Reusing Customer Specific Order Filtering Logic with CROSS APPLY and an Inline TVF (Part 4)
PostgreSQL psql Meta Commands: Databases - Comments posted to this topic are about the item PostgreSQL psql Meta Commands: Databases
Hyperscale Replicas IV - Comments posted to this topic are about the item Hyperscale Replicas IV
The SQL Server Date Magic: When CAST and CONVERT Keep Your Index Seek - Comments posted to this topic are about the item The SQL Server Date Magic: When CAST and CONVERT Keep Your Index Seek
Using CHOOSE() - Comments posted to this topic are about the item Using CHOOSE()
Re-Seeding a Broken Log Shipping Secondary (Without Touching the Primary) - Comments posted to this topic are about the item Re-Seeding a Broken Log Shipping Secondary (Without Touching the Primary)
SQL Server 2022 - Administration
Anyone knows where to download SQLexpress edition for 2022 - Where to download earlier version of SQL server express 2022?   Thanks
SQL Server 2022 - Development
Trigger isn't working - Hi, I have a trigger, that works fine elsewhere but is not working at this location. At one point I put a print statement in the trigger just to see if it was firing. The message comes through, but the data is not being copied to the new table. USE [db name] GO /****** Object: […]
 

 

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

 

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