A while back we found an odd bug that only occurred with some inputs while doing calculations that involved decimals. When we performed a series of multiplications and additions and then compared our calculation with an expected result (using
==) they didn’t show up as equal.
In this article, we’ll discuss why this is and what we can do to prevent it.Read More
In the 7.x branch, Laravel added an
artisan test command which acts as a wrapper for PHPUnit. It provides information about the tests as they’re running and stops on the first failure unlike PHPUnit’s default behavior of running all the tests and showing all the failures. It also provides a nice output when the tests fail.
The following article will provide a brief overview of how we can use it and quickly compare it to
Bootstrap is a good system for getting an application’s layout started and it comes with lots of helpful user interface elements that we can use in our application. The downside, is there tends to be a lot of duplication in our source code to support these elements. Thankfully, Laravel added components in the 7.x branch which will allow us to reduce that duplication.Read More
Laravel provides a built-in feature that allows us to flag database rows as deleted without actually deleting them from the database. This article discusses how we can get started using them.Read More
The other day I ran into an interesting problem with an SQL query, I needed to create the
count() of all items and the
count() of a specific set of items. Normally, I would use subqueries but there was so much data that the subqueries took a minute and that was not acceptable to our client (I wrote the query originally with a small amount of data and after 4 years the performance of it was horrible).
Read on to see how to fix this.Read More
The other day we needed to restore a single table from a database for our testing environment. Thankfully, MySQL provides an easy solution to this problem.Read More
subscribe via RSS