什么激励你记录/不记录您的代码? [英] What motivates you to document/not document your code?

查看:121
本文介绍了什么激励你记录/不记录您的代码?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在面对这个问题,因为我的组织中没有任何文件。



所以,我想知道,我的代码我也尝试写出重要的事情,即当有人读取我的代码时,他们可以理解上下文。



所以我的问题是:


  1. 什么让您记录或不记录您的代码?


  2. <


  3. 这是什么?


  4. / ol>

    欢迎有关代码文档的更多建议,标记为社区wiki。



    更新1



    好的,所以我得到了每一个有趣的答案,但有一个问题,所有你们正在谈论代码评论,但是公司的内部网页wiki页面如何,可以在Wiki索引和如何重用等等的教程中进行搜索?

    解决方案


    1. 我会明白这是6个月吗?

      :转到步骤2

      不确定:转到步骤6

      :转到步骤6


    2. 其他人会理解吗?

      :转到步骤3

      不确定:转到步骤6

      :转到步骤6


    3. 我与他人合作吗?

      :转到步骤6

      :转到步骤4


    4. 我会和别人一起工作吗?

      :转到步骤6

      :转到步骤5


    5. 代码是否自我记录?

      :停止

      :转到步骤6


    6. 文件



    I am facing this problem of NO DOCUMENTATION what so ever in my organization.

    So, I am wondering, when ever I write my code I also try to write the important things, i.e. when some one reads my code, they can understand the context.

    So my questions are:

    1. What makes you document or not document you code?

    2. How can we make developers document without making it a monotonous job after the initial thrust.

    3. What are the critical things a developer should keep in mind while documenting, so that he/she keeps it crisp, concise, easy to read and easy to write.

    Any more suggestions on documentation of code are welcome, marking as community wiki.

    UPDATE 1

    Ok, so I got some interesting answers from every one, but there is one problem, all of you guys are talking about code comments but what about company's intranet wiki pages, make it searchable on the wiki index and tutorials of how to re-use etc?

    解决方案

    1. Will I understand this is 6 months?
      Yes: Go to step 2
      Unsure: Go to step 6
      No: Go to step 6

    2. Will someone else understand this?
      Yes: Go to step 3
      Unsure: Go to step 6
      No: Go to step 6

    3. Am I working with others?
      Yes: Go to step 6
      No: Go to step 4

    4. Will I be working with others?
      Yes: Go to step 6
      No: Go to step 5

    5. Is the code self documenting?
      Yes: Stop
      No: Go to step 6

    6. Document

    这篇关于什么激励你记录/不记录您的代码?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆