Skip to content

Repo: Restructure to group exercises based on curriculum structure #533

@mao-sz

Description

@mao-sz

Prerequisites

  • I have thoroughly read and understand The Odin Project Contributing Guide
  • I have searched the existing issues to ensure this improvement hasn't been suggested before (please have a look through our open issues list to make sure)
  • The title of this issue follows the <Location of the improvement>: <Brief description of the improvement> format, e.g. Exercises: Add exercise on XYZ
  • (Optional) I am interested in working on this issue and would like to be assigned to it

Improvement Description

Very big proposal and certainly not urgent by any means.

In a similar vein to TheOdinProject/css-exercises#593, I'm proposing a restructure of this repo so the existing exercises are grouped into a foundations directory. They could be further grouped into subdirectories but I actually think they're fine just all together in a foundations dir.

With the open PRs adding new exercises as a part of TheOdinProject/curriculum#27265, this repo won't be exclusive to the Foundations course. If further exercises are added to this repo, they may not be appropriate to add to the end, but putting them earlier will require many files to be renamed with an appropriate number. This can be minimised if exercises are appropriately grouped. New groups can have a new dir made, leaving other exercise dirs untouched, and if any new exercises do have to be slotted in-between existing exercises in a group, it'll potentially reduce the number of files/dirs that'd need to be changed.

An example structure would be

├── computer_science
│   └── recursion
│       └── <put all the open PR recursion exercises here when approved>
└── foundations
    ├── 01_helloWorld
    ├── 02_addNumbers
    ├── 03_numberChecker
    ├── 04_mathEquations
    ├── 05_joinStrings
    ├── 06_repeatString
    ├── 07_reverseString
    ├── 08_removeFromArray
    ├── 09_sumAll
    ├── 10_leapYears
    ├── 11_tempConversion
    ├── 12_calculator
    ├── 13_palindromes
    ├── 14_fibonacci
    ├── 15_getTheTitles
    └── 16_findTheOldest

Acceptance Criteria

  • All 16 foundations JS exercises are moved into a top-level foundations/ directory.
  • Rephrase any relevant parts of the repo's README.md to account for the new structure.
  • The "Arrays and Loops" and "Object Basics" lessons' assignments rephrased to reference the foundations/ exercises dir and link to it (similar to how this was handled in All HTML/CSS assignments: Update lessons to reflect restructured css-exercises repo curriculum#28922.
  • Amend generators/ and plopFile.js to allow adding new directories and exercises as necessary (probably going to be the most complex part Edit: a fair few plop.setGenerator changes but I've played around and got this working as desired).
  • Amend CONTRIBUTING.md with updated plop prompts instructions.
  • Discord server announcement made regarding the restructure, providing git commands for community members to update their forks, similar to the CSS exercises repo restructure announcement.

If this is approved, depending on whether the open recursion exercises PRs gets merged first or not, one of either:

  • The open recursion exercises PRs are amended to place the exercises in computer_science/recursion/ and renumber the exercises.
  • The merged exercises CS exercises are moved into a computer-science/recursion/ directory and renumbered.

(Optional) Additional Comments

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    Status: Needs ReviewThis issue/PR needs an initial or additional review

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions