Tuesday, February 4, 2014

YAML and Marshal

Today I read the chapter on YAML and started the one on Marshal in The Book of Ruby...good times. :)

It's hard to remember everything, but I'm not really trying.  I plan to re-read the book when I'm done, as break from reading and working on other learning materials.  As I understand it, and please correct me  if I'm wrong about this, the coding that I would normally do in Ruby to make a program is the software that will be stored on my hard drive, and the information stored using YAML and Marshal are the temporary information that will be stored in ram for use in the program.

Apparently, you cannot save methods for for reuse using YAML, but you can do so using Marshal, which kind of makes me wonder why anyone would use YAML, at all.  This seems to be a theme in ruby, where there are multiple ways of doing things where one way is clearly more usable than the other.  If I am right about that, and I eventually write a book or tutorial, then I will only document the best practices and eliminate the things that I consider less than optimal.

Hopefully, I will finish this book by the end of the week and then start learning Ruby on Rails.  I have somethings in mind that I want to eventually build, but I think that I'll stick to the exercises on on Code Eval for now; I don't want to bite off more than I can chew and the levels of the challenges seems like a good way to work my way through the language.

No comments:

Post a Comment