Improving the link between research and industry in the programming world

There are about 18.2 million programmers worldwide, a number that is due to rise to 26.4 million by 2019, according to the Global Developer Population and Demographic Study 2015, and they are crucial to the computer industry.

At Microsoft, I make tools for programmers and their success is often down to their accessibility and ability to solve real world problems.

A lot of research goes into programming something to get it to do what we want it to, but research does not always consider the way that things operate within an overall system.

In order to make programming developments useful to industry, we must seek to programme in a compositional way, so that the overall performance of the system is improved, not just the component parts.

Inspiration

I had an early introduction to programming as I was lucky enough at my primary school to have an Apple 2 and, when I was nine years, old a teacher explained that there were different programming languages available. My father and brother also encouraged me: we used to play golf on a programmable calculator at home.

We were fortunate to grow up in an era where the PC was at the centre of everything and the most powerful device around. Things are changing now with phones and data centres that are more closed off to people. When I started out, everything was more open: you could programme the whole system and so we essentially educated ourselves.

Today we have lost some of that hands-on approach, but there is much that can be done to make the work of programmers easier and more efficient.

C# and F#

In 2005, I introduced the feature known as ".NET Generics," in C# 2.0. Generics allows programming code to be more easily reused, which in turn makes programming more productive, faster and easier than previous efforts, maintaining dynamism, safety, performance and correctness. Successful mainstream implementation has also given C# almost a 20-year technical advantage over competing programming languages such as Java.

Further to this, I developed the F# programming language in 2006, a major factor in my being recognised this year with an award by the Royal Academy of Engineering. I won a Silver Medal for remarkable technical achievement coupled with commercial success. F# is used in applications as diverse as analysing the UK energy market and tackling money laundering.

F# is designed to be a clear and concise language that interoperates well with other systems. It allows programmers to write code with fewer bugs than other languages, so users can get their programme delivered to market both rapidly and accurately.

Used by major enterprises in the UK and worldwide, F# is both cross-platform and open source, and brings innovative features from the forefront of programming research to industry. These include unit-of-measure inference, asynchronous programming and type providers, which have in turn influenced later editions of C# and other industry languages.

Bridging the gap between research and industry

C# is the dominant language, but F# brings a new type of programming called functional programming that stands alongside it, while focusing very much on the compositional.

F# is a research-inspired language designed for industry use. It makes programmers more productive. Previous programming languages like C# do not tell you if information is missing, which is vital for the programmer to know.

If you miss out part of a bridge when building it, then it will fall down, and missing information can have the same effect in computer programming. F# tells you exactly what is there, making it more reliable because there are no bugs due to missing information.

F# working in industry

Another reason why F# has worked so well in industry is that it provides short, clear descriptions of systems. From the engineering perspective, it also tracks more about the information such as the unit of measurement for a number. When you have a number in a computer programme, programmers need to know whether that number represents grams, kilograms, miles etc.

A major UK energy company, for example, writes simulators for energy markets that show how much energy is being generated in other countries in order to decide whether to turn on UK power stations. It takes half an hour to ramp up a power station, so they need good data to make a timely decision.

The energy company’s client and server components are in C# but the calculation engine was written in F# to address the algorithmically complex analysis of large data sets. When writing this code, it was vital to know the units of measurements, i.e. whether it is megawatt hours or megawatt half hours. The use of F# to address the complexity of this real-world application demonstrates the usefulness of the language for enterprise software.

Open source

Microsoft and Microsoft Research have recently moved in a more open source direction, in that much of its work is now available for others to edit and change on many different platforms. F# is no different, and as we take the language forward, we will continue to do it in an open way that is easy for companies to adopt.

F#’s ability to make life easier for programmers is key to its popularity within industry. Its open source nature enables programmers to utilise F# in the way they want to and adapt it to their own situations.

Continuing to bridge the gap between the two worlds of programming research and industry will be increasingly essential in the development of the next generation of computer programmers.

Dr Don Syme is a Principal Researcher at Microsoft Research