Why choosing when you can have both?

Pull Requests

A Pull Request is the moment where you ask your peers to review and check out your code changes.

Pull Requests aren’t the best tool for everything

Who moved my cheese?🧀

The new functional language. Fully interoperability with PHP 🚀


The Phel Language


Why Phel?

How to escape the mocking hell

What happens when you mock something?

In a unit test, mock objects can simulate the behavior of complex, real objects and are therefore useful when it is impractical or impossible to incorporate a real object into a unit test.

Another way of sharing quick suggestions with your team

Imagine this situation

What possibilities are there apart from just comments in a PR?

The spread operator to the rescue.

Flattening a one-level array

$lists = [
[1, 2],
[3, 4],
[5, 6],
$merged = [];foreach($lists as $list) {
$merged = array_merge($merged, $list);
// $merged === [1, 2, 3, 4, 5, 6];
$lists = [
[1, 2],
[3, 4],
[5, 6],
$merged = array_merge(...$lists);
// === [1, 2, 3, 4, 5, 6];

Unpacking an assoc-array

$lists = […

An alternative to the missing feature in PHP: Generics

The perfect combination

We will use this snipped for our examples

* @psalm-immutable
final class Customer
// Using PHP 8 constructor property promotion
public function __construct(
public string $name,
) {}
// We create a list of 6 customers
$customers = array_map(
fn(int $i): Customer => new Customer("name-{$i}"),
range(1, 6)

How to focus and have self-discipline

The Pilsum Lighthouse, on Germany’s North Sea coast.

If we get rewarded only for results and not for processes, we will become pretty miserable.

How to write proper unit tests to already written code.

These tests are also known as Characterization tests.

How to start?


Jose Maria Valera Reales

Aka: Chema. I love what I do: software, music, and sport, but here I write mostly about software.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store