JavaScript 開發者年度調查報告
本文來源:sqrtthree
There were over 5000 responses, 5350 to be exact, and I can’t wait to share the details. Before that I want to thank everyone who chipped in. This is a great time to be a part of the JavaScript community, and I’m truly excited for things to come!
截止目前有超過了 5000 人參與了(該次調查),準確的說是 5350 人。我迫不及待的想要和大家分享一下這次調查的細節。在分享之前我想要感謝參與調查的每一個人。這是 Javascript 社區一個偉大的時刻,我對未來的事情感到無比激動。
I didn’t anticipate such high interest, and next time I’ll make some improvements to the format. Namely, I’ll put the survey up on GitHub first so that the community can collaborate on the questions and options for a couple of weeks before launching the survey. That way, I’ll be able to produce more accurate results and avoid complaints like “I am shocked you didn’t include Emacs!”.
我沒有想到大家如此積極,下一次我一定會對版式做一些改進。換句話說,就是我會先將問卷調查放到 Github 上,以便于在開始調查之前,社區有一到兩周的時間來收集改進問題和選項。這樣,我就可以得到更精確的結果,也可以避免出現諸如 “我很震驚你竟然沒有包含 Emacs” 這樣的抱怨。
Now, onto the survey results. I’ll remain impartial in delivering the results, so that you can come to your own unbiased conclusions.
現在,基于調查結果。我將保持中立的態度發表一下調查結果,這樣你就可以得出自己的公正的結論。
##What type of JavaScript do you write?
你寫什么類型的 Javascript?
A whooping 97.4% of respondents write JavaScript for a web browser, while 37% of them write mobile web applications. Over 3000 of them – with 56.6% – also write server-side JavaScript. Among those who took the poll, 5.5% use JavaScript in some sort of embedded environment, such as Tessel or a Raspberry Pi.
有高達 97.4% 的受訪者用 Javascript 寫 web 瀏覽器程序,其中有 37% 的受訪者寫移動端 web 程序。超過 3000 人(56.6%) 也寫服務端的 Javascript。在這些參與調查者的人中間,有 5.5% 的人還在一些嵌入式環境中使用 Javascript,例如 Tessel 或 a Raspberry Pi (樹莓派).
A few participants replied they use JavaScript in some other places, notably in developing CLI and desktop applications. A few also mentioned Pebble and Apple TV. These fell in the Other category, with 2.2% of the votes.
少數參與者表示他們也在其他一些地方使用 Javascript,尤其是在開發 CLI 和桌面應用方面。還有少數提到了 Pebble 和 Apple TV. 這些都歸類在 Other 一類中,占總票數的 2.2%.
Where do you use JavaScript?
你在哪里使用 Javascript?
Unsurprisingly, 94.9% of voters use JavaScript at work. However, a large portion of the tallied – with 82.3% of the votes – also use it on side projects. Other responses included for teaching and learning, for fun, and for non-profits.
不出所料地,有 94.9% 的參與者在工作中使用 Javascript,但是,統計中也有很大一部分(占總票數的 82.3%) 參與者也在其他項目中使用。其他的回復則包括了教學,好玩,和非盈利目的的使用。
How long have you been writing JavaScript?
你寫 Javascript 多長時間了?
Over 33% of the surveyed have been writing JavaScript code for over six years. Out of those who answered the poll, 5.2% started at most a year ago, 12.4% two years ago, and 15.1% three years ago. That makes it 32.7% people who started writing JavaScript in recent years, out of 5350 voters.
超過 33% 的受訪者表示他們寫 Javascript 代碼已經超過了 6 年時間。除了這些人之外,有 5.2% 的人一年前開始寫 Javascript 代碼,12.4% 的人是兩年前,還有 15.1% 的人是三年前。這說明在 5350 個投票者中,有 32.7% 的人是在近幾年才開始寫 Javascript 的。
Which compile-to-JavaScript languages do you use, if any?
如果可以的話,你使用哪種 compile-to-JavaScript(編譯為 JavaScript 的) 語言?
A whooping 85% replied that they compile ES6 into ES5. Meanwhile 15% still use CoffeeScript, 15.2% use TypeScript, and a measly 1.1% reported they use Dart.
有高達 85% 的受訪者表示他們使用 ES6 編譯成 ES5。與此同時,有 15% 的人仍然使用 CoffeeScript
,15.2% 的人使用 TypeScript
,只有區區 1.1% 的人使用 Dart
.
This was one of the questions I wish I’d approached more collaboratively, as it got 13.8% of “Other” responses. The vast majority of these answers were ClojureScript, elm, Flow, and JSX.
這是我想進一步探討的問題之一,因為有 13.8% 的人選擇了 “Other”,選擇 “Other” 的絕大部分的回答是 ClojureScript
, elm
, Flow
, 和 JSX
.
What JavaScript stylistic choices do you prefer?
你更喜歡哪一種 Javascript 編程風格?
The vast majority of JavaScript developers who answered the poll seem to favor semicolons, at 79.9%. In contrast, 11% indicated they prefer not to use semicolons. When it comes to commas, 44.9% favor to place them after an expression, while 4.9% prefer to use comma-first syntax. When it comes to indentation, 65.5% prefer spaces, while 29.1% would rather use tabs.
回答這個問題的絕大多數開發者(79.9%)都選擇了分號。相反,有 11% 的開發者指出更喜歡不使用分號。
逗號方面,44.9% 的開發者喜歡將逗號放在表達式的末尾,然而有 4.9% 的開發者喜歡先寫逗號。
縮進方面,65.5% 的開發者更喜歡使用空格,然而有 29.1% 的開發者則更喜歡使用制表符(Tab)。
Which ES5 features do you use?
你使用過 ES5 的哪些特性?
While 79.2% of respondents are on board with functional Array
methods, and 76.3% indicated they use strict mode, Object.create
sees a 30% adoption and getters and setters are only used by 28%.
79.2% 的受訪者都使用過 Array(數組)
的一些實用的方法,76.3% 的開發者使用嚴格模式。30% 的開發者使用 Object.create
,而使用過 getters 和 setters 的開發者僅占了 28%.
Which ES6 features do you use?
你使用過 ES6 的哪些特性?
Notably, arrow functions are the most used ES6 feature among those who took the poll: 79.6%. Let and const together took 77.8% of the pollsters, and promises are also strong with 74.4% adoption. Unsurprisingly, only 4% of the respondents have played around with proxies. Only 13.1% of users indicated they’ve used symbols, while over 30% say they use iterators.
顯然,在這些投票中,箭頭函數是使用最多的 ES6 特性,占了 79.6%。在所有調查者中,Let 和 const 加在一起一共占了 77.8% 。promises 也有 74.4% 的開發者采用。不出所料,只有 4% 的參與者使用 proxies,只有 13.1% 的用戶表示他們使用 symbols,同時有超過 30% 的人說他們使用 iterators.
Do you write tests?
你寫測試么?
While 21.7% never write any tests, most do write some tests, and 34.8% always write tests.
有 21.7% 的開發者表示他們從不寫任何測試。大部分人偶爾寫一些測試。34.8% 的人總是寫測試。
Do you run Continuous Integration tests?
你運行持續集成測試嗎?
There’s a similar story with CI, although many more people don’t use a CI server – over 40%. Almost 60% of respondents use CI at least sometimes, of which 32% always run tests on a CI serve.
和 CI 類似,盡管許多人(超過40%)不使用 CI 服務器,但是差不多有 60% 的人表示在少數時間會使用 CI,其中有 32% 的人總是在 CI 服務器上運行測試代碼。
How do you run tests?
你怎么運行測試代碼?
59% like to run automated browser tests with PhantomJS or similar, and 51.3% also prefer to perform manual testing on a web browser. Automation in server-side tests amounts to 53.5% votes.
59% 的開發者喜歡使用 PhantomJS 或是類似的工具來運行自動化瀏覽器測試。也有 51.3% 的開發者喜歡在 web 瀏覽器上手動運行測試。有 53.5% 的投票者會在服務器端進行自動化測試。
What unit testing libraries do you use?
你使用過哪個單元測試庫?
It would seem most voters prefer either Mocha or Jasmine to run their JavaScript tests, although Tape received a healthy 9.8% of the ballots.
似乎大部分投票者都使用 Mocha 或是 Jasmine 來運行他們的 Javascript 測試用例。而 Tape 收到了 9.8% 的選票。
What code quality tools do you use?
你使用過哪個代碼質量檢測工具?
It would seem like respondents are divided between ESLint and JSHint, but JSLint is surprisingly strong after all these years, at almost 30%.
看起來受訪者在 ESLint 和 JSHint之間分成了兩派,但是 JSLint 還是有差不多 30% 的投票率,在這么多年之后勢頭還是驚人的強勁。
How do you prefer handling client-side dependencies?
你通過哪種方式來處理客戶端依賴關系?
npm took over as the client-side dependency management system of choice, with 60% of the votes casted their way. Bower still holds 20% of the audience, and plain old <script>
downloading and insertion managed to get 13.7% votes.
npm 接管了客戶端依賴管理系統的天下,有超過 60% 的投票就是證明它的方式。Bower 仍然有 20% 的觀眾,而通過下載和插入 <script>
標簽來管理的普通舊式方法則獲得了 13.7% 的選票。
What’s your preferred build script solution?
你首選的腳本構建方案是什么?
Build tooling choices are divided, partially due to the healthy amount of different options to choose from. Gulp is the most popular, with over 40% of the votes. Using npm run
is close by, at 27.8%, and Grunt got 18.5% of the audience.
構建工具的選擇很分散,部分原因是有太多的不同的選項可供選擇。Gulp 最流行,有著超過 40% 的選票,緊接著的是使用 npm run
,有 27.8%。Grunt 得到了 18.5% 的支持者。
What’s your preferred JavaScript module loading tool?
你首選的 JavaScript 模塊加載工具是什么?
At the moment, it would seem as most people are torn between Browserify and Webpack, although the latter leads by almost 7 points. 29% of users indicated they use transpile Babel modules first, before presumably using one of the two aforementioned tools to pack their modules together.
目前,看起來大部分開發者都在 Browserify 和 Webpack 之間徘徊,而后者高出了 7 個百分點。29% 的用戶表示他們在使用前面提到的這兩個工具打包他們的模塊之前會先使用 Babel 進行轉換。
What libraries do you use?
你使用過哪些庫?
In retrospect, this was one of the questions which would’ve benefitted a lot from collaborative editing. jQuery is still going strong, with over 50% of votes casted its way. Lodash and underscore are used by a significant portion of the JavaScript population that participated in the voting, while the xhr
micro library only clocked in 8% of the votes.
現在回顧起來,這是一個受益于協同編輯的問題之一。jQuery 獲得了超過 50% 的選票證明了它的勢頭依然很強勁。在參與投票的 JavaScript 使用者中,Lodash 與 Underscore 也被很大一部分開發者使用。 xhr
微型庫只獲得了 8% 的票數。
What frameworks do you use?
你使用過哪些框架?
Unsurprisingly, React and Angular are leading the pack. Backbone is still in a healthy position, with 22.8% of the votes.
毫無意外的,React 和 Angular 遙遙領先于其他框架,有著 22.8% 的 Backbone 仍然處在一個安全的位置。
Do you use ES6…
你使用 ES6 嗎?
Responses were quite divided in this question, with almost 20% never using ES6, over 10% using it exclusively, close to 30% using it extensively and almost 40% using it occasionally.
受訪者在這個問題上的反應相當分歧,有近 20% 的人幾乎從不使用 ES6,超過 10% 的人只寫 ES6,接近 30% 的人廣泛使用 ES6,近 40% 的人偶爾使用。
Do you know what’s coming in ES2016?
你知道在即將到來的 ES2016 中會有什么特性嗎?
Roughly speaking, half of the voters don’t know what’s coming in ES2016, while the other half have an idea of what’s coming next.
粗略地說,有超過一半的投票者表示不知道即將到來的 ES2016 中會有什么特性。另一半則對接下來的版本有所了解。
Do you understand ES6?
你了解 ES6 嗎?
Over 60% of respondents seem to understand the basics, while 10% have no idea about ES6 and over 25% consider they understand ES6 really well.
超過 60% 的受訪者似乎了解基本的概念。10% 的人對 ES6 毫不了解,有 25% 的受訪者認為他們非常了解 ES6。
Would you say ES6 is an improvement?
你認為 ES6 是一個進步嗎?
Almost 95% of the respondents consider ES6 to be an improvement to the language. I’ll congratulate TC39 members next time I run into them!
超過 95% 的受訪者認為 ES6 是對于 JavaScript 語言來說是一個進步,下一次碰到 TC39 的會員我得祝賀他們。
What are your preferred text editors?
你更喜歡什么文本編輯器?
Again, very divided because of the variety of options. Over half the respondents like Sublime Text, and over 30% like to use Atom, its open-source clone. Over 25% voted for WebStorm and also for vi/vim.
再一次,由于存在各種各樣的選擇導致結果非常分散。超過一半的受訪者喜歡 Sublime Text,超過 30% 的受訪者喜歡使用 atom 和 它的開源克隆版。超過 25% 的選票投給了 WebStorm,也有 25% 的選票投給了 vi/vim.
What’s your preferred development OS?
你更喜歡使用什么操作系統作為開發環境?
Over 60% of voters use Mac, while Linux and Windows users are close to 20% each.
超過 60% 的投票者使用 Mac,使用 Linux 和 Windows 的用戶都接近 20%。
How do you find reusable code, libraries and tools?
你是通過哪種方式搜索到可重用的代碼、庫和工具的?
Respondents seem to favor GitHub and search engines, but there’s also a healthy dose of blogs, 推ter, and the npm website being consumed.
受訪者似乎更青睞于 GitHub 和搜索引擎,但是也有一部分人使用博客,推ter 和 npm 網站。
Do you engage in social JavaScript events?
你參加過 Javascript 的社交活動嗎?
Almost 60% have attended at least a conference, while 74% indicated they like going to meetups.
有近 60% 的人參加過至少一次,74% 的人表示他們喜歡參加聚會。
What browsers do you support in your JavaScript applications?
在你的 Javascript 應用中,你都支持哪些瀏覽器?
Quite divided answers, but fortunately most of respondents don’t have to deal with customers on IE6 anymore.
回答相當分散,但是好在大多數受訪者表示他們不再處理使用 IE6 的客戶(的問題)了。
Do you learn about JavaScript latest features on a regular basis?
你會定期了解有關 Javascript 的最新特性嗎?
Around 80% of respondents try and stay up to date when it comes to the latest JavaScript features.
有 80% 的受訪者會嘗試實時了解并持續學習 Javascript 的最新特性。
Where do you learn about the latest JavaScript features?
你在哪了解最新的 JavaScript 特性?
Unsurprisingly, the top-notch Mozilla Developer Network is leading the pack in terms of JavaScript documentation and news. JavaScript Weekly is also a very popular source of news and articles at almost 40% of respondents.
不出所料地,Mozilla 開發者網絡 在 Javascript 文檔和新聞方面處于領先地位。JavaScript 周刊 也是一個非常受歡迎的新聞和文章的直接來源,它有著超過 40% 的投票。
Which of these features have you heard about?
你聽說過下面哪些新特性?
Over 85% of voters have heard about ServiceWorker, although I’d be curious to know how many of those have played around with it!
超過 85% 的人聽說過 ServiceWorker,我很想知道這些人中有多少人使用過它。
What languages do you use primarily, besides JavaScript?
除了 JavaScript,你還主要使用哪些語言?
There’s so many languages to choose from, I was bound to forget a few, but the results speak for themselves.
這有太多的語言可供選擇,我肯定會漏掉一些。但是結果不言自明。
Thanks!
謝謝
Lastly, I wanted to thank everyone who took part of the poll. It was far more popular than I anticipated and I’m looking forward to holding a similar poll next year. Hopefully, it’ll be one that’s even more diverse and perhaps a bit less biased.
最后,我想感謝參與此次調查的每一個人。這次調查的受歡迎程度超出了我的預期,我很期待明年再進行一次類似的調查。我希望,那將會是一個更多樣性的,也許會再少一點傾向性的調查。
What are your take-aways from the survey?
你從這次調查中獲得了什么呢?
本文根據 ponyfoo 的《JavaScript Developer Survey Results》所譯,整個譯文帶有自己的理解與思想,如果譯得不好或有不對之處還請同行朋友指點。如需轉載此譯文,需注明英文出處:https://ponyfoo.com/articles/javascript-developer-survey-results
來自: http://www.oschina.net//news/70954/javascript-developer-reports