Items tagged development

Recently I had to investigate a strange bug that only happened on our pre-production environment. Code that was fine all through our other development and test environments was causing a white screen of death on the home page. Not good. We’re a big team, and we have quite a strict code review process, so in theory no code should get into the main branch unless it’s had at least two pairs of eyes on it, and nothing should get through to pre-production unless it's been tested in two other shared environments, plus the developer's local machine.
Writing helps to clarify your thoughts, and I should do more of it. I used to do it a lot, when I had more time on my own. Work, marriage and parenthood get in the way, but there isn't really an excuse - it's always possible to make time for something if you value it enough. You just have to stop spending time doing something else. The most difficult part is starting. Getting a first draft is an enormous step.
An email arrives from a client with a bug report. It's not critical and I'm busy working on something else. What I should say is "raise a ticket and we'll investigate in due course", but still it's a struggle to stop myself from jumping out of my current task and straight into it. Partly it's that I don't want to be the jobsworth who tells people to follow the process, and partly it's that I'm not good enough at saying no, but I end up being too helpful for my own good. If you get a reputation as someone who helps people, people will ask you for help first.
Automated testing is definitely a good thing. Nearly all development teams should do more of it. But it's still important for humans to test, because people are better than machines at lots of things, and they're more flexible. Having said that, testing is boring, and testers often forget that what they should be doing is this:
In case you didn't already know, Drush is great. It can massively speed up the Drupal development process. Here are some of the commands I use again and again, so I've got them all in one place for reference. *Run an install hook manually drush ev "module_load_include('install', 'mymodule');mymodule_install();" Clear the CSS & JS aggregation cache drush cc css+js Clear all caches drush cc all
There are so many useful shortcuts in most pieces of software, and you can usually customise them as well. When developing, I use Netbeans IDE, and it has a lot of good stuff, that I wish I'd known about a lot earlier. Here are some that I use all the time:
This is a collection of a bunch of dummy content files. A client needed a website with lots of file uploads, and wanted to test that all the file formats worked. So here is a whole load of lorem ipsum type files for Microsoft Word, Excel, Powerpoint, and a whole bunch of other common file formats. The source is on GitHub, and if you can think of any more file formats that might fit with these, please let me know.

Pages