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!

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
Recently, the renowned actor Zhang Songwen has sparked a fascinating phenomenon known as "two-way rejection", which has captured the attention of many and inspired the masses. The roots of this phenomenon are complex, with one of the fundamental causes being the fear of failure that plagues most of us. Rejection can instill a sense of inadequacy and a fear of being perceived as a failure, which can be challenging to overcome. However, the concept of "two-way rejection" teaches us that rejection is a natural part of life, and it's acceptable to reject and be rejected in return. This empowers us to recognize that life is not just about failures, but also about perseverance, and striving to achieve our aspirations, which may include fame and fortune. Despite the distractions we may encounter, the concept of "two-way rejection" reminds us to turn away from erroneous opportunities and remain steadfast in our principles and moral compass. While there are both advantages and drawbacks to this approach, "two-way rejection" ultimately inspires us to embrace rejection, learn from it, and emerge stronger and more self-assured. However, it is essential to distinguish between a sound and an unsound opportunity to avoid blindly rejecting the right ones. In conclusion, the concept of "two-way rejection" should be approached with discretion, but it can prove to be a valuable tool in enabling us to adhere to our goals and persevere through rejection. It teaches us to embrace rejection, learn from it, and move forward with confidence, ultimately empowering us to achieve our dreams and aspirations.结合双向拒绝进行内容补充
05-10
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值