|
|
|
Right there with Babe
      
Group: General Forum Members
Last Login: Yesterday @ 12:30 PM
Points: 795,
Visits: 1,985
|
|
Hmmm...this thread seems familiar...but let's not poke that sleeping tiger.
Gaby ________________________________________________________________ "In theory, theory and practice are the same. In practice, they are not." - Albert Einstein
|
|
|
|
|
Valued Member
      
Group: General Forum Members
Last Login: Thursday, June 07, 2012 3:39 AM
Points: 57,
Visits: 62
|
|
I agree - don't awaken the beast.
In the eyes of developers, cursors are like Marmite.
|
|
|
|
|
SSCrazy Eights
        
Group: General Forum Members
Last Login: Saturday, May 04, 2013 11:13 AM
Points: 9,855,
Visits: 9,374
|
|
|
|
|
|
Forum Newbie
      
Group: General Forum Members
Last Login: Monday, August 20, 2012 12:19 AM
Points: 1,
Visits: 12
|
|
I also found this article rather insulting. I almost never use cursors. In fact, I think I should use them more. I sometimes find myself dong mental jujitsu, trying to write set-based T-SQL, when the task lends itself more easily to procedural code.
Of course they are slower, but sometimes performance is not as important as writing something that is simple and easily maintainable. Arguing that programmers are lazy and dumb is all the more reason to write something in a way that your (lazy, dumb) successors will understand.
Obviously anyone reading this article is interested in avoiding cursors, so why start off with a self-indulgent rant? JMHO.
|
|
|
|
|
Ten Centuries
      
Group: General Forum Members
Last Login: Wednesday, March 27, 2013 3:22 PM
Points: 1,276,
Visits: 1,112
|
|
mschroeppel (7/4/2010) I also found this article rather insulting. I almost never use cursors. In fact, I think I should use them more. I sometimes find myself dong mental jujitsu, trying to write set-based T-SQL, when the task lends itself more easily to procedural code.
Of course they are slower, but sometimes performance is not as important as writing something that is simple and easily maintainable. Arguing that programmers are lazy and dumb is all the more reason to write something in a way that your (lazy, dumb) successors will understand.
Obviously anyone reading this article is interested in avoiding cursors, so why start off with a self-indulgent rant? JMHO.
Set-based processing does stretch the old brain cells a bit, but as you point out everyone understands a loop.
I just had a recent discussion with a group about the benefits of writing extremely simplistic code versus efficiency (and several other programming oddities, btw). I listed out several coding priorities and challenged them to put their coding priorities in the correct order for their business. If you try this exercise and "efficiency" is at the bottom of the list, then you obviously have to code to your priorities.
Mike C
|
|
|
|