Category: programming.

Back to the Future.

This past weekend, I decided to take a trip down memory lane and take a look at the evolution of this blog’s design over the years (with a little help from the Wayback Machine). While I’ve really enjoyed the challenge of making an obsessively backwards compatible blog these last few...

Duplicating a Database Record in Laravel.

As I prepare to take my terrifying leap into hackademia, I’ve been freelancing a lot more lately—both as a way to freshen up some of my more rusty skills (Directing leaves little room for slinging code or technical writing), and as a way to offset some of the lost income...

Making Better Use of the `Accept` Header.

A while back, I wrote about a Jekyll plugin I created that cross-compiles all of my blog posts in plaintext (you can see it for yourself, just click the txt link at the bottom of this or any other post). It was a fun experiment, and allowed me to not...

Working with Serverless Log Data.

As mentioned in last week’s Sunday Reboot, I’ve recovered a few of my old posts from the Wayback Machine—all from my time at the now shut-down Fixate.io (via their blog, Sweetcode). These are all freelance topics, so the style of writing is a bit different than normal (for me, at...

CI/CD/CV: Emphasizing Continuous Visibility.

As mentioned in this week’s Sunday Reboot, I’ve recovered a few of my old posts from the Wayback Machine—all from my time at the now shut-down Fixate.io (via their blog, Sweetcode). These are all freelance topics, so the style of writing is a bit different than normal (for me, at...

Post-Mortem Incident Report Do's and Don'ts.

As mentioned in this week’s Sunday Reboot, I’ve recovered a few of my old posts from the Wayback Machine—all from my time at the now shut-down Fixate.io (via their blog, Sweetcode). This is the first of those posts, which I believe was originally written for VictorOps but ultimately scrapped for...

How to Dockerize EnvyMUD.

About 13 years ago, I published a post on my blog titled How to Compile Envy MUD (while my archive page has it listed as the first post, it’s actually just the oldest one I’ve retained after years of prior publishing). While the process of compiling Envy MUD (or EnvyMUD)...

Over-Engineering a #100DaysToOffload Counter in Jekyll.

Alright, so I’ve re-kicked off this #100DaysToOffload challenge, and despite the fact that it’s only been like 2 days, I’ve remembered just how tedious counting the posts can be. I mean, I’ve gotta open my last post, copy the challenge footer, paste it in the new post, increment the counter…...

Will It Render?

I’m a little obsessive about backwards compatibility on the web, and one thing that can be particularly sticky are image formats. While I know that GIF is the most widely supported format across both space and time, I wanted to better understand what is actually available across the wide-spectrum of...

Common CWE Finds: Reachable Assertion.

In this blog post series, we’re diving into Mayhem’s top common weaknesses enumeration (CWE) finds. A Common Weakness Enumeration, or CWE for short, is a list of software and hardware patterns that can lead to vulnerabilities and other weaknesses. One such CWE that is both fairly common and possibly unexpected is the reachable...

What's on Your Open Source Bucket List?

I’m not ashamed to admit that I don’t usually contribute to open source as a way of giving back to the community for everything it has given me. Don’t get me wrong, it’s a great side effect, but the reason that I do it is because it makes me feel...

A Few Heroku Alternatives.

Heroku’s been taking it on the chin lately for their response to what looks to be a pretty-damn-serious security incident—and for good reason, because their communication about the whole event has been abysmal.

WTF is a Postmortem?

A postmortem is the analysis of an event after it occurs. When an issue is encountered in a production environment, a postmortem is an important process that lets us reflect on and learn from our mistakes so we can improve our process and prevent them from happening again in the...

Fix Spaghetti Code and Other Pasta-Theory Antipatterns.

Nobody ever said it’s easy to write clean code. Successful software development isn’t just about making software work; it’s about making sure it will continue to work. While hardly an exciting objective, code maintainability is one of the most important elements of any application.

An Introduction to Vagrant Aliases.

A few years ago, I checked off an item on my Open Source Bucket List when I pitched—and ultimately contributed—a brand new feature to HashiCorp’s Vagrant: command aliases. While aliases have been a core Vagrant feature for some time, there hasn’t been a lot of coverage about what they are,...

Writing a Damn Good README File.

Raise your hand if you’ve ever read a README file. Now, keep that hand raised if you’ve ever written a README file. I’m going to take a shot in the dark and assume that your hand is still raised; at least, it’s raised in spirit, since you probably refuse to...

# Always Be Commenting.

As developers, we like to think of source code as a recipe. All the steps are written out, so understanding code is as simple as reading those steps. But that’s not the way it really works, is it? Programming is an art form, and programmers each have their own unique...

Magento on Vagrant: Lessons Learned.

Let’s get this out of the way first: Magento is by far the single-most inefficient framework I have ever had the displeasure of working with. While I’ve made a similar statement about Craft CMS in the past, after a week working with Magento 2 I happily rescind my earlier Craft...

Why We Review.

Many development agencies refuse to inherit already built projects, and earlier this year, I found out why. The most dreaded part of any developer’s job is dealing with “legacy code.” While legacy code is a near inevitability in most tech companies, understanding and maintaining it is time consuming and costly....

Good Code Is Subjective, Documentation Is Not.

Last week, I had an interesting chat with a peer about the difficulty of finding a balance between using established standards and building proprietary solutions within development projects. Personally, I’m an advocate for utilizing established third-party solutions whenever possible as a way to reduce new developer onboarding time and increase...

Messing with the GitHub Contribution Graph.

You know the contributions calendar grid on GitHub profiles? The one with all the pretty green squares? What if you could write a message within that box? That’s exactly what a friend of mine asked me a few months ago. At first, it seemed like a silly question, because even...

MIME Type Validation Sucks.

An uncomfortable majority of companies that offer high storage limits for specific file types have a major problem: MIME type validation isn’t good enough. If you’ve ever had to implement file validation for user uploads, you’ve probably relied heavily on MIME type validation to ensure that the files you are...

Setting Up CloudFlare SSL for Laravel on Heroku.

CloudFlare. Laravel. Heroku. Despite being the keywordiest article title I’ve ever written, I really did have to solve this exact problem recently, and it took me longer than I’m proud to admit. Let’s face it: SSL is a pain in the ass. At least it is when it comes to...

How (and why) to Perform a Project Audit.

As a freelance developer, I am occasionally asked to audit projects that have had the majority of development outsourced. While outsourcing isn’t an intrinsically bad thing, managing an outsourced product requires you to walk a very fine line between “bootstrapped” and “cheap.” The Code No two codebases are the same,...

What is Full Stack Deployment?

Full stack deployments are a relatively new concept to me. At first, I was confused as to why you would redeploy the entire stack every time, rather than just the code. It seems silly, right? My brain was stuck a little in the past, as if you were rebuilding a...

API Design: A Documentation-first Approach.

What exactly makes a “good” API? That is a question a lot of developers ask when designing their first API. While there are hundreds of resources online, all with differing opinions about what defines “good,” the majority of them share some similar themes. Logical endpoint naming conventions, clear error messaging,...

Why Vagrant is the Best Developer Environment.

When starting a project, working as an individual developer provides a level of development freedom that can get quickly complicated when it is time to grow the team. Once you expand to multiple developers, it is critical to maintain a well-documented and structured development environment. In a poorly architected environment,...

How to Force Installation of Vagrant Plugins.

Vagrant is an amazing tool for local development, especially in the case of distributed teams. It allows for complete parity between every team member’s development environment without forcing anyone to follow a complicated list of environment setup steps. Vagrant’s plugin support is also excellent, as it provides for further automating...

PHP Binary Search Tree Implementation.

A Binary Search Tree is an ordered binary tree that has the following rules: The left subtree always contains nodes that have a value less than the current node. The right subtree always contains nodes that have a value greater than the current node. Each subtree must also be binary...

PHP Queue and Stack Implementations.

Continuing on my job interview study session binge, the next two data structures I have built using PHP are the traditional queue and stack. In computer science, stacks and queues typically go hand in hand, however they are opposite implementations of each other. A queue is a first-in-first-out data structure....

Quickly Determine If Two Strings Are Anagrams in PHP.

When interviewing with tech companies, there are a LOT of questions involving anagrams. While there are many different approaches to solving these questions, here is a simple one-line function that can determine whether or not two strings are anagrams in PHP. This approach utilizes the built-in PHP function, count_chars(). When...

A Linked List Implementation in PHP.

For the past few weeks, I have been going through the process of applying and interviewing with some amazing companies, the most exciting of which has been Facebook. Interviewing with Facebook has been an incredible experience which has challenged my knowledge of software development and computer science in so many...

My Two favorite Git Aliases.

I’m a big fan of Git. It is a super easy-to-use version control and source code management system. Before I came to Git, though, I used Mercurial, and there were two commands that I missed. Through a lot of Googling, I came across two Git aliases that have changed everything...

Anonymize Your cURL Requests Using Tor.

Note: This post assumes that you already have Tor installed and configured on your server. If not, visit the Tor Project Homepage for instructions on how to set it up. I love writing web crawlers and data aggregators in PHP. They say knowledge is power, and I find it exciting...

Custom CodeIgniter Model Class.

For the past year, I have been an adamant CodeIgniter developer. The one thing that I have found lacking, however, is CodeIgniter’s model class. I am a big fan of the simplicity of CakePHP’s ORM structure, and wrote this model class to (slightly) mimic it. Some of the functionality in...

How to Compile Envy MUD.

I have always been fascinated with MUDs, also known as Multi-User Dungeons. They are the World of Warcraft before there was a world to craft war in. It’s an interesting mesh between computers and Dungeons and Dragons. Imagination is an important factor, and from my experience, they are a great...