How Music Was Made On Super Nintendo
– Edit
Limiting breeds creativity.
– Edit
Limiting breeds creativity.
– twitter.com – Edit
#Laravel tip of the day: in Eloquent Query Builder, you can specify "as" to return any column with a different name, just like in plain SQL query. pic.twitter.com/r7xGm50lDL
— Povilas@LaravelDaily (@DailyLaravel) September 25, 2018
Read more [twitter.com]
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.
"As a Laravel developer, this is the one newsletter I most look forward to. Freek has a talent for distilling packages or techniques down to something immediately useful - one tip can save you hours and even weeks. It's concise and practical and highly relevant."
– www.troyhunt.com – Edit
In a new blogpost Troy Hunt explains why you shouldn't bother buying an EV certificate anymore.
That's it - I'm calling it - extended validation certificates are dead. Sure, you can still buy them (and there are companies out there that would just love to sell them to you!), but their usefulness has now descended from "barely there" to "as good as non-existent". This change has come via a combination of factors including increasing use of mobile devices, removal of the EV visual indicator by browser vendors and as of today, removal from Safari on iOS
Read more [www.troyhunt.com]
– medium.com – Edit
Mahak Narayan Singh explains how Babel does it's job.
Have you ever thought how this awesome tool which you use in your daily life works under the hood? How does compilers you use in our daily life work? Do you need your own customized compilation? You should find this article beneficial then.
Read more [medium.com]
In an older but still relevant article on the Clean Coder Blog, Uncle Bob argues that the structure of your tests should not necessarly reflect the structure of your code.
The structure of the tests must not reflect the structure of the production code, because that much coupling makes the system fragile and obstructs refactoring. Rather, the structure of the tests must be independently designed so as to minimize the coupling to the production code.
Read more [blog.cleancoder.com]
– Edit
Phoenix is a framework written in Elixir. It's creator, Chris McCord, showcased an impressive new feature called LiveView at ElixirConf.
Here is some more background info on LiveView: https://leveljournal.com/why-phoenix-liveview-is-a-big-dealLiveView is an extension of standard Phoenix views that will automatically propagate updates to the browser anytime state changes that would impact that view (using the existing Phoenix channels infrastructure). Instead of sending a state change event down the wire that you have to process in JavaScript manually, LiveView sends down an updated HTML fragment, diffs it against the current DOM state, and makes the necessary mutations for you.
– blog.tjmiller.me – Edit
TJ Miller shares a cool Travis config to tests against all versions of Laravel.
As Laravel 5.7 is now out, I needed to add support to both the package’s composer configuration and verification in CI. Previously, I only needed to verify against 5.5 and 5.6 I thought that having --prefer-lowest in the matrix would add the coverage I needed. Now that I am supporting three versions I felt that I needed a more specific way of verifying compatibility with different versions of Laravel.
Read more [blog.tjmiller.me]
– twitter.com – Edit
? Reviewing your code for symmetry is a great way to improve readability.
— Jason McCreary (@gonedark) September 17, 2018
To get started, check for paired naming, consistent tone, and relative complexity. From there any remaining asymmetric bits will be easy to spot.
Here's a before and after snippet from the @OhDearApp. ? pic.twitter.com/KAhzYBxzSd
Read more [twitter.com]
by Freek Van der Herten – 4 minute read – Edit
A while ago I ditched the custom admin of this blog in favour of Laravel Nova. As you might have noticed every blog post on murze.be has some tags. Nova ships with many form fields but a field to use tags is not included out of the box. That's why I created my own tags field and released it as…
– stitcher.io – Edit
My colleague Brent released another awesome package called laravel-view-models. On his blog he shares some good examples and uses cases.
In essence, view models are simple classes that take some data, and transform it into something usable for the view. In this post I'll show you the basic principles of the pattern, we'll take a look at how they integrate in Laravel projects, and finally I'll show you how we use the pattern in one of Spatie's, our company, projects.
Read more [stitcher.io]
– twitter.com – Edit
Whenever you find yourself using || or && in an if statement, consider extracting the conditions of that if statement to a dedicated method with early returns. It's more readable and it makes debugging much easier.
— Freek Van der Herten (@freekmurze) September 12, 2018
Example: https://t.co/hUcq29uP54
Read more [twitter.com]
– twitter.com – Edit
Did you know that using stream contexts, you can set headers when making HTTP requests with #php's file_get_contents() function? pic.twitter.com/bBoS5bksbt
— Liam Hammett (@LiamHammett) August 24, 2018
Read more [twitter.com]
– medium.com – Edit
Liam Hammett explains what bitmask constants are and how they work.
PHP has a handful of core functions that can accept boolean arguments in the form of constants that have a binary value. These can be combined together in a single function argument, essentially passing multiple boolean flags in a very compact manner. They work a bit differently to how most people implement options in their userland functions, so let’s take a look at how they work.
Read more [medium.com]
– twitter.com – Edit
?shell tip?
— Travis Northcutt (@tnorthcutt) September 6, 2018
brew install tesseract
alias ocr='screencapture -i ~/tmp/screenshot.png && tesseract ~/tmp/screenshot.png stdout | pbcopy && rm -f ~/tmp/screenshot.png'
Then, run `ocr` in your terminal, select text in an image, and...
✨it's copied to your clipboard ✨ pic.twitter.com/KEsiDasu8l
Read more [twitter.com]
Daniel Gomes, a developer at Teamleader, explains a potential problem when cloning object in PHP.
As you know, PHP has a well-known clone keyword that shallow copy all of the object’s properties. So under the hood what it does is to create a new Object with the exact same values of that object properties – unless you change its behavior by implementing the clone() function in your class.
Read more [dcsg.me]
– www.wired.com – Edit
Wired.com published a interesting piece on Even You and Vue. It also contains some quotes by Taylor Otwell, the creator of Laravel.
The big reason for Vue's success, developers who rely on it say, is its simplicity. More companies want to build web applications that, like Google Docs, feel as snappy as a native application. But few actually build applications as complex as Facebook’s or Google’s. What developers often really want is a framework for building small, interactive web apps. Angular can be overkill for simple applications, while React has a steep learning curve even for experienced developers. Vue applies a more "layered" approach to building a framework.
Read more [www.wired.com]
Here's another excellent post by Matthias Noback.
Reuse-in-the-small is definitely possible. Reuse-in-the-large is deemed to be impossible, because no two problems/projects are alike, but practice proves otherwise. There are reusable components covering entire subdomains, which are nonetheless quite successful. The chance of success is bigger if such a reusable component is used to cover for a generic subdomain. Using an off-the-shelf solution in such a case helps you save development effort which can instead be redirected to the core domain.
Read more [matthiasnoback.nl]
Mariko Kosaka, an engineer at Google, started a beautifully illustrated series on how Chrome works behind the scenes.
In this 4-part blog series, we’ll look inside the Chrome browser from high-level architecture to the specifics of the rendering pipeline. If you ever wondered how the browser turns your code into a functional website, or you are unsure why a specific technique is suggested for performance improvements, this series is for you.
Read more [developers.google.com]
– twitter.com – Edit
Then you're gonna love self-executing memorization functions. @TheAlexLichter just introduced me and @wilburpowery to it. pic.twitter.com/0XJ6OYRxbS
— Till Krüss (@tillkruss) September 6, 2018
Read more [twitter.com]
– twitter.com – Edit
? Quick Tip on @laravelphp's new email verification feature! Want to override/replace the notification with your custom notification? You can. Just use a callback in a service provider for instance. pic.twitter.com/odxfnBemnH
— Stefan Bauer (@stefanbauerme) September 6, 2018
Read more [twitter.com]