View e-mail in browser

newsletter #42

Hi, welcome to the 42th newsletter! 

For this newsletter I've recently made the switch from MailChimp to Sendy. If you notice something out of the ordinary please let me know.

Starting from September I'm starting sponsorships for this newsletter. As a subscriber this means that the newsletter will contain one or two links that will be clearly marked as sponsored.

If you're interested in sponsering the newsletter, please get in touch.

Open-sourcing our guidelines
At Spatie we recently launched a new site: It contains articles on how we go about setting things up at Spatie and a collection of styleguides. The source code of the site is available on GitHub. In this blogpost I’d like to share why and how we created our guidelines site.

Cruddy by design
At this year’s Laracon US Adam Wathan gave a talk titled “Cruddy By Design” on how to structure your controllers better. After the conference he published a new GitHub repo that contains the demo app he refactored on stage. The 4 main tips to improve your code come as PRs on the repo with a full description on why the change is valuable. Very cool stuff.

Laravel/MySQL JSON documents faster lookup using generated columns
In an older post on his blog Mohamed Said demonstrates how you can leverage virtual columns to speed up queries on data stored as JSON.

Theme-based views in Laravel using vendor namespaces
At Spatie, we’re building a multi-tenant app. Seb figured out a great way to handle theme based views.

Calculating distance using MySQL
Logan Henson, a developer at Tighten, wrote a new post on the company blog about MySQL’s cool ST_Distance_Sphere function.

Why using Yoda conditions you should probably not be
Grégoire Paris wrote down his opinion on why he dislikes Yoda conditions.

Use your Laravel named routes in JavaScript
Daniel Coulbourne, an engineer at Tighten Co and co-host of the amazing Twenty Percent Time podcast, recently released Ziggy, a tool to share your Laravel named routes with JavaScript.

Precision Through Imprecision: Improving Time Objects
Ross Tuck is probably one of my favourite bloggers. He doesn’t publish something often (his previous post is from 2015), but when he does it’s very much worth your time.

Using global mixins in Vue.js
Recently I needed to add some global functionality to nearly all Vue components in an app. My colleague Seb told me a good way to achieve this: global mixins. In this post I’d like share that knowledge.

What’s in our .babelrc?
Sebastian De Deyne, my colleague and all round wizard at Spatie, wrote a new blogpost on how we use Babel.

CSS Utility Classes and “Separation of Concerns”
In my day to day work I don’t write any css at all, but I still very much enjoyed this blogpost by Adam Wathan where he shares some interesting things about how css should be structured and he makes the case for using utility classes to make visual tweaks.

The disadvantages of single page applications
Adam Silver lists a bunch of problems you need to solve if you opt to build a single page application.

Language features and code properties
Josh Justice gives some solid advice on how to pick the right language for your next projects.

gtop: a system monitoring dashboard for terminal
To view some real time statistics of your server you use top or htop. But there’s a new new kid on the block: gtop. It looks pretty nice.

An interview with Jef, Spatie’s account manager
My colleague Jef, who handles accounts at Spatie, recently was interviewed by Viraj Khatavkar. Read it to learn some interesting tidbits on how our company is being run.

Meanwhile on Twitter

On Twitter I see a bunch of people regularly tweeting very nice code snippets. Instead of only retweeting those, I’m going to add them to my blog. Here are the first ones:

Partitioning a collection using modern PHP
Dedicated view objects in Laravel 5.5

Useful links from the archives

Hunting for great names in programming
A great story by DHH on his quest to find good names for some functions he was working on.

Laravel LTS is a Trap
A couple of months ago Jason McCreary, creator of Laravel Shift, wrote down his opinion on the Laravel’s LTS release. I couldn’t agree more with this piece.

A package to easily work with regex in PHP
To make working with regex a bit more developer-friendly we coded up a new package called regex. Here’s how you can work with it.

Improving readability using array_filter
In this post I’d like to share a quick tip on how you can improve the readability of your code with array_filter.

I Peeked Into My Node_Modules Directory And You Won’t Believe What Happened Next
Jordan Scales examined the contents of the node_modules directory a discovered a lot of junk.   Twitter

You are receiving this mail because you've subscribed at