Book: The Pragmatic Programmer

In terms of purely technical, I would say Code Complete has done better. However, this book is great at the point that it’s really practical and drives software engineers not just focus on technical parts. In addition, you need to understand the project itself, its requirements, how to communicate with other engineers as well as customers.

Still worth to give it a read! I am going to list out what caught me up most.

Continue reading “Book: The Pragmatic Programmer”

My first experience with E2E: Jest and Puppeteer

I have heard a lot of E2E tests and how important they are to make products, especially the front-end side, more robust. However, I did not have any chance to work with them.

And just in time, when working in Edit Flow, there was a strange issue that E2E tests failed, then suddenly worked, and then failed. I worked on it and learned a few interesting things.

Continue reading “My first experience with E2E: Jest and Puppeteer”

First Experience with CI: GitHub Actions vs Travis CI vs CircleCI

I did not have any experience with CI until recently. The first task was quite easy when I need to configure the auto-deploy process from GitHub to a site on VIP. It was pretty straightforward as the most complicated task (script for CI) was created already.

The second task was to convert current CI tests from Travis to GitHub Actions (GHA), I have worked on Edit Flow, which is an over-10-year-old plugin. A challenge for me is that tests on Travis all failed.

Continue reading “First Experience with CI: GitHub Actions vs Travis CI vs CircleCI”

WhiteHat Security Trainings

Due to the requirement in my department (VIP/Automattic), I’ve had a chance to work through a few security training courses on whitehatsec.com. This post is more a concise summary for what I’ve got from them.

These are the courses I’ve finished:

  • OWASP Top Ten for Developers
  • Building Secure JavaScript Applications
  • Defensive Enterprise Remediation Series
  • Integrating Security Throughout the SDLC
  • Threat Modeling

The first three courses are more practical for developers with exploitation examples and solutions. The last two ones are more about procedure, strategy, and planning.

Continue reading “WhiteHat Security Trainings”

PHP 8.0: Non-strict Comparisons for a String and a Number

Non-strict comparisons in PHP are always not easy to work with, and here is the last piece of this common issue:

  • PHP < 8.0: “one operand is a number and the other one is a numeric string, then the comparison is done numerically”.
  • PHP >= 8.0: “Non-strict comparisons between numbers and non-numeric strings now work by casting the number to string and comparing the strings.”
Continue reading “PHP 8.0: Non-strict Comparisons for a String and a Number”

Access Control Patterns

When debugging this issue in Co-Authors-Plus plugin for WordPress, I’ve read relevant classes, functions, and hooks regarding roles and capabilities in WordPress core. That triggers my curiosity to get to know more about how to design access control for applications.

This post is not really a summary or research. It’s more a note of mine for articles I’ve collected.

Continue reading “Access Control Patterns”

Cachegrind – Profiling Tool

I’ve recently worked in a code test project in my company A8C and it has a task to improve the performance of an existing code. The excellent part is that the test gives a suggestion to use cachegrind. I was really impressive how this tool can help profiling the code, visualize profiling results, and find out exactly places where performance issues happen.

Continue reading “Cachegrind – Profiling Tool”

Woo Viet 1.5.0 and OnePay Gateways

It has been one year since my previous release 1.4.5 for Woo Viet – WooCommerce for Vietnam. In this version 1.5.0, I focused on two main issues:

I tracked this version with the milestone feature in GitHub.

Continue reading “Woo Viet 1.5.0 and OnePay Gateways”