Named arguments
My colleage Sebastian digs named arguments in PHP. As do I!
Read more [sebastiandedeyne.com]
My colleage Sebastian digs named arguments in PHP. As do I!
Read more [sebastiandedeyne.com]
According to the React maintainers, React developers reach for the useEffect hook too quickly. It is far from the only hook with many naive usages. Why won't we go through my favorite example of an incorrect usage for useRef?
Read more [flareapp.io]
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 publishes a super resourceful and practical newsletter. A must for anyone in the Laravel space"
Good tips by Jeffrey Way
Read more [laracasts.com]
– arunas.dev - submitted by Arunas
You'll learn the difference between "tactical" and "strategic" programming, and why choosing the right approach is important in the long run.
Read more [arunas.dev]
Let's explain the two most important topics when working with RDBMSs: indexes and transactions.
Read more [architecturenotes.co]
– arunas.dev - submitted by Arunas
Before we learn strategies for better software design, we must understand our enemy - complexity. Let’s define complexity, how to spot it, and what causes it.
Read more [arunas.dev]
DRY is just like every other principle out there - it has its place, but it's best taken in moderation.
Read more [gordonc.bearblog.dev]
Some good tips for writing effictive, human-friendly documentation.
Read more [thenewstack.io]
Did you know that DateImmutable isn't really immutable?
Read more [matthiasnoback.nl]
A nice list of things to keep in mind when writing software or documentation.
Read more [leerob.io]
Personally I don't know if this is a good practice, but you (and future me) might like it.
Read more [www.aaronsaray.com]
There are a couple of nice ideas there to solve longstanding problems with UUIDs
Read more [www.ietf.org]
I'm proud to announce that our new premium course on writing readable PHP is now available. It's called Writing Readable PHP.
This course contains a collection of bite-size tips (both in written form and videos) that make your code a joy to read for your co-workers and future self. These tips are aimed towards developers who know the basics of PHP and want to improve their craft. As a bonus, you'll learn to use static analysis to ensure that your code is understandable and correct.
Writing Readable PHP has been created by our team and Christoph Rumpel. It contains our combined knowledge on how to write the best PHP possible.
– doeken.org - submitted by Doeke Norg
DRY up code by deferring specifics to a callback.
Read more [doeken.org]
Passing booleans to a method can be code smell, as it is not clear what a boolean does by reading the calling code.
Andraes Möller blogged a few interesting strategies to name the constructors of your PHP objects.
Read more [localheinz.com]
– tray2.se - submitted by Patrik Ahlström
You might think that the way your store your data isn't really that important. Well it's more important than you think it is. A good database design just like good clean code is the key to performance, not only for the end user but also for you the developer. A poor database model just like poorly written code will slow you down and furthermore it will slow your database queries down which results in a slow application.
Read more [tray2.se]
This talk by Kevlin Henney looks at how a handful of coding habits, design practices and assumptions can systematically balloon code and compound its accidental complexity.
Using else often encourages complexer code structure, makes code less readable. In most cases you can refactor it using early returns.
Have you ever needed to maintain a project that wasn't yours? A project that, when you first opened it, gave you chills down your spine? Even without reading the code in detail, you could already tell it was a mess.