RRULE will make you hate calendars

Calendars are not the simplest applications by far.  There are many different features, lots of different implementations, multitude of standards (just a few being RFC 2445, which was obsoleted by RFC 5545, which was updated by RFC 5546, RFC 6868, RFC 7529, RFC 7953, RFC 7986) , and plenty of other complexities.

One area in particular, which is cryptic and annoying is RRULE, or recurrence rule.  You know, those events that don’t just happen once, but repeat once in a while.  Starting with the most basic rules of repeating every day, and going into complete insanity of repeating every other Thursday, starting from next week and until the beginning of next year every other month, RRULEs can drive even the calmest of people completely insane.  Here’s a screenshot to give you an idea.

Here are a couple of tools that we found useful, when implementing and testing this functionality:

  • rrule.js – a JavaScript library for working with RRULEs.  See the demo here.
  • recurr – a PHP library for working with RRULEs.

ninja-mutex – Mutex implementation for PHP

ninja-mutex is a simple to use mutex implementation for php. It supports different adapters (flock, memcache, mysql, redis, …) so you can setup it as you wish. All adapters (if set up properly) can be used in multi server environment – in other words lock is shared between web servers.

Easily optimize images using PHP

Via this blog post I came across this PHP image optimization library, which somewhat reminds me of this blog post from a couple of years ago.  As good as ImageMagick is, it takes time and effort to find all the right options.  With Spatie Image Optimizer you have an almost out of the box solution for optimizing images in a variety of formats.

This package can optimize PNGs, JPGs, SVGs and GIFs by running them through a chain of various image optimization tools.

object-graph – visualizing PHP objects

As you might know, I am a big fan of GraphViz.  I’ve used numerous times for visualizing different parts of the project code and dependencies (see here and here for example).

Today I came across a way to visualize PHP objects (not just classes) – object-graph library by Sebastian Bergmann, and I think it’s pretty cool.  If you are working on top of a PHP framework like CakePHP and Laravel, I suspect your object diagrams will get quite huge, but for more modular applications and libraries it should do the job just fine.

Clockwork – PHP developer tools integration for Google Chrome

Clockwork is a PHP library and a Google Chrome extension that work together to provide a new tab in the Google Chrome DevTools for PHP developers.  The tab contains all sorts of useful information such as variable values, application tracing, timing, and more.