开源日报 每天推荐一个 GitHub 优质开源项目和一篇精选英文科技或编程文章原文,坚持阅读《开源日报》,保持每日学习的好习惯。
今日推荐开源项目:《俄罗斯方块 react-tetris》
今日推荐英文原文:《Microsoft Failed Developers — and Now It Has a Plan to Win Them Back》

今日推荐开源项目:《俄罗斯方块 react-tetris》传送门:GitHub链接
推荐理由:相信大家或多或少小时候都玩过俄罗斯方块吧,把各种方块堆起来凑一行来消除从而得分的简单游戏,最起码小时候是这样想的。现在的俄罗斯方块已经有了各种各样的玩法——甚至可以玩吃鸡(Tetris99),还有包括 T-spin 这样以前几乎没怎么想过的高端技巧……扯远了,这个项目是一个 React 实现的俄罗斯方块游戏,在移动端和 PC 都能运行。借此机会用俄罗斯方块来作为打发碎片时间的休闲方式虽然很不错,但是要想磨练出技巧还是需要一定的功夫的,不要玩着玩着把工作给忘了才好。
今日推荐英文原文:《Microsoft Failed Developers — and Now It Has a Plan to Win Them Back》作者:Owen Williams
原文链接:https://onezero.medium.com/microsoft-failed-developers-and-now-it-has-a-plan-to-win-them-back-ecdafde5b20
推荐理由:微软决定将 Linux 混入自家的 Windows 中来让更多程序员使用自家系统。

Microsoft Failed Developers — and Now It Has a Plan to Win Them Back

you walked into any coffee shop in San Francisco five years ago, you would’ve been hard-pressed to find a single Windows laptop in a sea of glowing Apple logos. The MacBook was the default for startup culture — not just because of its sleek looks, but because the device was so great at web development.

Over the last few years, Microsoft has tried to flip the narrative and win coders back. Last week, its master plan culminated in a major announcement: Microsoft will include Linux as part of the Windows 10 operating system, starting this summer.

Hell has officially frozen over. This would have seemed impossible just a few years ago — but this is the new Microsoft. Years of hard work to redefine its business may finally pay off as developers are finally able to access a slate of modern tools to do their work on Windows.

The seeds for all of this were planted some time ago. Microsoft has technically included a form of Linux in Windows since 2016, when it announced a technology called “Bash on Windows” that makes it possible to run Linux apps, like the popular Node.js server, as if they were on a full Linux computer.

Bash wasn’t quite a full experience, though. It technically “virtualized” software that wasn’t running natively — with quirks that simply wouldn’t appear if you ran the same programs on a Mac.

That should be solved when Microsoft brings the Linux kernel to Windows later this year. Developers will now be able to easily switch from their Mac or Linux computer, because rather than virtualizing the software through a handcrafted layer, Linux will fully exist within Windows. And that might be the key for Microsoft to worm its way back into those coffee shops.

How Microsoft missed a generation of the web

The problems for Microsoft began when it completely missed a shift in the way people build web apps. Over the last decade, developers around the world have turned to new web development languages like Node.js and Ruby on Rails. As that shift happened, it became increasingly difficult to be a web developer on a PC.

The people behind new coding languages — like David Heinemeier Hansson, who created the popular Ruby on Rails technology — exclusively used Apple’s OS X, which made it difficult, or outright impossible, to develop for those languages on Windows. The issues snowballed as developers moved from Microsoft-created, paid technologies like the SQL Server to free tools like MySQL, which run natively on Linux or macOS. Windows users were, in essence, iced out.

As the world shifted to open-source software, a revolution arrived in the form of hundreds of millions of free, easy-to-install pieces of code available through tools like the npm package manager. Npm allows JavaScript developers to search a huge library for specific functions — like “sort numbers by date” — and find a drop-in solution that’s already made, solving problems without requiring anyone to write a new line of code.

Linux options within Windows. Credit: Microsoft

Package managers, which are now used by over 90% of JavaScript developers according to some estimates, drastically reduce the amount of time and money it takes for developers to implement an idea in code. Alongside the rise of the package managers, front-end development frameworks — like Angular, React, Vue, and others — exploded in popularity, which led to more problems for Windows users.

The tools needed to build and run Node-based web apps, for example, were sometimes only partially functional on Windows, if they worked at all. To get npm and Node running correctly was a complicated task that drove developers to near insanity. None of the people who created the most relevant development tools did so on a Windows machine.

Complicating this further, while anyone can easily install Windows on a Mac via Boot Camp, Apple doesn’t allow OS X to be installed on any third-party hardware. That meant Windows-based developers were forced to either install open-source Linux operating systems on their machines or use slow, “virtual” servers on top of their existing computer to get work done.

Turning the tide

While Windows still dominated market share at big companies — and probably your office — it was widely considered a terrible platform for this new wave of web development, and startups refused to use it.

Microsoft, looking for new ways to make money after Windows 10 became a free update, focused heavily on cloud hosting and enterprise with a service called Azure, which allows developers to host servers, or even just their own code, in Microsoft data centers around the world.

The company made another appeal to developers when it revealed an open-source development tool, Visual Studio Code, in 2015. Not only was it incredibly fast and infinitely customizable, it was also entirely free. The tool was embraced by surprised developers, and is now the most popular coding app in the world, with more than 50% of coders using it.
Microsoft has, in the space of just a few years, completely redefined itself as a company that cares about developers.
Microsoft truly opened the floodgates in 2016. It released Bash on Windows, that first crack at Linux, it open-sourced the .NET programming language, and it announced that it had acquired the popular cross-platform coding framework Xamarin for millions of dollars. Later, Microsoft gobbled up GitHub, the most popular open-source platform, abandoned efforts to build its own browser engine in favor of Chrome, and even open-sourced the Windows calculator. Hey, why not?

All of this is to say that Microsoft has, in the space of just a few years, completely redefined itself as a company that cares about developers. The announcement that it will ship Linux in Windows is the coup de grace, because it’s the component that will bring the entire thing together.

Native Linux on Windows makes it so straightforward for developers to consider switching for the first time that thousands will probably try it again (after writing the operating system off a decade ago). Given that Microsoft has already captured the attention of millions of developers who use tools like Visual Studio Code, it won’t have to do much work to convince them.

The timing couldn’t be more perfect: Apple has recently paid zero attention to fostering its developer ecosystem on macOS, focusing instead on getting people to build iOS apps.

Combined with the ongoing MacBook keyboard disaster, developers are looking beyond the Mac for the first time when they need to buy a new laptop. Windows machines finally look like a viable, even superior option for once.

It’s somewhat ironic that Microsoft may win developers back to Windows by integrating another operating system, Linux, but it’s a smart move: Choice is good. If you’re still skeptical, that’s fair enough given the company’s past. But you can’t deny that Microsoft has, year after year, shown that it’s willing to shed its skin to build something new.

I’m a web developer, too, so when my MacBook Pro keyboard broke, I switched from macOS to Windows. It was much more difficult to make the move back then, and friends in the industry were skeptical it would work out. I’m still using my PC, and two years in, as Linux finally arrives, I can finally say that my workflow is better here than it would be anywhere else.
下载开源日报APP:https://openingsource.org/2579/
加入我们:https://openingsource.org/about/join/
关注我们:https://openingsource.org/about/love/