Vai al contenuto

Post

Appunti e tutorial su Laravel, PHP, elettronica e su quello che sto costruendo.

Alcuni post vanno letti in ordine: sfoglia le serie.

Senza eval, ogni modifica è una scommessa

Perché un agente AI ha bisogno di eval prima della prossima modifica al prompt o al modello, che cosa rende un agente più difficile da valutare di una singola chiamata a un LLM e il ciclo di task, esecuzione e valutazione su cui si costruisce ogni eval.

EN

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

EN

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.

EN

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?