coding-style 478

  1. Should a function have only one return statement?
  2. How do you return multiple values in Python?
  3. Single quotes vs. double quotes in Python
  4. What is the standard Python docstring format?
  5. What is the purpose of wrapping whole Javascript files in anonymous functions like “(function(){ … })()”?
  6. Python `if x is not None` or `if not x is None`?
  7. Are PHP short tags acceptable to use?
  8. Order of items in classes: Fields, Properties, Constructors, Methods
  9. Is there a better way of writing v = (v == 0 ? 1 : 0);
  10. Styling multi-line conditions in 'if' statements?
  11. C++: “std::endl” vs “\n”
  12. Why use def main()?
  13. typeof !== “undefined” vs. != null
  14. Vim 80 column layout concerns
  15. Why do most fields (class members) in Android tutorial start with `m`?
  16. What is the most effective way to get the index of an iterator of an std::vector?
  17. Good Haskell source to read and learn from
  18. What's the best way to convert a number to a string in JavaScript?
  19. What's the purpose of using braces (i.e. {}) for a single-line if or loop?
  20. Should import statements always be at the top of a module?
  21. Tabs versus spaces in Python programming
  22. What open source C++ static analysis tools are available?
  23. Declaring Multiple Variables in JavaScript
  24. #pragma once vs include guards?
  25. Should methods in a Java interface be declared with or without a public access modifier?
  26. 'AND' vs '&&' as operator
  27. When do you use the “this” keyword?
  28. 80-characters / right margin line in Sublime Text 3
  29. android set style in code
  30. When is JavaScript's eval() not evil?
  31. Coding Conventions - Naming Enums
  32. How do you tell someone they're writing bad code?
  33. What does 'foo' really mean?
  34. Which comment style should I use in batch files?
  35. Why are dashes preferred for CSS selectors / HTML attributes?
  36. JSON Spec - does the key have to be surrounded with quotes?
  37. Getter and Setter?
  38. Are there any coding standards for JavaScript?
  39. What was the strangest coding standard rule that you were forced to follow?
  40. Why do some scripts omit the closing PHP tag, '?>'?
  41. String output: format or concat in C#?
  42. Using “super” in C++
  43. return statement vs exit() in main()
  44. Good or bad practice? Initializing objects in getter
  45. Why is it considered a bad practice to omit curly braces?
  46. codestyle; put javadoc before or after annotation?
  47. Internal typedefs in C++ - good style or bad style?


  48. C++ code in header files
  49. Creating an empty list in Python
  50. Should enums in C# have their own file?