開源日報 每天推薦一個 GitHub 優質開源項目和一篇精選英文科技或編程文章原文,堅持閱讀《開源日報》,保持每日學習的好習慣。
今日推薦開源項目:《斷手偶素 osu》
今日推薦英文原文:《Why JavaScript is (not) the best first language to learn》
開源日報第483期:《斷手偶素 osu》
今日推薦開源項目:《斷手偶素 osu》傳送門:GitHub鏈接
推薦理由:osu 應該算是出名的音遊了,曲譜多的數不勝數,而且每天都有更新。這個項目就是它在 GitHub 上的倉庫,對它本身感興趣的話可以在遊玩之餘參觀一下代碼。如果對於單純只是喜歡音游的人也是一款不能錯過的遊戲,配合觸摸屏食用效果更佳(滑鼠的力量是有極限的,所以……)
今日推薦英文原文:《Why JavaScript is (not) the best first language to learn》作者:Clyde Bates
原文鏈接:https://medium.com/@a.bates1993/why-javascript-is-not-the-best-first-language-to-learn-8f8a99da5ec
推薦理由:要記住,語言本身也只不過是一種工具而已,而語言背後的思想,邏輯等等才是需要重視的

Why JavaScript is (not) the best first language to learn

This article is going to touch on a common tech interview question — 「why did you decide to learn first?」 and what I think the proper response should be. My first language was JavaScript, and so I』ll be focusing from that vantage point when thinking about this question. You see, JavaScript is both the best language to learn first, and not the best language to learn first. The reason it is not is quite simple — there just isn』t a 「best first language」. Doesn』t exist. Next question please.

But really, the whole idea of one language being 「better」 than another is a bit erroneous. There』s certainly preferences — but those are subjective, and often just matters of preferred syntax. And there』s also best-case languages, in other words, languages that are best suited to the job/project you』re on— but that wasn』t the question. The truth is, all languages do the same thing. They translate human intentions into machine instructions. And that is the important thing. It doesn』t matter which language you learn first, what matters is that you learned a language. You learned how to talk to a machine, how to get on its level and think like it thinks. You learned a level of cognitive reasoning that makes you incredibly well suited to work in ANY language. If you can learn one language really really really well, it』ll be a piece of cake to learn another. The real skill isn』t knowing how to solve the problem, it』s what questions to ask to get to the answer. That』s what learning a language — any language — will teach you.

All that being said — JavaScript is a great first language. Let』s delve a little bit into why that is…
開源日報第483期:《斷手偶素 osu》
JavaScript was invented in 1995 by Brendan Eich, who worked at Netscape at the time. This was during the time that Netscape enjoyed being the world』s most popular Web Browser (imagine that). Also at this time was a company quickly picking up A LOT of steam and looking more and more like a monopoly on tech each day. That』s right, you guessed it, Microsoft. See, Netscape didn』t want to lose this battle for the world wide web. JavaScript was currently being developed as a powerful server and client side language up to this point. But when Netscape decided to wage war on Microsoft, they responded to the Internet Explorer project with a quick standardization of the JavaScript language and an unlikely partnership with Sun, the creators of Java. With all this, sights were set to have JavaScript become the companion language to Java. So that quick jump from 「powerful server and client language」 to 「web companion to Java」 is the reason for many of JavaScripts most hated quirks, like automatic type coercion. Because of this unfortunate marketing decision (which really didn』t do much for Netscape in the end, as we all know), JavaScript was merely a browser language for nearly two decades. However, during this time, JavaScript became the de-facto leader of web languages. It』s hard to find a website that doesn』t use it. Which is my point #1 of why it』s a great first language to learn.

All of that brings us to 2009 — the release of Node.js
開源日報第483期:《斷手偶素 osu》
With the release of Node.js, JavaScript finally realized its full, original potential and moved out of Browser Jail. Now, you can learn ONE language and be a full-stack developer. Node.js 「is a highly customizable server engine that uses non-blocking event-based input/output model.」 What this means, basically, is that we can now use JS to create server apps, not just client apps. This makes JavaScript incredibly well rounded, being the leader in browser development that is still able to be a fully-fledged backend language.

So there ya have it. There』s no real best first language, but I』m glad I learned JavaScript first. It is, in my opinion, the fasted route to a full stack understanding. That being said, just keep in mind… There is no best language.
下載開源日報APP:https://openingsource.org/2579/
加入我們:https://openingsource.org/about/join/
關注我們:https://openingsource.org/about/love/