Reading and Writing to Files in Ruby
Much of the work of a backend developer is to build the structures that organize, analyze and pass around data. Unfortunately, your data will likely not all come in the same form, some may be from user input, some from an API, and some from CSVs. Reading and writing to files often trips up newer developers. I believe this may be due in part to the fact that a lot of the work is abstracted by Ruby. It feels like you need to do so much, but there aren’t that many methods you need to get the job done.
In the following video I review using Unix commands and Ruby methods to interact with files as well as a little ARGV.