Our Blog
Solutions. Made Simple.

Drupal: Two Steps Forward, One Step Back

The Drupal developers have a lovely habit of using the word “regression” in their version notes to politely refer to fixing bugs that were introduced in previous versions.   So where Linus Torvalds might famously record “I fixed this ****ing idiot’s code”, the more genteel Drupal community will record a phrase such as “Fixed regression in the link widget where help text does not show”.  It all boils down to the same thing though – going back to fix something that somebody just broke.

My question was, is this a case of “two steps forward, one step back”?  Fortunately I could see a simple way to quantify things.  All of the release notes are listed on pages starting from here:  https://www.drupal.org/project/drupal/releases  … so with a quick bit of command line coding, I was able to knock  together a few data trawls so that I could then count the number of times the phrase has been used in updates to the last three versions of Drupal – 8, 7 and 6.

The code for Drupal 6 was easy – there were 38 revisions posted for this major version, and the development team was very consistent about numbering them.  These few bash commands were all I needed to pull down the release notes and save all of the lines mentioning “regression” while filtering out the few that said “no known regressions”.

for start in {0..38}
do
curl -s "https://www.drupal.org/project/drupal/releases/6.$start" | grep regression | grep -v "no known regressions" >> drupal_6_regression_mentions
done

I will save the actual figures for the end of the article.

The code for Drupal 7 was very similar, except there were 57 revisions for that version:

for start in {0..57}
do
curl -s "https://www.drupal.org/project/drupal/releases/7.$start" | grep regression | grep -v "no known regressions" >> drupal_7_regression_mentions
done

For Drupal 8, the current version, they have moved the goalposts a bit – revision numbers now have major and minor parts, and scattered in amongst them are “dev”, “alpha”, “beta” and “rc” versions. In the interest of fairness I decided to ignore all of those. To do this, I looped across all of the pages of the Drupal 8 releases, created a list of all the links to release note pages that didn’t use those phrases in their names, and then looped across that list to pull down each page and then look for my keyword, “regression”. That resulted in a list of 38 separate revisions so far in Drupal 8, and my code looks like this:

for start in {0..4}
do
curl -s "https://www.drupal.org/project/drupal/releases?api_version%5B0%5D=7234&page=$start" | grep "/project/drupal/releases/" | egrep -v "(beta|alpha|rc|dev)" | sed -e "s:.*href=\"\([^\"]*\)\".*:\1:g" >> drupal_8_notes.tmp
done
sed -e 's#https://www.drupal.org##g' < drupal_8_notes.tmp | sort | uniq > drupal_8_notes
while read url
do
curl -s "https://www.drupal.org${url}" | grep regression | grep -v "no known regressions" >> drupal_8_regression_mentions
done < drupal_8_notes

So now for the fun part, the figures. I’ll lay them out in table form and then give a little commentary:

Drupal Version    Number of 
Revisions 
Number of
Regressions 
Ratio of
Regressions to Progressions 
6 38 5 7 and 1/2
7 57 37 1 and 1/2
8 39 17 2 and 1/2

The last figure gives the number of “steps forward” that are taken before each single step back, with the figures rounded to the nearest “half step” (or “stumble” as I prefer to think of them) .

So what do we see?  Well, Drupal 6 looks like it was really successful, with 38 steps forward and only 5 steps back.  Of course, those of us who used it in anger know this definitely was not the case (D6 was, in technical terms, a pig!), so presumably they simply did not use the term “regression” until late in its life.  Perhaps someone else would care to investigate further…

Drupal 7 was to all intents and purposes still a bit of a mess – with only 1 and 1/2 steps forward for each step back.  It certainly did sometimes feel like that at the time – we apply each of these patches to our clients’ sites as they arrive, and with the best will in the world Drupal is fundamentally a community-led project and there is not all that much real accountability.  Getting Drupal developers to agree on how something should be done is like herding cats.  So errors and contradictions do often slip through.  In essence, some of what you gain in the short term due to the flexibility and low cost of the Drupal platform you go on to lose in the longer term because of its greater maintenance requirements.  This harks back to my previous blog – I would still never recommend Drupal or Magento to small companies because their maintenance requirements are just too high.  If you compare these two systems with WordPress for instance, the update cycle and mechanism seems archaic.  Modern WordPress installations auto-update and they very rarely fail if they have been built on popular, standard plugins.  Magento and Drupal still require a lot of ongoing developer support.  While companies like SteamDesk are happy to make a living providing this, we really feel for the smaller clients who have been pushed down the Magento/Drupal route by inexperienced developers in the past when it really was not the best choice for their requirements.

Coming back to the story, we finish with Drupal 8, which certainly appears to have introduced a reasonable improvement over Drupal 7.  There are now 2 and 1/2 steps forward for each step back, which is still very close to the apocryphal “two steps forward, one step back” but it is still moving in the right direction.  So apparently things are currently looking up in the Drupal community, hooray!

Caveat:  the figures above are a bit silly really, because a new version is very rarely a “single step forward” (a new version usually includes multiple, sometimes even dozens of improvements), while what I am counting as a regression is typically a “single step backward”.  So the actual ration of regression to progress is going to be much lower than I’ve shown above.  But that wouldn’t have made for such a fun story!