New with ES6, we have an additional way to write function expressions in our code – as arrow functions. This new syntax offers 3 main benefits:
- They are much more concise than regular function expressions/definitions
- They have implicit returns, which allow us to write single-line expressions (much like we can do with conditionals and the ternary operator)
- The value of
this is lexically bound, meaning that it is not re-bound when you use an arrow function inside of another function – which is very helpful for asynchronous callbacks
As of ES6, we have two new ways to define variables, in addition to the classic
var keyword. Each are a little bit different in their own way and I’ll break down those differences in this article.
A few weeks ago, I gave a presentation at WordCamp Greenville on CSS Grid Layout.
It was the very first WordCamp Greenville and also my first conference talk so it was a pretty exciting experience for me all around.
You can watch the full recording of my talk below:
Additionally, you can view my presentation slides here.
I’ve been looking for a good autocomplete plugin for Vim for a while. It seems like the most popular option by far is YouCompleteMe (which I have been using for a while now). While I think YouCompleteMe is a good plugin, I also feel like it’s a bit heavy and seems to need a lot to setup and maintain. I always seem to have issues with the server going down.
Basically, I just wanted a lighter option.
Continue reading “Vim Text Completion”
What is Web Storage and when would you use it?
There are instances where storing data in a users browser can be really helpful. Up until somewhat recently, saving the state of the application locally in the browser via Cookies was the main way to achieve this. Cookies have limitations, however. For example, their max size (4093 bytes) and the fact that they have to me transmitted with every request.
Continue reading “Intro to the Web Storage API”
CSS Custom Properties, also commonly referred to as CSS Variables, is a specification that allows you to declare a property and use it later on in your stylesheet. This works similar to how you would declare a variable with a preprocessor.
Continue reading “Using CSS Custom Properties”
I’ve been wanting to try out a Linux desktop for a while now. Mainly out of curiosity – I like to try new devices, operating systems, etc. I didn’t really want to invest in a computer just to try out a new OS, however. I had a couple older MacBooks lying around but I also had a Raspberry Pi 3 that I hadn’t quite decided what to do with. After poking around a bit on the internet, I found desktop variant Ubuntu MATE had been optimized for the use with the Raspberry Pi 2 & 3. The installation process looked pretty straightforward and I had an extra monitor, keyboard, and mouse so I figured I’d give it a try!
Continue reading “Ubuntu MATE on Raspberry Pi”
Recently I’ve been digging into React.js. Some my awesome co-workers are experimenting and utilizing the library in some pretty cool ways, so it really sparked my interest. As a result, I’ve collected a little list of bookmarks that I thought was worth sharing.
Continue reading “React.js Resources”
Here’s a little gem on conditional statements that I saw for the first time in the WordPress Coding Standards a few months ago. When writing out a conditional logic, it is recommended to place the variable on the right side of the comparison operator and the constants or literals on the left. Appropriately named “Yoda Conditions”, as the statement then reads backwards to how we would typically speak or think. I’ve never really thought about this before but it really is a handy little tip.
Continue reading “Yoda Conditional Statements”
I am very obsessive about backing up my data. To preserve space on my MacBook Air’s drive, I store most of media files on a WD Passport external drive. Additionally I back that media up on a second (and oftentimes a third) desktop external drive. Sure, this is a little OCD but it’d be quite a shame to lose all of my files, should my first Passport drive fail me.
Continue reading “Moving Local Files with Rsync”