`
fujohnwang
  • 浏览: 152803 次
社区版块
存档分类
最新评论

Programming with a thought considerate of others

阅读更多

1- add necessary comment into the javadoc of your classes/components as much as possible.
    Usually, you are not the only user of the classes or components you defined before,
    in order to ease other people to better or fully understand your thinking at the time you define your classes or components, adding some sample code or remark words into javadoc will be more helpful to others, even to yourself.

 

    You may wonder why I would like to mention this point, here are some reasons for this:

 

  • After on board CSTS, I have to dig into others' code to find out what this piece of work is for, so that I can do something, such as refactoring or develop new features on the fundation of those code. It takes time and sucks to try to understand those code pieces, no matter the code piece is good one or bad one, if the original author add some comment for his/her masterpiece, that will save me a lot.

        Another story is , Since the original system is still using older version of some framework(can't upgrade for a reason of stability), in order to support some functionality, I have to implement some support components/classes for this, but after that, I found others were using it in a way of going against my orginal philosophy, and almost mess up my design and structure. So I have to add more comment into the javadoc to notify others how this comoponent is supposed to be used.

 

        So, u see, it's a bilateral relationship, both for the orginal code author or the code user.

 

  •  There are two camps in the world of software solutions, the open source ones and the commercial ones. I remembered some words Dino said before, he said, "the most pain or pitfall of open source software is, they are seldom good-documented". To some extent, I have to agree. It's true that the commercial software solutions always provide well-prepared document and materials,  although some open souce solutions do so, e.g. the spring framework, jboss solutions, most of the open source software do not provide proper document , even necessary document.
           Bad-documented open source software solutions take more time for users to get close to them, seldom to become popular. So add more document to your software solutions as much as possible.
           Even down to the fundamental parts of the software, I mean, source code, we should add necessary comment to it. You and others will benefit from what you do one day.

2- If you TDD first, Code second, then please document everything last as more details as possible.

 

    Although you and others can find more information about your code later, but only unit tests are not enough, even though, you can't make sure whether you have created any unit tests. 

    So please go ahead to write document for your design and implementations, Agile doesn't mean no document, after you have finished your document, add links to your code.  In this way, others or yourself later can find out what's going on with your design and implementations soon.

    Everyone can benefit a lot from what you do.

 

Stay tuned!

分享到:
评论

相关推荐

    雅思口语素材

    She is appealing to me, tall and slim, 1.73 meters tall, wearing long flowing and silky hair with a side part and a wispy of fringe. She was born with a pair of big and bright eyes. Being amicable ...

    数据结构作业Hash表

    Note to define the strategy of conflict and considerate the size of the hash set.  Remove function: This function removes the key specified as the parameter from the hash set. Tips: refer to your ...

    hash table spell checking

    Note to define the strategy of conflict and considerate the size of the hash set.  Remove function: This function removes the key specified as the parameter from the hash set. Tips: refer to your ...

    电力英语考试选择题讲解

    6. It is considerate 考虑周到的 of you to turn down the radio while your sister is still ill in bed. 这是体贴你调低收音机,你的妹妹还在床上生病。 7. It’s not quite certain 肯定that he will be present...

    ImpREC 1.7c

    - user32.dll is always read from the system, prevents a crash from corrupted PE of user32.dll (MaRKuS_TH-DJM) - Latest version of psapi.dll (6.0.6000.16386) included - Fixed Vista64 crash bug ...

    英语四级整理笔记.doc

    56. _B_ his sister, Jack is quiet and does not easily make friends with others. A Dislike B Unlike C Alike D Liking like vt. 喜欢; dislike vt. 不喜欢,厌恶; unlike prep. 不象…; alike adj. & adv. ...

    computer aided designer

    It's very useful,helpful and considerate.You never know until you try,why not try it now?

    ncnn:ncnn是针对移动平台进行了优化的高性能神经网络推理框架

    ncnn is deeply considerate about deployment and uses on mobile phones from the beginning of design. ncnn does not have third party dependencies. it is cross-platform, and runs faster than all known ...

Global site tag (gtag.js) - Google Analytics