Exception handling in Ruby and life
As a student in the Flatiron School’s web development program, we’ve learned to use Ruby on Rails for the backend. Until recently, we’ve not had to be concerned with exceptions.
Exception handling, where your code anticipates possible errors and “rescues” the application from crashing, is key to developing code that has to interface with the often predictable unpredictability of the real world.
One area where exception handling is required is when using APIs for web-based services such as Twitter, Google and countless others. Not all exceptions mean that something went wrong; they can also be used to signal temporary unavailability of a service (like during routine maintenance or discontinued endpoints) or changes to the API. …
You don’t develop code. Code develops you.
During a recent lecture via Zoom in the Flatiron School software program, I attempted to crack-wise on the chat as my fellow students and I often do. I can’t exactly remember what prompted me, but I wrote:
“You don’t develop code. Code develops you.”
Although I was trying to make a joke, this stuck with me. I believe it’s true, if you’re serious about learning how to code (well).
What do I mean by “code develops you”? A few things come to mind, but the overarching truth about code development for me is:
“A computer is literally as dumb as a rock. It literally needs to be told how to do EACH. AND. EVERY. LITTLE. …
Don’t let synchronous code upset yourMomma and spoil Thanksgiving
The issue with a single thread becomes clear when a program needs to perform an operation that may take a long time to complete, like reading a large file from a disk or uploading a file to the cloud. …