TheOdinProject / curriculum

The open curriculum for learning web development
https://www.theodinproject.com/
Other
9.99k stars 13.35k forks source link

JavaScript/Recursive Methods: "Visualizing Recursion in the call stack" resource now behind paywall #26622

Closed scottwright-dev closed 11 months ago

scottwright-dev commented 11 months ago

Describe your suggestion

Having checked the additional resources section in the Recursive Methods lesson I can report that the "Visualizing Recursion in the call stack "appears to have now been moved behind a paywall for members only.

I have double checked this with my (free tier) Medium account and cannot access the full article. I think it may have to be removed as a resource.

Path

Node / JS

Lesson Url

https://www.theodinproject.com/lessons/javascript-recursive-methods

Checks

(Optional) Discord Name

No response

(Optional) Additional Comments

No response

CouchofTomato commented 11 months ago

Agreed. Options are to find another resource or simply remove this one.

If you don't have another resource in mind then just submit a PR removing the one there. I'll assign it to you since you have indicated you want to work on this issue.

scottwright-dev commented 11 months ago

Thanks for assigning @CouchofTomato I can certainly remove the existing link. As a consideration for a replacement, as the main focus of the article appears to provide the learner with a way of visualising how a recursive function works I have a suggestion of an alternative resource which could fulfil this.

There is a site I have used in the past which I find helpful in visualising code: Python Tutor. The site has a helpful visualiser tool where you can input code in Javascript and it allows you to step through the sequence of the function.

For demonstration purposes, I plugged in one of the questions from the assignment section of this lesson, example here.

Perhaps this could be something to consider? I would be interested to hear your thoughts if you feel something like this tool brings some additional value to the lesson. If not I can go ahead and remove the existing resource.

CouchofTomato commented 11 months ago

@scottwright-dev

Yeah that looks like a decent resource. We could use the Javascript one perhaps?

scottwright-dev commented 11 months ago

Sure, sounds like a plan. For clarity would an example similar to the one used in the original article suffice? The article used factorials. So something along the lines of:

function calcFactorial(num) {
    if (num === 1) {
        return 1;
    }
    return num * calcFactorial(num - 1);
}

calcFactorial(5);

Which would be linked like this in the visualizer. Please let me know if thats suitable and I'll add it in. Many Thanks.

Baguirre03 commented 11 months ago

Nooo. Thats so devastating, I wonder why on earth they would change that. I agree, maybe the visualizer would be nice, or maybe I could write something similar up 🤔

CouchofTomato commented 11 months ago

Sure, sounds like a plan. For clarity would an example similar to the one used in the original article suffice? The article used factorials. So something along the lines of:

function calcFactorial(num) {
    if (num === 1) {
        return 1;
    }
    return num * calcFactorial(num - 1);
}

calcFactorial(5);

Which would be linked like this in the visualizer. Please let me know if thats suitable and I'll add it in. Many Thanks.

Yeah, that seems fine.

scottwright-dev commented 11 months ago

Hi @CouchofTomato, I've submitted a PR with the replacement of the resource as we discussed.

The Python Tutor visualizer I've included is reasonably intuitive I think, but I'm mindful that new users might benefit from some additional guidance. Please let me know if you feel we should add a brief instruction on how to use the tool.

Many Thanks,

Scott