PHP Internals Book provides some insight into how PHP works internally. Â It currently covers PHP 5, with PHP 7 update coming soon. Â If you are eager to help, the book is available under Creative Commons on GitHub.
Category: Technology
I work in technology sector. And I do round a clock, not only from 9 to 5. It is my bread and butter, it is my hobby, it is the fascination of my life. And with the current rate of change particular in information technology (IT), there is always something new to learn, to try, to talk about. I often post news, thoughts, and reviews. And when I do, this is the category I use.
Async PHP Requests & Reactive Responses with PHP-FPM
“Async PHP Requests & Reactive Responses with PHP-FPM” is talk by Holger Woltersdorf, in which he shares the approaches he tried for implementing asynchronous requests in PHP, and how he arrived at hollodotme/fast-cgi-client, which is a PHP fast CGI client for sending requests (a)synchronously to PHP-FPM.
Rate Limiting with NGINX and NGINX Plus
Nginx blog (which, if you work with Nginx in any capacity, you should subscribe to) has an excellent guide to rate limiting. Â The article explains rate limiting from the basics, through bursts, all the way to more advanced examples, with multiple rate limits for the same location.
LINGsCARS.com – website of the day
LINGsCARS.com deserves some kind of title and reward. Â I’m giving it a website of the day award, as I’m still stunned for words.
On one hand, it serves as a painful reminder of how the web used to be back in the 90’s. Â It got everything from psychedelic background and auto-played music to animated GIFs and mouse hover effects.
On the other hand, it does stand out from all pastel colored material designed websites of today. Â Obviously, a lot of work went into building this thing and … somehow … strangely … it works.
Now, please excuse me while I wipe my bloody tears…
P.S.: Yeah it also took me a while to actually prepare that screenshot. Â Full-page image was too large. Â Cropping it down significantly brought it down to just under 5 MBytes, after which TinyPNG compressed it to just 1.4 MBytes.
Git Commit Good Practice
Open Stack wiki has an excellent guide on how to create good commits. Â In a few places it is too specific to Open Stack development practices, but overall it’s one of the best guides I’ve seen for any project using git.
It is basically split into two sections. Â One on how to decide which code goes into the git commit, and the other is what to include in the git commit message to make it useful.
The first part is simpler:
The cardinal rule for creating good commits is to ensure there is only one “logical change” per commit. There are many reasons why this is an important rule:
- The smaller the amount of code being changed, the quicker & easier it is to review & identify potential flaws.
- If a change is found to be flawed later, it may be necessary to revert the broken commit. This is much easier to do if there are not other unrelated code changes entangled with the original commit.
- When troubleshooting problems using Git’s bisect capability, small well defined changes will aid in isolating exactly where the code problem was introduced.
- When browsing history using Git annotate/blame, small well defined changes also aid in isolating exactly where & why a piece of code came from.
With these things to avoid:
- Mixing whitespace changes with functional code changes.
- Mixing two unrelated functional changes.
- Sending large new features in a single giant commit.
The second part is slightly more detailed. Â Here’s the information that should be included in the commit message, generally speaking (abbreviated quote):
As important as the content of the change, is the content of the commit message describing it. When writing a commit message there are some important things to remember
- Do not assume the reviewer understands what the original problem was.
- Do not assume the reviewer has access to external web services/site.
- Do not assume the code is self-evident/self-documenting.
- Describe why a change is being made.
- Read the commit message to see if it hints at improved code structure.
- Ensure sufficient information to decide whether to review.
- The first commit line is the most important.
- Describe any limitations of the current code.
- Do not include patch set-specific comments.
In other words, if you rebase your change please don’t add “Patch set 2: rebased” to your commit message. That isn’t going to be relevant once your change has merged. Please do make a note of that in Gerrit as a comment on your change, however. It helps reviewers know what changed between patch sets. This also applies to comments such as “Added unit tests”, “Fixed localization problems”, or any other such patch set to patch set changes that don’t affect the overall intent of your commit.
Read the whole thing for more details, examples of good and bad practices, and more specific instructions on the spacing, line length, and more.
And if you need more convincing or a different explanation, then Google “git commit best practices” or simply check out some of these resources:
- Commit Often, Perfect Later, Publish Once: Git Best Practices
- How to Write a Git Commit Message
- StackOverflow : git commit best practices
- 5 Useful Tips For A Better Commit Message
- Git Commit Best Practices
- The Art of the Commit


