GNU/Linux is declining in popularity among programmers. That's according to a survey from Stack Overflow, which says Mac OS X has now replaced the open source platform as the second most popular code development environment, after Windows.

Stack Overflow conducted the survey to understand current trends among the developers who populate its online hub for the programming community. Survey results reflect responses from more than 56,000 programmers spread across the world. Web developers were the most strongly represented group, but programmers of all stripes responded.

The site asked programmers questions on a variety of topics, ranging from programming trends to preferences involving pets. But the most interesting finding -- in Stack Overflow's view and ours -- was that GNU/Linux has continued to decline in popularity as a desktop operating system among programmers.

Two years ago the open source OS category was the second most popular choice after Windows. Last year it was neck-and-neck with Mac OS X. This year's results shows OS X with a significant lead over Linux.

Also notable is that Stack Overflow says Ubuntu is far ahead of the pack among programmers who do use Linux-based environments. The OS from Canonical controls 12.3 percent of the total OS market, compared to under two percent for the next-best performers in the open source category.

This isn't to say Linux is in a crisis, even among developers. The survey asked programmers which desktop operating system they used, not which environment they deploy for programming. Those may be the same thing for many people, but certainly not all. Plus, when you throw virtualized and cloud-based environments into the mix, you may well have many developers who run one main OS on their computer, but code (or test code) on other types of platforms that they access virtually or through the cloud. So identifying the most popular desktop OS is not as straight-forward as it may sound.

Moreover, in a way, the fact that more programmers are moving toward Mac OS X -- even though the importance of GNU/Linux as a hosting environment remains steady -- is a good thing for the open source community. It implies that developers can program for Linux-based platforms without having to run Linux themselves. That's a reflection of the growth of cross-platform compatibility in recent years, as the expansion of the cloud and the open-sourcing of proprietary platforms even by the likes of Microsoft has made it much easier to program for any type of environment, no matter which one you're using locally.