For mefeedia, we’re getting better and better at developing practices. I always had a way to print out queries being performed on any page, today I added a way to have an EXPLAIN statement run on those queries and output a warning if something looks funky (using filesort, no index used, …). That way, I can browse through the site and very easily see if there are potentially bad queries on a specific page, like in the picture below.
In the example below, there’s a query that uses a filesort, which is often a bad thing, so I go to PHPMyAdmin to do an explain on that query, and see if I can improve that query by adding an index or something.
Other development practices that are really helping that we use are (clearly) using versioning, a bug database and a fairly clean internal API. For our internal API, we also run PHPDoc to generate automatic documentation, which is really easy when trying to find if there’s a function that does what you want and for refactoring stuff.
Another pretty cool thing we got is a script that does simple counts of rows in the database. It’s on an external server (a shared host), and just pings the db every hour, gets a list of tables and logs their rowcounts. It’s a great way of adding stats, I’m surprised I didn’t find an open source solution to do that. We added graphs to make it even nicer. The only regret I have is that I didn’t start doing this from day 1.
The only things we feel we are really missing now is a way to do a 1-click go-to-beta and a 1-click go-live of changes. That’ll help us roll stuff out more regularly. We’re working on that.
