Are the posted questions getting worse?

  • TomThomson - Thursday, July 6, 2017 3:32 PM

    Had it been me who was asked that question, you would have received a lecture on not starting to write code untile the requirements were clear; so why should I waste my time on an incompletely specified requirement - tell me what you want the statement to return if @Num is divisible by neither 3 nor 5.
    If you resolved that without making a fool of yourself, I would then have pointed out that the appropriate statement is one that relies on @Num being NULL, since your problem declares it and then wants it evaluated despite no value having been assigned. So depending on what you wanted returned when testing for neither divsibility by 5 nor divisibility by 3 would return true the answer would be either "select <whatever tyou said you wanted returned for the non-divisible case>" or, if you said you wanted nothing returned, "select null where 1 = 0" (which returns nothing, for some reasonable interpretation of "returns nothing").
    That would demonstrate that I can think for myself and can see the flaws in incomplete specification and ask for clarification.
    Perhaps the interviewee you mentioned burst into tears because she realised that she didn't want to work in a shop where the guy interviewing recruits was that sloppy about specifications, so she'd been wasting her time coming to be interviewed because she didn't want to work with a bunch of incompetents.  Probably not, but maybe you should be a bit more careful of the impression you give.

    I'm with you on this one...
    What's the business requirement behind this, why does the user need such an odd piece of code *FOR*?
    Is it so HR can lay people off based on their employee ID?
    If they get a "Fizz" they get the nice severance package with 6 months pay and health benefits, "Buzz"ers get 1 month pay and no benefits, and "FizzBuzz"ers' get a cardboard box and 5 minutes?

  • jasona.work - Friday, July 7, 2017 7:54 AM

    TomThomson - Thursday, July 6, 2017 3:32 PM

    Had it been me who was asked that question, you would have received a lecture on not starting to write code untile the requirements were clear; so why should I waste my time on an incompletely specified requirement - tell me what you want the statement to return if @Num is divisible by neither 3 nor 5.
    If you resolved that without making a fool of yourself, I would then have pointed out that the appropriate statement is one that relies on @Num being NULL, since your problem declares it and then wants it evaluated despite no value having been assigned. So depending on what you wanted returned when testing for neither divsibility by 5 nor divisibility by 3 would return true the answer would be either "select <whatever tyou said you wanted returned for the non-divisible case>" or, if you said you wanted nothing returned, "select null where 1 = 0" (which returns nothing, for some reasonable interpretation of "returns nothing").
    That would demonstrate that I can think for myself and can see the flaws in incomplete specification and ask for clarification.
    Perhaps the interviewee you mentioned burst into tears because she realised that she didn't want to work in a shop where the guy interviewing recruits was that sloppy about specifications, so she'd been wasting her time coming to be interviewed because she didn't want to work with a bunch of incompetents.  Probably not, but maybe you should be a bit more careful of the impression you give.

    I'm with you on this one...
    What's the business requirement behind this, why does the user need such an odd piece of code *FOR*?
    Is it so HR can lay people off based on their employee ID?
    If they get a "Fizz" they get the nice severance package with 6 months pay and health benefits, "Buzz"ers get 1 month pay and no benefits, and "FizzBuzz"ers' get a cardboard box and 5 minutes?

    Pretty sure there is more to it than just coming up with a solution.  She stared at for almost 5 minutes and never asked a question.  That is where the failure occurred.  Yes, I went beyond what was asked, but then I just wanted to be sure I still knew how to write the FizzBuzz code as it has been a few years since I saw this particular "requirement" being asked.

  • J Livingston SQL - Friday, July 7, 2017 5:18 AM

    DesNorton - Friday, July 7, 2017 5:14 AM

    .....  The spec provides a scenario, and table design, with some sample data.  It also provides a set expected outcome.

    ....if only all the questions on this site did this 😀😀

    Feel free to write some.

  • Steve Jones - SSC Editor - Friday, July 7, 2017 8:51 AM

    J Livingston SQL - Friday, July 7, 2017 5:18 AM

    DesNorton - Friday, July 7, 2017 5:14 AM

    .....  The spec provides a scenario, and table design, with some sample data.  It also provides a set expected outcome.

    ....if only all the questions on this site did this 😀😀

    Feel free to write some.

    A 'perfect' question would be great. I'd add it as a link in my signature and refer posters to it all the time.

    The absence of evidence is not evidence of absence.
    Martin Rees

    You can lead a horse to water, but a pencil must be lead.
    Stan Laurel

  • jasona.work - Friday, July 7, 2017 7:54 AM

    TomThomson - Thursday, July 6, 2017 3:32 PM

    Had it been me who was asked that question, you would have received a lecture on not starting to write code untile the requirements were clear; so why should I waste my time on an incompletely specified requirement - tell me what you want the statement to return if @Num is divisible by neither 3 nor 5.
    If you resolved that without making a fool of yourself, I would then have pointed out that the appropriate statement is one that relies on @Num being NULL, since your problem declares it and then wants it evaluated despite no value having been assigned. So depending on what you wanted returned when testing for neither divsibility by 5 nor divisibility by 3 would return true the answer would be either "select <whatever tyou said you wanted returned for the non-divisible case>" or, if you said you wanted nothing returned, "select null where 1 = 0" (which returns nothing, for some reasonable interpretation of "returns nothing").
    That would demonstrate that I can think for myself and can see the flaws in incomplete specification and ask for clarification.
    Perhaps the interviewee you mentioned burst into tears because she realised that she didn't want to work in a shop where the guy interviewing recruits was that sloppy about specifications, so she'd been wasting her time coming to be interviewed because she didn't want to work with a bunch of incompetents.  Probably not, but maybe you should be a bit more careful of the impression you give.

    I'm with you on this one...
    What's the business requirement behind this, why does the user need such an odd piece of code *FOR*?
    Is it so HR can lay people off based on their employee ID?
    If they get a "Fizz" they get the nice severance package with 6 months pay and health benefits, "Buzz"ers get 1 month pay and no benefits, and "FizzBuzz"ers' get a cardboard box and 5 minutes?

    I'd have to say that if either of these was a serious response, I'd mark you off my list and end the interview soon. I dislike pedantic arguments for the sake of being difficult.

    I think it's an interesting low bar test, an exercise in seeing the user sort through logic. Certainly asking about NULL might be a nice question, but returning the number or just returning the Fizz, Buzz, Fizz, Fizz, etc. is fine. It is just be interesting to see how someone solves the logical problem.

    This one is well known, so I'd likely construct something similar but different, just to see how they interpret a simple question.

  • Phil Parkin - Friday, July 7, 2017 8:59 AM

    Steve Jones - SSC Editor - Friday, July 7, 2017 8:51 AM

    J Livingston SQL - Friday, July 7, 2017 5:18 AM

    DesNorton - Friday, July 7, 2017 5:14 AM

    .....  The spec provides a scenario, and table design, with some sample data.  It also provides a set expected outcome.

    ....if only all the questions on this site did this 😀😀

    Feel free to write some.

    A 'perfect' question would be great. I'd add it as a link in my signature and refer posters to it all the time.

    If the answer is '42', what is the question?

    Brandie Tarvin, MCITP Database AdministratorLiveJournal Blog: http://brandietarvin.livejournal.com/[/url]On LinkedIn!, Google+, and Twitter.Freelance Writer: ShadowrunLatchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.

  • Brandie Tarvin - Friday, July 7, 2017 9:03 AM

    If the answer is '42', what is the question?

    42 + 0? 🙂

    This also reminds me of: https://www.youtube.com/watch?v=DKbQFMOEFTs

    Thom~

    Excuse my typos and sometimes awful grammar. My fingers work faster than my brain does.
    Larnu.uk

  • I know that there some new updates coming for the site. One thing that seems to be missing is a cancel button when posting. If you accidentally click Quote instead of Like there is no way to cancel your post without reloading the page or going to another page. Even stranger is that if you click quote on a different thread you are suddenly quoting both posts. Weird.

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/

  • Thom A - Friday, July 7, 2017 9:06 AM

    Brandie Tarvin - Friday, July 7, 2017 9:03 AM

    If the answer is '42', what is the question?

    42 + 0? 🙂

    DECLARE @Question VARCHAR(100) =
    'The Answer to the Ultimate Question of Life, the Universe, and Everything'
    DECLARE @Source VARCHAR(100) =
    'The Hitchhikers Guide to the Galaxy'
    DECLARE @Answer VARCHAR(10)
    SET NOCOUNT ON
    IF object_id('tempdb..#ParallelUniverse') IS NOT NULL
    DROP TABLE #ParallelUniverse

    SELECT top (len(@Source)) IDENTITY(INT, 1, 1) n
    INTO #ParallelUniverse FROM master.sys.all_columns

    SET @Answer = (select len(@Question) - (SELECT MAX(n) from
    ((SELECT n FROM #ParallelUniverse )
    EXCEPT
    (SELECT (PU1.n * PU2.n) AS cn
     FROM #ParallelUniverse AS PU1, #ParallelUniverse AS PU2
     WHERE PU1.n BETWEEN 2 AND CEILING (SQRT (1000))
     AND PU2.n BETWEEN 2 AND CEILING (SQRT (1000))
     AND PU1.n <= PU2.n
     AND (PU1.n * PU2.n) <= 1000) )x))PRINT @Question + ' is.. ' + @Answer
    SET NOCOUNT OFF

    ________________________________________________________________
    you can lead a user to data....but you cannot make them think
    and remember....every day is a school day

  • Sean Lange - Friday, July 7, 2017 9:09 AM

    I know that there some new updates coming for the site. One thing that seems to be missing is a cancel button when posting. If you accidentally click Quote instead of Like there is no way to cancel your post without reloading the page or going to another page. Even stranger is that if you click quote on a different thread you are suddenly quoting both posts. Weird.

    I like hitting multiple quote buttons to quote multiple posts and being able to type in between them, but the quotes don't get rendered properly.  They don't have the boxed outline and I haven't figured out a way to fix it yet.

  • Ed Wagner - Friday, July 7, 2017 9:13 AM

    Sean Lange - Friday, July 7, 2017 9:09 AM

    I know that there some new updates coming for the site. One thing that seems to be missing is a cancel button when posting. If you accidentally click Quote instead of Like there is no way to cancel your post without reloading the page or going to another page. Even stranger is that if you click quote on a different thread you are suddenly quoting both posts. Weird.

    I like hitting multiple quote buttons to quote multiple posts and being able to type in between them, but the quotes don't get rendered properly.  They don't have the boxed outline and I haven't figured out a way to fix it yet.

    I can see where the multiple quotes is kind of useful occasionally but not being able to cancel a post is kind of silly.

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/

  • jasona.work - Friday, July 7, 2017 7:54 AM

    TomThomson - Thursday, July 6, 2017 3:32 PM

    Had it been me who was asked that question, you would have received a lecture on not starting to write code untile the requirements were clear; so why should I waste my time on an incompletely specified requirement - tell me what you want the statement to return if @Num is divisible by neither 3 nor 5.
    If you resolved that without making a fool of yourself, I would then have pointed out that the appropriate statement is one that relies on @Num being NULL, since your problem declares it and then wants it evaluated despite no value having been assigned. So depending on what you wanted returned when testing for neither divsibility by 5 nor divisibility by 3 would return true the answer would be either "select <whatever tyou said you wanted returned for the non-divisible case>" or, if you said you wanted nothing returned, "select null where 1 = 0" (which returns nothing, for some reasonable interpretation of "returns nothing").
    That would demonstrate that I can think for myself and can see the flaws in incomplete specification and ask for clarification.
    Perhaps the interviewee you mentioned burst into tears because she realised that she didn't want to work in a shop where the guy interviewing recruits was that sloppy about specifications, so she'd been wasting her time coming to be interviewed because she didn't want to work with a bunch of incompetents.  Probably not, but maybe you should be a bit more careful of the impression you give.

    I'm with you on this one...
    What's the business requirement behind this, why does the user need such an odd piece of code *FOR*?
    Is it so HR can lay people off based on their employee ID?
    If they get a "Fizz" they get the nice severance package with 6 months pay and health benefits, "Buzz"ers get 1 month pay and no benefits, and "FizzBuzz"ers' get a cardboard box and 5 minutes?

    It's pretty common to have a business requirement that might match 1 or more criteria, the basic question can you do a % in SQL is easy.  But perhaps an additional caveat would be to include showing multiple solutions that have different results and explaining why each of them does.

  • Sean Lange - Friday, July 7, 2017 9:15 AM

    Ed Wagner - Friday, July 7, 2017 9:13 AM

    Sean Lange - Friday, July 7, 2017 9:09 AM

    I know that there some new updates coming for the site. One thing that seems to be missing is a cancel button when posting. If you accidentally click Quote instead of Like there is no way to cancel your post without reloading the page or going to another page. Even stranger is that if you click quote on a different thread you are suddenly quoting both posts. Weird.

    I like hitting multiple quote buttons to quote multiple posts and being able to type in between them, but the quotes don't get rendered properly.  They don't have the boxed outline and I haven't figured out a way to fix it yet.

    I can see where the multiple quotes is kind of useful occasionally but not being able to cancel a post is kind of silly.

    Agreed

  • Steve Jones - SSC Editor - Friday, July 7, 2017 8:59 AM

    jasona.work - Friday, July 7, 2017 7:54 AM

    TomThomson - Thursday, July 6, 2017 3:32 PM

    Had it been me who was asked that question, you would have received a lecture on not starting to write code untile the requirements were clear; so why should I waste my time on an incompletely specified requirement - tell me what you want the statement to return if @Num is divisible by neither 3 nor 5.
    If you resolved that without making a fool of yourself, I would then have pointed out that the appropriate statement is one that relies on @Num being NULL, since your problem declares it and then wants it evaluated despite no value having been assigned. So depending on what you wanted returned when testing for neither divsibility by 5 nor divisibility by 3 would return true the answer would be either "select <whatever tyou said you wanted returned for the non-divisible case>" or, if you said you wanted nothing returned, "select null where 1 = 0" (which returns nothing, for some reasonable interpretation of "returns nothing").
    That would demonstrate that I can think for myself and can see the flaws in incomplete specification and ask for clarification.
    Perhaps the interviewee you mentioned burst into tears because she realised that she didn't want to work in a shop where the guy interviewing recruits was that sloppy about specifications, so she'd been wasting her time coming to be interviewed because she didn't want to work with a bunch of incompetents.  Probably not, but maybe you should be a bit more careful of the impression you give.

    I'm with you on this one...
    What's the business requirement behind this, why does the user need such an odd piece of code *FOR*?
    Is it so HR can lay people off based on their employee ID?
    If they get a "Fizz" they get the nice severance package with 6 months pay and health benefits, "Buzz"ers get 1 month pay and no benefits, and "FizzBuzz"ers' get a cardboard box and 5 minutes?

    I'd have to say that if either of these was a serious response, I'd mark you off my list and end the interview soon. I dislike pedantic arguments for the sake of being difficult.

    I think it's an interesting low bar test, an exercise in seeing the user sort through logic. Certainly asking about NULL might be a nice question, but returning the number or just returning the Fizz, Buzz, Fizz, Fizz, etc. is fine. It is just be interesting to see how someone solves the logical problem.

    This one is well known, so I'd likely construct something similar but different, just to see how they interpret a simple question.

    /FWWEETTT!!!!
    Serious talk at the water cooler!
    20 minute penalty cleaning the hippos enclosure with a spatula!
    😀

  • FizzBuzz.
    Back in my college days BizBuzz was a game involving shot glasses of beer and change of direction in saying Biz, Buzz, BizBuzz, or the number.
    Cheating by drinking from your fill bottle usually resulted in ensuing penalties later on as it came around.
    Little did I know that a game would evolve into an interview question.

Viewing 15 posts - 59,176 through 59,190 (of 66,738 total)

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