Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase «««1234»»

Defensive Programming Expand / Collapse
Author
Message
Posted Friday, April 23, 2010 10:04 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Friday, August 1, 2014 9:46 PM
Points: 1,380, Visits: 2,684
I would of guessed 1859 and would have missed ths one if it wasn't for my friend google. :-(

---------------------------------------------------------------------
Use Full Links:
KB Article from Microsoft on how to ask a question on a Forum
Post #909643
Posted Friday, April 23, 2010 11:55 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: 2 days ago @ 4:11 PM
Points: 5,969, Visits: 8,228
I got it right, but I don't like the question.

The QotD should be about testing our knowledge of SQL Server. Not testing our ability to use a search engine. And please don't tell me I've cheated by using one - how relevant is it that I do not recognise the paper from just the quote, or that I do not remember off the top of my head when it was published?

I do thank Tom for the effort of posting a QotD, and about a very important (and often overlooked) issue as well - but next time, please come up with a question about what defensive programming actually is, and how we can do that in the context of databases in general and SQL Server in specific.



Hugo Kornelis, SQL Server MVP
Visit my SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis
Post #909717
Posted Friday, April 23, 2010 1:02 PM


SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: 2 days ago @ 5:17 PM
Points: 1,521, Visits: 3,038
Hugo Kornelis (4/23/2010)
I got it right, but I don't like the question.

The QotD should be about testing our knowledge of SQL Server. Not testing our ability to use a search engine. And please don't tell me I've cheated by using one - how relevant is it that I do not recognise the paper from just the quote, or that I do not remember off the top of my head when it was published?

I do thank Tom for the effort of posting a QotD, and about a very important (and often overlooked) issue as well - but next time, please come up with a question about what defensive programming actually is, and how we can do that in the context of databases in general and SQL Server in specific.


Oh, but I do disagree. I see the QOD as a tool for learning more than a test of knowledge. In this case, guessing or searching out the answer is a stimulus to contemplation of the basic problem of whether it's possible to avoid errors or necessary to accept that once any system (computer program or otherwise*) reaches a certain level of complexity, it becomes more and more likely that errors will exist and that defensive measures must be taken.

That this was recognized and studied so early in the history of electronic computers should be taken as a foundation for the discussions you propose on defensive measures. If anyone is developing an appliction or even a single program without considering strategies for reducing or containing errors, they should at least know that they're ignoring a principle that's at least six decades old.

-----------------
* If I were designing a data processing / info technology ciriculum, I'd be sure to include at least one course using Systemantics: How Systems Work and Especially How They Fail by John Gail. Its example cases come from a number of disciplines, but are described in plain terms, intended to reach lay readers.
Post #909774
Posted Friday, April 23, 2010 1:20 PM


SSCrazy Eights

SSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy Eights

Group: General Forum Members
Last Login: Yesterday @ 2:18 PM
Points: 8,706, Visits: 9,253
Hugo Kornelis (4/23/2010)
I got it right, but I don't like the question.

The QotD should be about testing our knowledge of SQL Server. Not testing our ability to use a search engine. And please don't tell me I've cheated by using one - how relevant is it that I do not recognise the paper from just the quote, or that I do not remember off the top of my head when it was published?

I can understand that, and in fact I wondered a bit about posting something with relevance quite as tangential or indirect as this, and more about the history of programming than about current practise. But in the end I thought that on balance it might be worth reminding people that defensive programming has been recognised as a need in computing since the very start of the programming stored program computers. Besides, I wanted an easy ride on my first QOTD so that it wouldn't have too many people picking holes in the answer or in the explanation and this was one I thought I couldn't get wrong (I was wrong about that - there's a glaring typing error in the explanation, as has already been pointed out). I expected most people would guess rather than resort to google, but I can't see why anyone would regard use of google as cheating on a question like this; and I was very surprised to see that TPTB had decided to make it worth 6 points, because it is not at all an SQLServer question - although some of the questions tagged humour have been even less relevant yet still higher scoring.
But don't worry, my next QOTD (assuming it gets accepted - it's been pending a while) is T-SQL straight and simple, and I hope that will be more to your taste.


Tom
Post #909779
Posted Friday, April 23, 2010 1:47 PM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: 2 days ago @ 4:11 PM
Points: 5,969, Visits: 8,228
Tom.Thomson (4/23/2010)
and I was very surprised to see that TPTB had decided to make it worth 6 points, because it is not at all an SQLServer question - although some of the questions tagged humour have been even less relevant yet still higher scoring.
But don't worry, my next QOTD (assuming it gets accepted - it's been pending a while) is T-SQL straight and simple, and I hope that will be more to your taste.


Hi Tom,

Thanks for the explanation. I do indeed share your amazement at the amount of points alloted to this question, and to almost all "humour" questions. It's almost as if the amount of points for a question is inversely proportional with it's relevance to our everyday job...

I'm glad to hear that you have another question pending, and I'm looking forward to try my hand on it. And, I hope, on many more!



Hugo Kornelis, SQL Server MVP
Visit my SQL Server blog: http://sqlblog.com/blogs/hugo_kornelis
Post #909792
Posted Friday, April 23, 2010 2:16 PM


SSC-Dedicated

SSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-DedicatedSSC-Dedicated

Group: Administrators
Last Login: Yesterday @ 3:56 PM
Points: 33,182, Visits: 15,320
Of course the points are inversely proportional to your job. Isn't that how reviews are handled as well? And interviews?

It's actually a fun decision on my part, giving people a chance to "catch up" some easy points.







Follow me on Twitter: @way0utwest

Forum Etiquette: How to post data/code on a forum to get the best help
Post #909810
Posted Saturday, April 24, 2010 4:39 PM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Saturday, June 28, 2014 8:50 AM
Points: 2,649, Visits: 766
I found the Hartree reference quoted in the American Mathematical Society Journal from 1960... I had half hoped that the "6" in 1960 along with the six possible answers were pointing me toward an answer of 1960 and the AMS article published in 1960 seemed to support that strongly but noticed as I pushed the button it said Trivia rather then Humor as a category.

It would appear a lack of knowledge of the history of Micro-processing stood in my way. As an English Major with a minor in Education, I did not study the Manchester Machine. (http://plato.stanford.edu/entries/computing-history/)

I am curious as to how the SQL language is related to this particular piece of trivia. Did SQL develop from the mathematics for a micro-processor style of defensive programming?


Jamie
Post #910058
Posted Saturday, April 24, 2010 6:54 PM


SSCrazy Eights

SSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy EightsSSCrazy Eights

Group: General Forum Members
Last Login: Yesterday @ 2:18 PM
Points: 8,706, Visits: 9,253
Jamie Longstreet-481950 (4/24/2010)
I found the Hartree reference quoted in the American Mathematical Society Journal from 1960... I had half hoped that the "6" in 1960 along with the six possible answers were pointing me toward an answer of 1960 and the AMS article published in 1960 seemed to support that strongly but noticed as I pushed the button it said Trivia rather then Humor as a category. {/quote] I'm not sure why you think Humor as a category might have helped. Probably 6 options were too many - if I eever do another question lik ethat I'll maybe go for five options (or maybe severn?). [quote]

It would appear a lack of knowledge of the history of Micro-processing stood in my way. As an English Major with a minor in Education, I did not study the Manchester Machine. (http://plato.stanford.edu/entries/computing-history/)

Studying the Manchester machine would not have helped. The machine in question was the Cambridge Machine.

I am curious as to how the SQL language is related to this particular piece of trivia. Did SQL develop from the mathematics for a micro-processor style of defensive programming?

No, certainly not (although EFC's attitude to NULL [he regarded it as essential] might well be regarded as a vote infavour of defensive probramming). The idea of the question was to remind writers of SQL (who, in my experience, generally regard defensive programming as something that those funny C++ programmers do, despite thae fact that C++ programmers almost never do it) that defensive programming dates from the earlliest times of programming (lomg before HLL's like Fortran or Cobol, let alone SQL or C# [or amazing LLL's like C and C++] had been invented) and is something that has to be done in whatever language you write in (including T-SQL) unless you have a divine dispensation that says your code will never encounter a problem.


Tom
Post #910072
Posted Monday, April 26, 2010 5:14 AM


SSChampion

SSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampionSSChampion

Group: General Forum Members
Last Login: 2 days ago @ 6:32 PM
Points: 11,194, Visits: 11,140
Hugo Kornelis (4/23/2010)
I got it right, but I don't like the question.

The QotD should be about testing our knowledge of SQL Server. Not testing our ability to use a search engine. And please don't tell me I've cheated by using one - how relevant is it that I do not recognise the paper from just the quote, or that I do not remember off the top of my head when it was published?

I do thank Tom for the effort of posting a QotD, and about a very important (and often overlooked) issue as well - but next time, please come up with a question about what defensive programming actually is, and how we can do that in the context of databases in general and SQL Server in specific.

+1. I didn't even bother to Google - I waited for the correct answer to be mailed to me today

Whatever possessed Steve to throw six points at this?

Paul




Paul White
SQL Server MVP
SQLblog.com
@SQL_Kiwi
Post #910289
Posted Monday, April 26, 2010 5:24 AM
SSCommitted

SSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommittedSSCommitted

Group: General Forum Members
Last Login: Today @ 5:44 AM
Points: 1,739, Visits: 6,350
Steve Jones - Editor (4/23/2010)
It's actually a fun decision on my part, giving people a chance to "catch up" some easy points.


Easy? Only if you google the results.
All the QOTDs are just as easy if you look up the answer
Post #910293
« Prev Topic | Next Topic »

Add to briefcase «««1234»»

Permissions Expand / Collapse