google / tie Goto Github PK
View Code? Open in Web Editor NEWLicense: Apache License 2.0
License: Apache License 2.0
Working on creating this question in branch: bomberman_question
Cannot add a character in middle.
When users want to add 'c' in middle of 'abde', users will expect it becomes 'abcde'. But the actual result turns to be 'abce', where the new character 'c' covers the old character 'd' instead of adding itself between 'b' and 'd' in 'abde'.
Cannot scale as two other output screens.
We should probably add an end-to-end test that loads the page and clicks some of the buttons / submits some code, in order to prevent breakages like the one that was fixed in #80. (Note that even an end-to-end test which just loads the app.html page in a browser and checks that there are no console errors would have helped here.)
Protractor is likely to be a good library for this, and is worth investigating.
The output screen at the left top corner has a black box to indicate the Run results, which only scales based on the screen size instead of the text length. Thus, if the text within this black box is longer than screen size, the rest text will simply extend out of the black box, which is not very elegant.
Repro instructions:
We can find out the output text exceeds the actual size of the black box.
You told me to write this.
Expected behavior: No errors seen in Dev Tools console.
Observed behavior: "TypeError: Cannot read property 'forEach' of undefined" error written to Dev Tools console after completing the first question.
Steps to reproduce:
For some reason the editor is conflating tabs and spaces and it's causing all sorts of errors. I usually run into this on the i18n question when adding the length check to abbreviate.
Open app.html
Copy/paste solution.
Add lines to solution (hitting "Enter" after a complete line), and then tab inwards.
You see the correct indentation, but it's now mixed tabs with spaces.
Reproduction Steps:
Open "app.html"
Navigate to a question
Add a library import like import string
or import re
Use the import in the function like word[0] in string.whitespace
or re.compile(r'\w')
Click Run
Current message is:
NameError: name 'string' is not defined on line 3
Which could be:
Library imports are not permitted for this problem
Standard library imports like re and string may not be allowed as they make the problem solution too simple and unchallenging. However, it might be a god idea to say that explicitly.
[EDIT Mar 4, 11:24]
Suggested Solutions:
Option 1: Ban the use all libraries for all questions
This is a blanket solution. For each solution to any problem, check for an import statement. If there is one, don't compile the problem. Instead, show a message saying imports are not permitted.
This is how the system is currently designed and would only require adding a check and a message. This can be a good minimal solution.
Option 2: Ban libraries specific to questions
We could have two sets of libraries - banned in every question e.g. pandas
and banned for this specific question e.g. re
for string manipulation questions. This is a more elegant and sustainable solution and requires a little more work than the first option
For are_all_unique, it takes in an array as an argument, but that's not currently supported, so jsonVariableToPython crashes.
Launch app.html
Navigate to i18n question
Complete tasks up to first instance of filling in are_all_unique
App should crash.
On the GUI it said "You'll see the first question to your right". However, the question appears in the bottom.
The problem statement is not so clear. We don't know what to expect as the result of the decoder. The problem said something about one-to-one mapping between the encoder and decoder, 23xa means 2aaa and not 23 of 'a'. However, it is not just clear in the problem statement.
Students should not be able to access AuxiliaryCode or System classes.
Repro steps (at least, the easiest ones):
Navigate to Problem 2
Paste in the following code:
def isBalanced(s): return AuxiliaryCode.countNumberOfParentheses(s)
Run code. You should get an error message (rather than a SyntaxError or something) since it called one of the AuxiliaryCode methods. We should block students from calling any of those classes, potentially via throwing a SyntaxError or a ForbiddenNamespaceError of our own making. Something to tell them yo you can't run our code.
Retro steps:
In step3 of Question 4, Run-Length Encoding:
We write a one-line program to return the input directly, then click 'run'.
Output:
The output of our function will be 'bbbbb' when input is '5xb'.
Expected behavior:
The output of our function will be '5xb' when input is '5xb'.
Possible causes:
'bbbbb' is the result after using the function 'AuxiliaryCode.decodeEncodedString' defined in 'outputFunctionName' attribute in JS script of questions on our output '5xb'. It may confuse some users cause the output in the console is not the actual output of their function.
Suggestion:
Maybe we can modify the text when outputFunctionName != null. For this question, a possible output could be 'Output after decoding:', 'Expected Output after decoding'. Or we can modify the question: give them the decoding function/strategy to ask them write correct encoding function to make sure the string remain the same after encoding and decoding. Or in the last step we can ask them to implement the decoding function by themselves.
Repro Steps:
Open "app.html".
Navigate to question 1.
Change the returned string from "" to a random string(e.g., "abcd") which will produce wrong answer.
Click "Run".
The console now shows the input("moo cow bark dog") and the output("abcd"), and the expected output("oom woc krab god") if scrolling down the window.
Change the returned string from "abcd" to another random string(suppose the user is fixing the bug in the code).
Run the code again.
The console shows the expected output, but the actual output is not seen until you scroll up the window.
Expected behavior: The console always displays the input and actual output, whenever the user runs the code. It's easier for the user to see what his/her code produced and debug the code.
(This comes from a suggestion in #88.)
It would be nice to have some sort of way for students to "ask questions". This could be as simple as having a question mark button in the bottom right and allowing them to select, multiple-choice style, clarifying questions from it (including "can I have a hint, please?"). That way, although they might not be able to practice coming up with questions on their own, at least they get a feel for what sort of thing to ask.
Since the test cases, which are quite few and rather simple, are shown on screen with their correct answers once failed, challengers can list out all test cases as predicates in their codes and 'cheat'.
In the last phase of this question, the user are required to encode the word in a comprehensible manner, in which "5aaaa" can be decoded properly.
However, the most straight forward way is to encode "5" as "1x5", which conflict with the previous phase's requirement(encoding should be as short as possible).
If we make the function always return false, it says "Try running your code on '))((' on paper. Did you expect that result?". This suggestion is useless, because the input '))((' should get false.
Expected behavior: When question or feedback looks at how whitespace is handled, whitespace is rendered properly in the feedback window.
Observed behavior: Whitespace appears as a single space character, regardless of whether it is a tab or consists of multiple whitespace characters.
Steps to reproduce:
The text areas with the instruction and the question can be resized by the user.
Text areas resize or become scrollable based on the amount of text in them (with a fixed minimum size)
Executing code after changing the function name displays error and breaks the output console.
Reproduction Steps:
The description/examples of this question could be more detailed, as dog->d1g
is a valid case according to the description but failed here:
Maybe like below:
An abbreviation of a word follows the form <first character><length of the middle of the string><last character>
. Below are some examples of word abbreviations:
a) it --> it (no abbreviation)
b) d|o|g --> dog (no abbreviation)
c) i|nternationalizatio|n --> i18n
The Judge does not test my code for tasks that I've passed before.
For example, on Question 2, my code went through Task One smoothly but had bugs on Task Two. Then I made some changes so as to pass the tests for Task Two. Even through now my code failed on the tests of Task One, the Online Judge would not find out, but instead moved me forward to the third task. Such design seemed quite inappropriate to me, because the next round task, based on the previous one, encourages challengers to generalize their codes, rather than allowing them to pass the tasks individually.
Sometimes users want to create custom test cases to figure out the bugs in their codes, but there is no place to do it in the webpage right now. So it should be helpful to have it and maybe it's better to embed a default right algorithm for each problem to show the correct result for the custom test case.
Reproduction Steps:
Expected Output: The line numbers should not overlap with the code
Actual Output: The code contents overlap with the line numbers on the left
In the code, we just return Booleans such as False,
False or False
, False or False or False
...and so on. However, the hints got different every time. Seems like the hints are just iterating in the back-ends regardless of the actual mistake of user's code.
And if we return anything but an expression that results in False
, such as None
, True
...It displays the input, output and the expected output. I kind wish it always displays so that users know what input they are tested against.
I finished the question 2 (compiled successfully and got tests passed) and moved forward to question 3. When I went back to question 2 (click "2" in the process bar) to review the code, the code has been reset and my code was not saved.
Any output function defined in the auxiliary code and then specified in the data schema (such as rle.js's decodeEncodedString) is not currently used.
Repro steps:
AuxiliaryCode.decodeEncodedString
was not run on the output.Hi,
The current version of TIE does not do auto-indentation when there is a new line after 'def', 'if' or 'where' clauses. It just aligns the new line with the previous one. It may be more user-friendly and save some time if this feature is included, since it is not convenient for users to count spaces themselves.
I captured two screenshots to compare between TIE and Leetcode.
Repro instructions: Go to the reverseWords problem, and type the code seen in the screenshot below.
Observed behaviour: Runtime errors have the wrong line numbers. For example, in the screenshot below, the error is shown as being on line 15, whereas the actual error is on line 3.
Expected behaviour: The error message should show the correct line number.
Repro steps from scrach:
Start any question
Complete a task within that question
Prompt will have inconsistent message with button -- button should change, I think.
Per discussion in #57, let's add the new CodeSubmission object to the Snapshot (that's used as part of a transcript) so that the transcript has all the information needed to restore a user session.
Create Most Common Character Question with @spwahaha
If you try the following in the reverse word question:
def reverseWords(word):
if word == "moo cow bark dog":
return "oom woc krab god"
Parsing fails and an error is written to console, but no feedback (or error) is given to the user.
Expected behavior: Some indication to user what went wrong.
Observed behavior: Nothing (unless you open a console and see the obscure error message written there)
Currently, if user navigate to another problem, they will lose all the work on current problem even without a warning message.
This can be very frustrating for users if they just navigate to another problem by accident, or they are stuck on the current one and they wish to work on another problem and come back later. We might keep user's work in session or at least add an alert message warning that they are about to lose all the current work.
On a larger window, everything is centered with the same height on the left and right sides:
On smaller windows, the elements do not have a consistent width, nor are they centered on the page. Also, the extra height on these is not required when the elements are stacked vertically.
Repro steps:
It might be worth catching that error and saying something closer to "You seem to be missing an 'abbreviate' method. Check the starter code and make sure that it hasn't been deleted or modified accidentally."
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.