|
Hi CodeProject members,
Greetings!
After being a passive reader of CodeProject articles for so long a time, it feels great to be actively contributing something to this thriving and extremely helpful community.
Recently, I decided to undertake the task of explaining some relatively complex concepts of T-SQL, SQL Server and MSBI, in an effort to give back something to the community I have been learning from for so long.
My goal is to simplify the explanation and elucidation of the concepts as much as possible, at the expense of being annoyingly verbose if need be.
To this effect, I started with explanation of a recursive Common Table Expression in t-SQL. My article can be found at[^] http://www.codeproject.com/Articles/1139746/Recursive-CTE.
Now this is my first attempt at explaining something in writing. I need feedback-, how have I fared overall, suggestions for improvement, possible topics for later etc.
Thus, I am sincerely hoping, active community members would help me out in this regard. I have tried explaining the recursive CTE concept to the best of my ability here. But of course, often one's best is still lacking in some respects. Please come forth with your comments and feedback.
Could I have used a better example to explain the concept?
Could I have used better formatting for the code snippets? Or the result-sets?
How could I have ensured that this article is as helpful as possible to a person who is finding it difficult to grasp the recursive CTE concept?
Looking forward to hearing from you.
|
|
|
|
|
So...you've been here 7 years, and you've suddenly decided to post the same message in three places, trying to drum up support for your article. And you can't even get the link right...
That's not particularly nice - it smells of desperation.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
Ah yes. True. Thing is I wanted to post this message only once. But immediately on posting it, the website reported 'Message removed'! And I was confused if I was doing something wrong-like posting my message in the wrong forum perhaps. Therefore, the repetition.
And I couldn't get the link right. True again. I am doing this for the first time.
By the way, is there any specific rule or regulation which bans people from posting anything after 7 years?
And regarding drumming up support for an article, the article is what it is. The article's usefulness or worthlessness should not be judged simply on the basis of a perceived desperation on the part of its author. Give the article a chance to prove itself.
|
|
|
|
|
Not only that, but a quick check shows the content of your article as a delected question on Quora: How to explain T-SQL recursive CTE concept with a simple example - Quora[^] - so you could be wide open to plagiarism accusations here, unless you can prove you wrote an answer there instead of the question...
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
I wrote the answer there and I can prove it.
|
|
|
|
|
Go on then.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
But if you don't mind, can you spare some time and tell me how the article is?
|
|
|
|
|
At the moment, you have a bigger problem - I'm starting to suspect that you didn't write the article. So if you don't prove it pretty quickly - and you say you can - then somebody (maybe me, maybe not) is going to start the "plagiarism process" which will very quickly get your account closed. Permanently.
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
|
That's all I needed.
We take plagiarism very seriously here, and have a "no second chances" policy. So when your article appears elsewhere and is suspiciously deleted, I do start to suspect the worst!
You'd be amazed how many people think that "copy and paste" equals "I wrote this" ...
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
|
|
|
|
|
I am deleting that thread at Quora again, okay?
And hey, it is okay.
And of course, why should a freeloader be allowed to claim another person's hard work as his or her own? It is best to be vigilant against these kind of attempts.
By the way, can I now request you to spare some time in reading my article and provide your thoughts? If you don't mind, that is.
|
|
|
|
|
Now I am not sure about whether one can be accused of plagiarizing from oneself. Self-plagiarizing, perhaps?
It is me who wrote that answer. But of course, a better platform for that kind of answer is CodeProject. Don't you think?
Now please check the link. I am going to delete the thread from Quora again. I don't want same article posted multiple times in multiple places.
|
|
|
|
|
Rahul_Biswas wrote: Now I am not sure about whether one can be accused of plagiarizing from oneself. I was, once, by a Dutch moron living in Kowloon and conning kids out of money for mostly copied-and-pasted English lessons (example here[^])
The stuff he added himself in the discussion boards he spammed was always completely wrong, so I was continually pulling him up on it (as well as posting the sources of his stolen text).
On one occasion, I quoted my own text from one of my own sites, and he immediately flared up, demanding to know how I dared to call him a plagiarist and thief, when I had "stolen" the words from a web-site. Ranted about it for several hundred words.
So I added a comment at the top of the page I'd copied my work out of, telling him in no uncertain terms precisely what kind of idiot he is.
Dick W.J. Oosterveld, the guy's name.
Pretends to be the CO of a non-existent company named HKEOL (started as Hong Kong Exporters On-line, a poorly made web-shop that never sold a bean, then changed to Hong Kong English On Line, when he realised he could bilk Chinese kids out of money for copied and pasted English lessons).
If you ever run across him, give him a smack in the mouth from me.
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
|
So you really are desperate; posting this in three different forums is really bad form. All you are doing is cluttering the forums with unnecessary messages and getting a bad reputation for yourself. Which means quite a few people will not bother to read your article.
|
|
|
|
|
Sorry I can't help as I know nothing on T-SQL or SQL Server in the last 15 years.
But to everyone else, just f*** off and look at his article and judge him on that. The posting in 3 forums has been addressed in his initial or second reply.
Get a life you miserable c***s and whinge like bitches else where.
Michael Martin
Australia
"I controlled my laughter and simple said "No,I am very busy,so I can't write any code for you". The moment they heard this all the smiling face turned into a sad looking face and one of them farted. So I had to leave the place as soon as possible."
- Mr.Prakash One Fine Saturday. 24/04/2004
|
|
|
|
|
Thanks Martin! I owe you.
|
|
|
|
|
How much beer can you afford?
I wanna be a eunuchs developer! Pass me a bread knife!
|
|
|
|
|
Absolutely!
|
|
|
|
|
I actually found it helpful in creating a stored procedure for a report. Unfortunately I couldn't use a CTE due to some other constraints, but I did learn something. Thanx!
|
|
|
|
|
Great that you found it useful, Besinger! If you would like to talk about why you cannot use CTE in your SP, I would be glad to help.
|
|
|
|
|
After reading the comments here (and Michael's was spot on, IMO), here's my thoughts:
Nice example, though please fix the clickey. At this point, it seems to point to my last post!
Explain: The ‘UNION ALL’ is a syntactic handcuff. What do you mean by "handcuff?"
You might want to reference other explanations, like SQL Anywhere: Example: RECURSIVE UNION[^]
Rahul_Biswas wrote: Could I have used better formatting for the code snippets?
IMO, yes -- get rid of the extra lines and use them only to separate top level "blocks" like "select" and "union"
Rahul_Biswas wrote: Or the result-sets?
Yes - get rid of extra lines or use screenshots.
Rahul_Biswas wrote: How could I have ensured that this article is as helpful as possible to a person who is finding it difficult to grasp the recursive CTE concept?
That's a difficult question. Some suggestions:
- a lot of people want to know about performance. Dig into the SQL plan so people get an idea if SQL Server is doing a full table scan, and if it is, are there ways to prevent that?
- as silly as it sounds, explain what "recursive" actually means.
- What are the alternatives? Can you remove the self-reference (requiring a nullable column) by splitting the table into employees and supervisors? (Why yes, you can.) What are the pros and cons of that architecture and how does it affect the query and performance?
- How does this stuff work with an ORM, like EF? Is EF smart enough to use
UNION ALL or does it do separate queries or does it bail and leave it up to the coder?
[edit]
You might want to illustrate (with #3 in mind) how you do other queries as well, like:
- people that are supervisors but do not have supervisors.
- people that are not supervisors but are themselves supervised.
- immediate people that are being supervised by supervisors that do not have supervisors.
- all people in the hierarchy that are being supervised by supervisors that do or do not have supervisors.
- traverse the hierarchy upwards: given a person, who are all their supervisors, recursively.
[/edit]
Thinking of queries like that delve more into architectural considerations and make for potentially really messy queries.
Hope that helps.
Marc
|
|
|
|
|
Thank you so very much. These are very helpful comments and suggestions. I will try to modify the article going forward with these. Once again, thanks so much.
|
|
|
|
|
Simple rule for training or instruction is -
Tell them what you are going to tell them
Tell them
Tell them what you told them
in other words -
give an overview in simple point form
here you should start with a paragraph that allows the reader to decide whether the content is relevant to them. After reading that paragraph they should be able to decide whether to read on or not.
deliver the details
Keep the paragraphs short. No more than a few sentences. This allows the reader to take bite size information. Nothing turns me off more than long paragraphs that I need to reread 3 times to get it.
then recap with simple reminder, in point form, of what you told them.
When I write I start with a list of things I want to talk about, rearrange the list so it gradually builds on the previous knowledge. This reinforces the previous while providing small steps.
it's also good to use examples that the target audience can relate to. In this case it's developers so an example that uses Dilbert and his pointy headed boss would be appropriate.
Hope this helps.
|
|
|
|
|
Thanks for the great suggestions.
Can you elaborate a bit more on 'When I write I start with a list of things I want to talk about, rearrange the list so it gradually builds on the previous knowledge. This reinforces the previous while providing small steps.'?
Thanks again.
|
|
|
|