spO0q

spO0q @spo0q

About: Practice what you preach

Location:
earth
Joined:
Dec 29, 2019

spO0q
articles - 126 total

You don't write tests for yourself

You write code, so you write tests You may have a different version: You write tests before you...

Learn More 5 3Jun 16

Hugo: partialCached or not?

The name is pretty self-explanatory. It caches the render of a given partial. While it can optimize...

Learn More 0 0May 25

Hugo: don't miss the best part

Hugo is a fantastic piece of software, IMHO. It's highly flexible and covers lots of great features,...

Learn More 2 2May 3

PHP: random failures in tests

Context: Tests have been working fine so far, and, suddenly, it seems to fail. Why? While it's...

Learn More 3 0Apr 1

Laravel: Do you need facades?

What are facades? Laravel comes with an internal mechanism called Facades, which provides...

Learn More 5 3Mar 13

PHP: errors to avoid with constructors

PHP developers love constructors 🫶. You only need to implement a method named __construct() in your...

Learn More 3 0Mar 4

Naming boolean parameters in your API

Developers love boolean parameters 😅. You may use names such as is_enabled, is_active, is_published,...

Learn More 2 0Feb 1

PHP Frameworks: hidden errors to avoid

Frameworks such as Symfony (7.2 at the time of writing) or Laravel are highly customizable and...

Learn More 4 0Dec 30 '24

PHP: Skip the boring part & press Tab!

Phpstorm is a fantastic IDE for PHP developers. While it's not free, you get pretty cool features,...

Learn More 1 0Dec 17 '24

PHP: Should I mock or should I go?

Mocks in short Mocks aim to test the behavior of real objects. They simulate...

Learn More 6 2Dec 6 '24

PHP: Practical ways to escape from the hell of Dates

Critical features for businesses often rely on dates, such as subscriptions, recurrent payments, or...

Learn More 4 0Nov 26 '24

PHP 8.4: It's a small change, but `$date = DateTimeImmutable::createFromTimestamp(1732420815)` instead of `$date = new DateTimeImmutable(); $date->setTimestamp(1732420815);` looks pretty cool! 🤩

A post by spO0q 🐒

Learn More 1 8Nov 24 '24

PHP: The Garbage Collector explained with simple words

The Garbage Collector (GC) is the internal memory management system in PHP, but there are some...

Learn More 4 0Nov 19 '24

PHP: monads

This post is heavily inspired by the tech talk by Gina Banyard at the "FORUM PHP 2024": ...

Learn More 0 0Nov 1 '24

Forum PHP 2024

Last week, I attended the "Forum PHP 2024." \0/ What is Forum PHP? Forum PHP 2024 is...

Learn More 5 0Oct 13 '24

Idempotency and API design

It's easy to build REST APIs that break the principle of idempotency. It happens when identical...

Learn More 1 0Oct 6 '24

PHP: Going multibytes

Multibyte characters can be tricky in programming. Warning mbstring is not enable by...

Learn More 4 0Aug 11 '24

PHP: Understanding Time Zones

Working with time zones can be tricky in programming. As PHP is meant for the web, the language...

Learn More 4 1Aug 4 '24

PHP: no, it's not possible

You may add "yet" to this title! Sometimes, things are what they are simply because nobody knows how...

Learn More 6 5Jul 13 '24

Performance: mistakes to avoid

It might seem obvious, but performance is a concern, and it's easy to make mistakes in that...

Learn More 3 0Jun 30 '24

PHP: yes, it's possible

Let's see if that's possible, then we'll see when to use it. Is is possible? Can...

Learn More 16 3Jun 22 '24

PHP 8.4: Property Hooks

PHP 8.4 is expected for this fall. Let's review the RFC "Property Hooks." Disclaimer...

Learn More 6 5Jun 6 '24

PHP: testing, "Attention please!"

Why bother with tests anyway? Unit tests encourages developers to write modular and...

Learn More 2 0May 1 '24

Security: Why the "XZ backdoor" is worrying

The recent attempt to compromise XZ, a library included in many Linux distributions out of the box,...

Learn More 2 1Apr 20 '24

Security: move your SSH keys to an encrypted location

The problem By default, the ssh-keygen command writes public/private keys in the ~/.ssh...

Learn More 2 0Apr 7 '24

PHP: basic loops vs. built-in array helpers vs. readability

PHP has built-in helpers to make all kinds of sorting and filtering with arrays, but is it always the...

Learn More 6 3Mar 3 '24

PHP: about empty()

The empty() helper is a built-in PHP function that is often used to check inputs. The problem is it...

Learn More 7 2Jan 27 '24

PHP: The first rule of the output buffering is you do not talk about the output buffering

PHP provides built-in helpers to manipulate the output buffering, but it can be tricky to debug. ...

Learn More 7 2Jan 21 '24

Python: the making of Secret Santa

Let's practice with a basic Secret Santa generator in Python. What is Secret...

Learn More 3 0Dec 25 '23

PHP 8.3: a new major in town

PHP 8.3 is available with cool features you might not know yet. You have now a built-in...

Learn More 5 0Dec 10 '23