PHP 7 introduced two powerful operators that significantly simplify common coding tasks: the null coalescing operator (??) and the spaceship operator (<=>). These operators provide cleaner, more concise alternatives to verbose conditional statements, improving code readability and efficiency. The Null Coalescing Operator (??) The null coalescing operator (??) is a […]
Simple logging system for Angular
It can often be useful to have a centralized point where to keep an eye on the events that occur on our site. Today we’ll create a simple logging system for Angular, to manage everything in one place. To start, we create the enum that takes care of ordering the […]
“Maybe you were looking for…” 404 page
Sometimes we see a useful tip when we search for a command or a page and we find a 404 “Not found” page or a “command not found” if we are from the command line.This behavior is given by an algorithm named: “Levenshtein distance algorithm”.This particular algorithm allows us to […]
The JSON format, this unknown
It has happened to me many times that issues discussed and re-discussed a million times, came back into vogue as doubts, perhaps trivial but always dangerous, being able to give rise to unknown outputs. I’m talking about the very useful JSON (JavaScript Object Notation) format, often useful in case of […]
Angular good code with some advices
Sometimes it can be convenient to stop and think about how to improve the existing one and write Angular good code, rather than go ahead without thinking.Below I have collected some small rules that I try to constantly follow and which I hope will be useful to you too. 1) […]