Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase 12»»

Check Yourself Expand / Collapse
Author
Message
Posted Thursday, September 24, 2009 9:05 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: 2 days ago @ 3:11 PM
Points: 31,368, Visits: 15,837
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
Post #793649
Posted Friday, September 25, 2009 6:38 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Thursday, April 5, 2012 6:02 AM
Points: 4, 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!!

Thanks and happy coding!!

dminder
Post #793770
Posted Friday, September 25, 2009 6:50 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 3:26 AM
Points: 14,205, Visits: 28,536
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
Post #793781
Posted Friday, September 25, 2009 7:02 AM
SSChasing Mays

SSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing Mays

Group: General Forum Members
Last Login: Wednesday, December 17, 2014 9:40 AM
Points: 635, Visits: 998
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
Post #793782
Posted Friday, September 25, 2009 7:12 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Tuesday, September 2, 2014 12:13 PM
Points: 41, 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!

Post #793792
Posted Friday, September 25, 2009 7:43 AM
Valued Member

Valued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued MemberValued Member

Group: General Forum Members
Last Login: Friday, November 21, 2014 8:54 AM
Points: 55, Visits: 133

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.
Post #793814
Posted Friday, September 25, 2009 7:54 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Monday, December 8, 2014 6:44 AM
Points: 1,332, Visits: 19,320
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."
Post #793823
Posted Friday, September 25, 2009 7:56 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: Today @ 2:16 PM
Points: 10,381, Visits: 13,441
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

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
Post #793826
Posted Friday, September 25, 2009 8:14 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Thursday, November 6, 2014 3:09 PM
Points: 287, Visits: 210
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 ...
Post #793837
Posted Friday, September 25, 2009 9:11 AM
SSC Veteran

SSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC VeteranSSC Veteran

Group: General Forum Members
Last Login: Thursday, December 11, 2014 6:21 AM
Points: 295, Visits: 1,256

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. "
Post #793888
« Prev Topic | Next Topic »

Add to briefcase 12»»

Permissions Expand / Collapse