Searched for ""

Stop Thinking Like A Developer. Think Outside-in.

TL;DR: Want to advance your career as a software developer? Putting all energy into learning technical topics is not enough. You need to think outside-in.   Finally, you landed your first software development job. It felt like a dream came true. Or at least it’s one step closer to your dream. Your career as a software developer just started. You are super excited and eager to learn and grow as fast as possible. You want to be like that ninja developer on the team who seems to know everything about programming. You are ready to put in some extra hours after… Continue reading

Design Pattern: Decorator and Waffle

Design patterns in life and Ruby – gain an intuitive understanding of OO design patterns by linking them with real-life examples.   The decorator pattern is about adding additional features to an existing object easily. Does that sound like French? No worries. We will come back to this later. Let’s take a look at some waffles first!   The genius part about waffles is that they start plain and simple. Because they are plain, almost everything tastes good with them. The most common toppings for waffles are strawberries, blueberries, blackberries, bananas, almonds, whip cream, Nutella, and syrups. If we try… Continue reading

Intimidated by the Official Rails Guides? Here is the Cure.

TL;DR: how to study and master the Rails Guides to level up and become an intermediate Rails developer.   It’s a bit embarrassing to admit that I was scared of the official Rails Guides. I much preferred video tutorials and blog posts over the official doc. Becuase video tutorials and blog posts seemed less intimidating and more hand-holding. I avoided the official Rails Guides like the plague. Whenever I saw recommended Rails resources, the Rails Guides was always on top the list. But I was so afraid of it that my brain would automatically filter it out and go check… Continue reading

How to Fail at Almost Everything and Still Win Big (WIP)

Main Concepts of the book: Build systems that increase your chance of success, instead of setting goals. Focus on building systems that no matter what’s the outcome of the things you do, you will learn and be closer to success. Focus on maximizing your energy. Focus on failing forward – learn the most out of your failures and move on. Stay optimistic. Keep things simple. That’s the best way to make sure they get done. Willpower is a limited resource. If something requires willpower, it’s more likely to fail. Don’t rely on willpower. Build habits and routines. Eliminate all the decisions you… Continue reading

Frustrated Learning Rails? Here is What You Should Do.

You were new to Rails, Web Development, or even programming. But you decided to give Rails a try. You thought it might be challenging but doable, like climbing a hill. Unfortunately, as you spent more and more time with Rails, things got more and more confusing. Each time when you were stuck and searched for a solution, you encountered some new words: Bundler, MVC, ERB, TDD, ActiveRecord Associations… There were conventions after conventions. You felt all you did was googling and copy-pasting and had trouble gluing all the components together. You started to lose confidence and wonder if you would ever learn Rails or… Continue reading

Design Pattern: Simple Factory and Cheesecake Factory

Design patterns in life and Ruby – gain an intuitive understanding of OO design patterns by linking them with real-life examples.   Factory Patterns are about encapsulating object creation. But before diving into details of these patterns, let’s talk about cheesecakes. Because cheesecakes are about … happiness! Let’s focus our gaze at six of my personal favorites: Original Cheesecake, Ore0 Cheesecake, Coffee Cheesecake, Tiramisu Cheesecake, S’mores Cheesecake, and Hazelnut Cheesecake. Here is how we make a cheesecake: def make_cheesecake(type) cheesecake = nil case type when ‘oreo’ cheesecake = OreoCheesecake.new when ‘coffee’ cheesecake = CoffeeCheesecake.new when ‘tiramisu’ cheesecake = TiramisuCheesecake.new when… Continue reading

Design Pattern: Template Method and Chipotle

Design patterns in life and Ruby – gain an intuitive understanding of OO design patterns by linking them with real-life examples.   Template Method is the most commonly used design pattern in programming and real life. Before we dive into details of the pattern, let’s learn an important life lesson: Chipotle 101: How to Order in Chipotle. There are four steps involved: Choose a “vessel”: Burrito vs. Bowl vs. Tacos vs. Salad Add meat: Chicken vs Steak vs. Barbacoa vs. Carnitas vs. Vegetarian Add toppings: Tomato vs. Corn vs. Green Chili vs. Red Chili Add extras & drinks: Chips vs…. Continue reading

When to Refactor

Keep hearing all these good things about refactoring but don’t know where to start? Here are seven cases where refactoring can help.   Case 1: When you need to make a change but it’s difficult to do so. for each desired change, make the change easy (warning: this may be hard), then make the easy change — Kent Beck (@KentBeck) September 25, 2012 Instead of trying to make a difficult change, first, refactor the code so you can make the change easily. Then make the easy change.   Case 2: When you need to understand a piece of code. When… Continue reading

Code Smell Cheat Sheet

Want to refactor some code but don’t know where to start? Just implemented a functionality and want to clean up the code? Need to review a gigantic pull request and find it hard to understand? Start with spotting and removing code smells.     I designed this cheat sheet to help you identify code smells. The first column describes symptoms of a code smell. The second column lists the name of a code smell. This cheat sheet is my notes from the wonderful Refactoring book written by Martin Fowler. I strongly recommend you to get a copy if you don’t have… Continue reading