開源日報 每天推薦一個 GitHub 優質開源項目和一篇精選英文科技或編程文章原文,堅持閱讀《開源日報》,保持每日學習的好習慣。
今日推薦開源項目:《俄羅斯方塊 react-tetris》
今日推薦英文原文:《Microsoft Failed Developers — and Now It Has a Plan to Win Them Back》
開源日報第427期:《俄羅斯方塊 react-tetris》
今日推薦開源項目:《俄羅斯方塊 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.
開源日報第427期:《俄羅斯方塊 react-tetris》
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/