learnyounode icon indicating copy to clipboard operation
learnyounode copied to clipboard

My First I/O: Misleading instructions; clarify "first command-line argument"

Open brianjsullivan opened this issue 9 years ago • 5 comments

I think the instructions for this challenge, as seen here: my first io instructions are a little misleading. While technically accurate, for beginners this can be confusing as a) no arguments are passed by the user outside of "learnyounode run file.js" and b) the clandestine argument ends up as the third, not first, index in the process.argv array.

brianjsullivan avatar Apr 17 '15 00:04 brianjsullivan

+1 Should say "Third element after node and program"

rupertdev avatar Apr 20 '15 23:04 rupertdev

+1

tgfjt avatar Apr 21 '15 00:04 tgfjt

But you don't need to process command line arguments for exercise 1 and in exercise 2 it does clearly explain about the command line arguments.

connorwyatt avatar May 14 '15 21:05 connorwyatt

I agree with @connorwyatt. If you've done exercise 2, you would've learned that the actually CLI parameters start at the third position (index 2 of the process.argv array). This is actually silently testing that you've learned from the previous exercises and can use that knowledge now.

gligoran avatar Jun 29 '16 21:06 gligoran

Just saw another student run into this. Couldn't tell whether it was the previous exercise not managing to teach the knowledge required or that the student simply had forgotten at the time he returned to the exercises.

Right now the error is unhelpful and since we can't test whether the student grabbed the right arg it seems doing something to the docs is the only solution. Maybe a hint on the first argument not being the first element?

alextes avatar May 17 '17 18:05 alextes