Mark Baker

Mark Baker

Mark is Head of Design and Development at Innoved (Innovative Solutions for Education) Learning, based in Wigan; a company which (coincidentally) shares offices with his favourite Rugby League team, the 2013 Superleague and Challenge Cup winners, and which occasionally gets him free tickets to attend Warriors games.

He has been working in the computer software industry since before was registered as a domain name, before the term “cyberspace” was first used in fiction, when Linus Torvalds and Rasmus Lerdorf were still at high school, and Mrs. Zuckerberg had yet to give birth to a bouncing baby social network enabler; and has been developing for the Web in a variety of languages since the days when the Tim Berners-Lee’s creation comprised less than 1,000 sites.

Over those years, he has contributed to a number of open source projects: some still extant, others lost to history, including a minor submission to PHP’s SPL. Currently he is coordinator and lead developer for the PHPExcel library, and a coordinator and developer on the PHPOffice library suite (PHPWord, PHPPresentation, PHPProject and PHPVisio). Most recently, he has been working on new datastructures such as Tries, Quadtrees and Matrices; hoping that he’ll be able to get them included in SPL.

His particular interests include PHP integration with office suites, Textual analysis, Geodata and geographic information systems, and “big data” and data analysis.


Talk: A Functional Guide to Cat Herding with PHP Generators

When working with arrays in PHP, three of the most useful functions available to us are array_map(), array_filter() and array_reduce(), which allow us to walk an array and manipulate the value of array elements, select a subset of values from an array, or reduce an array to a single value; all using a callback function to determine exactly what logic should be applied. The use of the callback makes them extremely flexible, and these functions can be particularly powerful, especially when combined (or chained) together.

However, these functions only work with standard PHP arrays; so if we are using Generators as a data source instead of an array, then we can’t take advantage of the functionality that they provide. Fortunately, it’s very easy to emulate that functionality and apply it to Generators (and also to other Traversable objects like SPL Iterators), giving us access to all of the flexibility and power that mapping, filtering and reducing can offer, and with all the benefits that Generators can offer our code.

So how do we go about implementing filter(), map() and reduce() functions for our Generators? How do we use those functions in our applications? Mark will be answering those two questions, and explaining how he keeps track of his cats armed only with a GPS Tracker, PHP Generators, and filter/map/reduce.

« Back to the schedule