curriculum icon indicating copy to clipboard operation
curriculum copied to clipboard

Ruby: Replace the archived Event Manager Project (Ref. #29540)

Open annarider opened this issue 7 months ago • 8 comments

Checks

Describe your suggestion

I finished read through the Event Manager Project in the Ruby on Rails path, under the Files and Serialization section. By the time I was ready to do the project, it was archived. Since I knew it existed, I found it in the archives and completed it. I felt it was a great foundation for the following Hangman Project, even if the follow-along format is at odds with the rest of TOP.

I suggest releasing a new lesson that's simplified and based off the Event Manager Project, with a focus on learning how to open, write or read, and close files. It feels like there's a bridging lesson missing between the previous lesson, Files and Serialization, and the Hangman project, as the curriculum currently stands.

An alternative to adding a new lesson would be to add more reading assignments to the Files and Serialization lesson to cover more depth on opening, writing, and closing files. yes, there is perhaps an example or two in the existing reading assignments, but they weren't emphasized (and the examples didn't follow the Ruby Style Guide best practice).

https://www.theodinproject.com/lessons/ruby-files-and-serialization

Path

Ruby / Rails

Lesson Url

https://www.theodinproject.com/lessons/ruby-files-and-serialization

(Optional) Discord Name

No response

(Optional) Additional Comments

Related to #29540

annarider avatar May 15 '25 17:05 annarider

This seems like a great idea, but let me reach out to the RoR maintainers and see if we have any feedback/guidance on your suggestions.

rlmoser99 avatar May 17 '25 15:05 rlmoser99

Hello @annarider. Thank you for making this issue!

I think this is a good idea. I'd be interested in getting some more specifics about what your plan is. Maybe you can work on and provide a rough outline here for what you have in mind?

I personally think that the replacement shouldn't get into APIs, erb files/templating, or csv parsing the way the previous project did. Those are a lot of new things to throw at a learner, and it led to the lesson needing to be a code along, which felt out of place to me in the context of TOP. But if you have something in mind for learners to just practice reading and writing to files and serializing objects, I think that'd be great to have in the curriculum.

JoshDevHub avatar Jun 03 '25 21:06 JoshDevHub

Hi Josh,

Yes, I think collaborating on an outline is a great idea to make sure it fits with TOP requirements before I invest the time to make the project.

I agree with you on simplicity. I want to focus on core IO concepts, and not much more as the goal is to prepare learners for Hangman. Hangman offers more complexity to file serialization later, such as error handling.

I think a to-do list could be a very simple project. Here's what I have in mind.

To-do Organizer Project

Project Overview

Learners build a simple to-do list system that teaches file I/O and folder organization concepts.

Learning Objectives

  • Create and organize files in folders
  • Read from and write to text files
  • Parse simple text formats
  • Filter from multiple files and save to a new file

Project Description

Build a to-do list organizer that:

  • Stores tasks in category folders (for example, work, home, hobby, etc.)
  • Uses simple checkbox format to mark the status: [ ] incomplete, [x] complete
  • Generates a summary of all incomplete tasks
  • Saves the incomplete tasks to a new to-do file to take action on

Sample folder structure

In the project description, we can suggest a file structure like so

todo_organizer/
├── work/
│   └── tasks.txt
├── home/
│   └── tasks.txt
├── family/
│   └── tasks.txt
├── lib
│   └── organizer.rb
└── todo_tasks.txt

Example Input Task Files

work/tasks.txt

[ ] Send invoice
[x] Transfer payments  
[ ] Attend customer meeting
[ ] Reply to email

home/tasks.txt

[x] Buy groceries
[ ] Do laundry
[ ] Clean kitchen
[ ] Water plants

Example Output To-do List (todo_tasks.txt)

WORK:
- Send invoice
- Attend customer meeting
- Reply to email

HOME:
- Do laundry
- Clean kitchen
- Water plants

Assignment

  1. Create category folders if they don't exist. Read tasks from a single file. Parse [ ] vs [x] format. Use a suitable data structure to save complete and incomplete tasks.

  2. Read tasks from all category folders. Group output by category. Filter incomplete tasks

  3. Save all incomplete tasks to a file if it doesn't already exist that contains all incomplete tasks in every category. Format output clearly by category

Add resources

  • TBD pending approval on this outline

If you don't like this idea, other ideas I have are: a book reading list, recipe collection, and a music collection. They're all simple projects that naturally contain categories and lend themselves to the idea of reading in data from a file, filtering the data in some way, exporting the manipulated data into a new file.

I don't forsee any tests for this project but I could add if you think they're appropriate. (I'm working on the Rspec and Connect Four lessons so my brain is stuck on testing.)

Any thoughts and feedback are welcome.

annarider avatar Jun 11 '25 19:06 annarider

This issue is stale because it has had no activity for the last 30 days.

github-actions[bot] avatar Jul 12 '25 02:07 github-actions[bot]

I gave this topic more thought after I posted the above outline. I think since the Ruby Course is so large already, it may be overwhelming to put in another project.

So, I'd like to revise the above outline by proposing that instead of doing the To Do List project, an alternative option is to follow the Lint and Rubocop lesson. It would look like written text about file IO operations with focus on up-to-date syntax that follows the Ruby Style Guide. It won't cover much on serialization because the previous lesson focused on serialization into different formats already. It will be mostly focused on what was covered in the Zetcode input & output article.

Another way of thinking about my proposal is splitting the existing Files and Serialization lesson into 2. The first lesson focuses on serialization. The second lesson focuses on file IO operations. The reading assignments will split accordingly. The file IO operations can include 1 or 2 more readings or videos to enforce the learning from different perspectives.

annarider avatar Jul 15 '25 15:07 annarider

This issue is stale because it has had no activity for the last 30 days.

github-actions[bot] avatar Aug 16 '25 02:08 github-actions[bot]

I think this is a very good idea to add a new project in place of Event Manager. I also have a project idea that I think is very fun, and is very involved with the topics of Files and Serialization. Here is the rough idea:

Source Code Archiver

Write a ruby program that will perform the following steps:

  1. Generate a list of file names in the current directory (possibly a previous ruby-course project directory)
  2. Filter out non ruby source code files (*.rb files)
  3. For each of these source code files, read the source code text into a ruby object
  4. Serialize the collection of these ruby objects and write data to a (new) file, like source_code.archive
  5. Read back in source_code.archive, (possibly in a new directory?)
  6. Deserialize archived data
  7. For each source code object (which contains the text of the original source code files), regenerate the files that they initially belonged to (i.e. write the text data to new files with their original file names)
  8. Extra Credit: Make it work for all text files and make it work for entire directory structures!

I think it's quite fun and I like that such a program is directly concerned with creating, reading, and writing files, and serializing actual ruby code (even though it's just String data). Initially I thought of a project that would re-implement require using similar ideas as above and using eval, but the data structures required might be a bit too "advanced" for this level. Anyways, Interested to know what others think.

scriabin-enjoyer avatar Oct 18 '25 00:10 scriabin-enjoyer

@TheOdinProject/ruby would any of yall be interested in doing a deep evaluation of the proposed project here?

wise-king-sullyman avatar Nov 22 '25 17:11 wise-king-sullyman