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


Check Yourself


Check Yourself

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

Group: Administrators
Points: 141908 Visits: 19420
Comments posted to this topic are about the item Check Yourself

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
dminder
dminder
Grasshopper
Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)Grasshopper (10 reputation)

Group: General Forum Members
Points: 10 Visits: 15
As a developer, anytime I find code, I never - NEVER just copy and paste. I look it through for A) does it do what I want? and B) Do I understand everything it says/does? If not....back to research. I also always reference the original author and/or the site I get it from not only for my reference but for anybody else who happens to also come along behind me so that they can better understand what it is.

Great editorial btw, I see this everyday on the forums where I like to help others myself. So often these....developers/administrators/etc just want code to do what they want, not that they want to understand it, break it down and learn from it. I cannot tell you the headaches I have had to sort out because people just copy and paste with no apparent logic or reason. It is difficult enough to decipher one persons code let alone several in one shot!! :-P

Thanks and happy coding!!

dminder
Grant Fritchey
Grant Fritchey
SSC Guru
SSC Guru (95K reputation)SSC Guru (95K reputation)SSC Guru (95K reputation)SSC Guru (95K reputation)SSC Guru (95K reputation)SSC Guru (95K reputation)SSC Guru (95K reputation)SSC Guru (95K reputation)

Group: General Forum Members
Points: 95339 Visits: 33013
Flat out, it depends. I get something from Jeff, Gail, Lynn, the usual suspects, I will review it and test it, but I'll generally assume it's right. I get something from other sources, I'll try to vet it, get second opinions, do a bit more research, and then review it and test it. I don't think I've ever simply copied & pasted code from online to my production system, ever.

----------------------------------------------------
The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood...
Theodore Roosevelt

The Scary DBA
Author of: SQL Server Query Performance Tuning and SQL Server Execution Plans
Product Evangelist for Red Gate Software
Stephanie J Brown
Stephanie J Brown
Ten Centuries
Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)Ten Centuries (1.3K reputation)

Group: General Forum Members
Points: 1256 Visits: 1103
I always review code I get from AnyWhere - co-workers included - to make sure I understand it before I start working with it. And it always goes on a test system first, with comments about where it came from. If it's pretty simple (SELECT xxx, yyy from zzzz) I won't spend a lot of time researching it, but anything complex or esoteric or unclear definitely gets researched and cross-checked to the best of my ability. Which sometimes means running it by co-workers with better SQL skills than mine. If we can't understand it, it doesn't go anywhere other than Notepad.


Here there be dragons...,

Steph Brown
DMarvez
DMarvez
SSC Veteran
SSC Veteran (299 reputation)SSC Veteran (299 reputation)SSC Veteran (299 reputation)SSC Veteran (299 reputation)SSC Veteran (299 reputation)SSC Veteran (299 reputation)SSC Veteran (299 reputation)SSC Veteran (299 reputation)

Group: General Forum Members
Points: 299 Visits: 313
This is a great reminder about not only understanding what you are about to do with the advice, but learning from it as well.

Working in a support environment, we often are looking for that quick fix to a customers problem and more often than not, just go with the advice or suggestion.

It goes back to the old adage, you are only as good as your last backup. Just throwing code or a solution at something without doing your own testing first is always
a bad idea!
kerry_hood
kerry_hood
SSC-Enthusiastic
SSC-Enthusiastic (150 reputation)SSC-Enthusiastic (150 reputation)SSC-Enthusiastic (150 reputation)SSC-Enthusiastic (150 reputation)SSC-Enthusiastic (150 reputation)SSC-Enthusiastic (150 reputation)SSC-Enthusiastic (150 reputation)SSC-Enthusiastic (150 reputation)

Group: General Forum Members
Points: 150 Visits: 172
As a developer/DBA I will admit I don't usually vet the responses I use. I use other people's posted replies quite frequently (today I looked for one to solve my "Transaction context in use by another session" problem without luck) and, though I always test the solution on my local/test database, and only use it if I understand it, I almost never vet it because:
(a) It was due to be done yesterday
(b) If it breaks in 2 years time it'll be me that fixes it again.
jcrawf02
jcrawf02
SSCarpal Tunnel
SSCarpal Tunnel (4.8K reputation)SSCarpal Tunnel (4.8K reputation)SSCarpal Tunnel (4.8K reputation)SSCarpal Tunnel (4.8K reputation)SSCarpal Tunnel (4.8K reputation)SSCarpal Tunnel (4.8K reputation)SSCarpal Tunnel (4.8K reputation)SSCarpal Tunnel (4.8K reputation)

Group: General Forum Members
Points: 4778 Visits: 19324
What is this "research" of which you speak?

---------------------------------------------------------
How best to post your question
How to post performance problems
Tally Table:What it is and how it replaces a loop

"stewsterl 80804 (10/16/2009)I guess when you stop and try to understand the solution provided you not only learn, but save yourself some headaches when you need to make any slight changes."
Jack Corbett
  Jack Corbett
SSC-Forever
SSC-Forever (42K reputation)SSC-Forever (42K reputation)SSC-Forever (42K reputation)SSC-Forever (42K reputation)SSC-Forever (42K reputation)SSC-Forever (42K reputation)SSC-Forever (42K reputation)SSC-Forever (42K reputation)

Group: General Forum Members
Points: 42943 Visits: 14925
I'm basically with Grant on this one. If I know the source and I know that they are conscientious about testing I'll usually use it, although even then I usually run it against a test/dev system first to make sure I understand it.

I can't find the post now, but Buck Woody had a blog post about being sure to understand and test any scripts/code you get online before using it in production. If/when I find it I'll post it.



Jack Corbett

Applications Developer

Don't let the good be the enemy of the best. -- Paul Fleming
At best you can say that one job may be more secure than another, but total job security is an illusion. -- Rod at work

Check out these links on how to get faster and more accurate answers:
Forum Etiquette: How to post data/code on a forum to get the best help
Need an Answer? Actually, No ... You Need a Question
How to Post Performance Problems
Crosstabs and Pivots or How to turn rows into columns Part 1
Crosstabs and Pivots or How to turn rows into columns Part 2
Curtis Smith
Curtis Smith
Right there with Babe
Right there with Babe (783 reputation)Right there with Babe (783 reputation)Right there with Babe (783 reputation)Right there with Babe (783 reputation)Right there with Babe (783 reputation)Right there with Babe (783 reputation)Right there with Babe (783 reputation)Right there with Babe (783 reputation)

Group: General Forum Members
Points: 783 Visits: 239
Very Good Article: What I see a lot, are replies that do not provide the best answer. I understand that people often provide a solution without looking at other possible solutions. I often told my developers, especially junior, to check your solution by attempting another solution.
With that being said, at least check the solution, or at a minimum think about it.




Curtis Smith
SQL Server DBA
Well in worked in Theory ...
MarvinTheAndriod
MarvinTheAndriod
Ten Centuries
Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)Ten Centuries (1.1K reputation)

Group: General Forum Members
Points: 1108 Visits: 1291
I always test as much as I can before putting on a production server, even if I know the source. Everyone is human even the best, they can all make mistakes. That way if anything goes wrong I blame myself for not testing hard enough, rather than the person who supplied the solution.

There are always times we need to do things quickly. But we must weigh up the risk versus gain in this case, and make it our own call.
I am reminded of the following quote:

Eric Cantona "By all means take advice form other people. But remain true to yourself. "
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