Many will have enjoyed watching Stephanie Flanders's recent BBC 2 series, Masters of Money, covering Keynes, Hayek and Marx.

For those who missed it, or are pushed for time, the Keynes versus Hayek debate is compressed down to eight minutes of gangster rap in a well-known YouTube video, Fear the Boom and Bust. If you're not seen it, watch it.

What YouTube captures, but 60 minutes of BBC doesn't quite unpick, is the insightful and elegantly delivered rap lyric, "malinvestments wreck the econo-mee". This is Hayek down to a single line.

So what are these malinvestments, and just what have they got to do with our current economic predicament? Well, everything.

For Hayek, malinvestments are the result of easy credit, resulting in what should be tomorrow's prosperity creating today's debts. But malinvestments aren't just about easy credit, they're about how poor investments can undermine wider economic productivity, which is of course the ultimate engine of prosperity.

Let's take energy as an example, where malinvestments are at present all too common. Politicians of most hues, perhaps with the exception of the Chancellor, enthuse that Green energy is an industry of the future, a driver of economic growth and creator of jobs.

The argument goes like this. Due to its diffuse nature, Green energy is more labour intensive than compact thermal energy, so it's good for boosting employment. And so to ensure growth of this new industry Government needs to provide support by steering significant sums into production subsidy.

So, if Green energy requires more jobs per unit of energy produced than its competitors, is this an inherent advantage? No, of course it's not. Job creation isn't the issue, it's delivering low-cost energy that can drive the economy and generate genuine prosperity for the future.

Prior to the industrial revolution much of the population worked the land to grow biofuels – simply food for human labour. With the advent of energy dense steam power, the fields emptied and cities filled, ultimately leading to the historically unprecedented prosperity we now enjoy. The labour intensity of energy production plummeted, as energy became cheap and labour expensive.

So Green energy, as it's currently being pursued, looks like a good example of a malinvestment. If it's jobs we're interested in, we could ban the use of tractors on farms and return to the fields, but this hardly constitutes any reasonable norm of human progress.

Similarly, if it's carbon that concerns us, switching from coal to gas can deliver more immediate impact for every pound we spend. Last year wind saved about five million tonnes of CO2, but at a cost of £750 mil-lion in subsidy, so that's £150 per tonne of CO2 saved.

However, simply ramping up our relatively clean gas turbines and ramping down coal a little would have delivered the same carbon saving, but perhaps for as little as £100m more for the extra gas, or a more reasonable £20 per tonne of CO2 saved. So what could we have done with that extra £650m we put into production subsidy? Well, we could have left it in the pockets of consumers. Or importantly, we could have invested it in basic energy research and innovation to bring down the cost of clean energy for the future, rather than skewing markets by subsidising inefficient production.

And if we want to deal with negative externalities such as carbon, we could perhaps guess that Hayek would have favoured a simple carbon tax. One that starts low, so we don't dent the economy, but with a clear upward slope to focus minds on the long term.

This would certainly encourage investment in clean energy, but particularly technologies such as nuclear, with a long 60-year design life. It would also encourage an almost immediate and efficient switch from coal to gas, with less than half the emissions per unit of energy produced.

Rather than picking winners, a flat carbon tax takes decisions out of the hands of a small number of officials and puts decisions into the hands of the many engineers, economists and project planners in the energy sector.

To be clear, this isn't libertarian politics, it's simply the mass democratisation of decision making from the few to the many. Some companies will make the wrong call and lose out, while others will get it spectacularly right, as can been seen with those who took an early punt on shale gas in the US.

At its best, Hayek's freed market is a distributed optimisation algorithm. It allows rival ideas and technologies to measure up against each other, with the most efficient and productive gaining markets share. That's of benefit to us all.

Finally, let's not forget, there's only one thing more important than Hayek's sound money in a developed economy, that's cheap energy. Without it everything stops.

Colin McInnes is Professor of Engineering Science at Strathclyde University