Syoichi's Tumblr: 自分のコーディングルールとその理由

0-9:

・横80列で折り返す。
普段80列で開発してるわけじゃないけど、横に長いコードも見にくいので。

・1funtionは30行にする。
これも列指定と同じ意味で。
数字自体はそこまで意味がないけど、長いコードはそれ自体問題がある可能性が高い。

・1ファイルは200~300行
「JSを1ファイルに200行以上書くと人間は死ぬ」と言われてるけど、実際はもうちょっと多くても大丈夫。

・インデントは8タブ
タブを使う理由は「タブはスペースに一括置換できるけど、スペースはタブに一括置換できない」から。

Syoichi's Tumblr: 自分のコーディングルールとその理由

0-9:

・横80列で折り返す。
普段80列で開発してるわけじゃないけど、横に長いコードも見にくいので。

・1funtionは30行にする。
これも列指定と同じ意味で。
数字自体はそこまで意味がないけど、長いコードはそれ自体問題がある可能性が高い。

・1ファイルは200~300行
「JSを1ファイルに200行以上書くと人間は死ぬ」と言われてるけど、実際はもうちょっと多くても大丈夫。

・インデントは8タブ
タブを使う理由は「タブはスペースに一括置換できるけど、スペースはタブに一括置換できない」から。

Posted 4 months ago 102 notes

Notes:

  1. roesy reblogged this from mokari
  2. techou reblogged this from 0-9
  3. wfsp reblogged this from vivit-jc
  4. vivit-jc reblogged this from interglacial
  5. nobby0-0 reblogged this from syoichi
  6. ayu reblogged this from syoichi
  7. echizen-kurage reblogged this from syoichi
  8. yoderkeez reblogged this from nasubanana
  9. ken0205 reblogged this from syoichi
  10. nasubanana reblogged this from kens-notepad and added:
    ・横80列で折り返す。 普段80列で開発してるわけじゃないけど、横に長いコードも見にくいので。 ・1funtionは30行にする。 これも列指定と同じ意味で。 数字自体はそこまで意味がないけど、長いコードはそれ自体問題がある可能性が高い。...
  11. kens-notepad reblogged this from syoichi
  12. kfumiya reblogged this from syoichi
  13. sada123 reblogged this from syoichi
  14. asanons reblogged this from syoichi
  15. mokari reblogged this from syoichi
  16. mno-okr reblogged this from 0-9
  17. alfadori reblogged this from syoichi
  18. orihika reblogged this from syoichi
  19. kkuma reblogged this from syoichi
  20. overthetetrapod reblogged this from syoichi
  21. cr96 reblogged this from syoichi
  22. red765 reblogged this from syoichi
  23. nullpointerexception reblogged this from syoichi
  24. stardance reblogged this from syoichi
  25. stardance reblogged this from syoichi
  26. dekoi2501post reblogged this from hsmt
  27. okanoao reblogged this from hsmt
  28. matubuse reblogged this from syoichi
  29. hsmt reblogged this from syoichi
  30. toqoz reblogged this from 0-9
  31. criff reblogged this from syoichi
  32. vitan reblogged this from syoichi
  33. nobby0-0 reblogged this from syoichi

About:

Following: