Searched for ""

To self-doubting developers: are you good enough?

Does any of the following sound familiar? You constantly worry that you are not good enough. Look at the developers around you. They seem to have everything together. Their code is cleaner than yours. They debug much faster than you do. They merely glance at the documentation before knowing what they need. They are confident. They enjoy coding. But you, you are worried. You worry that you don’t know enough about the framework and the language you are using. You worry about introducing bugs. You worry about catching up with the hottest technologies. You worry that you are not talented… Continue reading

18 Months at Gusto: The “Unhappy” Paths

TL;DR A big part of programming is about handling the “unhappy” paths. As is the case in life. Lower your expectations and expect the unexpected.     Time flies by when you are busy with one task after another. A lot happened in the past six months since my last retrospection, 1 Year at Gusto — the 15 things I learned. Among all, one thing, in particular, stands out. It’s related to a bug — an expensive, painful, and soul-sucking bug. I introduced the bug and caught it a few weeks after it went live. The bug was dead stupid,… Continue reading

Three Days with Sandi Metz on Practical Object-Oriented Design

Last month, I attended Sandi Metz’s three-day Practical Object-Oriented Design Course in Durham, NC. The course totally exceeded my high expectations. I felt very lucky and glad that I decided to go. It was one of the best things that happened to me this year.   In this post, I will share: why I decided to make this big investment what happened in those three days what happened after the course how can you learn these course materials   1. Why I decided to spend time and ??? on this course I first knew about Sandi Metz through her book Practical Object-Oriented… Continue reading

Design Pattern: Iterator and Movie Collections

Design Patterns in life and Ruby — gain an intuitive understanding of OO design patterns by linking them with real-life examples.   The Iterator Pattern answers this question: What’s next? In English, an iterator returns items from a collection one at a time until it has returned all items from the collection. Let’s use the Iterator Pattern to build our movie collection. Let’s pretend we have subscriptions for both Netflix and Amazon Prime. Our goal is to combine all the movies on Netflix and Amazon Prime to build our movie collection. We can ask Netflix for a list of available… Continue reading

Design Pattern: Facade and 1-Click Ordering

Design Patterns in life and Ruby — gain an intuitive understanding of OO design patterns by linking them with real-life examples.   The Facade Pattern is about making complicated things simple.   You will know exactly what the definition means after we do some shopping on Amazon.   Shopping on Amazon is similar to shopping anywhere else online. You first add an item to your shopping cart. You then proceed to the checkout process, which has four steps: Enter Shipping Address Enter Payment Method Review Items and Shipping Place Order Here is what the code will look like: class CheckoutProcess… Continue reading

Object-Oriented Design Patterns in Life

Object-Oriented Design Patterns in Life Many programming concepts are inspired by the physical world we live in. Object-oriented design patterns are no exception. Join me on the journey of learning object-oriented design patterns by recognizing them in day-to-day life. Each post in the series maps a design pattern with a real-life example. You will be surprised by how many oo design patterns you have been using in everyday life: Love burgers? You already know the Strategy Pattern. Love Chipotle? That’s the Template Method Pattern. Can’t live without Amazon? The Facade Pattern is your friend.   Subscribe so you won’t miss the next post! Creational Patterns Factory & Cheesecake Factory… Continue reading

Design Pattern: Adapter and Power Adapter

Design Patterns in life and Ruby — gain an intuitive understanding of OO design patterns by linking them with real-life examples.   The Adapter Pattern is very easy to understand because we interact with it every single day.   If we search for adapter images online, we will see lots of real-life examples using the Adapter Pattern.   Type C to Type A Power Adapter Let’s take a closer look at one of these real-life examples — Type C to Type A Power Adapter. The Type A electrical outlet plug is widely used in the US, whereas Type C is widely… Continue reading

Design Pattern: Command and Concierge

Design Patterns in life and Ruby — gain an intuitive understanding of OO design patterns by linking them with real-life examples.   The Command Pattern’s definition is a stressful one to look at.   Let’s forget about it for a second and take a trip to Hawaii. And live in a luxury hotel.   We spent the day on the beach, scuba dived, and did some sightseeing. It’s time to get back to the hotel to chill, eat, and plan for the next day.   After getting back to the hotel, we want to: Get room service for dinner Get… Continue reading

Who are you? Self-awareness In Ruby

Understanding how self works is critical in reading Ruby code. If you ever feel confused or lost when reading a piece of Ruby code, exam what is self in the current context might get you back on track. It’s one of those things that once you get it, many Ruby codes will start making sense to you. This article explains: what is self how to determine self What Is Self? Being the default object of the current context gives self two privileges. It is the default receiver of messages, meaning calling a_method is the same as calling self.a_method.  It is the owner of instance… Continue reading