Screen scraping JavaScript and AJAX heavy pages with Selenium

Screen scraping libraries are popular and easy to use in a variety of languages (such as Symfony Crawler in PHP, Scrapy in Python etc). As these libraries are HTML parsers and not browsers, they cannot render JavaScript. As web pages get more sophisticated, JavaScript has become a core part of the user experience; therefore the tools we use …

Continue reading

Binary search algorithm in PHP

Binary search is a search algorithm that is dramatically faster than PHP’s internal functions (such as array_search) when searching ordered data. How does it work? PHP’s internal function array_search is an example of a linear search; it will iterate over the entire data set until it finds a match working from front to back. This is great …

Continue reading

Improving Vagrant performance

Vagrant is a great tool to automate the set up of development environments utilising a virtual machine. Unfortunately, a virtual machine will rarely perform faster than a local install of your development environment. There are plenty of settings to tweak, and we have compiled some common ones that cause issues that are easily fixed. Increasing …

Continue reading