February 9, 2009 at 9:48 am
Great post! I'm so tired of looking at code that makes my eyes bleed. Jeff is spot on with the view that if you don't care about your code, no one else will; besides, it takes so little effort to make your code readable. This advice is equally applicable across all languages and environments.
February 9, 2009 at 10:43 am
Thanks, Osskey... I appreciate the feedback.
This doesn't apply just to forums when it comes to readability and self or embedded documentation. I started a consulting job about 7 months ago and even the people who've been hear longer than me can figure out what's going on in some of the code. When it comes to embedded comments, the code is a virtual desert. When it comes to readability, whenever you need to work on a piece of that legacy code, you actually have to reformat it to read it. Absolutely no standards were invoked never mind followed. It's really a mess.
--Jeff Moden
Change is inevitable... Change for the better is not.
February 9, 2009 at 11:24 am
Great article. The best thing about the suggested approach is that if the poster takes the time to define the problem and consider the test data and the desired output, chances are the solution will present itself.
If it doesn't, I may have to post my question after all. 😀
And, incidentally, thank you for the trick with QUOTENAME! I live, I learn.
February 9, 2009 at 11:36 am
Olga B (2/9/2009)
Great article. The best thing about the suggested approach is that if the poster takes the time to define the problem and consider the test data and the desired output, chances are the solution will present itself.If it doesn't, I may have to post my question after all. 😀
There actually has been a few documented cases of just that happening, but that isn't the norm.
February 9, 2009 at 12:03 pm
Lynn Pettis (2/9/2009)
Olga B (2/9/2009)
Great article. The best thing about the suggested approach is that if the poster takes the time to define the problem and consider the test data and the desired output, chances are the solution will present itself.If it doesn't, I may have to post my question after all. 😀
There actually has been a few documented cases of just that happening, but that isn't the norm.
I suspect it's because thinking through the problem is not the norm. 😉
When answering support questions my policy is to wait about 20 minutes for all non-work-stopping requests. It's amazing how many times I get a "Never mind, I figured it out" message 18 minutes later.
February 9, 2009 at 12:10 pm
Olga B (2/9/2009)
I suspect it's because thinking through the problem is not the norm. 😉
BWAA-HAA!!! That's the perfect answer! Thanks for the feedback, Olga! 😀
--Jeff Moden
Change is inevitable... Change for the better is not.
February 9, 2009 at 10:30 pm
One problem I run into with these articles is only one inch of the code is visible at a time. Is there a way I can get more of the code to show without having to copy it and throw it into notepad?
Thanks!
Kay
February 10, 2009 at 7:01 am
kbatta (2/9/2009)
One problem I run into with these articles is only one inch of the code is visible at a time. Is there a way I can get more of the code to show without having to copy it and throw it into notepad?Thanks!
Kay
I don't know what the heck they've done to the forum recently, but I sent an email to the WebMaster alerting him to the problem.
In the meantime, the copy/paste to notepad or word is gonna have to do. Sorry about that.
--Jeff Moden
Change is inevitable... Change for the better is not.
February 11, 2009 at 5:09 am
I didn't got time to enter the forum in last few days, so I read this late. It was excellent explanation. First I thought it was something related about this forum. But as usual I glued to your article from start to finnish. No words to praise your writing...
February 11, 2009 at 6:05 am
Thank you, Anirban. You're always gracious and kind with your words.
They republish this article about every two months or so to try and help folks with their posted questions so they can get better help quicker. Many of use keep a reference to this article in our signatures to make it easy to point out for people who come up a little short on a posted question.
--Jeff Moden
Change is inevitable... Change for the better is not.
May 28, 2009 at 12:34 pm
I am trying to understand how to post data and table definitons.
I did read the article. Just having a bit of a problem understanding it.
I know how to export data out of SQL 2005 and generate table definitions.
Does this article apply to SQL 2005? Are these instructions a manual process? Or do I use my exported data and defintions?
I take it it is not as simple as using the upload process when am creating a post?
I must be a slow learner? Just doesn't seem clear to me.
Apreciate any assistance. I started a T-SQL question and wanted to clean it up.
Dave
May 28, 2009 at 1:17 pm
It does apply to '05, and it's not really a manual process, if you write your SQL as Jeff suggests, e.g. ...
SELECT 'SELECT ' + QUOTENAME(ID,'''')+',' + QUOTENAME(DateValue,'''')+',' + QUOTENAME(Value,'''')+',' + QUOTENAME(YearValue,'''')+',' + QUOTENAME(MonthValue,'''') + ' UNION ALL' FROM yourtable
... then you get your output already.
The manual part would be writing that script, and adding in the DDL for your table structure etc, but the end user only has to Execute, not reformat, your data to see exactly what your issues are.
I'm lazy, so I created a script that I can just copy/paste my SELECT into, update my column names, and let the system tables do the work of generating both the DDL and the data (attached)
---------------------------------------------------------
How best to post your question[/url]
How to post performance problems[/url]
Tally Table:What it is and how it replaces a loop[/url]
"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."
March 2, 2010 at 7:19 am
Great article, perhaps valid though for those who rely heavily on posts for answers to their issues..personally i dont post issues and of late, answers either. The reason mainly is that it takes an awful lot of time posting all the details of a problem, try putting in a support call with Microsoft for example and see how many details they ask for. Granted most people dont post right, on the other hand most people don't know how much of detail is enough. Sometimes you may miss a vital detail such as a version #. Answers are given for free and *assume* stuff all the time, somebody taking time to answer itself is doing you a favor and he/she does nto have to consider all involved before doing it. In short there are lots of limitations to this mechanism of getting information and while I think it is admirable to keep it up I also think you should take everything you read with a sack of salt before implementing especially on production.
April 7, 2010 at 11:10 am
Hey,
I'm quite new to the forum and I greatly appreciate this article.
Much thanks for posting it.
April 7, 2010 at 5:49 pm
nicholas.bazin (4/7/2010)
Hey,I'm quite new to the forum and I greatly appreciate this article.
Much thanks for posting it.
You bet. Thanks for stopping by and thanks for the feedback.
--Jeff Moden
Change is inevitable... Change for the better is not.
Viewing 15 posts - 136 through 150 (of 212 total)
You must be logged in to reply to this topic. Login to reply