protoschool.github.io icon indicating copy to clipboard operation
protoschool.github.io copied to clipboard

Lesson Feedback: [Regular File API lesson 6 (https://proto.school/regular-files-api/06)]

Open winksaville opened this issue 4 years ago • 1 comments

Have a question or suggestion regarding a specific ProtoSchool lesson? Please use this template to share it!

URL of the lesson that's confusing: Regular Files API Lesson 6 of 8 - List the files in a directory

What's confusing about this lesson? The result variable returns an array of objects. And for the field "type": String it says the value can be a "file" or "directory".

{
  "cid": Object,
  "path": String,
  "name": String,
  "depth": Number,
  "size": Number,
  "type": String // can be "file" or "directory",
  "mode": Number
}

But, can the "type" field actually be "directory" I don't see a test for it here I see only tests for 'file'. Also, if a directory can be returned might the value actually be 'dir' like is suggested in Lesson 8 for ifps.get(ipfsPath). Although when I look at the documentation for ipfs.get it just says "you will get a tarball containing the contents of the directory" and it doesn't mention the format of that data.

What additional context could we provide to help you succeed?

What other feedback would you like to share about ProtoSchool? Two suggestions:

  • It would be nice to get more precise compile errors. For instance "missing ':'" isn't very useful.
  • I wish there was an easy way to add console.log statements to give more visibility.

winksaville avatar Dec 08 '21 23:12 winksaville

  • I wish there was an easy way to add console.log statements to give more visibility.

As "everybody" knows, there is an easy way to see console.log statements, at least on chrome, just click on the three vertical '...' -> 'More tools' -> 'Developer tools'.

So I'll modify my suggestion, please consider adding a paragraph explaining how to enable 'Developer tools' on various browsers and suggesting console.log as a debug tool for neophytes :)

winksaville avatar Dec 09 '21 20:12 winksaville