Reading List
The most recent articles from a list of feeds I subscribe to.
Sketchplanations: Point positive
A little Sketchplanation on "point positive".
Point positive is a rafting term for agreeing in advance to point towards the safe way out of danger rather than towards the dangers themselves.
When you're in trouble, don't dwell on the cause, look for a solution. Only when the waters are calm, take a step back, reassess, and learn the necessary lessons to avoid it in the future.
Cat Hicks on Craft
I lovely read on craft by Cat Hicks.
Grandpa loved craft. […] He fixed things often and silently. Grandpa just cared about things working. He had an instinct for not just broken things but soon to be broken things. He would point out risky work, bad decision making in the form of shoddy materials or shifting angles.
As software developers, we often consider our trade to be unique. But what we (should) have in common with others is the mindset of respecting our craft—of producing solid and lasting work.
I have read a lot of long spiels about craft that frequently end in something like, software work isn’t like other work, and we shouldn’t be judged the same way. We are entirely unique. We are the special ones. I find this both saddening and unconvincing. I think that all labor is skilled labor. I think about the factories and the fields and the ways that demands for speed instead of cadence can hurt people. I think we should seek to understand and value our skills and see effort. But I don’t think we are going to fix anything about how software work is valued by refusing to let it belong to the rest of the world.
Forge deploy scripts in version control
I love Laravel Forge's quick deploy scripts. Forge allows you to set up a deploy script in their web interface and run it when you push to a git branch. However, I generally prefer to keep orchestration in the git repository. It's nice to have history, and I don't want to visit Forge whenever I want to make a change to the deploy script.
An elegant solution: move the script to a file. I created a deploy.sh and call it from Forge.

My deploy script isn't too bulky for now. It runs composer install and npm ci for dependencies, builds assets, clears the cache, caches config files, and does a safe restart of the php fpm process.
composer install --no-dev --no-interaction --prefer-dist --optimize-autoloader npm cinpm run build php artisan cache:clearphp artisan config:cache ( flock -w 10 9 || exit 1 echo 'Restarting FPM...'; sudo -S service php8.2-fpm reload ) 9>/tmp/fpmlock
Which I call from Forge:
cd /home/forge/full-stack-artisan.devgit pull origin $FORGE_SITE_BRANCH ./deploy.sh
Don't forget to make deploy.sh executable before use.
chmod +x deploy.sh
Whenever I need to tweak the deploy script, I can update it from my text editor and git push.
Keeping Forge deploy script in version control
I love Laravel Forge's quick deploy scripts. Forge allows you to set up a deploy script in their web interface and run it when you push to a git branch. However, I generally prefer to keep orchestration in the git repository. It's nice to have history, and I don't want to visit Forge whenever I want to make a change to the deploy script.
An elegant solution: move the script to a file. I created a deploy.sh and call it from Forge.

My deploy script isn't too bulky for now. It runs composer install and npm ci for dependencies, builds assets, clears the cache, caches config files, and does a safe restart of the php fpm process.
composer install --no-dev --no-interaction --prefer-dist --optimize-autoloader npm cinpm run build php artisan cache:clearphp artisan config:cache ( flock -w 10 9 || exit 1 echo 'Restarting FPM...'; sudo -S service php8.2-fpm reload ) 9>/tmp/fpmlock
Which I call from Forge:
cd /home/forge/full-stack-artisan.devgit pull origin $FORGE_SITE_BRANCH ./deploy.sh
Don't forget to make deploy.sh executable before use.
chmod +x deploy.sh
Whenever I need to tweak the deploy script, I can update it from my text editor and git push.
Go by example
A few years ago I taught myself some Go. Not because I needed it but because I like poking around other ecosystems. I came across Go By Example, and it's still is one of my favorite formats to explore a new language or framework.
The examples are succinct and introduce you to a concept without overwhelming you. This format will not turn into an expert, but is just enough to get you curious and kickstart your own explorations.