Blog

A short list of the most common git commands that I use

May 07, 2018 - 3 min read

Git is a powerful version control system that allows people and teams to collaborate on source codes more efficiently and effectively. It saves history, allows you to work on features or bugs in parallel, peer review code before saving it to production, and much more. Assumptions This post assumes…

Using native system fonts on your websites and applications

April 30, 2018 - 2 min read

Here’s the native system font stack that I use for all of my projects, unless the client has a preference to something else. Why use this font stack? Loading special fonts takes time to load, and sometimes leads to the dreaded flash when a website loads and the font changes - which is terrible for…

A short list of the most common Vim commands that I use

April 23, 2018 - 4 min read

Vim is an old-school editor that’s inspired by vi , the built-in editor on Linux terminals/shells. It’s extremely powerful and designed with speed in mind, so practically everything can be done without using a mouse, via shortcuts and commands. A lot of people get frustrated right out of the gate…

A simple line of code to help you debug your CSS layout

April 16, 2018 - 2 min read

As the name of the title suggests, this will be a very short post, though it’s saved me countless hours of trying to see exactly where your HTML is laid out on your page. The code It’s as simple as it gets. This line of CSS code says “outline all of the elements on the page with a semi-thick gray…

Creating a copyright date that updates automatically

April 09, 2018 - 2 min read

Practically every website has a footer with a copyright message at the bottom and a date for the copyright. On many of the websites that I’ve redesigned, there wasn’t a simple function that updated the date for the copyright’s year automatically. That means someone familiar with coding in HTML was…

Labeling function arguments/parameters in ReasonML

April 02, 2018 - 3 min read

A common source of confusion for many people writing JavaScript applications are function arguments. Unless you use the object as a parameter pattern , it can get really difficult, really fast to remember how many arguments your function accepts and what order they should be passed in. The solution…

Piping functions with ReasonML

March 26, 2018 - 2 min read

If you’ve read through the ReasonML docs before, you may have noticed that there’s no too much information available on their syntax sugar for piping functions, which is one of my personal favorite features of using ReasonML. The pipe operator The pipe operator allows you to chain function…

Best practices for naming functions and variables

March 19, 2018 - 5 min read

Naming things is hard. It’s easy to remember what your functions, variables and files do/are without a good name in the moment that it’s fresh in your mind, but it gets exponentially more difficult to remember as time passes by. Here are a few tricks that I’ve picked up that have saved me from hours…

Shorter syntax for state and bind/event handler functions in React.js classes

March 12, 2018 - 2 min read

If you’ve ever seen an older React.js component that contains state and/or an event handler function , i.e. , , etc. then you’ve probably seen the class written something like the example below: or maybe with the method like this: A new syntax While there’s nothing wrong with the two…

Smart vs. Dumb components in React.js

March 05, 2018 - 4 min read

You’ve probably heard the term “smart” and “dumb” in React.js before. “Smart” components are written as JavaScript classes and contain things like state and lifecycle hooks (such as , etc.) and usually contain a variety of other components that it controls via props and state. “Dumb” components are…

Using PropTypes with React.js

February 26, 2018 - 8 min read

PropTypes are an indispensable tool for declaring the types for your React.js component’s props so that when the application is running and an incorrect type is passed, you’ll see an error warning in the console. PropTypes are highly recommended if you’re not already using a static type checker…

Creating modules with ReasonML

February 17, 2018 - 3 min read

As we briefly discussed in my previous blog post about pattern matching in ReasonML , ReasonML is really powerful syntax for JavaScript with a lot of extra functionality to make your code more straightforward. One of the most important concepts to learn in ReasonML are , which we’ll be discussing…

Pattern matching with ReasonML

February 12, 2018 - 3 min read

ReasonML is a hot new JavaScript-like syntax with types, pattern matching, functional programming patterns built-in and much, much more. It’s an incredible API from the brilliant minds at Facebook and I highly recommend trying it out if you haven’t already. What is pattern matching? Pattern…

Customizing Prism.js

February 05, 2018 - 2 min read

Prism.js is a syntax highlighter for code blocks on webpages. It’s what I (and most other developers) use for sharing code blocks online when it’s not embedded from a service like GitHub. Using built-in themes You can choose one of their built-in or extended themes to get started quickly, or you…

Tips for creating React.js stateless functional components

January 29, 2018 - 3 min read

Unless your component has internal state that it needs to manage, it’s better to use a simpler type of component called “stateless functional components.” Here are a few tips on using these in your application. Components without props These are useful for breaking up larger components so you don’t…

Announcing Bulma Classnames!

January 22, 2018 - 5 min read

TL;DR - In addition to Sushi Commerce , I’m working on a simple, but powerful way to write Bulma.css classnames! Expected to release in May 2018 The problem Bulma is very modular and powerful css framework, similar to Bootstrap , Foundation , etc. One of the issues I have when using a…

Using JavaScript objects as function parameters

January 15, 2018 - 2 min read

TL;DR Using an object as a parameter instead of individual values can make it easier to read and call functions, especially when there are a lot of parameters. Without using an object as a parameter (simple example) This is a very simple function and with no reason to use an object for passing in it…

What I learned from becoming a developer

January 08, 2018 - 3 min read

TL;DR —  Forget about competition. We all have unique skills that add value to what you’re doing — stay different. Talent comes from doing something you love. I wasn’t always an engineer. As a musician with a heavy passion for creating anything that you can call ‘art,’ it was a struggle when I…

Announcing Sushi Commerce!

January 01, 2018 - 2 min read

TL;DR - I’m excited to say that I’m currently working on an awesome open source project for creating free ecommerce websites! Expected release date, June 2018 Background I designed Sushi Commerce so I could easily create and manage a simple e-commerce site for my clients to pay me with. Since I don…