THE SQL Server Blog Spot on the Web

Welcome to SQLblog.com - The SQL Server blog spot on the web Sign in | |
in Search

The Rambling DBA: Jonathan Kehayias

The random ramblings and rantings of frazzled SQL Server DBA

Has the SQL Community Lost its Focus?

Yesterday, Thomas LaRock’s blog post, WMI Code Creator, was brought to my attention by a member of the SQL Community.  I subscribe to Tom’s blog in my blog reader so eventually I’d like to think that his post would have come to my attention, but to be perfectly honest, I have been to busy with other obligations lately that have made reading blog posts almost impossible.  When I looked at Tom’s post, I was kind of put off when I did a copy paste of the Code from it and got the following:

DECLARE @WmiServiceLocator INT ,
 @WmiService INT ,
 @CounterObject INT ,
 @AvgDiskReadPerSec BIGINT,
 @AvgDiskReadPerSec_Base BIGINT 

EXEC sp_OACreate 'WbemScripting.SWbemLocator', @WmiServiceLocator OUTPUT, 5
EXEC sp_OAMethod @WmiServiceLocator, 'ConnectServer', @WmiService OUTPUT, '.', 'root\cimv2' 

IF ISNULL(@WmiService, -1) <= 0
 BEGIN
 EXEC sp_OADestroy @WmiServiceLocator          
 RAISERROR('Could not access WMI service.', 16, 1)
 RETURN
 END 

EXEC sp_OAMethod @WmiService, 'Get', @CounterObject OUTPUT, 'Win32_PerfRawData_PerfDisk_PhysicalDisk="_Total"'
EXEC sp_OAGetProperty @CounterObject, 'AvgDiskSecPerRead', @AvgDiskReadPerSec OUTPUT
EXEC sp_OAGetProperty @CounterObject, 'AvgDiskSecPerRead_Base', @AvgDiskReadPerSec_Base OUTPUT 

SELECT @AvgDiskReadPerSec, @AvgDiskReadPerSec_Base

Read more: http://thomaslarock.com/2011/01/wmi-code-creator/#ixzz1AKN2Swcm 
If you are not at thomaslarock.com, this material has been plagerized by someone who steals content from others. 

Now I am all for protecting your content, but if you are going to blog code it should be reusable without an abusive message like this.  Beyond that, if you force me to have to delete this kind of message when posting code into SSMS from your blog, the word plagiarized should be spelled correctly at a minimum.

As Since Tom is a member of the Board of Directors for PASS I would expect a lot more in the way of being a better role model for the community.  Personally, my own take on this is that if the WordPress Addin that appends this text to the copied code can’t handle code blocks separately for this kind of thing, then it shouldn’t be used.  There are certainly better ways to identify plagiarism than this, though they may require some additional work.

Published Friday, January 07, 2011 2:30 AM by Jonathan Kehayias
Filed under:

Comments

 

Richard back said:

Many bloggers find plagiarism to be a problem and use a number of ways to discourage, prevent and detect it.

A recent blog post by a high profile member of the SQL community described the use of a tool to put exactly that kind of message in copied text, when describing his arsenal.

He's widely respected, and in my opinion if you're putting stuff out there as a blogger, you have a right to protect your stuff.

January 7, 2011 5:28 AM
 

SQLDenis said:

The reason you get that message is because it is done with JavaScript...it doesn't matter what you copy, the moment you hit CTRL + C it appends that message to anything you copy....however it doesn't do it for me because I have added tynt in my host file since I got really annoyed by lots of sites doing this

Just drop this into your host file and you are set

127.0.0.1 tcr.tynt.com

January 7, 2011 6:58 AM
 

Thomas LaRock said:

Sorry for the poor spelling, I'll double check to see if that can be removed for code snippets.

Given the rise in stolen content I took steps to protect my work.

January 7, 2011 7:34 AM
 

Thomas LaRock said:

I have updated the code script from Tynt to put a comment "--" in front of the lines. That should help those who cut and paste code snippets.

As for the misspelled word, think of it as a brown M&M. I think the idea at the time was to leave something unique in the sentence. It doesn't make sense to me know, but at the time it did.

I'm sorry if the misspelling of one word has caused you to lose faith in my ability to serve on the PASS Board of Directors. I'll strive for perfection in each and every blog post going forward.

But I do intend to continue to protect my content and would encourage others to do the same.

January 7, 2011 7:47 AM
 

Brent Ozar said:

Jonathan - I hear your frustration about the message included with copied code.  I use that same script myself, and when I read your complaint, I immediately checked my own copyright message.  I'd written it during the heat of the moment after I'd been plagiarized by three bloggers in two days, so the message wasn't as friendly as it could be.  I reworded it now that I haven't been plagiarized in the last 24 hours. :-D

You said, "There are certainly better ways to identify plagiarism than this, though they may require some additional work."  That's the tough part, I guess: how much work can we expect a blogger to put in?  Frankly, I'm just tickled pink when somebody shares their code on the Internet period, and I'm even more excited if it actually *works*.  I know a lot of big-name bloggers whose code doesn't work on case-sensitive servers, for example.  If I had to choose between someone putting the work into getting their SQL code right versus tweaking their anti-plagiarism code, I'll opt for the SQL code every time.

Now, take a deep calming breath before you read this last part.  I'm going to take a sentence from you and point out two crucial things:

Your original sentence: "As a member of the Board of Directors for PASS I would expect a lot more."

In the very sentence where you're criticizing Tom's spelling, you're actually making a grammatical error.  The way the sentence is worded, you're saying YOU are a member of the Board of Directors for PASS.  Whoops.  ;-)

The second thing to point out - well, lemme just reword your sentence in the way I read it:

"Tom LaRock takes time away from his family to volunteer endlessly by serving on the PASS Board of Directors, plus he shares his own code for free on his blog.  That's not enough, and he needs to do more!  He needs to start coding PHP and JavaScript too!"

Hmmm....

January 7, 2011 8:18 AM
 

mjswart said:

It's interesting that this post is about blog style/practices. While Tom's post was about something technical.

January 7, 2011 8:46 AM
 

hillbillyToad said:

I ignored the comment and tested the code, as I figured it wasn't meant for me, but for someone who might copy and paste it up on their blog as their oww - as happened to Paul Randall just yesterday.

Did you ask Thomas if he knew his posts were exhibiting this behavior?  Maybe he didn't realize?

January 7, 2011 9:28 AM
 

Jonathan Kehayias said:

Tom/Brent,

I don't have an issue with using tynt.com, I have an issue with the nasty gram you chose to put in.  99% of the people that are going to copy/paste the code from your site are going to be doing it for the legit purpose of testing/using it to solve a problem.  The 1% of readership that is going to copy/paste to plagiarize is probably going to delete your nasty gram anyway, so why put off the other 99% that have no wrong intentions?

Like I said, I am against plagiarism, and yes I have gone after folks that plagiarized my content.  The issue isn't you protecting content its how you chose to do it.

January 7, 2011 10:10 AM
 

Adam Machanic said:

Perhaps we should take issue with the fact that Tom is using Object Automation procedures, in 2011, and even worse no cleanup is being done. Tom! The year 2000 called, and it wants its broken code sample back! If you're going to recommend OA procs, at least use some error handling, and make sure to call sp_OADestroy at the END of the batch, every single time, to help ensure that you don't cause a memory leak or worse.

January 7, 2011 10:27 AM
 

Dylan said:

I've got to agree with Jonathan here.  Making 99% of the people that will copy/paste your code suffer the effect of your tynt.com settings seems counter intuitive and if I'm being honest offensive.  I hadn't noticed before because I use an RSS reader to keep up on blogs, but during Brent's series of posts on plagiarism I went to his site and tried out copy and paste.  While I think his setting on word count is fine and most people wouldn't bump up against it, I was enraged that the behavior of my computer was affected by his choice so much that I promptly took action against tynt.com by blocking it and it's scripts.

You can never stop people taking your work and reposting it if they're determined to.  I however feel that the majority of people online are smart enough to know when they come across a site like BigResource.com or CrazySQL to know that it's blatantly copied from somewhere else and the site is pretty useless.  I would never setup one of those sites in my RSS feed, but I might use the code or idea I came across there.  And even if it's not their idea or code, so what?  The information still helped someone with a problem!  Dissemination of information and ideas is what the internet is all about!

In the end I feel that these methods do little to discourage people that are going to plagiarize and much to discourage me from actually going to your site to check out and use your content.  I might be the minority but even alienating a small group of content consumers could end up hurting not only readership but the community as well.  It also prevents the maximum spread of your information or ideas out there and that's what the interenet is all about!  Well that and watching people in funny hats making things people like.

January 7, 2011 10:55 AM
 

Thomas LaRock said:

Adam,

*HEAVY SIGH*

I'll add that line in. As for my using code from 2000, well...I'll stop as soon as Microsoft makes it easier for me to get perfmon counters using TSQL. I'm sure you already have stuff built into CLR, but not everyone went down that path in life.

January 7, 2011 11:06 AM
 

Tim Mitchell said:

Should the misspelling have been corrected?  Yep.  Could the plagarism message have been a little softer?  Perhaps.  But IMHO, it's not enough of a big deal to get worked up about, much less deserving of a harsh public smack-down.  Move along, nothing else to see here...

January 7, 2011 11:26 AM
 

Dave Levy said:

I have to take Jonathan's side on this one. We are still a young community and to grow we have to be able to draw people in. Doing things that may appear heavy handed or spiteful could impact those efforts.

I use a tool called Copyscape to monitor my blog for plagiarism. (http://www.copyscape.com/). The tool seems to work well but does require me to spend my own money to protect my own content. They do offer a free banner to add to your site warning of the copy protection but that even seemed a bit much to me.

My $0.02.

January 7, 2011 11:30 AM
 

Josh Jones said:

Personally, I don't think Tom (or anyone else) is out of line in any way. The ONLY bugger to me is not including the --. Otherwise, really, if I'm going to the trouble to copy/paste the code for a legit reason (i.e. to solve my own problems) then is it really that big of a deal that I have to delete some comment lines? After all, I didn't have to write the rest of the code, did I? And since I know that I'm NOT plagiarizing, I don't have to take offense to the comment. I just appreciate the fact that people are sharing code; and as someone who's done a little publishing, I totally appreciate protecting content AND preserving your reputation.

January 7, 2011 11:47 AM
 

ArnieRowland said:

Personally, I think that Tom's message is overly harsh. The 'read more' is good, the second line is accusatory. I could easily see someone being reluctant to share this code example with teammates due to the implicit accusation that they are stealing. Perhaps something more in tune with "If you didn't read this on my blog, let me know where."

And Jonathan, you are coming across as overly harsh on Tom. Neither the spelling or copyright notice have any thing to do with Tom's community involvements, including his PASS Board membership. I'm very appreciative of anyone that volunteer's their time and effort to help direct PASS. It is right that someone accuses you of dishonesty should you park on or slightly over the line? It was too much of a reach.

I'm reminded of some years ago when the Police Chief in Portland, Oregon was quoted as saying that anyone who would jay-walk was going down the path toward a life of crime. He was rightfully ridiculed in the press for weeks.

Arnie Rowland

January 7, 2011 12:23 PM
 

Jonathan Kehayias said:

Arnie,

Thanks for the feedback.  You aren't the first person to comment on the mention of him being on the Board.  Perhaps I should have just said "As a leader in the community..." and left the PASS tie in out.  I have a feeling I would still be considered overly harsh no matter how I said things.  Tom and I have traded emails, comments and tweets, its really not anything personal against him, he happened to be the person that I encountered this with and I think it is a sign that the community is going to far with things like this.

January 7, 2011 12:59 PM
 

Aaron Bertrand said:

If you're not living in a cave, you are probably aware of the blog posts and twitter discussions that

January 7, 2011 5:04 PM
 

TheSQLGuru said:

I vote "no problem" for Tom's code comments.  If you copy the code from his website, then in effect you are "at thomaslarock.com" and did not plagiarize the code.  So the comment CANNOT be accusatory nor abusive because it doesn't apply to you.  I also like that he modified the use of tynt to put in leading '--' to comment it out so you don't have to (although you will almost certainly delete the 2 lines anyway regardless of your intended use of the code sample).  

I also agree with Aaron's new blog post that it won't make a difference to plagiarists.  But that doesn't mean that a blogger shouldn't put in such protections if they wish to.

As for calling someone out for a spelling error on a blog post I just can't see a reason for that.  This is especially true given that I have seen one gramatical error and another spelling error on this page by the blogger.  May he who has not sinned cast the first stone. ;)

Tom, thanks for all you do for the SQL Server community!!  Oh, and thanks for putting in the sp_OA cleanup! :-)

January 7, 2011 5:36 PM
 

Jonathan Kehayias said:

Kevin,

The spelling thing wasn't that big of deal.  It's hard to be sarcastic in text, at least for me it is.  I should have followed the same rules I apply to business emails and left that out, but I didn't and its caused the real issue to be overlooked/lost.  If I said that line in person with voice inflections, you'd take a different meaning from it.

Aaron's blog post makes the best point about this, the point I tried to make in my response to Brent and Tom above.  It doesn't make sense to affect the majority of readers that aren't going to plagiarize content to maybe catch that .0001% that is.  Why not just disable the context menu and copy functionality altogether, its just another javascript:

http://www.hypergurl.com/norightclick.html

If you go that route, you could upload the source as a zip file attached to the blog post, and mark up the source scripts with whatever open source license you'd like.  That's actually easier for your readers to make use of.

January 7, 2011 6:05 PM
 

GrumpyOldDBA said:

Actually I always thought the point of a blog was to give to the community - I always hope that someone will will find something I post useful to them - I agree with Jonathan 100% the message is inappropriate on a blog.

January 10, 2011 8:38 AM
 

RowlandG said:

This is a little like Hollywood stars and the Paparazzi. After all, if people weren't reading Thomas', Paul's or any other rockstars blogs, books or go to conferences like PASS to hear them speak who'd care?

Most folks in the spotlite (like Thomas LaRock) seem to derive a part of their income from this endless self-promotion. You'll have to ask them if it's worth it to be on endless flights, hotel rooms and missing family. I think the underbelly of this 'See what I can do!' leads to the wannabes grabbing code and emulating the so-called stars of this show. There's a surprise ;)

Credit is due I suppose but it's getting harder these days to identify what belongs to whom. So much of this content is copied, derived and regurgitated that outright plagiarism is getting harder to spot from the sidewalk out here where I live.

January 10, 2011 11:52 AM
 

The Rambling DBA: Jonathan Kehayias said:

Late Thursday night, ok it was actually very early Friday morning, I wrote a blog post that stirred a

January 10, 2011 7:07 PM
 

Nate said:

Well said RowlandG.  It is difficult to identify who owns what. Tom didn't conceive of that WMI query. He definitely wasn't the first to wrap such call in an OA procedure. So, what is it that he is laying claim to anyways?

It seems lately the blogging community has 'lost its focus' of helping and instead taken a hard "that's mine" stance.  Someone posted here (or was it on Tom's post?) that some have been more focused on "protecting their precious blogs" than helping and I tend to agree.  I don't know how many times recently i've witnessed the community assemble into a mob to oust someone who reposted something they read elsewhere without "proper attribution."  Protecting content and receiving credit is important, don't get me wrong; but, it seems they truly are taking on celebrity attitudes.

I do not publish a blog (yet) so perhaps I should not be afforded an opinion. However, at a micro level here at my day job, I do share knowledge through mentoring. I always encourage junior kids to take what I have written and understand it, extend it, improve it, and most importantly make it their own. The words "that's mine" just don't seem fitting.  Are we selfless mentors or are we self-promoting celebs?  

I also believe the issue is better handled by the self-organizing community anyways.  Take Adam's WhoIsActive procedure, something that truly warrants some level of protection. It would take a plagiarist literally seconds to copy his work, find/replace his name with Joe Schmoe, and then repost on his own blog.  Joe's post will fall on deaf ears in my opinion, being held down by Google's indexing algo, lack of followers, activity, etc., while Adam is backed by a vibrant community and strong Twitter following, etc. it will always be known as the source by those who matter.  Also, if Joe's post ever crawls out of the depths of Google to receive some recognition in the community, the community itself would immediately beat it down into submission.  I am only one person, and I have personally called attention to many instances of plagiarism over the years. I often see "tributes" to Ken Henderson's words pop up here and there, and I usually just leave a comment mentioning that "I wasn't aware Ken posted under this pseudonym."  :)

No ctrl+c script or comment header will ever offer any sort of real protection against the Joes of the world. If we keep heading in this direction, what's next? Will we require registration to view the code? Will we only distribute code as encrypted stored procedures or compiled assemblies?

A thriving community built on trust is the way to go in my opinion.  

January 11, 2011 2:39 PM
 

rdjabarov said:

Well said, Nate, very well said.  I haven't blogged myself to the extent where it would matter to me, but I did think very hard about what should be done to protect my blog...And I realized - NOTHING.  The very fact that you blog for the public to see should meen that you don't care if anybody takes it or closes the browser with a smirk.  After all, if those "vicious" thieves took your code and published it somewhere else as their own, - it's always easy to check.  Just google the main points of the script, or a concept, and then point the original author's page to the thief on his own site for the rest of the public to see, - and he's done!

January 28, 2011 10:56 AM
Anonymous comments are disabled

This Blog

Syndication

Powered by Community Server (Commercial Edition), by Telligent Systems
  Privacy Statement