TheOdinProject / curriculum

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

Ruby Course: Adding additional information about the Graphs data structure #28931

Closed PivtoranisV closed 6 days ago

PivtoranisV commented 1 week ago

Checks

Describe your suggestion

It would be great to add more information about the graph data structure in the Knight’s Travails project context, so learners can relate graph data structure to the current problem. The current version of the lesson briefly introduces graphs but does not specify how this data structure relates to solving the knight’s movement problem.

My suggestion is to include the below part before the Assignment

In this problem, the chessboard can be represented as a graph:

Thus, the problem of finding the shortest path for the knight’s movement becomes a graph traversal problem. The goal is to traverse the graph (the chessboard) to find the shortest route between two nodes (the start and end positions).

1. Vertices and Edges

2. Graph Representation

While solving this problem, you don’t need to explicitly create a graph object with vertices and edges. Instead, you can think of the graph as being implicit:

Path

Ruby / Rails

Lesson Url

https://www.theodinproject.com/lessons/ruby-knights-travails

(Optional) Discord Name

volodymyrpivtoranis

(Optional) Additional Comments

I think my suggestion will not make the project easier, but it will help to understand a graph data structure better. I'm not sure, maybe it is only for me, but that connection between the graph and the current project took a while.

As always, thank you for the great job you are doing with maintaining such an amazing project

SumonGFC commented 1 week ago

hi just want to let you know this is related to #28487

So if the maintainers give the go-ahead to start working on a dedicated graph data structure project/lesson, then this addition to the KT project will become obsolete/deprecated when/if the new graph project/lesson is added to the curriculum.

For what my opinion is worth: even if there will be a new graph project, I think the suggestions here are great, and, since it will likely be some time before the new project is added (if at all), the additions proposed here would be beneficial to learners going through this project up to the addition of the new graph project.

Also @PivtoranisV , there is also a corresponding Knight Travails project in the Javascript course, so that should be updated accordingly as well if this addition gets approved

PivtoranisV commented 1 week ago

Thank you @SumonGFC for pointing that, for some reason I missed that issue. I think we can still keep KT project in TOP, as it is a good warm up before final Ruby project. But yes, it will be nice to have one more Graph dedicated project.

wise-king-sullyman commented 1 week ago

Thanks for making this issue!

Yes I was about to mention that issue as well, I just gave the go ahead on it.

I agree that these changes would be good to have in the interim at least, so @PivtoranisV if you'd like you go ahead with this.

As @SumonGFC mentioned though your suggestions here may no longer be needed when the other graph project is added, so if you don't want to invest time into something that might no longer be needed in a short time I'd understand completely.

PivtoranisV commented 1 week ago

Thank you @wise-king-sullyman ! I will make PR with changes, even if it will stay not for long ;)

wise-king-sullyman commented 5 days ago

@PivtoranisV thanks for the quick work!

One thought: it looks like you only changed the Ruby version, can you make the same change in the JS version of the lesson?

PivtoranisV commented 5 days ago

@wise-king-sullyman done https://github.com/TheOdinProject/curriculum/pull/28968

Thank you

wise-king-sullyman commented 4 days ago

Thank you!