February 25, 2009 at 9:44 am
GilaMonster (2/25/2009)
Lynn Pettis (2/25/2009)
What is "best practices" actually? What is "best" today may not be "best" a week, or month, or year from now.Which is one of the reasons I use the term 'recommended practice' and not 'best practice'
Probably a better way to phrase it. I usually preface anything I mention as a best practice with something like, "I consider this to be".
Jack Corbett
Consultant - Straight Path Solutions
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
February 25, 2009 at 9:45 am
Lots of whitespace is good. Every survey on document layout agrees on that point.
- Gus "GSquared", RSVP, OODA, MAP, NMVP, FAQ, SAT, SQL, DNA, RNA, UOI, IOU, AM, PM, AD, BC, BCE, USA, UN, CF, ROFL, LOL, ETC
Property of The Thread
"Nobody knows the age of the human race, but everyone agrees it's old enough to know better." - Anon
February 25, 2009 at 9:46 am
Max (2/25/2009)
Welcome to megalomaniacs central, folks!Don't bother us with your petty sql statements, do not ask us questions without reading the dozen or so best practice documents; blogs and forums and, above all, never do anything outside our standards and waste our valuable time - that we do not like.
We also strongly suggest that you take our carefully thought through standards to your workplace and imply that any colleague that doesn't study and use them is somehow inferior.
Perhaps, I hope, that sarcasm this is.
Is it wrong to ask those asking for help to do things that help us help them? The help we provide is free, and is on our own time or during breaks at work. If I have to spend my time reformatting code so I can figure out what is going on in it, is that a good use of my time? If I have to decipher table DDL and test data from the code, is that a good use of my time? If I have to take the time to convert sample data provided in "table" format to insert statements, is that a good use of my time?
If the OP's put as much effort into asking for help as the expect in getting it, things would go a lot easier for both sides.
February 25, 2009 at 9:48 am
Max (2/25/2009)
Welcome to megalomaniacs central, folks!Don't bother us with your petty sql statements, do not ask us questions without reading the dozen or so best practice documents; blogs and forums and, above all, never do anything outside our standards and waste our valuable time - that we do not like.
We also strongly suggest that you take our carefully thought through standards to your workplace and imply that any colleague that doesn't study and use them is somehow inferior.
Max,
That isn't the point at all, which is why in my first post on best practices (whatever they are) and formatting I put in the smiley. I think the point is to be consistent in your methods and that there should be some sort of standards in place for your work place. They may not be the same as mine and that's okay.
Some of the comments about the format some code is posted in relate to the time it takes to make it easy for us to read. Let's face it, if I have to take 10 minutes to format your code so I can understand it, I'm probably less likely to answer your question.
Jack Corbett
Consultant - Straight Path Solutions
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
February 25, 2009 at 9:52 am
Lynn,
I think it's a balance here that experts have to strive for. Sure we want to educate, and get people to think for themselves, but we're always bringing along the new ones. It's like a rolling Kindergarten class here and we have to remember that and not get too frustrated.
At the same time, it would make sense to try and provide good links, as you have in your sig, to try and educate people.
I think it helps to have a good amount of patience, hint to people, tell them or hint about how they can present things better, and if they won't, walk away. It is your time, but you also have to balance that with some benevolence and tolerance of ignorance of better ways to do things.
February 25, 2009 at 9:54 am
I think the best we can do is to try and lead by example. Jeff's code is an excellent example of how code should be written. Do I write my code that way, no. I am trying to add more comments to my code as I try to be a little more like Jeff in some regards. Plus, as I get older, the memory isn't nearly as good as it once was (that and the rear-end accident back in 95, nothing like getting hit at 65+ while at a dead stop).
I would hope that as people come to this site and see how some of us try to present code, that they would start to follow suit. Most of us post well written, formatted, readable code.
February 25, 2009 at 10:11 am
Steve Jones - Editor (2/25/2009)
Lynn,I think it's a balance here that experts have to strive for. Sure we want to educate, and get people to think for themselves, but we're always bringing along the new ones. It's like a rolling Kindergarten class here and we have to remember that and not get too frustrated.
At the same time, it would make sense to try and provide good links, as you have in your sig, to try and educate people.
I think it helps to have a good amount of patience, hint to people, tell them or hint about how they can present things better, and if they won't, walk away. It is your time, but you also have to balance that with some benevolence and tolerance of ignorance of better ways to do things.
Steve, I'm thinking here, that you are going back to my comments about a "good use of my time". I'll be honest, I have spent plenty of time reformatting code, creating tables and sample data. I think you'll find that I am one of the most patient ones here on SSC with some of the OP's. I try hard to help because of the help I have received from the others here on SSC and WANT to give back to this community.
My questions about a "good use of my time" were really more rhetorical in nature. Yes, sometimes it is a good use of my time when I am able to help someone with a problem. There are times, however, when some OP's just no longer deserve the assistance anymore since they don't seem to want to help us help them.
February 25, 2009 at 10:16 am
I don't think arguing best practices for formatting of code is a productive use of our time.
(Forgive me Lynn, but in the past year I've begun to put commas at the FRONT of lines when listing columns.)
But Max, the best practices for asking a question serve a number of purposes. First and foremost, they get the OP a quicker answer. How many times does a thread go for hours while people ask questions trying to clarify what table schemas look like, or what error is actually being returned?
Second, I agree with Lynn, people who are volunteering their time to help out deserve a little consideration for their effort. Any OP who resists cooperating with someone who might help them out is like a drowning man fighting the lifeguard who swims out to rescue him. You wouldn't think it would be hard to script out a couple of create tables and insert intos to populate some sample data.
I think part of the problem may be that some of the OPs are really very weak. For them, producing even the sample code might take an hour or more. Another part of the problem might be expectation levels. Some people apparently think the forums are a hot line, with operators standing by to solve all their problems in ten minutes or less with minimal effort on the OPs' part. That expectation level shouldn't be encouraged.
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
February 25, 2009 at 10:22 am
Bob Hovious (2/25/2009)
I don't think arguing best practices for formatting of code is a productive use of our time.(Forgive me Lynn, but in the past year I've begun to put commas at the FRONT of lines when listing columns.)
No need to forgive you, as long as you are consistant. I still prefer the commas at the end. Personal preferences are not an issue on this.
At least you also like to have each column on its own line, this also helps in readability. I don't mind scrolling up and down as much as I do left and right.
February 25, 2009 at 10:30 am
Steve, a suggestion: Why not expose first time OPs to a best practices for asking questions link BEFORE they enter their question. Just pop it up when they go to enter a new question, and don't let them enter the new question for at least 5 or ten minutes. Do this to them the first two or three times, and after just let them post questions without having to see it. Other people may have better ideas about how to present it, I'm just throwing this out there.
I know OPs can just ignore it and plow blindly on, but part of the education process should be teaching newcomers the nature of the system they are participating in and how they can best help it work for them. It really is a surprisingly good system, and works beautifully when the OPs cooperate.
__________________________________________________
Against stupidity the gods themselves contend in vain. -- Friedrich Schiller
Stop, children, what's that sound? Everybody look what's going down. -- Stephen Stills
February 25, 2009 at 10:33 am
Bob Hovious (2/25/2009)
(Forgive me Lynn, but in the past year I've begun to put commas at the FRONT of lines when listing columns.)
Heretic!:D
P.S. That IS sarcasm
Jack Corbett
Consultant - Straight Path Solutions
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
February 25, 2009 at 10:36 am
That might push away a newbie from coming to the site. Thats not what Steve would want. Maybe when an OP asks a question, we could educate them by providing them links to how to post properly. Also when we give them an answer, maybe we can keep some of the simple things in mind.
Just my .00002 cents... 😀
PS : This thread is about to HIT a double century... Yay......
EDIT not about to HIT but HAS HIT 😛
-Roy
February 25, 2009 at 10:41 am
Not quite. This is post 1993.
😉
February 25, 2009 at 10:43 am
Roy Ernest (2/25/2009)
That might push away a newbie from coming to the site. Thats not what Steve would want. Maybe when an OP asks a question, we could educate them by providing them links to how to post properly. Also when we give them an answer, maybe we can keep some of the simple things in mind.Just my .00002 cents... 😀
And you probably have seen that there are several of us that have a link to Jeff's article in our signature block, and frequently point new OP's to read the article. The sad part, is that some say they have read it but still don't follow the guidelines presented.
February 25, 2009 at 10:49 am
From my point of view any type of best (or recommended) practice does not need to be mentioned as an "entry requirement for requests" unless there is any "reward" for OP's following that practise versus others that don't.
If I as an OP get my question answered no matter how the code is formatted, I'd use the easiest way (from my perspective).
Maybe it would help to add a few lines of comments to the answers that would explain why the code is formatted the way it is or what the applied "standard" is.
This would leave enough room for everybody who answers to stay with her/his preferred standard and still would tell the OP that there are better ways of coding... - and over time we would see a number of recommended practice that -most probably- would all follow two simple patterns: each format will be standardized and easy to read.
And maybe a few of the OP's will figure out that changing their way of coding makes it easier for them as well as for others.
Viewing 15 posts - 1,981 through 1,995 (of 66,738 total)
You must be logged in to reply to this topic. Login to reply