Defensive Programming

  • Woohoo - 6 points for a GUESS! I figured in WWII and assumed mid-fifities and beyond were just a little late. Technology started rolling pretty fast even back then so I took a stab in the dark and WON!! ~pats self on back~ 😎

    -- You can't be late until you show up.

  • A nice research question. I got it right because of Google.

    If I had not looked it up, I would have guessed a much earlier date. Initially I figured that it was a reference to some sort of general logical thinking and that the programmes were either military programmes, using arithmetic in devising trajectories, forecasting, etc or some other sort of programmes used in mechanical engineering from the industrial revolution. Glad I looked it up!

  • An interesting and article; the applicability of which seems to become more poignant each year.

    http://www.jstor.org/pss/98663

  • Found the article on Google. This looks like it could be a very interesting article! When I have some free time (whatever that is), I'm going to have to get a copy of it and read it!

    +--------------------------------------------------------------------------------------+
    Check out my blog at https://pianorayk.wordpress.com/

  • hanziou (4/23/2010)


    I the title of the paper really "The diagnosis of mstakes in programmes on the EDSAC" by S. Gill,? I.e. is "mistakes" purposely misspelled by S. Gill? Or was that a transcription error by the QOTD poster?

    It's my transcription error, the author of the paper was more careful than I was (I guess if you are getting you department head to put a paper of yoursup for the Royal Society you are very very careful indeed).

    Tom

  • 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

  • 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/Data Platform MVP (2006-2016)
    Visit my SQL Server blog: https://sqlserverfast.com/blog/
    SQL Server Execution Plan Reference: https://sqlserverfast.com/epr/

  • 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[/u] by John Gail. Its example cases come from a number of disciplines, but are described in plain terms, intended to reach lay readers.

  • 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

  • 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/Data Platform MVP (2006-2016)
    Visit my SQL Server blog: https://sqlserverfast.com/blog/
    SQL Server Execution Plan Reference: https://sqlserverfast.com/epr/

  • 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.

  • 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

  • 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?).

    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

  • 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

  • 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 🙂

Viewing 15 posts - 16 through 30 (of 38 total)

You must be logged in to reply to this topic. Login to reply