Our office Slack bot for tea and coffee

Who’s turn it was to make the tea was becoming a contentious issue in the office.. and so BevBot was created. BevBot, short for Beverage Bot, lets the team opt-in to a tea or coffee – with the person making the drinks chosen at random at the end of the time limit.

Using coderstephen/slack-client as a base, and building a generic bot framework on top (that I hope to open source in the coming months), BevBot can accept requests for tea or coffee, and manage the round of orders.

The general flow looks like this:
BevBot example

We’ve even plotted the results in ChartBlocks, so we can see who’s drinking the most.

Parsing CIF files to get train schedule data in PHP

I’ve had some fun looking at what data you can get via the National Rail Open Data scheme, and was really impressed by the ActiveMQ implementation they’ve got for Real Time Train Movement Messages!

The messages National Rail send allow you to plot trains to stations, or even along route, but the message only contains station IDs or train IDs – which is kinda boring. I like to visualise the data, on a map for example.

To get the station name and location for a particular train message one has to access an entirely different database, from another provider. Along comes ATOC with their CIF files, which look very scary compared to ActiveMQ.

To cut a long story as short as I can, the CIF files contain a lot of information (400MB+ files), using string length and new lines to split up the data. You can sign up to download the files on the ATOC website, and the specification for the files is available here.

Why the blog post? Well, I needed a way to parse these files to populate a Mongo database and wanted to promote the PHP CIF parser I’ve started work on: https://github.com/rb-cohen/php-cif-parser

 

Sql Server Reporting Services SOAP API methods

We’re (trying) to use the SSRS SOAP API at work with a PHP application. We found an open source SDK over at codeplex but soon found it to be badly written, outdated and broken!! We were forced to write our own…

It’s been an interesting process, and we hope to release our library as an Open Source SDK as soon as possible but in the mean time, if you need the documentation and are struggling to find it on MSDN (like we did), its here: http://msdn.microsoft.com/en-us/library/reportservice2010.reportingservice2010.aspx

Hold out for our release, hopefully before the end of March 2011. If you’re interested in more information just leave a comment below!

P.S. That is the 2010 reference, which is what we’ll be coding for (i.e. ReportService2010.asmx?wsdl)

PHP Kent

We’ve been struggling to fill a PHP development position at work and noticed a lack of community for PHP developers in the Kent area. There is PHP London and thats great, we head up there every month, but perhaps we could arrange an additional meetup closer to home!

For now we just want to see if we can find enough members (say 10+) to warrant starting the group, but as an additional service to agencies in Kent, we’ve set up a Kent PHP Job board, that agencies can post available positions to for free! We’ll be vetting submissions to keep the jobs relevant!