Searched for ""

Why I chose Gusto over Facebook and Airbnb.

Leave your email below. I will email you once I finish the post. 😀 [contact-form][contact-field label=”Name” type=”name”/][contact-field label=”Email” type=”email” required=”true” /][contact-field label=”Extra Comment” type=”textarea” /][/contact-form]

Design Pattern: Proxy and Agent

Design Patterns in life and Ruby — gain an intuitive understanding of OO design patterns by linking them with real-life examples. Imagine yourself as a movie star, a big one. You are so famous that everyone in Hollywood wants to work with you. You never lack acting opportunities. So many requests come to you that you need an agent to handle them. Here is what you want your agent to do. When a new filming request comes, the agent first checks to see if it fits your schedule. If so, the agent then checks your preferences. (For example, you have… Continue reading

Design Pattern: State and Combination Locks

Object-Oriented Design Patterns in Life Series – gain an intuitive understanding of OO design patterns by linking them with real-life examples.   The State Pattern is a beautiful example of how combining simple classes with clean interfaces can produce great power. This is a long post. But stay with me. We are going to witness the beauty and power of object-oriented design together. Build a combination lock We will learn the State pattern by building a combination lock. According to WikiHow, opening a combination lock involves three steps: Spin the dial three times clockwise to clear any previously entered numbers… Continue reading

Design Pattern: Composite and Group Messaging

Design Patterns in life and Ruby – gain an intuitive understanding of OO design patterns by linking them with real-life examples.   The Composite Pattern gives the ability to treat grouped objects and individual objects the same. Let’s look at its definition:   A Real Life Example: Group Messaging Let’s look at the definition in light of group messaging. There are six people on my contact list: Mom, Dad, Uncle Bob, Cousin Nick, Aunt Julia, and Amy Kinser. The Parents group is composed of Mom and Dad, whereas the Uncle Bob’s Family group is composed of Uncle Bob, Cousin Nick, and… Continue reading

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