SQL Clone
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


Common Mistakes


Common Mistakes

Author
Message
Steve Jones
Steve Jones
SSC Guru
SSC Guru (563K reputation)SSC Guru (563K reputation)SSC Guru (563K reputation)SSC Guru (563K reputation)SSC Guru (563K reputation)SSC Guru (563K reputation)SSC Guru (563K reputation)SSC Guru (563K reputation)

Group: Administrators
Points: 563799 Visits: 20837
Comments posted to this topic are about the item Common Mistakes

Follow me on Twitter: @way0utwest
Forum Etiquette: How to post data/code on a forum to get the best help
My Blog: www.voiceofthedba.com
Jeff Moden
Jeff Moden
SSC Guru
SSC Guru (817K reputation)SSC Guru (817K reputation)SSC Guru (817K reputation)SSC Guru (817K reputation)SSC Guru (817K reputation)SSC Guru (817K reputation)SSC Guru (817K reputation)SSC Guru (817K reputation)

Group: General Forum Members
Points: 817921 Visits: 46323
According to the interviews that I've done in the last 3 years of Front-End Developers, Database Developers, and DBAs, the biggest mistake made is not knowing what they don't know and the second biggest mistake is not taking the time to find out.

Of course, it's not only the world of Developers that suffer from such a problem. I've run into folks with a Phd in Mathematics that couldn't convert 1416 to Base-10 without a calculator, electricians that think that connecting a ground wire to the shiny spot on a cast iron pipe makes a good ground, doctors that don't know that OTC Naproxen Sodium works just as well as prescription Naproxen Sodium, and dentists that don't know anything about the devastating galvanic effect of dissimilar metals in a wet environment.

I guess that all means that the real mistake is one of attitude.

--Jeff Moden

RBAR is pronounced ree-bar and is a Modenism for Row-By-Agonizing-Row.
First step towards the paradigm shift of writing Set Based code:
Stop thinking about what you want to do to a row... think, instead, of what you want to do to a column.
If you think its expensive to hire a professional to do the job, wait until you hire an amateur. -- Red Adair

Helpful Links:
How to post code problems
How to post performance problems
Forum FAQs
Gary Varga
Gary Varga
SSC Guru
SSC Guru (69K reputation)SSC Guru (69K reputation)SSC Guru (69K reputation)SSC Guru (69K reputation)SSC Guru (69K reputation)SSC Guru (69K reputation)SSC Guru (69K reputation)SSC Guru (69K reputation)

Group: General Forum Members
Points: 69456 Visits: 6562
1) Not understanding the need to separate the logical from the physical. The application is not the database and vice versa. The application places requirements on the database but these are unlikely to be the full set of requirements on the database.

2) NOLOCK - I have previously worked at a multinational that had it as a coding standard requirement (not guidance) on *ALL* SELECT statements. Yes, there is a rather large amount of financial transactions involved. Muppets.

3) Difficut to maintain: terrible code, no/poor documentation and no strategy. Brilliant. [Yes. That is sarcasm.]

EDIT: I couldn't count up to 3!!!

Gaz

-- Stop your grinnin' and drop your linen...they're everywhere!!!
freekk
freekk
SSC Journeyman
SSC Journeyman (96 reputation)SSC Journeyman (96 reputation)SSC Journeyman (96 reputation)SSC Journeyman (96 reputation)SSC Journeyman (96 reputation)SSC Journeyman (96 reputation)SSC Journeyman (96 reputation)SSC Journeyman (96 reputation)

Group: General Forum Members
Points: 96 Visits: 127
Sadly I share the experience of seeing more bad coding instead of less the last couple of years, it should be the other way around. What I think contributes to better work is starting a new piece of code with CREATE VIEW instead of CREATE PROCEDURE. Sqlserver as all databases is set-based and procedural code should be avoided as much as possible for lots of reasons. In new work I hardly ever use sp's anymore.
call.copse
call.copse
SSChampion
SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)SSChampion (13K reputation)

Group: General Forum Members
Points: 13140 Visits: 2331
Not many coming through nowadays at my current gig fortunately, at least not that I understand! It's kind of part of my job to help people do it better so I'd see it as a failure on my part. I help hire most everyone that does back end work, I like to hire people as clever or cleverer than myself (I hope my experience counts for something), so they take hints really quickly, and generally I'm learning from them. It's a nice situation to be in for sure.
Knut Boehnert
Knut Boehnert
SSCrazy
SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)SSCrazy (2.4K reputation)

Group: General Forum Members
Points: 2434 Visits: 421
#1 No documentation
Well, someone else can figure out what I meant, can't they?

#2 Incomplete documentation
This code is on a Need-To-Know-Bases and you don't need to know. The rest is obvious so I just write one or two sentences.

#3 Inadequate documentation
Well, this is kind of trivial so I explain a little bit more around it and by the end you will not know what the code does but anything else but what 42 stands for. However this is a shining example of how code should be documented so I lay down all the necessary details without even telling you anything about the actual code. Well, anything but 42.
redtux1
redtux1
SSC Veteran
SSC Veteran (282 reputation)SSC Veteran (282 reputation)SSC Veteran (282 reputation)SSC Veteran (282 reputation)SSC Veteran (282 reputation)SSC Veteran (282 reputation)SSC Veteran (282 reputation)SSC Veteran (282 reputation)

Group: General Forum Members
Points: 282 Visits: 213
Developers who forget the magic words "it depends"
Ed Wagner
Ed Wagner
SSC Guru
SSC Guru (251K reputation)SSC Guru (251K reputation)SSC Guru (251K reputation)SSC Guru (251K reputation)SSC Guru (251K reputation)SSC Guru (251K reputation)SSC Guru (251K reputation)SSC Guru (251K reputation)

Group: General Forum Members
Points: 251690 Visits: 12111
1. A lack of general understanding about the database.
2. No documentation.
3. A general acceptance of poor performance.
4. The inability or unwillingness to learn new things.

There are others (like loops where they're not needed and inchworm splitters), but they all point back to #1. If people don't understand how the database works, everything goes downhill from there. I guess it stems from attitude.


Tally Tables - Performance Personified
String Splitting with True Performance
Best practices on how to ask questions
alicesql
alicesql
SSCommitted
SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)SSCommitted (1.8K reputation)

Group: General Forum Members
Points: 1834 Visits: 1293
Hard coded dates were rampant here.

I 'used to be' a systems analyst at a major pharmaceutical company where there were clear divisions of labor, a set development, test and production environments and rigorous testing and QA requirements, including documentation. I left my SQL/DB2 skills behind over 20 years ago when our eldest was born. I was asked to 'help out' here since I 'knew' SQL and the remote/rural area we now live in has few technical folks. I am painfully aware of my limitations and am studying almost every night and applying what I have learned at every opportunity. The biggest stumbling block has been a complete absence of any documentation at all and hard-coded dates in virtually all view defs. Yes, this past December/January was quite busy!

But, even after such a hiatus, I can still remember what NOT to do - like hard code dates!

Unfortunately, no one else here knows SQL, or any programming tools. So I have no one to learn from or collaborate with. On the plus side, I can set my own (part-time) schedule, I have rediscovered how much I enjoy this and I am considering working towards certification. Just in time for the empty-nest as our youngest will be off at college in 18 months!
swwg69
swwg69
SSC Veteran
SSC Veteran (229 reputation)SSC Veteran (229 reputation)SSC Veteran (229 reputation)SSC Veteran (229 reputation)SSC Veteran (229 reputation)SSC Veteran (229 reputation)SSC Veteran (229 reputation)SSC Veteran (229 reputation)

Group: General Forum Members
Points: 229 Visits: 37
Don't forget the race to the bottom of the payroll scale. Where you had IT majors making good money before, now you have tech school grads and drop outs making min wage. You get less devoted employees and less dedicated professionals. The joy of lowest bidding off-shore contractors adds to the mess.
Why hire one quality developer when you can get several cheapies. The CEO has to make his bonus.
The managers are paid based on head-count, not code quality metrics.
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum








































































































































































SQLServerCentral


Search