Tag: PHP

Reducing packet count to Statsd using Mediawiki

Recently I have been spending lots of time looking at the Wikimedia graphite set-up due to working on Grafana dashboards. In exchange for what some people had been doing for me I decided to take a quick look down the list of open Graphite tickets and found T116031. Sometimes it is great when such a small…

By addshore December 17, 2015 1

MediaWiki CRAP – The worst of it

I don’t mean Mediawiki is crap! The Change Risk Anti-Patterns (CRAP) Index is calculated based on the cyclomatic complexity and code coverage of a unit of code. Complex code and untested code will have a higher CRAP index compared with simple well tested code. Over the last 2 years I have been tracking the CRAP index…

By addshore November 21, 2015 0

Misled by PHPUnit at() method

So it turns out the at() method doesn’t quite do what I had initially thought…. I have recently been working on some tests for the new Newsletter extension for Mediawiki, specifically to test the NewslettterTablePager class. This thing extends the TablePager class in Mediawiki which is designed to make displaying information from a database table on…

By addshore August 29, 2015 6

The importance of a strict comparison

Now if you have ever come across issues caused by non strict comparisons before then this is going to seem like a piece of cake, but remember, everyone makes mistakes. Strict equality compares two values for equality where the values must also be the same type. Non strict or loose equality compares values while not caring…

By addshore April 2, 2015 1