Categoria: Tecnologia

  • Introducing value objects in PHP

    Introducing value objects in PHP Domain-Driven Design (DDD) is a software design philosophy with one crucial concept: the structure and language of software code (class names, class methods, class variables) should match the business domain. To attend to this concept, DDD presents Value Objects, which, in practice, represents an object similar to a primitive type […]

  • PHP 8.1: more on new in initializers

    I could not agree more with Brent when he says concerning the "new in initializers"[1] feature: PHP 8.1 adds a feature that might seem like a small detail, but one that I think will have a significant day-by-day impact on many people. When I see this new feature, lots of places that use Dependency Injection[3] […]

  • PHP Memory Usage and Performance Improvements Tips

    Memory usage and performance improvements make everybody happier, from end-user to cloud and infrastructure engineers. And they are all right, and this is an optimization that we should try to achieve as much as possible. I am also keeping this page for a reference to my future self because we cannot rely too much on […]

  • PostgreSQL – pg_upgrade from 10 to 12

    I have some PostgreSQL databases running pretty well but we need to keep our software updated. This is a mandatory practice for a high-quality service. Those servers are running version 10 and they need to be upgraded to version 12. I have used pg_dump / pg_restore strategy for a long time, but this time I […]

  • PHP Test Coverage Using Bitbucket and Codacy

    Wikipedia: In computer science, code coverage is a measure used to describe the degree to which the source code of a program is tested by a particular test suite. A program with high code coverage has been more thoroughly tested and has a lower chance of containing software bugs than a program with low code […]

  • Environment Variables in Angular

    Need to use different values depending on the environment you’re in? If you’re building an app that needs to use API host URLs depending on the environment, you may do it easily in Angular using the environmen.ts file. We are considering Angular 8+ apps for this article. Angular CLI projects already use a production environment […]

  • High-performance Fibonacci numbers generator in PHP

    Based on the article High-performance Fibonacci numbers generator in Go I wrote my version using PHP. Despite the differences between PHP and Go architectures reflected in response times, we can face a huge performance difference when using an optimized function. We may notice that we can have the same results, but the quality of the […]

  • Um convincente e-mail fraudulento do Bitcoin extorquindo você

    Esta publicação foi originalmente publicada em The convincing Bitcoin scam e-mail extorting you, por Mattias Geniar, em inglês. Mas o alerta vale ser traduzido para o português, tendo você assistido ou não do que a acusação se trata. Mais uma vez vemos a criatividade de aplicadores de golpe. Fique atento. Fique alerta. A internet é […]

  • Codility – MissingInteger

    I scored 100% in #php on @Codility! https://codility.com/demo/take-sample-test/missing_integer/ Training ticket Session ID: training5FZX3Y-S7H Time limit: 120 min. Status: closed Created on: 2016-01-17 05:31 UTC Started on: 2016-01-17 05:31 UTC Finished on: 2016-01-17 05:35 UTC

  • Codility – TapeEquilibrium

    I scored 100% in #php on @Codility! https://codility.com/demo/take-sample-test/tape_equilibrium/ Training ticket (real time – 1 hour) Session ID: trainingK8ND7B-7TN Time limit: 120 min. Status: closed Created on: 2016-01-17 05:21 UTC Started on: 2016-01-17 05:21 UTC Finished on: 2016-01-17 05:22 UTC