This self-guided course will help you learn how to work with the low level tools that you’d usually rely on libraries and frameworks to provide. Each of its four parts will give you a feel for a different kind of I/O programming and text processing work:
- Standard I/O streams and the filesystem
- Encoding and decoding binary files
- Parsing text-based file formats
- Socket programming and network I/O
In each part of the course, you’ll start by carefully reading a Practicing Ruby article that explores one of the topics listed above. You will then work through a set of review questions to test your grasp of the material. Finally you’ll apply the concepts to realistic problems by working on a set of project-based exercises.
Once you’ve completed the entire study guide, you’ll know how to do all of the following things:
Build command line applications in Ruby that follow the Unix philosophy and work similarly to other console-based applications you use day to day.
Encode and decode binary files at the level of bits and bytes, and understand how primitive data structures are represented in low-level storage formats.
Work with streams in a memory efficient way, whether they’re coming from files, standard I/O, or the internet.
Work with the same parser and compiler technology that is used by serious text processing libraries and programming languages.
Understand the basics behind TCP-level socket programming, and how to build simple client and server software.
We often take these concepts for granted because our libraries and frameworks take care of them for us. But this self-guided tour of Ruby’s basement will help you appreciate the many low-level tools and techniques we have available for solving these problems.
To begin your journey, fork the course git repository and then follow the instructions in its README. Work at your own pace, and don’t hesitate to ask for help when you need it. You can submit issues in our tracker for general questions, and pull requests when you’d like a review of your work. Good luck, and happy hacking!
Practicing Ruby is proudly independent, open source, and advertising-free.
This is a 100% reader-funded, reader-focused project that needs your support.