When the newsbroke last night that Microsoft was in negotiations to buy Minecraft creators Mojang for $2 billion, people quickly started asking "why would Microsoft buy another gaming company?"

It's a good question, as Microsoft's track record with gaming acquisitions hasn't been good. While using expatriate cash to buy companies let Microsoft use its cash pile more effectively, it still doesn't explain just why Microsoft is spending that much on Minecraft.

Games are at the heart of Microsoft's consumer strategy, with its Xbox One console, but there's more to Minecraft than just another game. When you start to explore the Minecraft worlds that users around the world have created, you quickly realise that Minecraft creator Markus Persson (known by his online handle "Notch") created something a lot more powerful and a lot more flexible than just another game.

Minecraft lets players build worlds while struggling to survive against monsters. At least that's how it began, but a popular creative mode lets users build enormous constructions on huge maps. They've been used to map countries, demonstrate physics, and even build working computers. It's a composable environment, one that might help solve one of IT's biggest problems: Educating coders.

The software industry agrees that we don't know where the next generation of programmers is coming from. School courses focus more on using apps and building web pages than on the fundamentals of writing code, and where they do, they skirt the deep understanding good programmers need.

Microsoft has often been accused of losing an entire generation of developers to the web and to open source (though it's been quick to adopt those technologies in its development tools and platforms, either directly or through its Visual Studio integration program). Its response to criticism has been interesting, with the release of free versions of Visual Studio and an intriguing focus on the gamification of programming.

By gamification I don't mean the awarding of badges for bugs fixed or lines compiled. Instead, Microsoft's research scientists came up with games that teach programming. Kodu introduced event-driven functional programming to schools, while Project Spark took the same model and extended into a free-form game-building sandbox on its Xbox platforms and on Windows PCs. The resulting environments are worlds where every element is programmable, and where event-driven functional programming is key to building interactive worlds and games.

Like Kodu and Project Spark, Minecraft is an interesting metaphor for the ubiquitous computing world Microsoft CEO Satya Nadella has focused the company on delivering. It's a sandbox where the very elements of the game are used to build new elements, creating new games from the various blocks players mine. You only have to look at the worlds that Minecraft's users have created and -- perhaps more importantly -- at the many thousands of viewer hours top players are clocking up on Twitch to see just how powerful the environment is, and what its capable of delivering.

If Microsoft does purchase Minecraft, it's going to own an interesting set of educational technologies that the world thinks of as games. Beginners will be able to start creating Minecraft worlds before graduating to the programmable environments of Kodu and Project Spark. Users will be learning complex programming skills, while building distributed event-driven applications.

The only thing missing is the next step, from Project Spark's visual programming world to the Visual Studio IDE. That step makes a lot of sense, as programmable worlds like these exhibit many of the attributes of the programmable devices and sensors that are at the heart of the Internet of Things, a wider programmable world of ubiquitous computing devices.

You can take code from Microsoft's introductory programming tools like the Windows App Studio and work with it in Visual Studio, adding functions and features to generated code.

With its One Microsoft focus, perhaps it's time for Microsoft to tear down the walls between its gaming properties and its developer tools. Why shouldn't code migrate from Project Spark into Visual Studio, and vice versa? And if Microsoft does buy Minecraft, why shouldn't there be a Minecraft editor built into Visual Studio's Express editions?

Bringing game editors and development tools together makes a lot of sense, especially if games are extensible. It's an approach that offers an opportunity to teach key object-oriented and functional programming techniques, as well as giving a clear road from gamer to coder (and an opportunity for Microsoft's Internet of Things program to deliver code that runs on more than just Intel Galileo boards). Minecraft worlds run on Playstations, on Macs, on Linux, even on phones: Making Microsoft's developer tools familiar across a wider range of platforms as well.

There's an army of K12 students out there building worlds in Minecraft, and it's time to bring them into the rest of the computing world. Buying Mojang and Minecraft gives Microsoft a fascinating cross-platform route into tapping that skill base, from $25 Raspberry Pi devices to gaming consoles to the billions of PCs. Providing a link from the visual programming tools that power Minecraft and Project Spark to the code-driven world of Visual Studio will help bring that new generation of programmers on-board, and at the same time give them tools to build bigger and better games.

Two billion dollars is a lot of money for a games company with one product and a history of failed attempts at a second string. But when you look at those billions of dollars as a route to millions of new developers, all of whom have a background in distributed systems development, then it's not much of a price to pay. In ten years' time we could be looking back on a Microsoft Mojang acquisition as something much more than a gaming story, instead seeing it as a turning point in the growth of not just Redmond's developer platforms, but of the entire Internet of Things.