javascript
javascript 开发者年度调查报告(2016-尊龙游戏旗舰厅官网
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
- 上一篇:
- 下一篇: