├── style.md └── README.md /style.md: -------------------------------------------------------------------------------- 1 | ## JavaScript style examples 2 | 3 | Code sample from [Mozilla's JavaScript guide](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Guide/Iterators_and_Generators). 4 | 5 | ### No semicolons 6 | 7 | ```javascript 8 | function fibonacci(){ 9 | var fn1 = 1 10 | var fn2 = 1 11 | while (1){ 12 | var current = fn2 13 | fn2 = fn1 14 | fn1 = fn1 + current 15 | yield current 16 | } 17 | } 18 | ``` 19 | 20 | ### Semicolons 21 | 22 | ```javascript 23 | function fibonacci(){ 24 | var fn1 = 1; 25 | var fn2 = 1; 26 | while (1){ 27 | var current = fn2; 28 | fn2 = fn1; 29 | fn1 = fn1 + current; 30 | yield current; 31 | } 32 | } 33 | ``` 34 | 35 | ### Commas at the beginning 36 | 37 | ```javascript 38 | function fibonacci(){ 39 | var fn1 = 1 40 | , fn2 = 1; 41 | 42 | while (1){ 43 | var current = fn2; 44 | fn2 = fn1; 45 | fn1 = fn1 + current; 46 | yield current; 47 | } 48 | } 49 | ``` 50 | 51 | ### Commas at the end 52 | 53 | ```javascript 54 | function fibonacci(){ 55 | var fn1 = 1, 56 | fn2 = 1; 57 | 58 | while (1){ 59 | var current = fn2; 60 | fn2 = fn1; 61 | fn1 = fn1 + current; 62 | yield current; 63 | } 64 | } 65 | ``` 66 | 67 | ### Methods and loops with no spaces 68 | 69 | ```javascript 70 | // No space before the curly brace 71 | function fibonacci(){ 72 | var fn1 = 1; 73 | var fn2 = 1; 74 | 75 | while (1){ 76 | var current = fn2; 77 | fn2 = fn1; 78 | fn1 = fn1 + current; 79 | yield current; 80 | } 81 | } 82 | ``` 83 | 84 | ### Methods and loops with one space 85 | 86 | ```javascript 87 | // The space appears before the curly brace 88 | function fibonacci() { 89 | var fn1 = 1; 90 | var fn2 = 1; 91 | 92 | while (1) { 93 | var current = fn2; 94 | fn2 = fn1; 95 | fn1 = fn1 + current; 96 | yield current; 97 | } 98 | } 99 | ``` 100 | 101 | ### Functions and loops with two spaces 102 | 103 | ```javascript 104 | // The function or method name has a space, and so does the curly brace 105 | function fibonacci () { 106 | var fn1 = 1; 107 | var fn2 = 1; 108 | 109 | while (1) { 110 | var current = fn2; 111 | fn2 = fn1; 112 | fn1 = fn1 + current; 113 | yield current; 114 | } 115 | } 116 | ``` 117 | 118 | ### Indentation with spaces 119 | 120 | ```javascript 121 | function fibonacci() { 122 | var fn1 = 1; 123 | var fn2 = 1; 124 | 125 | while (1) { 126 | var current = fn2; 127 | fn2 = fn1; 128 | fn1 = fn1 + current; 129 | yield current; 130 | } 131 | } 132 | ``` 133 | 134 | ### Indentation with tabs 135 | 136 | ```javascript 137 | function fibonacci() { 138 | var fn1 = 1; 139 | var fn2 = 1; 140 | 141 | while (1) { 142 | var current = fn2; 143 | fn2 = fn1; 144 | fn1 = fn1 + current; 145 | yield current; 146 | } 147 | } 148 | ``` 149 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | ## JavaScript Developer Survey 2 | 3 | This survey is for . You can fork it and send a pull request if you want to change or add questions. 4 | 5 | ### What type of JavaScript do you write? 6 | 7 | Multiple choice. 8 | 9 | * Browser 10 | * Server 11 | * Native (Windows 8, Appcelerator) 12 | * Hybrid Apps (Cordova/PhoneGap) 13 | * Mobile 14 | * Other 15 | 16 | ### Where do you use JavaScript? (multiple choice) 17 | 18 | Multiple choice. 19 | 20 | * At work 21 | * Side projects 22 | * Other 23 | 24 | ### How long have you been writing JavaScript? 25 | 26 | Radio. 27 | 28 | * One year or less 29 | * Two years 30 | * Three to five years 31 | * Five to 10 years 32 | * More than 10 years 33 | 34 | ### Do you use a language that compiles to JavaScript? 35 | 36 | Radio. 37 | 38 | * Yes 39 | * No 40 | 41 | ### Which compile-to-JavaScript languages do you use, if any? 42 | 43 | Multiple choice. 44 | 45 | * CoffeeScript 46 | * ClojureScript 47 | * Dart 48 | * TypeScript 49 | * Other 50 | 51 | ### What JavaScript stylistic choices do you prefer? 52 | 53 | Multiple choice. 54 | 55 | You can find examples for each of these descriptions here: [style.md](https://github.com/alexyoung/dailyjs-survey/blob/master/style.md). 56 | 57 | * No semicolons 58 | * Semicolons 59 | * Commas at the beginning 60 | * Commas at the end 61 | * Functions and loops with no spaces 62 | * Functions and loops with one space 63 | * Functions and loops with two spaces 64 | * Indentation with spaces 65 | * Indentation with tabs 66 | 67 | ### Which EcmaScript 5 features do you use? 68 | 69 | Multiple choice. 70 | 71 | * Object.create 72 | * Object seal and freeze methods 73 | * Use bind method on functions 74 | * New Array methods like forEach 75 | * Getters and setters 76 | * Strict mode 77 | 78 | ### Unit Testing: Do you write tests? 79 | 80 | Radio. 81 | 82 | * Yes 83 | * No 84 | * Sometimes / Not enough / Not too much / When needed 85 | 86 | ### Unit Testing: What environment do you run unit tests in? 87 | 88 | Multiple choice. 89 | 90 | * Manually in-browser 91 | * Node.js 92 | * PhantomJS 93 | * SlimerJS 94 | * Testling 95 | * Other 96 | 97 | ### Unit Testing: What unit testing libraries do you use? 98 | 99 | Multiple choice. 100 | 101 | * QUnit 102 | * Jasmine 103 | * Karma 104 | * Mocha 105 | * node-tap / tape 106 | * Nodeunit 107 | * Vows 108 | * YUITest 109 | * Other 110 | 111 | ### Unit Testing: Do you run tests on a Continuous Integration system? 112 | 113 | Radio. 114 | 115 | * Yes 116 | * No 117 | 118 | ### Unit Testing: Which Continuous Integration system do you use? 119 | 120 | Multiple choice. 121 | 122 | * Jenkins 123 | * Hudson 124 | * Travis CI 125 | * Bamboo 126 | * CruiseControl 127 | * TeamCity 128 | * Other [specify] 129 | 130 | ### Static Analysis: Do you use any tools for verifying code quality? 131 | 132 | Multiple choice. 133 | 134 | * JSLint 135 | * JSHint 136 | * Google Closure Compiler 137 | * YUI Compressor 138 | * No tools 139 | * Other 140 | 141 | ### How do you handle client-side dependencies? 142 | 143 | Multiple choice. 144 | 145 | * Bower 146 | * Component 147 | * npm 148 | * Plain old files 149 | * Volo 150 | * Other 151 | 152 | ### What's your preferred build script solution? 153 | 154 | Multiple choice. 155 | 156 | * Make 157 | * npm scripts 158 | * Grunt 159 | * Gulp 160 | * Browserify 161 | * Other 162 | 163 | ### Front-End Frameworks: What frameworks do you use? 164 | 165 | Multiple choice. 166 | 167 | * Agility 168 | * AngularJS 169 | * Backbone.js 170 | * CanJS 171 | * DerbyJS 172 | * Dojo 173 | * Ember 174 | * Ext 175 | * Flight 176 | * Ionic Framework 177 | * KendoUI 178 | * Knockout 179 | * Meteor 180 | * MooTools 181 | * jQuery 1.x 182 | * jQuery 2.x 183 | * React 184 | * Sammy 185 | * WinJS 186 | * YUI 187 | * None 188 | * I use modules instead of frameworks 189 | * Other 190 | 191 | ### Project Development: What is your IDE or Editor of choice for JavaScript projects? 192 | 193 | Multiple choice. 194 | 195 | * SublimeText 196 | * TextMate 197 | * Notepad++ 198 | * IntelliJ 199 | * Dreamweaver 200 | * NetBeans 201 | * SpringSource 202 | * Eclipse 203 | * jEdit 204 | * Vim or vi clone 205 | * Visual Studio 206 | * Emacs 207 | * Other 208 | 209 | ### Project Development: What is the OS you are using for your development? 210 | 211 | Multiple choice. 212 | 213 | * Linux 214 | * Mac 215 | * Windows 216 | * Other 217 | 218 | ### Project Discovery: How do you find reusable code, libraries and tools? 219 | 220 | Multiple choice. 221 | 222 | * npmjs.org 223 | * GitHub 224 | * Google Code 225 | * Social Bookmarking Sites 226 | * News Sites 227 | * Search Engines 228 | * Bitbucket 229 | * SourceForge 230 | * DailyJS 231 | * Echo JS 232 | * Twitter / IRC / Asking friends 233 | * Newsletters 234 | * Other 235 | 236 | ### Project Hosting: Preferred hosting for your own JavaScript projects 237 | 238 | Multiple choice. 239 | 240 | * GitHub 241 | * Google Code 242 | * Bitbucket 243 | * Self-hosted 244 | * Other 245 | 246 | ### Community: how do you learn about JavaScript offline? 247 | 248 | Multiple choice. 249 | 250 | * conferences - general web development 251 | * conferences - JS specific 252 | * meetups / groups - general web development 253 | * meetups / groups - JS specific 254 | 255 | ### CDN: Which service do you use to serve third-party libraries? 256 | 257 | Multiple choice. 258 | 259 | * Google Ajax Libraries 260 | * Microsoft Ajax Content Delivery Network 261 | * jQuery CDN 262 | * CDNJS (CloudFlare) 263 | * MaxCDN 264 | * Browserify CDN / wzrd.in 265 | * jsDelivr 266 | * Other 267 | 268 | ### IE: What's the minimum version of Internet Explorer you target? 269 | 270 | Radio. 271 | 272 | * IE 7 273 | * IE 8 274 | * IE 9 275 | * IE 10 276 | * IE 11 277 | * N/A 278 | 279 | ### ES6: Are you using ES6 features in your code right now? 280 | 281 | Radio. 282 | 283 | * Yes 284 | * No 285 | 286 | ### ES6: If you are using ES6 features, Which polyfill/tools you are using to target browsers yet to support ES6 ? 287 | 288 | Multiple choice. 289 | 290 | * Traceur 291 | * es6ify 292 | * 6to5 293 | * Other 294 | 295 | ### ES6: If you are using ES6 features, Which features do you currently use or planning to use in next 6 months ? 296 | 297 | Multiple choice. 298 | 299 | * Arrow Functions 300 | * Classes 301 | * Default 302 | * ES6 APIs - Array, Math, Number, String, Object APIs 303 | * Generators 304 | * Iterators 305 | * Modules 306 | * Promises 307 | * Proxies 308 | * Rest 309 | * Spread 310 | * String Templates 311 | * Subclassable Built-ins 312 | * Symbols 313 | * Let, Const & Block Scoping 314 | 315 | ### Other than JavaScript, what are your primary development languages? 316 | 317 | Multiple choice. 318 | 319 | * C/C++/Objective-C 320 | * C#/.Net 321 | * Python 322 | * Java 323 | * Ruby 324 | * Lisp 325 | * Clojure 326 | * Erlang 327 | * Go 328 | * Scala 329 | * Perl 330 | * PHP 331 | * Other 332 | --------------------------------------------------------------------------------