Tips to Speed up Your PHPunit Tests

I came across this collection of “Tips to Speed up Your PHPunit Tests“. Apart from the few usual ones, like disabling XDebug and using groups, I found a couple that linked to handy tools:

  • ParaTest – a PHPUnit extension that runs PHPUnit tests in parallel, significantly minimizing the test run time, and
  • PHPUnit Report – a tool that visualizes test run times, clearly showing which unit tests take the longest to run.

Very cool! Needs trying …

The HTML we never had

The HTML we never had” is an interesting look at some features of HTML, that weren’t implemented, but could have been easily done, and if they were, how different the modern web development would be.

I agree that the “src” attribute makes a lot of sense for tags other than just images and videos.

How To Secure A Linux Server

How To Secure A Linux Server is a nice collection of tips and tricks on improving the security of a Linux server. There are some well-known bits like SSH key authentication and firewall configuration, as well as some less common bits like multi-factor authentication and RAM disk for /tmp.

GitHub : Draft Pull Requests

Here are some exciting news from GitHub – an introduction of the Draft Pull Requests. I think this is a very welcome addition to GitHub features.

At work, we’ve been using a work around to solve the problem – a [WIP] prefix in the title of the pull request, which means that this is “Work In Progress” and the PR shouldn’t be merged.

While the prefix does help, it’s not as good as the new Draft Pull Requests. Somebody can still merge a [WIP] pull request by mistake. But with Draft Pull Requests, merging is blocked, until the developer indicates otherwise.

Great stuff!

UUIDs in MySQL are really not random

Jouke Waleson points out to an interesting fact about UUIDs in MySQL, which you might have missed in the documentation:

Warning: Although UUID() values are intended to be unique, they are not necessarily unguessable or unpredictable. If unpredictability is required, UUID values should be generated some other way.

Make a note!

Dotfile madness

Dotfile madness” is an excellent look at the problem of hidden data and configuration files that seem to be multiplying lately in the users’ home directories:

We are no longer in control of our home directories.
My own home directory contains 25 ordinary files and 144 hidden files. The dotfiles contain data that doesn’t belong to me: it belongs to the programmers whose programs decided to hijack the primary location designed as a storage for my personal files. I can’t place those dotfiles anywhere else and they will appear again if I try to delete them. All I can do is sit here knowing that in the darkness, behind the scenes, they are there. Waiting in silence. Some of those programmers decided to additionally place some normal files and directories in the same place. Those are clearly visible every time I execute ls in my home directory. 

While there is no easy centralized solution to this problem, as each application’s developer decides for himself, the article proposes a better way of doing things, reminding us about the XDG Base Directory Specification. This spec allows for a much finer control of where things go via the XDG_* environment variables.

Nice one!

gita – manage multiple git repositories

gita is a command line tool to manage multiple git repositories in parallel. You can easily check the status of several repositories, pull, push, commit, and so on.

This is a nice alternative to how we are handling things at work, with hundreds of repositories all around, but with a lot of overlap between them too. For us, a custom set of scripts works pretty well, with a combination of a powerful terminal emulator. Terminator, for example, provides handy functionality of split screen view, with grouped terminals, where multiple screens can be easily updated with a single command input.