Reading someone else's code can be quite confusing. Hours can go on issues that should have been fixed in minutes. In this article, I would like to share some advice on how to write code that will be easier to understand and maintain.
Working with logs is a very significant part of software development. Logging means writing messages to a file (or console) describing what is happening in the application. It allows monitoring of complex systems and step by step description of its behavior.
Laravel is the most popular PHP framework for building web applications. It provides simple solutions for common problems, like secure database querying, routing, console commands, ORM or input validation. It is a very solid choice if you wish to follow test-driven development process.
Test-driven development is a concept of writing application code after writing tests. It requires from a developer to first define what is the expected outcome before starting the implementation.
Bitmasks are a very useful way to compress multiple boolean flags in a single variable. It can reduce memory usage and operations on bits are basically as fast as they can get. In practice, any time you want to have multiple flags describing something in your application, a bitmask could be the right tool for the job.