I’ve recently started going back and reviewing some of the first projects I created to practice my refactoring skills. And let me tell you, it’s not pretty. In fact it’s overwhelming how much needs to be done, but it’s also interesting to reflect on how far I’ve come.
For my first jab at refactoring I decided to start small and tackle something that has always bothered me: the long list of component imports at the top of my main component. Here’s a screen shot of what I’m talking about.
I’ve been working on a new project the past few weeks and decided to learn how to use RSpec and write tests for my Rails backend. Turns out it is a lot easier than I thought, especially after I learned about RSpec’s Subject.
The first tests I wrote centered around my Models in Rails. I wanted to confirm the relationships and validations I wrote were working properly. Now I know this doesn’t follow the normal red light, green light, refactor methodology but it was my first time, so I hope you’ll give me a pass.
My first attempt at writing…
I recently put together a small portfolio site as part of my job search. After finishing I was really excited to share it on LinkedIn and get all those cool interactions. So I dropped my url in a post on LinkedIn and this is what I saw.
In a previous post I wrote about how emails are expected from web applications and how you can use Action Mailer to accomplish this in Ruby. But what if you aren’t making a full-stack web application and don’t have a backend to handle this?
In this post I’m going to show you how…
Writing code that works under normal operating conditions is a good skill to have. Writing code that works even when something goes wrong is even better. In code, there are a lot of different ways things can go wrong.
For example, when something is wrong with the code itself, maybe the wrong type or number of arguments are passed to a function. Or sometimes browser incompatibility can cause problems. Other times user inputs in forms can be the culprit.
Regardless of how they happen, it’s important to understand how you can prevent them from breaking your program. In this post…
this. This post will dive into bind(), call() and apply() and how they tie into our series on
In order to fully understand the functions I want to show you what they have in common, what the key differences are as well as a few examples of each. Let’s start with what they have in common first.
All three of these functions have one main thing in…
My last post, What is this?, attempted to clarify what
this by diving into arrow functions and how they effect what
this refers to.
The first question my interviewer asked was to describe
this but when asked to describe it I wasn’t even sure where to start. …
I was recently practicing some algorithm problems on Hacker Rank to help prepare myself for technical interviews. I came across a problem that required me to filter an array down to unique values. This is something I’ve done before and the solution I came up with worked but wasn’t very pretty. It went like this:
1. let a = [1, 1, 2, 3, 3, 4, 5, 5]2. console.log(a.reduce((acc, val) => acc.includes(val) ? acc : [...acc, val], ))
// [1, 2, 3, 4, 5]
I recently completed Flatiron School’s Immersive Software Engineering bootcamp. After settling down from the excitement I quickly switched into job searching mode. Part of my to do list was to “clean-up” my GitHub. So I customized my profile with some cool badges and graphics and then realized I had over 300 repos that needed to go.
These repos were all labs that we forked as part of the bootcamp and only about fifteen or so were projects that I had built and/or collaborated on. I knew I needed to get rid of these but wasn’t sure the best way to…
Software Engineer located in Austin, Texas with six years of petroleum engineering experience working for an international oil and gas company.