每天推荐一个 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