senooken JP Social
  • FAQ
  • Login
senooken JP Socialはsenookenの専用分散SNSです。
  • Public

    • Public
    • Network
    • Groups
    • Popular
    • People

Conversation

Notices

  1. 7of9(0x70f9=28921) (7of9@qiitadon.com)'s status on Thursday, 18-Oct-2018 10:49:18 JST 7of9(0x70f9=28921) 7of9(0x70f9=28921)

    #comment
    #coding
    #grep
    #search

    自分は下記のようなコメントを書く時がある。

    ...
    XXX_unit(ON); // @ func_AAA() > BBB開始時
    ...
    XXX_unit(ON); // @ func_CCC() > DDDの時の処理
    ...
    XXX_unit(ON); // @ func_EEE() > EEEの時の処理
    ...

    XXX_unit(ON)でgrepした時、目的の実装にすぐに到達できるようにするため。

    全ての関数コールでそうするのでなく、必要になった時点でコメントを足すという感じ。

    コメントがないとgrepはこうなる。

    XXX_unit(ON);
    XXX_unit(ON);
    XXX_unit(ON);

    そしてすべてを総当たりで見ることになり、mental overloadが増す。

    In conversation Thursday, 18-Oct-2018 10:49:18 JST from qiitadon.com permalink
    • 7of9(0x70f9=28921) (7of9@qiitadon.com)'s status on Thursday, 18-Oct-2018 11:02:13 JST 7of9(0x70f9=28921) 7of9(0x70f9=28921)
      in reply to

      この方法の欠点はソース上のコメントが増えること。

      欠点と利点を天秤にかけ付ける付けないを検討する。

      In conversation Thursday, 18-Oct-2018 11:02:13 JST permalink

Feeds

  • Activity Streams
  • RSS 2.0
  • Atom
  • Help
  • About
  • FAQ
  • TOS
  • Privacy
  • Source
  • Version
  • Contact

senooken JP Social is a social network, courtesy of senooken. It runs on GNU social, version 2.0.2-beta0, available under the GNU Affero General Public License.

Creative Commons Attribution 3.0 All senooken JP Social content and data are available under the Creative Commons Attribution 3.0 license.