From the blog:

The Null Object Pattern: Simplify Your PHP Code

Jan 11, 2025 #PHP

Handling null values in PHP can be a pain. We've all seen (or written) code that’s riddled with if checks just to deal with null. But what if I told you there’s a cleaner way? Enter the Null Object Pattern, a simple yet effective solution for avoiding unnecessary checks while keeping your code easy to read and maintain.

Let me show you how it works.

Read more

PHP Annotations: Streamlining Your Code with Attributes

Jan 9, 2025 #PHP

Let’s rewind to 2020. PHP 8.0 lands, and developers get their hands on something they’d been craving for years: attributes. Think of them as PHP’s version of annotations—a way to embed metadata directly into your code. No more juggling bulky docblocks or fragile YAML files. Now you can keep things simple and readable.

Read more

A Comprehensive Guide to Async/Await in JavaScript

Jun 7, 2024 #Javascript#Promises

Asynchronous programming in JavaScript can be challenging, but async/await makes it more manageable and readable. Introduced in ECMAScript 2017, async/await allows you to write asynchronous code that looks like synchronous code, simplifying the process of handling asynchronous operations.

Read more

When to Use Traits in PHP

Jun 4, 2024 #PHP#Traits

Traits are a powerful feature in PHP, introduced in PHP 5.4, that allows developers to reuse code across different classes independently of class hierarchies. They serve as a mechanism for horizontal code reuse, helping to avoid issues related to multiple inheritance and allowing for a more modular and maintainable codebase. This blog article will explore the ideal scenarios for using traits, provide examples, and offer best practices, including how to organize traits within a project.

Read more

Mastering JavaScript Promises: A Comprehensive Guide

Jun 3, 2024 #Javascript#Promises

JavaScript promises are a powerful tool for managing asynchronous operations. They provide a cleaner, more readable way to handle asynchronous code compared to traditional callback functions. In this article, we will explore what promises are, how to use them, and best practices to follow.

Read more

How to add a .gitignore file to your Git repository

May 24, 2024 #Git

When working with Git, managing which files should and shouldn't be tracked is crucial for maintaining a clean and efficient repository. This is where the .gitignore file comes in. This article will provide a comprehensive guide on how to create and use a .gitignore file in your Git project.

Read more

How to add SSR to an InertiaJS Laravel project

Jan 24, 2023 #Laravel#Forge#InertiaJS#SSR

In this post, I’m going to show you how I add Server-side rendering to this website.

Read more

Copyright 2025. All rights reserved