“And above all, watch with glittering eyes the whole world around you because the greatest secrets are always hidden in [your logs].” — Roald Dahl
A secret is anything that authenticates or authorizes you to a system, and so you want to keep it, well, secret. If you have an application, the chances are you have some secrets.
For example, you may have a connection string that you pass to a database so you can authenticate a session and request data from it. Or you may have an API token that you supply when you make a call to your…
This is the last article in a four-part series on the basics of object-oriented programming in Ruby. Read the previous article here.
The gears turned once we introduced inheritance. And now that we understand the core concepts of object-oriented programming, not only can we start to build durable and versatile programs, or think at a high level of abstraction and solve problems in a clear, systematic way, we can start to understand more nuanced concepts in this article and beyond.
We’ve seen when an instance variable is initialized in a superclass (or mix-in module), it can be accessed in a…
This is the third article in a four-part series on the basics of object-oriented programming in Ruby. Read the previous article here.
No class is an island entire of itself. We’ve only dabbled on the shores of inheritance so far, but it’s core to how we think about and design the interaction of our classes. If the classes are islands, inheritance is like the waters that distinguish yet tie them together. Let’s dive in head first.
In the first article of this series, we said inheritance allows us to extract common behaviours from specialized classes to a base class or…
This is the second article in a four-part series on the basics of object-oriented programming in Ruby. Read the previous article here.
Now that we’ve played at the foundation of object-oriented programming, we can sit at the big kids’ table and define our first class step by step. Wait a second… Object-oriented programming… Object-oriented… Object… Obj… What’s an object?
In Ruby, everything from
123 is an object. An object is an encapsulation of state and behaviours. A class is like a blueprint for an object’s state and behaviours, what it’s made of and what it can do. If…
All good things come to an end. Except when they’re foundational. The internet has a new favourite meme that’ll probably be covered in dust by the time you read this article, but you don’t have to leave OOP to pass in your SAVED MEMES folder. I OOP, and you should too!
Object-oriented programming is a programming paradigm created to deal with the increasing complexity of large software systems.
We’ve all heard advice like only you can complete yourself because, for better or worse, we don’t always know how our relationships will change. …
“Aren’t the Vietnamese so beautiful?” my friend exclaimed in the car ride home, reading a notification on her phone. She’d posted a photo of me at dinner on her Instagram story, and one of her followers responded to it with this supposed compliment.
She laughed, but my stomach turned.
At best, it’s weird to generalise an entire ethnic group and ascribe beauty to the millions of people in it. But racial microaggressions are so pervasive and automatic in daily interactions they’re often dismissed and glossed over as being innocuous. After all, the follower just meant I’m attractive, right?