No amount of new programming techniques or software testing tools seems to make much of a dent in the number of bugs that regularly creep into both commercial and home-grown applications. But two academics claim to have devised an alternative approach to tackling bugs – music.
Their idea is to give programming instructions short musical themes. Related instructions are likewise given similar, complimentary sounds. If the ‘tune’ deviates from the expected musical score when the program is played, the resulting discordant notes indicate a bug or programming error.
The researchers, Dr Paul Vickers from Northumbria University and Professor James Alty of Loughborough University, trialled their novel idea using the Pascal programming language.
“It works because it allows the programmer to build a mental expectation of how the music should unfold over time. If the music deviates from its expected ‘score’ then that signifies the possible presence of an error in the program,” says Vickers.
The researchers suggest that even non-musicians are able to tell the difference between different sounds and pitches – and when they sound ‘wrong’. However, even if this approach works in the real world, de-bugging a monster of a program such as Microsoft Windows 2000 – all 40 million lines of it – might take some time. And it would certainly create a veritable symphony, however discordant that might be.