每天推薦一個 GitHub 優質開源項目和一篇精選英文科技或編程文章原文,歡迎關注開源日報。交流QQ群:202790710;微博:https://weibo.com/openingsource;電報群 https://t.me/OpeningSourceOrg
今日推薦開源項目:《貢獻表單 GitHub Contribution Chart Generator》傳送門:GitHub鏈接
推薦理由:興許你們在 GitHub 上面的個人頁面都見識過這個功能了(雖然我的基本一片白……),這個項目可以把用戶名和這個表單合在一起生成一張你可以拿去體現自己貢獻的圖片,這在諸如臉書推特之類的地方很好用,最起碼免去了截圖要截很大地方才能看到用戶名的煩惱。
GitHub 上單純的頁面:
使用這個項目生成的截圖:
今日推薦英文原文:《The Five Top Reasons to Use JavaScript》作者:Richard Kenneth Eng
原文鏈接:https://medium.com/javascript-non-grata/the-five-top-reasons-to-use-javascript-bd0c0917cf49
推薦理由:如果你想讓別人跳入 JS 這個大坑中,就可以用這篇文章把他勸誘進去
The Five Top Reasons to Use JavaScript
Reason #1:
JavaScript is very easy to learn. No setup is required; it』s built right into the web browser! Just start writing code and see the results immediately in your browser.
I pity would-be software engineers who are too intimidated and lethargic to follow simple installation instructions for languages like Python, Ruby, Smalltalk, Go and Elixir. They lack the kind of initiative, curiosity and determination that is so necessary to becoming an IT professional.
Once you overcome the huge, overbearing obstacle of installing one of these languages, you』ll find that the syntax is wonderfully easy and inviting. They』ll make JavaScript look like the awkward stepchild that it is in the world of engineering.
Reason #2:
JavaScript is used everywhere…web browser (Angular, React), server-side (Node), mobile, desktop, games, Internet of Things, robotics, virtual reality, etc.
Hold your horses, not so fast! JavaScript dominates in web development because you have no choice — it』s the native language of the web browser. Outside of the web, JavaScript is up against many language competitors where it』s clearly disadvantaged. For example, in the mobile space, JavaScript has no hope of displacing Java (for Android) and Objective-C/Swift (for iOS).
On the desktop, JavaScript cannot compete with C++ and Java. In games, C++ and C# rule. Internet of Things? We』re looking at C, Python, Java, even Perl! Robotics means C/C++, Python, Java and Smalltalk. And so on.
Do you see a pattern? In every case, solid programming languages win the day. JavaScript is objectively a very flawed language. That it has managed to be shoehorned into these different areas is a testament to the JavaScript community』s creativity, but we have to face the fact that, in practice, JavaScript is not gaining traction. JavaScript is used for web development. Period.
Reason #3:
Node is super popular. Proof: there are over 30,000 NPM packages available!
How many of these 30,000+ packages have significant usage? Probably relatively few. Let』s consider an Apple analogy. Apple claims that there are over 1.5 million iOS apps in the App Store. But it』s well-known that only a tiny percentage of them are popular. The rest lie fallow, never to see the light of day. In fact, I wrote an iOS app that has done absolutely squat in the App Store; I』m one of the sad statistics.
The fact that so many NPM packages exist shows the 「gold rush」 mentality that most contributors have. They hope to cash in on the JavaScript hype, or at least make a name for themselves in the open source community. Open source is another good example. Open source has countless thousands of contributions, most of which never see the light of day. So what do 30,000+ NPM packages signify?
Not much of anything. We still don』t know how many businesses use Node. Is it even in the thousands, for instance (show me the numbers)? Even that would pale in comparison to Java or Python usage.
Reason #4:
There are lots of high-paying jobs for JavaScript developers. What a great way to start your IT career!
It』s true, there are lots and lots of JavaScript job postings. And all of them are related to front-end web development or Node. You won』t find any postings for JavaScript programming in mobile, desktop, Internet of Things, games, robotics, virtual reality, etc. If all you want to do is write web apps, then JavaScript may be your ticket. But it』s hardly the path to a healthy career in IT, where there are so many other exciting developments going on, such as Artificial Intelligence, robotics, Big Data, Internet of Things, cloud computing, scientific modelling and simulation, Virtual Reality, etc., which use grown-up languages like Java, Python, C/C++, Go, Haskell and Julia.
Reason #5:
JavaScript is an incredibly expressive and powerful language.
Such an unbelievable overstatement! Is JavaScript any more expressive than, say, Clojure, Scheme, Erlang/Elixir, Haskell, C#, or even Smalltalk? Smalltalk has first-class functions and closures, which means that it can do anything JavaScript can do. If you really care about using an expressive language, you』d choose one of the above seven, not a language that is plagued by hobgoblins of every sort and apparently one that ECMA TC39 is incapable of fixing.
So there you have it: the five top reasons to use JavaScript. Good luck with it. You』ll need it.
每天推薦一個 GitHub 優質開源項目和一篇精選英文科技或編程文章原文,歡迎關注開源日報。交流QQ群:202790710;微博:https://weibo.com/openingsource;電報群 https://t.me/OpeningSourceOrg