A Brief Overview of JavaScript’s New Primitive Type: Symbol

In the last post, we learned that we can access the index of an array in the modern for…of loop by using the entries() iterator which implements a method of the new primitive type Symbol. You are probably familiar with the older primitive types: undefined, null, Boolean, Number, String, and Object. Symbol is a new primitive type! What can Symbols be used for? to define properties for objects for iteration to define a global registry of objects to define some special well-known methods in objects This post will review these 3 three use cases, so let’s start at the top.
Read more →

JavaScript’s for loop: A Retrospective

When I started learning JavaScript, ES6+ was already released, and I was initially pretty confused about the difference between the older style versus the ES6+ style. Once I started picking up the language, it became easier to recognize and appreciate how ES6 made many aspects of JavaScript not only more readable, but also easier to maintain. For this post, let’s take a closer look at the traditional versus the modern for loop.
Read more →

Binding the Index in React

I haven’t been blogging lately because I’ve been solving programming problems for work now, and I’m not yet sure how to translate those to blog posts. With some time off for the holidays, I was fortunate enough to dive back into React. While I don’t use this particular library for work, I find building anything with JavaScript improves my overall frontend toolbox. I was working on an assignment from a React class that I started on Udemy a couple of months ago.
Read more →

Flatiron Online Coding Bootcamp Experience

My goal here is to share my experience attending Flatiron’s Online Web Development Program from October 2017 to April 2018. A lot of people ask about this, so here is my long answer. My answer will cover the following: curriculum mentoring services access to help from technical people career services pricing structure Curriculum The greatest value I received was having structured and time-sensitive goals to focus on for six months.
Read more →

Git or Treat

Git gets a lot easier the more you just dig in and use it. There’s an inflection point on learning anything, where you can move on from just the basic fundamentals of understanding something to understanding something so well that you can start to think more creatively while using the new skill. Think of each commit as a a friendly ghost that you can conjure up to learn about the code’s past.
Read more →

TDD: Is it worth it? Let me work it.

Writing tests before you develop may help you write better code. I didn’t understand the full extent of the benefits of TDD until I actually wrote tests myself and then incrementally wrote code based on those tests. This post will share how I got started writing tests in Rails. I will walk you through getting started by creating a simple Rails API and then writing a test that determines whether or not requesting a specific resource will result in rendering the data you want.
Read more →

How Git Subtree Helped Me Deploy to Heroku

One thing to consider when you start developing an application is the organization of your git repos. Monorepo is an organization structure where all of your code is one repo, and multi-repo involves organizing code across multiple repos. When I built Greenthumb Gardens, I used something similar to the monorepo structure because I nested the client in a folder inside of the Rails API. Typically, monorepos are a bunch of different high level folders in the same repo.
Read more →

Creating a Floating Cat in CSS

I recently took the plunge into learning CSS animations, and I’m so glad I did. I had so much fun learning how to add an animation to one of my cat illustrations, and I’m excited to share it. This post will explain the basics of CSS animations, as well as how to add a floating animation to an image. Let’s get started For context, I added this animation to a blog application built in Rails using ERB to display content to the client.
Read more →

JavaScript’s Switch to the Rescue

Conditional statements (if…else) execute code if a condition is true. If the condition is false, another statement is executed. In JavaScript, you can also use a switch statement to evaluate multiple conditions against the same expression. This post will explain when you should use a switch and how it works. The code below generates a random number and executes a statement based on 2 conditions: either the number is greater than 500 or it’s not.
Read more →

Multi-Tenancy in Rails with Apartment

I’m working on a Rails app for nonprofit management that features multi-tenancy. This means that a single instance of the application will support multiple isolated users. Today, we’ll discuss how to configure multi-tenancy using the Apartment library with sessions. What is Multi-tenancy? Multi-tenancy is a type of design architecture that allows an application to run multiple clients on one system. So, you can have multiple customers (customer == tenant == nonprofit administrative organization) logging into the same software.
Read more →