In the 4.5 years I've been a developer at Spatie, over 200 packages have been built and released by our team. I've done quite some authoring and maintenance over the years, and I'd like to share 8 actionable tips on writing and maintaining open source software without going insane.
Want to view a single image on @imgur (literally its only job)? Good luck! You gotta successfully download (354KB) and run (1.21MB) of client-side React in order to get your image requested as resource 110 of 553. What should have been an IMG element became… this.
This is ridiculous. Things like this don't even make me any mad anymore, they disappoint.
To make things worse, a large portion of the replies try to justify everything with “but business decisions…".
We can do better. We should do better.
Today I tagged v1 of a new package: Laravel Mix Preload. It automatically generates
prefetch links based on the contents of your
Takuya’s is the sole developer and owner of Inkdrop, a popular markdown app. He wrote setting goals to make his product better instead of bigger.
I asked myself “do I really need another goal?” Because the project is just what I love to do in the first place, as I wrote in the article about grit. Making it profitable was merely a requirement to continue doing it and not a genuine source of the motivation.
I’ve been thinking about the balance between growth and sustainability lately, and this quote from the article stuck out:
By focusing not on endless growth or expansion, it makes your business sustainable. Interestingly, about 90 percent of all businesses worldwide that are more than 100 years old are Japanese. They all have fewer than 300 employees, and the ones that still exist never grow quickly or without great reason.
Read the full article on blog.inkdrop.info.
I built a small React component that uses the Google Places API to autocomplete an address in a project I'm working on, and extracted the predection fetching to a custom
useAddressPredictions hook. It's a nice example of a custom React hook composed of different primisite hooks, so I decided to pen write my thought process while building it.
I prefer to use light interfaces, so I rarely use dark mode in macOS or iOS. I often see people add dark mode to their sites, but never really knew whether visitors actually care. I started a Twitter poll:
Do you consider dark mode on websites / blogs (not apps) useful?
The poll is still open. At the time of writing, 225 people responded, and 47% answered “Yes”. Enough to convince me to add a dark mode to my blog.
React follows semantic versioning, but with a twist. From their versioning policy:
When releasing critical bug fixes, we make a patch release by changing the z number (ex: 15.6.2 to 15.6.3).
When releasing new features or non-critical fixes, we make a minor release by changing the y number (ex: 15.6.2 to 15.7.0).
When releasing breaking changes, we make a major release by changing the x number (ex: 15.6.2 to 16.0.0).
The twist is subtle: non-critical bugfixes are released as minor releases.
I've often wondered whether three digits really is necessary for versioning. As a package maintainer, deciding between minor and patch is often a gray area.
Two digits would suffice: breaking changes and non-breaking changes. Feature or bugfix doesn't really matter from a technical point of view: upgrading can either break things, or can't.
React reserves the patch number for critical bugfixes, which I believe is a necessary escape hatch in a two digit system. But I like I how they default to simply bumping minor versions.
Last week I published a post about how I implemented live updates on an Oh Dear! status page.
Caleb Porzio rebuilt the page with Livewire. It's pretty impressive to see how easy the process is by just adding a few built in Livewire directives.
Watch the short screencast on Caleb's blog.
Both Inertia.js and Livewire have been in the spotlight the past few months. The two libraries often get put next to each other because of their (coincidentally) simultaneous releases.
I've seen many people compare the two, or ask if they can be used together. This post showcases their similarities and differences, and should help you understand which problems they each solve best.
This short post outlines two ways to deal with routes in a Laravel and Inertia app.