Music from Our Tube: Rocket Juice for Peace

Before Atoms for Peace released AMOK (but after Thom Yorke, Flea et all joined forces) there was a one-off album by Rocket Juice and the Moon, a group around Damon Albarn (Blur), Flea and the great Tony Allen (Fela Kuti’s drummer/ percussionist and producer). And below’s Follow-Fashion for example, sounds like the nonidentical twin of Atom for Peace’s Before your very Eyes, doesn’t it?

Rocket Juice and the Moon - Follow-Fashion (feat. Fatoumata Diawara & M.anifest)

Autoptimize: why are .php,jquery excluded from JS optimization?

If you see .php,jquery added to the JS optimization exclusion list and wonder why that is the case; these are added by WP Spamshield to ensure optimal functioning of the that plugin and when you remove them they will be re-added automatically by WP Spamshield.
I am currently exchanging information with Scott (WP Spamshield’s developer) to potentially improve this (as jquery causes all JS with jquery to be excluded from optimization) which is sub-optimal from a performance point-of-view.
If you know what you are doing (i.e. if you are willing to do the trial-and-error dance) you can trick WP Spamshield into leaving the JS optimization exclusion list as is by entering:

.php,jquery.js

which reduces the exclusion to just jquery.js (and .php, but that doesn’t really matter) which based on a (too) quick (a) test could enough for WP Spamshield to function.
.php,jquery.IknowwhatImdoing

which invalidates the exclusion of any jquery (which might work with WP Spamshield if you ‘force JS in head’).
If you do decide to trick WP Spamshield this way, this is entirely and only your responsibility and you should test this thoroughly. Don’t ask Scott (or me) for support for such ugly hacks 😉

Mijn m.deredactie.be-alternatief nu ook met Sporza

futttas-sporzaHet was exact een jaar geleden dat ik nog iets over mijn m.deredactie.be-alternatief schreef en het was nog langer geleden dat ik er aan gesleuteld had. Omdat ik tussen mijn echte werk en mijn WordPress plugin spielereien nog wat tijd had, heb ik één en ander verbeterd;

  1. Je kunt nu ook Sporza-nieuws lezen
  2. Op PHP-installaties zonder APC-support (apc_store/ apc_fetch) wordt de cache nu op disk bijgehouden
  3. Op PHP-installaties zonder CURL-support wordt nu teruggevallen op file_get_contents
  4. Een reeks kleinere UI-verbeteringen en fixes voor PHP-notices
  5. Getest op PHP 5.2, 5.5, 7.0 en HHVM (op openshift)

De (crappy) sourcecode staat nog steeds op GitHub, bug-meldingen of pull-requests zijn daar zeer welkom 🙂

WordPress Plugin releases: who needs a big bang anyway?

On January 1st Mika Epstein blogged about releasing/ updating software for large projects, advising against releasing software during the festive season;

With the increasing provenance of online stories and websites for everyone, pushing a change when we know that the majority of the world is celebrating something between Nov 15th and January 15th is reckless. […] picture what happens when an update has a small bug that takes down […] 1/1000 of 1/4th of the entire Internet. […] It may be time to call a year end moratorium on updates to our systems and apps.

Working in corporate IT myself I could only agree. In theory that is, because a couple of days before I had purposely pushed out a major Autoptimize release in the last week of December, on a Saturday. Why? While inching closer to Autoptimize 2.0’s release, I was becoming worried of the impact some of the bigger changes could have. Impact as in “what if this breaks half of the sites AO is installed on“. One way to limit such impact, I thought, is by releasing on a moment people are bound to be less busy with their websites. So by releasing on Boxing Day, I assumed less people were bound to see & install the update on day 0, limiting the damage a major bug could do.
Now I do agree this approach is very clumsy, but being able to limit the amount of people seeing/ installing a plugin (or theme) update on day 0 could help prevent disasters such as the ones that plagued for example Yoast SEO. The idea of “throttled releases” is not new, it already exists for Android apps, with Google allowing developers to flag an update for a “staged rollout:

You can release an app update to production using a staged roll-out, where you release an app update to a percentage of your users and increase the percentage over time. New and existing users are eligible to receive updates from staged roll-outs. […] During a staged roll-out, it’s a good idea to closely monitor crash reports and user feedback.

Pushing an update to a percentage of users and monitoring feedback, allowing you to catch problems without the risk of impacting your entire install base? I want that for my WordPress plugins! So how could we get that to work?
What if an extra header were included in readme.txt, e.g. an optional “throttled release” flag. With that flag set, the percentage of people seeing the update in their wp-admin screens would be low on day one and increasing every day, for example;

Day after release% of people seeing release in dashboard
day 05%
day 110%
day 220%
day 340%
day 480%
day 5100%

This could be accomplished by having https://api.wordpress.org/plugins/update-check/ (against which WordPress installs check for updates) “lie” about updates being available if the “throttled release”-flag is set by e.g. simply introducing randomness in plugins/update-check/;

$showupdate = false;
$randomness = mt_rand(1,40);
if ( ($throttledrelease === true) && ($datenow === $pluginreleasedate) && ($randomness < 2) ) {
    $showupdate = true;
    }

(The “magic” in above code is in the random value between 1 and 40 which has a 1 in 40 (or 2.5%) chance of being smaller than 2 (i.e. 1), so in 2.5% of requests $showupdate would be true. This translates to 5% of requesting WordPress instances per day, as there are checks for updates every 12h, so 2 per day. Obviously on $pluginreleasedate+1d the condition would change, with the random value having to be smaller than 3 (so being either 1 or 2, i.e. approx. 5% of cases X2 =10%), on +2d smaller than 5 (1, 2, 3 or 4 = 10% X 2 = 20%) and so on. This randomness-based approach allows for plugins/update-check not having to keep tabs of how many people saw/ did not see the update at a given date.)
This obviously is just a simplistic idea that does not take into account any of the smart stuff undoubtedly going on in plugins/update-check/ (such as caching, most likely), but I’m pretty sure the wordpress.org-people who are responsible for that code could implement something along these lines. And I do think this would very much be worth the trouble, as It would allow Yoast & other major plugins developers to release without the fear of breaking hundreds-of-thousands WordPress sites within a couple of hours. And I would not have to release on Boxing Day, leaving me and the users of my plugins the time to digest that Christmas-dinner peacefully. What’s not to like?
Blogpost updated (code example + explanation) on 13/01/2016 to reflect the fact that a WordPress instance checks for updates every 12 hours, which impacts the randomness.

Music from Our Tube: The Arcs – Cold Companion

In September 2015 The Black Keys’ Dan Auerbach introduced The Arcs, his new side project to the world with a first album. Cold Companion, played live in the KCRW studio’s in the video below, is a haunting Southern-roots-rock (think Los Lobos, it’s no coincidence The Arcs released a 2nd album with David Hidalgo & Dr. John already) drenched track.

Crunching 2015’s numbers

So this was 2015 in numbers:

  1. blog;
  2. OptimizingMattersAvatarMy WordPress plugins:
    • wp-youtube-lyte: pushed out 3 minor and 1 major release, getting 40264 downloads pushing the total to 250545 and having +10000 active installs
    • wp-donottrack: no releases for this one (except for some small readme.txt changes),
      downloaded 2355 times bringing the total to 14364 and +2000 active installs.
    • autoptimize: 2 minor and 1 major release, downloaded 265299 times this year, bringing the total to 506930 and +100000 active installs

That was 2015. For 2016 my main goal is to work on Optimizing Matters.