Don't write your own framework
My colleague Brent shares a story to illustrate why you shouldn't write your own framework.
Read more [stitcher.io]
My colleague Brent shares a story to illustrate why you shouldn't write your own framework.
Read more [stitcher.io]
It can be very hard to spot a false positive within a test. So how do you avoid them?
Read more [timacdonald.me]
Join 9,500+ smart developers
Get my monthly newsletter with what I learn from running Spatie, building Oh Dear, and maintaining 300+ open source packages. Practical takes on Laravel, PHP, and AI that you can actually use.
No spam. Unsubscribe anytime. You can also follow me on X.
"Freek’s newsletter is one of the best ways to stay updated with the Laravel and PHP ecosystem. It consistently highlights useful packages, tools, and ideas from the community, especially the amazing work coming from Spatie. As a Laravel developer building SaaS and web platforms, I find it extremely helpful to discover practical tools and insights that improve my development workflow."
The usage of phantom types is a simple type level trick which can help with this in practical settings, without requiring complicated features or making your code too abstract and less readable.
Read more [marcosh.github.io]
Readability of code can be vastly improved by decreasing indentation. In this video we'll reverse conditions and early returns to accomplish this. If you want to see more videos like this one, head over to the video section at Spatie.
– frederickvanbrabant.com - submitted by Frederick Vanbrabant
My buddy Frederick wrote an interesting post on why he always checks out the admin panel of an app instead of the code.
Read more [frederickvanbrabant.com]
Dave Marshall replies to a blogpost that Frank De Jonge published recently.
Read more [davedevelopment.co.uk]
Tim MacDonald shares a nice way to go about this.
Read more [laravel-news.com]
Geepaw Hill explains a way to avoid demeter violations.
Read more [www.geepawhill.org]
🔥 Applications often have the most lines of code within controller actions.
— Jason McCreary (@gonedark) April 13, 2020
One practice to streamline your code is directly assigning view variables.
This also limits the use of temporarily variables and promotes abstractions which make the code more readable. pic.twitter.com/m0JGsybQ9k
– driesvints.com - submitted by Dries Vints
Dries Vints wrote a bost on why he uses single action controllers.
Read more [driesvints.com]
A must read by Frank de Jonghe on testing.
Read more [blog.frankdejonge.nl]
– tighten.co - submitted by Matt Stauffer
The average Laravel app sends between a few and a few dozen notifications to users, but what happens when they want to opt out? With legal regulations like GDPR, it's more important than ever to give users control over the emails they receive.
Read more [tighten.co]
My colleague Seb explains why and how you should use a global .gitignore file
Read more [sebastiandedeyne.com]
Seb explains why it's perfectly safe to drop a major version of PHP without tagging a new major version of a package.
Read more [sebastiandedeyne.com]
In this short post, I'd like to give you a tip on writing readable PHP.
In this video, which is part of the mailcoach video course, I show how I like to write my exceptions.
At the time of writing this post, we're running a contest where you can win a free mailcoach license.
Have you every come across confusing if statements with complex conditionals such as this? I bet you did!
// please kill me 🤯
if (!(($this->shipping_country == "GB" || (strcmp($this-status, "Valid") !== 0)) {
To me, this is completely unreadable.
In the video below I show how I deal with this situation. Spoiler: add some tests around it and break the conditionals apart.
This video is part of the Mailcoach video course. It contains many more videos on how to write clear code. You can use this coupon code to get a nice discount of $10.
YES-I-WANT-TO-WRITE-READABLE-CODE
Here's how to let password managers recognise your login form and let you use their features on your fields.
Read more [hiddedevries.nl]
Mattias Verraes explains a method for making technical debt visible and negotiable.
Read more [verraes.net]
– tighten.co - submitted by Matt Stauffer
In the age of internet tracking, more users are turning to blocker software for protection. Sara Bin shares some tips to improve your website's UX for these users—and everyone else!
Read more [tighten.co]