7 votes

Programming trick questions

5 comments

  1. [5]
    whbboyd
    (edited )
    Link
    I recommend actually looking at these before reading discussions about them. Spoilers Personally, I think the second and third questions are really more quizzes of esoterica (about the...

    I recommend actually looking at these before reading discussions about them.

    Spoilers

    Personally, I think the second and third questions are really more quizzes of esoterica (about the distribution of perfect numbers and semantics of unicode, respectively) than "programming trick questions", though I suspect a lot of people have the right ("wrong") amount of background to fall into the trap (i.e. remember the definition of perfect numbers, but only the values of the first two or three, and certainly not that the sixth one is greater than 8.5 billion).

    4 votes
    1. [3]
      cfabbro
      Link Parent
      Just in case you weren't aware, you can actually hide spoilers on Tildes by using <details> and <summary>, E.g. <details><summary>Spoiler!</summary>This is a spoiler.</details> = Spoiler!This is a...

      Just in case you weren't aware, you can actually hide spoilers on Tildes by using <details> and <summary>, E.g.

      <details><summary>Spoiler!</summary>This is a spoiler.</details> =

      Spoiler!This is a spoiler.
      4 votes
      1. [2]
        whbboyd
        Link Parent
        Thanks! That's a much better feature to appropriate for that functionality than any of the ones commonly used on Reddit (before they rolled out explicit spoiler-tagging).

        Thanks! That's a much better feature to appropriate for that functionality than any of the ones commonly used on Reddit (before they rolled out explicit spoiler-tagging).

        1 vote
        1. cfabbro
          (edited )
          Link Parent
          Agreed, but it still needs a little work though. Right now when you minimize the comment, the spoiler contents can accidentally be revealed in the visible excerpt... but it's definitely a step...

          Agreed, but it still needs a little work though. Right now when you minimize the comment, the spoiler contents can accidentally be revealed in the visible excerpt... but it's definitely a step above the CSS element hacks we use to have to resort to for so long on reddit. Those were a PITA and the implementation/syntax varied a lot between subreddits. :/

    2. ali
      Link Parent
      I agree, I got the first one at a second thought. When I read the Wikipedia article on the second one, I figured the solution was going to be like that, but I really had no idea what the third one...

      I agree, I got the first one at a second thought.

      When I read the Wikipedia article on the second one, I figured the solution was going to be like that, but I really had no idea what the third one was supposed to be.

      But I guess that’s the point of it being a trick question.

      2 votes