Skip to content

Posts

Notes and tutorials on Laravel, PHP, electronics and whatever I'm building.

Some posts are meant to be read in order: browse the series.

Without evals, every change is a guess

Why an AI agent needs evals before its next prompt or model change, what makes an agent harder to evaluate than a single LLM call, and the task, run and grade loop every eval is built on.

Learning PHP 8.1 Fibers using Tests

PHP 8.1 introduced the new Fiber class (see the proposed RFC here https://wiki.php.net/rfc/fiber), which allows running coroutines inside your script, i.e. two functions executing simultaneously

Database-oriented Strategy configuration

This article describes a way of implementing Strategy design pattern using a database-based runtime configuration. The approach allows to dynamically (re)configure class behavior without requiring code-based rearrangements.

Refactor long methods to method classes

Classes with a lot of lines of code are generally bad. Too many responsibilities, low cohesion, or both. However, sometimes it is not possible to make functions smaller. Reasons could be various. What can be done in this circumstance?