Changing Things Up

This past weekend, I decided to change things up a little bit on my blog. Nothing extreme – I’m still using WordPress but I moved my blog from WordPress.com to Pressable, a self-hosted solution. My main reason was so that I could be more helpful in testing out other Automattic products, such as Jetpack, as well as some new Core features, such as the beta Gutenberg editor. Additionally, a self-hosted solution will allow me to customize things a bit further that I would be able to on WordPress.com … but I don’t really plan to do a whole lot of that at the moment.

You may have also noticed that this blog has a new look. After a pretty decent stretch using the theme Revelar, I decided to switch to the default them from 2016 – Twenty Sixteen. I still think Revelar is a great theme. The main reason I switched is because I felt like Revelar is set up great for photography but, if I wanted to post a quick blurb or a standard blog post, I always felt pressured to come up with a good featured image. After exploring a few other themes, I found that Twenty Sixteen was exactly what I was looking for (after making a few very slight visual customizations). It looks great for photo posts with nice featured images, yet it still looks very nice for posts that don’t have/need one.

I’m hoping that this switch prompts me to blog a little bit more, since I don’t have to spend additional time worrying about imagery for non-photography posts. That being said, if you are looking for a more photo-based blog, Revelar is still a great theme!

Ubuntu MATE on Raspberry Pi

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”

React.js Resources

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:

I’m currently in the process of working my way through these and I will likely update this post as I discover more resources. That said, please do share in the comments, if you know of any good ones that I’ve missed!

* List last updated on 04/01/2015

Yoda Conditional Statements

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.

Take the following example (from the handbook):

[code language=”php”]
if ( true == $the_force ) {
$victorious = you_will( $be );
}
[/code]

Despite that it reads backwards, this makes sense programatically. If you were to accidentally omit a part of the comparison operator (an equals sign, for example) when writing out your statement, your code would fail because you can’t assign to a constant. Writing your conditional the other way around (non-Yoda) would evaluate to true via an accidental assignment operator. This would result in perfectly valid code and a bug that is much more difficult to track down.

Note that this only applies to ==, !=, ===, and !== comparisons. As stated in the handbook, “Yoda conditions for <, >, <= or >= are significantly more difficult to read and are best avoided.”

Moving Local Files with Rsync

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”

Virtual Terminal Sessions with Screen

Not so long ago, a co-worker and friend of mine introduced me to the UNIX application, screen. While I was really excited to learn of something so useful, I was also deeply saddened in realizing that it was right under my nose all this freaking time. In this short post, I’m going to show you how you can take advantage of this clever little utility.

Continue reading “Virtual Terminal Sessions with Screen”

Getting Started with Grunt.js

For quite some time, I’ve been hearing a lot of great things about Grunt.js: What it does for automating tasks in the development process; how it is so configurable; the fact that it is open source and driven by such a great community of developers; and how much easier it is to configure compared to other build scripts, such as Ant. I even sat through a great session by Ben Alman (the creator) at the 2012 jQuery Conference in San Francisco.

When I initially took a look at the project and what it would take to get up and running, I was a little intimidated and did not really know where to begin. So, as I usually do in those situations, I put it off. Finally, after about a year of hearing so many positive opinions about Grunt, I decided to just sit down for an afternoon and dig into it. I am so glad I did because I absolutely LOVE it!

Continue reading “Getting Started with Grunt.js”

Disable the Character Picker in OS X

OS X 10.7 (Lion) introduced a feature called the Character Picker. This allows you to press-and-hold a key on your keyboard, activating a little popup with the different character options associated with that key. This can be a useful feature for some, as it allows you to visually see all of those additional character options and not have to know how to otherwise activate each of them. I, however, found that it was more of a hinderance to my workflow. For example, when I am editing my code in VIM or Vintage Mode in Sublime Text, this feature prevents me from holding down the movement keys (h, j, k, l) to navigate. So I decided to disable it.

Continue reading “Disable the Character Picker in OS X”

JavaScript and Media Queries

When developing a responsively designed web site, it is likely that you will come across a situation where you will want to selectively execute a JavaScript callback based on a media query comparison. For example, you may want to alter your menu layout for small-screen devices. Or you may wish to load in specific content only on large-screen devices. Luckily, these capabilities are currently available. In this article I will cover a couple methods and show you that this can be done without much trouble at all!

Continue reading “JavaScript and Media Queries”