SQLServerCentral - www.sqlservercentral.com

A community of more than 1,600,000 database professionals and growing

Featured Contents

Featured Script

The Voice of the DBA

How Perfect Should Our Software Be?

I've a fan of Basecamp (formerly 37Signals). I think that Jason and David run their company, business, design, and software in a fascinating way. If I didn't work for an amazing company (Redgate Software), I'd might see if they want a DBA/evangelist. 

Over the years I've read a number of interesting posts from them, including their ReWork book, and I've learned a lot. They make me think, give me ideas, and a perspective I might otherwise miss about work, life, or something else. They tend to focus on software and since I'm a part of that business, I like reading those posts. I ran across a good one from Jonas Downey called "The right amount of perfect".

The piece talks about the tendency to want our work to be perfect. We want our new software, class, table, method, stored procedure to be right. We craft systems to work well and meet requirements. Sometimes, perhaps often, we over engineer things. At least, the very talented people I know tend to over engineer. The less talented more often than not just barely get things working, meeting only one particular case, and leave behind a load of technical debt, often in a steaming pile.

Finding a balance for how good our software should be can be hard. I do think that often it doesn't take longer to write good code than bad code, but it does take time to learn to write better code and practice using patterns that perform well, both in terms of solving a problem and not using too many resources. Early on, when experimenting, it does seem more important to try things, even if they don't work well. Later, when we are more confident that this particular feature/view/method/etc. is highly likely to be used, we ought to ensure we refactor code or adjust our design to become more "perfect". We still have to balance how robust we make code given the fact that we always have more work than time, but it should be better than a the first, quick cut at getting a working feature.

The worry I have had, and likely many of you, is that our quick design, our hasty prototype, will be used in production without any time given to rebuild the underlying code properly. That is certainly a concern, and I don't have a good solution if your management insists on releasing poor code and living with poor performance. The one piece of advice I can give is to learn patterns that work well for queries, for database design, for error handling, or any other task. That won't allow you to build an extremely robust system quickly, but it can help you minimize the amount of poor coding you do when under time constraints. You'll write more good code the first time.

Steve Jones from SQLServerCentral.com

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


The Voice of the DBA Podcast

Listen to the MP3 Audio ( 4.0MB) podcast or subscribe to the feed at iTunes and Libsyn. feed

The Voice of the DBA podcast features music by Everyday Jones. No relation, but I stumbled on to them and really like the music.

ADVERTISEMENT

Featured Contents

 

Learning about DML Triggers

Steve Jones from SQLServerCentral.com

Triggers can be confusing and complex for many developers new to SQL. Steve Jones gives a few ideas for learning more about this construct as well as practicing writing them. More »


 

Picking over the Bones of a SQL Injection Attack

The best way to learn how to protect your databases from SQL Injection is to see it in action. In this article, we attack a vulnerable SQL Server REST interface, explain how the attack unfolds, the mistakes that made it possible, and SQL Monitor's vital role as the 'canary in the mine'. More »


 

Top 10 Databases for 2019

Additional Articles from Database Journal

A look at ten top databases fighting for mind-share in 2019. More »


 

From the SQLServerCentral Blogs - How to Encrypt and Restore Your SQL Server Database Backups

Gavin Draper from SQLServerCentral Blogs

We’ve had backup encryption out of the box since SQL Server 2014, yet I’ve rarely seen it used. In an... More »


 

From the SQLServerCentral Blogs - Defaults In msdb Database

Jason Brimhall from SQLServerCentral Blogs

Today is a day to discuss defaults. It started with the day being TSQL Tuesday and having a topic of... More »

Question of the Day

Today's Question (by Steve Jones):

Which of the following is true about creating a memory-optimized table?

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


We keep track of your score to give you bragging rights against your peers.
This question is worth 1 point in this category: Memory Optimized Tables.

We'd love to give you credit for your own question and answer.
To submit a QOTD, simply log in to the Contribution Center.

ADVERTISEMENT

Expert T-SQL Window Functions in SQL Server

Expert T-SQL Window Functions in SQL Server takes you from any level of knowledge of windowing functions and turns you into an expert who can use these powerful functions to solve many T-SQL queries. Replace slow cursors and self-joins with queries that are easy to write and fantastically better performing, all through the magic of window functions. Get your copy from Amazon today.

Yesterday's Question of the Day

Yesterday's Question (by Steve Jones):

In SQL Server 2017, what is the most number of parameters we can use in a stored procedure?

Answer: 2100

Explanation:

There is a limit of 2100 stored procedure parameters that can be defined.

Ref: CREATE PROCEDURE - click here


» Discuss this question and answer on the forums

Featured Script

Find text in sql modules

Peter Shilovich from SQLServerCentral.com

Just compile and exec with desired parameters

More »

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 : SQL Server 2017 - Administration

Remote connect to a linux SQL instance - I installed my first instance of SQL server on Linux to experiment it. The Linux is installed using Virtualbox on my...


SQL Server 2017 : SQL Server 2017 - Development

removed zeroes from numeric column -

Get total waiting time and number of rows from date intervals - In the below given schema and data, we need to find the time waited for each vehicle and number of...


SQL Server 2016 : SQL Server 2016 - Administration

request for info on mirroring configuration - hello everybody on a same mirroirng server Is it possible to have bases in synchronous mode and others in asynchronous mode thanks

General slowness - Okay so this should be pretty much everywhere and in every business that you come across a situation wherein the...

Clustering Vs Always on - For 2 node cluster setup, my understanding is the i need to configure two different servers as part of one...

Why are my 2 Transaction Logs growing at roughly the same speed? - I think I may have the answer, I just cannot find the definitive version. I have a database with 2...

Generate SQL-script that creates all logins with appropriate permissions - Hi, colleges. How can I create a script that contains information for creation all SQL-logins including database users with all permissions? It'll...

Can we add Multiple IP's to a Listener in same subnet- SQL 2016 Alwayson AG - currently, I have 3 nodes in WSFC with a file share witness. However, Node A and NOde B- 2 nodes...


SQL Server 2016 : SQL Server 2016 - Development and T-SQL

Sort already comma separated list - Hi I have values like this in a column which basically is the exact same thing if sorted . ORM;


SQL Server 2014 : Administration - SQL Server 2014

sql restart - When I tried to restart the sql server  it showing as change pending, how do I bring it online

Failed to initialize sqlcmd library with error number -2147467259 - Hi all, I have the following problem: I have a three node cluster with three sql instances. All are SQL Server 2014...


SQL Server 2012 : SQL 2012 - General

how to connect Cassandra and report the data using SSRS - Hi Friends, I have a requirement to generate report through SSRS 2012 from Cassandra DB.But I have no idea how does...


SQL Server vNext : SQL Server 15 - Administration

Login error - The login is from an untrusted domain and cannot be used with Windows authentication. (Microsoft SQL Server, Error: 18452) - Hi All, I am getting below error while trying to connect SQL from remote server. Local login is working fine. Can...


SQL Server 2008 : SQL Server 2008 - General

SQL backup to ACCDB - Hi All, Currently i have an access front end with links to SQL tables.  We now have a need to save...

bcp Invalid character value for cast specification - Hello SQLServerCentral colleagues, I'm getting the error: Invalid character value for cast specification trying to bcp in a large file to...


SQL Server 2008 : T-SQL (SS2K8)

TOP Clause performance is slow - I have 2 tables combined with union all operator in procedure.First table contains 20 million records  and second table contain...


Reporting Services : SSRS 2016

Page setup for reporting - setting header and footer page margins - Hi, Not sure if this is the correct place to post so apologies if not (please let me know which sub...


SQL Server 2005 : SQL Server 2005 Integration Services

VS_NEEDSNEWMETADATA error - Hi, I am trying to run an SSIS package via a job. However, I get the below error: Started: 11:18:08 Error: 2011-08-17...


SQL Server 7,2000 : Administration

Finding out Total Disk Space in TSQL - anyone know any workaround in TSQL who can give this result set? Drive letter | Total Disk Space (MB) | Free Disk Space...

This email has been sent to newsletter@newslettercollector.com. 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.
Feel free to forward this to any colleagues that you think might be interested.
If you have received this email from a colleague, you can register to receive it here.
This transmission is ©2018 Redgate Software Ltd, Newnham House, Cambridge Business Park, Cambridge, CB4 0WZ, United Kingdom. All rights reserved.
Contact: webmaster@sqlservercentral.com