August 2018
Intermediate to advanced
380 pages
10h 2m
English
The final side effect that we'll discuss here are input-output (IO) operations to the filesystem, or to the network. We can say that these operations are side effects because they depend on the environment so much.
In the case of IO operations on the filesystem, the success of the operation depends on whether the filesystem contains the specified file or if the file is readable. When performing network operations, the operation depends on whether we have a reliable internet connection or any firewalls.
When debugging an IO program, lots of moving parts come to our attention. Do we have access to the desired filesystem? What about the ownership of the files we are trying to read or write? What about the permissions ...