Code Should Tell a Story

The key to writing maintainable code that doesn’t make future developers want to scream at you is to follow a simple rule: “Code should tell a story”

What defines that?

The code should be immediately understandable. Anyone in the future who jumps into the project should be able to look at your code and immediately…

Continue reading: Code Should Tell a Story

The Myths of SEO

Saying “I know SEO” is disingenuous. The only people who “know SEO” are the engineers who write the ever-changing search engine algorithms that determine which sites have “good SEO” and which sites don’t. Yet, we have so many self-proclaimed SEO experts offering their services. How did we get to this point?

In the past, it…

Continue reading: The Myths of SEO

Check if Folder Exists in Ruby (Case-Sensitive)

Ruby’s Dir.exist? is tied to your OS, which may or may not be case sensitive when it comes to directories. That means that it is possible for a directory named ‘Derp’ to exist, but Dir.exist?(‘derp’) would return true.

Here’s a convoluted piece of code to get past that. It adds another method to the Dir…

Continue reading: Check if Folder Exists in Ruby (Case-Sensitive)

Writing Better Code: The Quick and Easy Guide to Doing the Title of this Blog Post

Given this snippet of PHP code, how much could you improve it?

[php] // INPUT: an array // OUTPUT: message to the screen // UPDATED: 2017-6-5 // AUTHOR: Elongo Wendrico function displayedDetaileMessages($passed_cnt) { $return = false; if(length($passed) == 0){ $return = true; }else{ $return = false; } return $return; } [/php]

Short answer to “how…

Continue reading: Writing Better Code: The Quick and Easy Guide to Doing the Title of this Blog Post

A Foie Gras Sandwich

After a series of fortunate events exactly one year ago today, my wife came home with several pounds of Canada’s finest exports – products like maple syrup, duck meat, maple syrup, foie gras, and maple syrup-related products. Foie gras is a word unknown to most people who have never watched Iron Chef, and for good…

Continue reading: A Foie Gras Sandwich

Start Command Prompt in Another Drive’s Folder on Windows 7

Create a shortcut to cmd.exe by opening your start menu, and typing “cmd” into the search bar. Right click on either “cmd.exe” or “cmd.exe (admin)”, and open the properties of the shortcut. On the “Shortcut” tab, edit the Target;

C:\Windows\System32\cmd.exe /k "e: & cd e:\Vagrant"

In this case, I want to start the command prompt…

Continue reading: Start Command Prompt in Another Drive’s Folder on Windows 7

Install Zabbix on an AWS Instance with Amazon Linux

Amazon Linux is cheaper than the other Linux flavors available in AWS, but the package manager is missing a few things – namely Zabbix. Let’s install Zabbix!

UPDATE: Oh, but hold the phone! I went about this entirely the wrong way! As Tag mentions in the comments below, there is a much better way to…

Continue reading: Install Zabbix on an AWS Instance with Amazon Linux

Bughunting

“OK, so which levels does this occur on?”

“1,2, and 4.”

“Not 3?”

“Not 3.”

“And this only happens on mobile?”

“Yes, but only some mobile devices”

Well shit. Every level of the maze uses the same logic. They are all checking collisions based on whether or not the player’s “pawn” came in contact with…

Continue reading: Bughunting