Category: bug

Number().toFixed() Rounding Errors: Broken But Fixable

This article was originally published on David Kaye. I found a rounding bug in Number().toFixed() in every JavaScript environment I’ve tried (Chrome, Firefox, Internet Explorer, Brave, and Node.js). The fix is surprisingly simple. Read on… Warm Up I found this version of the rounding bug in toFixed() while revi...

Poka Yoke – Saving Projects with Hyper-Defensive Programming

When working in a medium to large team on the same codebase, it can sometimes become hard to understand each other’s code and how to use it. Various solutions exist to help with this. For example, you can agree to follow a set of coding standards to make the code more readable for each other, or use a framework t...

Contributing to PHP: How to Fix Bugs in the PHP Core

Previously, we covered contributing to PHP’s documentation. Now, we will be covering how to get involved with PHP’s core. To do this, we will be looking at the workflow for fixing a simple bug in the core. Since submitting new features to PHP has already been explained pretty well, we will not be covering that her...