datacamp-content / courses-introduction-to-shell

Introduction to Shell by Greg Wilson
Other
48 stars 47 forks source link

Incorrect submission thrown for exploration #63

Open hugobowne opened 6 years ago

hugobowne commented 6 years ago

If this has already been discussed, feel free to close.

In many exercises, I want to see where I am (pwd) or explore a little bit (ls). Sometime it is helpful to see where I am to solve the challenge, such as here: https://campus.datacamp.com/courses/introduction-to-shell-for-data-science/manipulating-files-and-directories?ex=11

however, when I execute pwd, I am told I am making an incorrect submission. But I'm not even trying to make a submission. This is proving very frustrating for me. However, it may be a result of expectations set from Python/R courses on DC.

gvwilson commented 6 years ago

@hugobowne you're correct - as soon as the learner types "enter", that exercise's SCT is run. If the user types several lines, one at a time, the SCT is triggered by the first one. The only way around this is to have the learner type their lines into a temporary file which is then submitted - but this is a long way away from normal shell interaction. I agree it's not ideal.

cc @machow

machow commented 6 years ago

When we built the SQL courses, we originally had an "auto-submit" checkbox that could be toggled. In a sense, it seems like the "auto-submit" behavior in shell courses could be toggled in the same way. Issue seems related to product side of things (cc @rv2e )

rv2e commented 6 years ago

@hugobowne (cc @machow @gvwilson) I get your concerned. Like you said it's more product related. In one hand the instruction should be self-explanatory enough in a ConsoleEx in order to avoid having to do pwd. In the other hand the user should have the ability to run code without getting SCT every time which could be frustrating indeed. @ramnathv (@martijnsublime) Should you take care of finding a solution (or not if you think we shouldn't)? Or should we (LE team) and then discuss with you?

martijnsublime commented 6 years ago

@gvwilson I had a discussion with @ramnathv on this just now. We suggest the following:

Let's leave it like it is for now since there is not enough certainty this is an actual issue for the majority of our users. However, when beta testing starts for external users (assuming this has not happened yet) it would be good if we could add an extra open-ended question to the survey asking them what their thoughts are on this new exercise type. If many gave the same comment as Hugo, we can change the set-up.

ramnathv commented 6 years ago

Responding to this specific comment from @gvwilson

@hugobowne you're correct - as soon as the learner types "enter", that exercise's SCT is run. If the user types several lines, one at a time, the SCT is triggered by the first one. The only way around this is to have the learner type their lines into a temporary file which is then submitted - but this is a long way away from normal shell interaction. I agree it's not ideal.

The ConsoleExercise (and its variations) as an exercise type was designed to make it easy to get quick feedback on tasks involving single-line of code, without having to explicitly click on a submit button. If your exercise requires the user having to type multiple lines of code to complete it, you might want to consider a different exercise type that supports it.

gvwilson commented 6 years ago

As far as I can tell, the only exercises that support multi-line submissions don't provide feedback as the user types - for example, it's kind of odd (and not helpful) to type ls and not see the output right away. I agree that there's no way to solve this without an explicit "done" indication from the learner, at which point we check their last line. Is there an exercise type that supports that?

ramnathv commented 6 years ago

@gvwilson Fair point. Right now it is either single-line submissions with instantaneous feedback, or multi-line submissions with batched feedback. The idea of TabConsole and BulletConsole was to break down multi-line submissions into single-line submissions. If you can provide an example of an exercise where it is a multi-line submission, but cannot be broken down into a Tab/Bullet type, that would be useful for us to think about alternate types.

gvwilson commented 6 years ago

@ramnathv I have broken many of the shell exercises up into single steps using TabConsole and BulletConsole. The problem is that users (quite fairly) often want to type a few extra ls or pwd commands as they go along - things that don't alter the files, and aren't their final submissions, but help them keep track of where they are and what they're doing. I do this in the shell all the time as well, I think many other people do too, and it's a habit we wouldn't want to discourage.