Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Ruby : Files and Serialization : Format unreadable article in assignment #28897

Open
wants to merge 3 commits into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions ruby/files_and_serialization/files_and_serialization.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,13 @@ Finally, files and serialization overlap in a lot of ways with the idea and purp

This section contains a general overview of topics that you will learn in this lesson.

- What are two ways to store a file from your hard drive into a string or array in your Ruby script?
- What are three things made possible or much easier by serialization?
- What is JSON?
- What is YAML?
- How do you turn a Ruby object into JSON?
- How do you turn JSON into a Ruby object?
- What classes and methods can your Ruby script use to read and write to the hard drive?
- Two ways to store a file from your hard drive into a string or array in your Ruby script.
- Three things made possible or much easier by serialization.
- What is JSON.
- What is YAML.
- Turning a Ruby object into JSON.
- Turning JSON into a Ruby object.
- What classes and methods can your Ruby script use to read and write to the hard drive.

### Assignment

Expand All @@ -29,7 +29,7 @@ This section contains a general overview of topics that you will learn in this l
1. Read [Thoughtbot's I/O in Ruby](https://thoughtbot.com/blog/io-in-ruby). You can ignore both the 'Putting it all together' and the 'Working with disparate APIs' sections.
1. Watch [icc0612's introduction to serialization](https://www.youtube.com/watch?v=uS37TujnLRw). It will explain the concept of serialization before you implement it in Ruby.
1. Read [Choosing the Right Serialization Format](https://www.sitepoint.com/choosing-right-serialization-format/) for more information about the various serialization options you can choose from.
1. Skim [Alan Skorkin’s article about object serialization in Ruby](http://www.skorks.com/2010/04/serializing-and-deserializing-objects-with-ruby/). Some of the code examples are outdated, but this post still contains relevant information. If you want to follow along with the code examples, copy and paste them into your code editor and use word wrap.
1. Copy this [pastebin](https://pastebin.com/ZixCHcWk) and open [Odin Markdown Preview Tool](https://www.theodinproject.com/lessons/preview), paste it and click on preview and start reading. because [Original article](http://www.skorks.com/2010/04/serializing-and-deserializing-objects-with-ruby/) is not well formatted and some code examples are outdated. but this post still contains relevant information.
1. Read the sections 'Ruby files' and 'Ruby directories' from the [Input/Output chapter of Zetcode's Ruby Tutorial](http://zetcode.com/lang/rubytutorial/io/) for examples of how to manipulate files and directories using the `File` and `Dir` classes.

</div>
Expand Down