今日推薦開源項目:《3RS 3rs-of-software-architecture》
今日推薦英文原文:《Letter of Recommendation: Bug Fixes》
今日推薦開源項目:《3RS 3rs-of-software-architecture》傳送門:GitHub鏈接
推薦理由:3RS,即 readable,reusable,refactorable 三個方面,通過調查軟體架構的這三樣屬性來評價一個架構。一般來說架構這玩意應該是最開始設計的,改的越晚改起來就越花功夫,而這個項目通過一個常見的 JS+React+Redux 的項目作為例子,介紹了對這三方面進行提升的方法準則,在需要長久發展的項目上這三個屬性會顯得很重要,在一開始就設計好合適的架構可以避免更多麻煩——雖然重構可能會遲到,但是它一定不會缺席就是了。
今日推薦英文原文:《Letter of Recommendation: Bug Fixes》作者:New York Times Magazine
原文鏈接:https://medium.com/new-york-times-magazine/letter-of-recommendation-bug-fixes-a1450ee0ab1a
推薦理由:軟體的 commit 記錄上記載著它的發展歷程
Letter of Recommendation: Bug Fixes
I work in the software business, which means that I live in a world ruled by computer code. A lot of that code is proprietary and secret. You can see what it does, but you can』t see how it works unless you work at the company that makes it.We can, however, see some of it. A lot of the world now runs on 「open source」 code. That means it』s free and reusable, under the terms of its license. The Firefox web browser and the largest parts of Chrome and Safari are open source; whole operating systems, including essential parts of MacOS, are open source; the server software that powers our digital cloud, driving data to our phones, enveloping us in wonderful and terrible ways — much of that』s open source, too. If you』re reading this online, you』re almost certainly using open-source code right now.
The gates of the open-source palace are always open. You can enter by way of websites like GitHub (which is built on top of version-control software called Git, which was created by Linus Torvalds, the same person who created Linux). GitHub serves more than 100 million different code repositories. It』s owned by Microsoft, which is another sign of how things have changed: Microsoft used to write memos about how to ruin free software.
In 2019 you can track every change anyone makes to a codebase, whether they』re fixing one typo or changing 5,000 files. You can see who made the change, and read a description of the change. If something suddenly doesn』t work, you can backtrack to an earlier version and figure out why.
The secret history of the 21st century is written in code 「commits」 — which is what coders call changes like bug fixes and feature updates. I like to read commits like a newspaper, especially for software I use. I do this partly because I want to know what I can do today that I couldn』t yesterday. Little things add up; perhaps there』s a new way to use the cursor keys to add minutes back to my days, or a search function that could help me better organize my email.
I read the change logs, and I think: Humans can do things.In every commit, you can see how the code is growing, changing and reacting to the world: 「Make image scaling work without ImageMagick support in eww」 (from the Emacs text editor). 「Disables autofill/ autocomplete/ spellcheck in the hex input field」 (from a pixel editor that runs in the browser, called Make8BitArt.com). 「Fix the bell sound when Alt+key is pressed. (#1006)」 (from Microsoft』s command-line terminal app).
I wouldn』t expect a nonprogrammer to understand the above, but you can intuit some of what』s going on: that we don』t need ImageMagick to scale images anymore, because the text editor can scale images on its own; that it』s bad form to spell-check hex values, which specify colors; that the bell is doing something peculiar if someone holds down the alt key; and so forth.
But there』s also something larger, more gladdening, about reading bug fixes.
My text editor, Emacs, is a free software project with a history going back more than 40 years; the codebase itself starts in the 1980s, and as I write this there are 136,586 different commits that get you from then to now. More than 600 contributors have worked on it. I find those numbers magical: A huge, complex system that edits all kinds of files started from nothing and then, with nearly 140,000 documented human actions, arrived at its current state. It has leaders but no owner, and it will move along the path in which people take it. It』s the ship of Theseus in code form. I』ve probably used Emacs every day for more than two decades. It has changed me, too. It will outlive me.
Open source is a movement, and even the charitably inclined would call it an extreme brofest. So there』s drama. People fight it out in comments, over everything from semicolons to codes of conduct. But in the end, the software works or it doesn』t. Politics, our personal health, our careers or lives in general — these do not provide a narrative of unalloyed progress. But software, dammit, can and does. It』s a pleasure to watch the code change and improve, and it』s also fascinating to see big companies, paid programmers and volunteers learning to work together (the Defense Department is way into open source) to make those changes and improvements. I read the change logs, and I think: Humans can do things.
Technologists, being who they are, often suggest that we Git-ify everything: congressional legislation, newspaper articles and so forth. Sometimes I wish the 「real」 news worked like GitHub. But how could it? There』s no central code repository, no one source, for American culture. Most people aren』t living their lives thinking, If only this were more like software. When you love technology, this is a hard lesson to learn.
I like knowing how things are made. That』s the great lesson of software, to me: With open code and version control, the foundational document and the human process are one. We』re usually told to turn away from the sausage-making. With laws, TV shows, chicken nuggets or corporate mergers, it』s better not to know. Not in software, in which nothing is ever finished. Watching the commits, you can see the story taking shape. Or possibly shape the story yourself.
下載開源日報APP:https://openingsource.org/2579/
加入我們:https://openingsource.org/about/join/
關注我們:https://openingsource.org/about/love/