Git Product home page Git Product logo

Comments (8)

seanlip avatar seanlip commented on May 5, 2024

Thanks for filing, @skywalker-lili! This looks like an important bug, but there isn't enough detail to reproduce it.

Would you mind providing clear reproduction instructions, expected/observed behavior, and a screenshot, similar to #83?

from tie.

skywalker-lili avatar skywalker-lili commented on May 5, 2024

Sure. Here is how to reproduce it:

  1. Open "app.html"

  2. Navigate to "Question 2: Balanced Parentheses"

  3. Modify the isBalanced(s) function to return False. Click "run" button to get a hint.
    hint1

  4. Then modify the isBalanced(s) function to return False or False. Click "run" button to get a hint.
    hint2

  5. Then modify the isBalanced(s) function to return False or False or False. Click "run" button to get a new hint.
    hint3

  6. The hints from step 3-5 are different even though the code made the same mistakes by just returning False. The last hint is especially misleading by assuming user's code is counting number of parenthesis.

Expected behavior: hints should be stable when user's code made same mistakes or when making the same wrongs in test cases. Also, hints shouldn't mislead the user what kind of mistake its code has.

from tie.

seanlip avatar seanlip commented on May 5, 2024

/cc @rujunm

from tie.

seanlip avatar seanlip commented on May 5, 2024

@skywalker-lili, thanks for adding the detail!

from tie.

andersonw avatar andersonw commented on May 5, 2024

Just wanted to say that this behavior seems intended: if you provide multiple hints for the same buggyOutputTest, then it'll just iterate through all of them as long as the code is edited in some way but returns the same result. So this feels like two separate issues:

  1. The criteria for when to give the next hint should be stricter than just "the code isn't exactly the same". Maybe some sort of edit distance or timestamp check?

  2. The "countNumberOfParentheses" function isn't doing the intended thing; I think the "return numLeft == numRight" line should be outside the for loop.

from tie.

andersonw avatar andersonw commented on May 5, 2024

I can fix 2 (removing the tab does indeed fix it), but should 1 be moved to a separate issue? @seanlip

from tie.

seanlip avatar seanlip commented on May 5, 2024

Yes, let's move 1 to a separate issue. Thanks @andersonw!

from tie.

seanlip avatar seanlip commented on May 5, 2024

Second part fixed in #212; first part filed as #211. Thanks @andersonw!

from tie.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.