The engineering notebook

Thinking out loud.

Notes on software, the occasional deep dive, and things
I’ve learned from making things work.

All writing 16

Ideas collected along the way
DevOps

Atomic symlink swaps

When changing symlinks, particularly as part as a deployment. The goal is generally to eliminate downtime. We often refer to these an atomic deployments. Just because you are using a symlink those, doesn't necessarily me...

2 min read
PHP

Using the built in web server included with PHP

Since version 5.4.0. PHP comes with a built in web server. If you're doing anything significant, chances are that you'll likely use Vagrant or similar to manage your local environment(s). However, if you're a Mac user. Y...

2 min read
Laravel

Soft Delete Records With Laravel

When working with data such as users or user related records. Sometimes you may want to soft delete the data rather than permanently removing it. One advantage to soft deletes is easy restore in the event of an accidenta...

1 min read
Laravel

Constraining relationship data with Laravel query builder

Sometimes when you work with relations in Laravel, a need me arise to add a constraint to the relatioship data. In Laravel terms, this is referred to as Constraining Eager Loads. Assumming that you have a User and Post M...

1 min read
JavaScript

Using the spread operator in ES6

collections such as an arrays into individual function params and elements. In the first example, lets look at getting the max value from an array of numbers. That can simply be written as: const array = [12, 34, 19, 84,...

1 min read