IE6 on VirtualBox - installing the network driver

One of the trial of web development is ensuring that your site works across a range of browsers.

Standards compliance is an important part of this - but testing cannot be avoided.

I work on Ubuntu, and use VirtualBox together with a licensed copy of Windows XP to test in a Windows environment, which also allows me to at least test the Sindows version of Safari.

Unfortunately Microsoft's decision to tie Internet Explorer closely with the operating system means that it isn't possible to install IE6 alongside IE7.

Read more

Number Crunching : Database vs OOP

For the last few months I've been working on a project that is part website and part data processing.

In theory the website is the bulk of the project, but in practice processing the data has taken a disproportionate amount of resources.

Data exchange with another organisation is always tricky - and in this case we have incoming data that doesn't conform to specification, business rules that change, and a daily data import to run.

The code I've been working on has been through a couple of versions, and now I have in mind a third

Read more

Don't make me think!

cover of Don't make me think! Don't Make Me Think!: A Common Sense Approach to Web Usability
Steve Krug
* * * *
£20.69

buy from amazon

 

This book is well written, short, and clear.

It has reassured me about much of what I do - and given me some pointers for areas I can improve on.

One of the great things about this book is the way it addresses the combination of technical and political issues that web projects can get bogged down in - it has a nice section called "Help my boss wants me to ___" with some good sample letters to the boss.

It really brings home that conventions are useful - and you need to test the site on users - little and often.

Read more

Install runkit for unit testing

Unit testing Drupal can be pretty challenging as it's hard to isolate parts of the code.

It seems :

Read more

Test-Driven Development By Example

cover of Test-Driven Development By Example Test Driven Development (The Addison-Wesley Signature Series)
Kent Beck
* * *
£21.97

buy from amazon

 

The premise of this book is to design organically (No grand plans).

Programming is reduced to the sequence

  • write a test
  • write code that passes the test
  • clean up that code (remove any duplication)

Much of the book is about getting into and keeping a good programming mindset - one nice tip is to always leave a failing test at the end of the day (this give you something concrete to start on the next day).

This book has changed the way I work (a bit).

Read more

SimpleTest - expecting Exceptions

SimpleTest is a great testing framework for PHP, with a Drupal module available too.

Many tests are based on assert statements, but this patterns doesn't work for functions which are expected to throw Exceptions.

In that case the following pattern is often useful.

<?php

try {
 
foo($bar);
 
pass('Foo Bar worked');
} catch (
MyException $e) {
 
$this->fail($e->getMessage());
}
?>

Read more

Working Effectively with Legacy Code

cover of Working Effectively with Legacy Code Working Effectively with Legacy Code (Robert C Martin)
Michael Feathers
* * * *
£48.22

buy from amazon

 
While waiting for a long database import to run I've been browsing my Safari bookshelf and this book looks really good.

I haven't by any means read the whole thing - but it really seems to have answers to questions I have been asking.

The topic of legacy code is one I have worked with a lot - and it's always challenging.

This book deals well with the technical, business, emotional and social impacts of this work.
With chapter titles like

      Chapter 6. I Don't Have Much Time and I Have to Change It

Read more

Testing websites in IE - verions 6 to 8

When developing a website it's important to test it in as many different web browsers as possible.

If a client has a problem viewing the page there's little point saying "but it works on my machine"

I have found that the differences between different versions of firefox to be small enough that testing in one version is sufficient.

Internet Explorer is so different between versions that each target version must be tested seperately.

There is a package for multiple IEs.

Read more

Drupal development mail testing

One of the problems I have encountered while developing for Drupal on a laptop is how to test the sending of emails.

I've recently come across two solutions.

Devel Module

This helpful module includes a mail wrapper function which directs all mail to the Drupal logs, perfect for testing volume mail sending or just for getting a password reset link.

http://drupal.org/project/devel

Read more