Debugging.

The more things change, the more they stay the same.

With all the recent talk of AI on the cusp of world takeover, there is one area in particular where I would like to see artificial intelligence make some progress – and that’s in software quality.
AI is a piece of software anyway and a proper one should be self-remedial. Learning algorithm is a kind of self-remedial software, but I’m more thinking in terms of old fashioned bugs.

The traditional way of software testing is scripting a bunch of functions and comparing the output to expected results. Either the test succeeds of fails. But anyone who has ever written end-user applications knows the limits of this approach when ‘ohh sh*t, I didn’t expect anyone to do this!’ happens.

I think AI still has a way to go before it can replicate the human ingenuity in application bashing.

But software tools are constantly improving and cutting down excuses for writing buggy software.
A common way to test software is to trace or log its actions. The limit of this approach is that the logging points have to be determined, which can lead to important steps missing or overwhelming log content.

Redux - a different way

Redux is a Javascript library that can not only store application state, but also a history of changes made to its state. This makes much of tracing and logging redundant.
Redux
To monitor the application state, a Redux DevTools extension to Chrome not only displays the state and actions but can also replay the whole interchange.

The most interesting thing about this approach is the importance placed on visualising what the application is doing. Programming is all about patterns-matching and the easiest way to identify patterns is visually – so it makes sense to visualise the application.

Visualisation is the biggest hurdle faced by AI, identifying patterns around us is so fundamental to us that we don’t know how we do it. But simple things like face recognition are a major programming task.