英文经典阅读之《Effective Java 3rd》----小试牛刀【自己翻译】
学习:
说来惭愧,开发这么多年了还木有“完完整整”的看过一本英文技术相关的书籍,而对于新的知识的学习通常还是从中文教程开始的,而其实学技术最好的办法就是直接通过阅读官方文档按最正确的姿势来学是最有效也是最权威的,毕境从英文到中文肯定还是有一定的翻译误差,另外对于编程来说基本都是跟英文打交道,所以能够非常流畅而又非常准确的阅读官方文档一直成为自己心中之所想,但是也一直被自己尝试阅读原滋原味的官网的各种说明读不太懂做为自己一直还是在亲切的中文资料中去搜寻,幸好在2018年初遇到了龙哥在知识星球上开设的如下课程:
燃起了自己要跟着龙哥一起在2018年完完整整的读通这本纯英文的Java史诗级巨著的信心,有大师在前面指引方向我想自己也不会遇到困难就退缩,跟着他的步伐一个个脚印来来阅读,期待着能在2019年新年到来的时候再回过头来感受到目示完成的兴奋之情,我也会完完整整的将整个的蜕变过程记录到博客当中,当然要想让自己从喜欢看中文书籍过渡到看英文书籍,其坚持是必须的,半途而费终就无所收获,所以我要坚持!!!!坚持!!!!坚持!!!!坚持!!!!坚持!!!!坚持!!!!
开篇学习是以龙哥的一篇他在infoq中翻译过的英文新闻开始的,并未正式开始阅读《Effective Java(3rd)》这本书,而是叫我们独立的试着将这篇英文新闻翻译一遍,待翻译完之后再跟他的翻译做下对比,来切身体会到英文阅读的感觉 以及英文阅读所给咱们带来的快感,所以先来将其原文贴出来,接下来准备完成龙哥的这个作用:
说实话还没正式翻译看着密密麻麻的英文就有种畏难的情绪,但是为了让自己能不畏,就必须咬牙坚持,万事开头难,下面准备完完整整通过自己的努力将上面的这则新闻翻译出来,当然还是得一小段一小段慢慢来翻译喽,遇到不会的就查词典解决,过程如下:The term "technical debt" was coined by Ward Cunningham. It describes the obligation that a development team incurs when it chooses a design or construction approach that is easy to implement in the short run but has a larger negative impact in the long run. Agilists provide their view point on what should be considered a technical debt and how it could be classified.
Martin Fowler suggested the following definition for technical debt,
Technical debt, is similar to a financial debt. Like a financial debt, the technical debt incurs interest payments, which come in the form of the extra effort that we have to do in future development because of the quick and dirty design choice. We can choose to continue paying the interest, or we can pay down the principal by refactoring the quick and dirty design into the better design. Although it costs to pay down the principal, we gain by reduced interest payments in the future.
Steve McConnell classified the technical debt into two kinds,
Unintentional – Junior developers writing bad code because of their inexperience.
Intentional - Team makes a conscious decision to optimize for the present rather than for the future by making some design choices which may be a quick and dirty way of resolving the situation.
Uncle Bob, added that sometimes mess is also considered to be technical debt. This is not correct. According to him,
A mess is not a technical debt. A mess is just a mess. Technical debt decisions are made based on real project constraints. They are risky, but they can be beneficial. The decision to make a mess is never rational, is always based on laziness and unprofessionalism, and has no chance of paying of in the future. A mess is always a loss.
Uncle Bob suggested that technical debt creates a need for cleanliness in the code, just like one needs to be more disciplined when he takes a big mortgage debt. He added that once the team decides to take a technical debt, it becomes all the more important to keep the code squeaky clean. Unless, this is done the situation might quickly disintegrate and paying off the debt would be a harder challenge.
Martin Fowler gave his view point that a mess is also a technical debt albeit of a different kind. He described mess as a reckless debt which results in amplified challenges as compared to a prudent debt which is based on well calculated situation. He further classified the technical debt as deliberate and inadvertent to complete the quadrant.
Martin gave the following examples for classifying technical debt into quadrants
Reckless - Deliberate – The team does not have time for design and provides a quick and dirty solution with little foresight into quality.
Prudent - Deliberate – The team must ship the product now with the known shortcomings and take a proactive lead on the consequences.
Reckless - Inadvertent – The team is unaware of the basic design principles and hence does not even realize the mess that they are introducing.
Prudent - Inadvertent – This is true for teams with excellent designers. They deliver a solution which is delivering business value but after completing the solution, they understand what the best design approach could have been.
Thus, having a technical debt in a project is usually inevitable and should be considered to be an expectation. The key lies in making sure that a team is not introducing reckless debts which contribute to the mess and are very difficult, if not impossible to deal with.
The term "technical debt" was coined by Ward Cunningham. It describes the obligation that a development team incurs when it chooses a design or construction approach that is easy to implement in the short run but has a larger negative impact in the long run. Agilists provide their view point on what should be considered a technical debt and how it could be classified.
“The term "technical debt" was coined by Ward Cunningham.”
生字查字典:①、"Ward Cunningham":沃德坎宁安(wiki创始人)。②、"technical debt":技术债务。③、"term":术语。④、"coin":这不是硬币的意思嘛,很显然这应该是个动词,而不是名字,根据词典解释:![]()
很明显是“创造”的意思。
翻译:
【“技术债务”这个术语是被WIKI创始人沃德坎宁安所创造的。】
【“It describes the obligation that a development team incurs when it chooses a design or construction approach that is easy to implement in the short run but has a larger negative impact in the long run.”】生字查字典:①、 obligation:有多层函义,查看词典如下:根据上下文,应该是“债务”的意思,因为在前面有一个“technical debt 技术债务”。②、incurs:会导致。③、approach:方法。④、impact:影响。⑤、in the short run:从短期看。⑥、in the long run:从长远来看。思考:①、这句话的"It"代表前面的"technical debt":技术债务。翻译:【它(指技术债务)描述的是这个一个开发团队的债务会导致当它选择一个设计或者执行方法时从短期看是比较容易实现的,但是从长远来看是有较大的负面影响的。】
【“Agilists provide their view point on what should be considered a technical debt and how it could be classified.”】生字查字典:①、Agilists:敏捷开发。②、view point:观点。③、classify:分类。翻译:【敏捷开发提供了它们的观点关于什么是需要被认为是一个技术债务或者如何进行分类。】
【“技术债务”这个术语是被WIKI创始人沃德坎宁安所创造的。它(指技术债务)描述的是这个一个开发团队的债务会导致当它选择一个设计或者执行方法时从短期看是比较容易实现的,但是从长远来看是有较大的负面影响的。敏捷开发提供了它们的观点关于什么是需要被认为是一个技术债务或者如何进行分类。】
Martin Fowler suggested the following definition for technical debt,
Technical debt, is similar to a financial debt. Like a financial debt, the technical debt incurs interest payments, which come in the form of the extra effort that we have to do in future development because of the quick and dirty design choice. We can choose to continue paying the interest, or we can pay down the principal by refactoring the quick and dirty design into the better design. Although it costs to pay down the principal, we gain by reduced interest payments in the future.
【"Martin Fowler suggested the following definition for technical debt,"】
生字查字典:
①、Martin Fowler:马丁福勒是国际著名的面向对象分析设计、UML、模式等方面的专家,敏捷开发方法的创始人之一,现为ThoughtWorks公司的首席科学家。
翻译:
【马丁福勒建议下面的定义则为技术债务,】
【"Technical debt, is similar to a financial debt. Like a financial debt, the technical debt incurs interest payments, which come in the form of the extra effort that we have to do in future development because of the quick and dirty design choice."】生字查字典:①、financial:金额。②、in the forms of:以...的时形。③、extra effort:额外的努力。④、interest payments:利息支付。翻译:【技术债务,跟财务债务很类似,像财务债务它会产生利息支付,而技术债务是以将来我们需要做额外的努力的形式进行展现的,原因也就是由于快速并且不合理的设计选择所致。】
【"We can choose to continue paying the interest, or we can pay down the principal by refactoring the quick and dirty design into the better design."】生字查字典:①、principal:本金。②、refactor ... into ...:重构成。③、pay down:偿还。翻译:【我们可以选择继续支付利息,或者我们可以通过将"快速而不合理的设计"重构成更好的设计来偿还本金。】
【"Although it costs to pay down the principal, we gain by reduced interest payments in the future."】生字查字典:①、reduced:减少。翻译:【通过偿还本金以便在未来我们可以减少利息。】
【马丁福勒建议下面的定义则为技术债务,技术债务,跟财务债务很类似,像财务债务它会产生利息支付,而技术债务是以将来我们需要做额外的努力的形式进行展现的,原因也就是由于快速并且不合理的设计选择所致。我们可以选择继续支付利息,或者我们可以通过将"快速而不合理的设计"重构成更好的设计来偿还本金。通过偿还本金以便在未来我们可以减少利息。】
Steve McConnell classified the technical debt into two kinds,
Unintentional – Junior developers writing bad code because of their inexperience.
Intentional - Team makes a conscious decision to optimize for the present rather than for the future by making some design choices which may be a quick and dirty way of resolving the situation.
Uncle Bob, added that sometimes mess is also considered to be technical debt. This is not correct. According to him,
【“Steve McConnell classified the technical debt into two kinds,”】生字查字典:①、Steve McConnell:斯蒂夫·迈克康奈尔(Steve McConnell)是IEEE Software的总编,Construx Software的总工程师兼总裁,多家世界知名软件公司的顾问,在美国软件业享有很高的声誉。②、classify...into...:把...分类为...。③、two kinds:两种。翻译:【斯蒂夫·迈克康奈尔将技术债务分为两种,】
【“Unintentional – Junior developers writing bad code because of their inexperience.”】生字查字典:①、Unintentional:非故意的。②、Junior:初级的。③、inexperience:缺乏经验。翻译:【第一种为非故障的:初始开发人员由于缺乏经验编写了比较烂的代码造成。】
【“Intentional - Team makes a conscious decision to optimize for the present rather than for the future by making some design choices which may be a quick and dirty way of resolving the situation.”】生字查字典:①、intentianal:故意的。②、conscious:有意识的。③、rather than:而不是。④、resolving the situation:解决这种情况。翻译:【第二种为故意的:团队做一个有意识的决定来优化现状而不是未来针对要解决既快又糟糕的方式而去做一些设计上的选择。】
【“Uncle Bob, added that sometimes mess is also considered to be technical debt. This is not correct. According to him,”】生字查字典:①、mess:混乱。翻译:【鲍勃叔叔补充有时后混乱也会被认为是技术债务,根据它的意思是这是不正确的。】
【斯蒂夫·迈克康奈尔将技术债务分为两种:
- 初始开发人员由于缺乏经验编写了比较烂的代码造成。
- 团队做一个有意识的决定来优化现状而不是未来针对要解决既快又糟糕的方式而去做一些设计上的选择。
鲍勃叔叔补充有时后混乱也会被认为是技术债务,根据它的意思是这是不正确的。】
A mess is not a technical debt. A mess is just a mess. Technical debt decisions are made based on real project constraints. They are risky, but they can be beneficial. The decision to make a mess is never rational, is always based on laziness and unprofessionalism, and has no chance of paying of in the future. A mess is always a loss.
【“A mess is not a technical debt. A mess is just a mess. Technical debt decisions are made based on real project constraints. They are risky, but they can be beneficial.”】
生字查字典:
①、are made based on:都是基于。
②、risky:有风险的。
③、beneficial:有益的。
翻译:
【“混乱并非是技术债务。混乱仅仅就是混乱而已。技术债务的决定它是基于一个真实的项目约束的,它们是有风险的但也有可是有益的。”】
【“The decision to make a mess is never rational, is always based on laziness and unprofessionalism, and has no chance of paying of in the future. A mess is always a loss.”】
生字查字典:
①、rational:合理的。
②、layziness:懒惰的。③、unprofessionalism:非专业的。
翻译:
【“使它混乱的决定从来都不是合理的,而它又是基于懒惰的和非专业的,并且在未来是没有支付是偿还的,混乱通常就是一种损失。”】
【“混乱并非是技术债务。混乱仅仅就是混乱而已。技术债务的决定它是基于一个真实的项目约束的,它们是有风险的但也有可是有益的。使它混乱的决定从来都不是合理的,而它又是基于懒惰的和非专业的,并且在未来是没有支付是偿还的,混乱通常就是一种损失。”】
Uncle Bob suggested that technical debt creates a need for cleanliness in the code, just like one needs to be more disciplined when he takes a big mortgage debt. He added that once the team decides to take a technical debt, it becomes all the more important to keep the code squeaky clean. Unless, this is done the situation might quickly disintegrate and paying off the debt would be a harder challenge.
【“Uncle Bob suggested that technical debt creates a need for cleanliness in the code, just like one needs to be more disciplined when he takes a big mortgage debt.”】
生字查字典:①、cleanliness:清洁。②、disciplined:有纪律的。③、mortgage:抵押贷款。翻译:【“Bob叔建议技术债务为了代码的清洁创建需要,就像一个人需要一个大的抵押贷款债务需要更加有纪律。”】
【“He added that once the team decides to take a technical debt, it becomes all the more important to keep the code squeaky clean. ”】生字查字典:①、squeaky:吱吱响的。翻译:【“他补充说一旦团队决定要承担技术债务,保持代码干净就变得尤为重要啦~”】
【“Unless, this is done the situation might quickly disintegrate and paying off the debt would be a harder challenge.”】
生字查字典:
①、disintegrate:分解。
翻译:【“除非处理解决可能快速分解并且偿还债务可能是一个巨大的挑战。”】
【“Bob叔建议技术债务为了代码的清洁创建需要,就像一个人需要一个大的抵押贷款债务需要更加有纪律。他补充说一旦团队决定要承担技术债务,保持代码干净就变得尤为重要啦~除非处理解决可能快速分解并且偿还债务可能是一个巨大的挑战。”】
Martin Fowler gave his view point that a mess is also a technical debt albeit of a different kind. He described mess as a reckless debt which results in amplified challenges as compared to a prudent debt which is based on well calculated situation. He further classified the technical debt as deliberate and inadvertent to complete the quadrant.
【"Martin Fowler gave his view point that a mess is also a technical debt albeit of a different kind."】
生字查字典:①、albeit:尽管。翻译:【“马丁福勒提出了他的观点:混乱也是一种技术债务尽管这有所不同。”】
【"He described mess as a reckless debt which results in amplified challenges as compared to a prudent debt which is based on well calculated situation."】生字查字典:①、reckless:不计后果的。②、amplified:放大的。③、prudent:谨慎的。翻译:【“他描述混乱将一个其结果是在一个放大的挑战的不计后果的债务作为与建立在计算情况的谨慎的债务相比。”】
【"He further classified the technical debt as deliberate and inadvertent to complete the quadrant."】生字查字典:①、deliberate:深思熟虑的。②、inadvertent:无意中做的。③、quadrant:象限。翻译:【“他进一步将技术债务分类为深思熟虑的和无意中做的完成象限。”】
【“马丁福勒提出了他的观点:混乱也是一种技术债务尽管这有所不同。他描述混乱将一个其结果是在一个放大的挑战的不计后果的债务作为与建立在计算情况的谨慎的债务相比。他进一步将技术债务分类为深思熟虑的和无意中做的完成象限。”】
Martin gave the following examples for classifying technical debt into quadrants
Reckless - Deliberate – The team does not have time for design and provides a quick and dirty solution with little foresight into quality.
Prudent - Deliberate – The team must ship the product now with the known shortcomings and take a proactive lead on the consequences.
Reckless - Inadvertent – The team is unaware of the basic design principles and hence does not even realize the mess that they are introducing.
Prudent - Inadvertent – This is true for teams with excellent designers. They deliver a solution which is delivering business value but after completing the solution, they understand what the best design approach could have been.
Thus, having a technical debt in a project is usually inevitable and should be considered to be an expectation. The key lies in making sure that a team is not introducing reckless debts which contribute to the mess and are very difficult, if not impossible to deal with.
【"Martin gave the following examples for classifying technical debt into quadrants"】
生字查字典:翻译:【“马丁针对将技术债务分类成象限给出如下例子:”】
【"1. Reckless - Deliberate – The team does not have time for design and provides a quick and dirty solution with little foresight into quality."】生字查字典:①、foresight:远见。翻译:【“1、不计后果 - 深思熟虑 - 团队没有时间设计和提供一个快速并且对质量缺乏远见糟糕的解决方案。”】
【"2. Prudent - Deliberate – The team must ship the product now with the known shortcomings and take a proactive lead on the consequences."】生字查字典:①、shortcomings:缺点。②、proactive:积极主动的。③、consequences:后果。④、ship:运送。翻译:【“2、谨慎 - 深思熟虑 - 团队必须将产品交付给已知的缺陷,并且对于后果需要采取取动的态度。”】
【"3. Reckless - Inadvertent – The team is unaware of the basic design principles and hence does not even realize the mess that they are introducing."】生字查字典:①、is unaware of:也不知道。②、principles:原则。③、hence:因此。翻译:【“3、不计后果 - 疏忽的 - 团队也不知道基本的设计原则,因此也不会意识到他们所介绍的混乱。”】
【"4、Prudent - Inadvertent – This is true for teams with excellent designers. They deliver a solution which is delivering business value but after completing the solution, they understand what the best design approach could have been."】生字查字典:①、excellent:优秀的。②、approach:方法。翻译:【"4、谨慎的 - 疏忽的 - 对于在一个团队中的优秀设计者它是事实,他们提供了一个交付业务价值的解决方案但是当完成解决方案之后,他们明白什么才是最好的设计。"】
【"Thus, having a technical debt in a project is usually inevitable and should be considered to be an expectation. The key lies in making sure that a team is not introducing reckless debts which contribute to the mess and are very difficult, if not impossible to deal with."】生字查字典:①、inevitable:不可避免的。翻译:【“因此,在项目中有技术债务通常是不可避免的,而且应该考虑成一种异常,关键在于确保一个团队不会引入不计后果的债务从而引起混乱是非常难的,如果不是不可能的话。”】
【“马丁针对将技术债务分类成象限给出如下例子:1、不计后果 - 深思熟虑 - 团队没有时间设计和提供一个快速并且对质量缺乏远见糟糕的解决方案。2、谨慎 - 深思熟虑 - 团队必须将产品交付给已知的缺陷,并且对于后果需要采取取动的态度。3、不计后果 - 疏忽的 - 团队也不知道基本的设计原则,因此也不会意识到他们所介绍的混乱。4、谨慎的 - 疏忽的 - 对于在一个团队中的优秀设计者它是事实,他们提供了一个交付业务价值的解决方案但是当完成解决方案之后,他们明白什么才是最好的设计。因此,在项目中有技术债务通常是不可避免的,而且应该考虑成一种异常,关键在于确保一个团队不会引入不计后果的债务从而引起混乱是非常难的,如果不是不可能的话。”】
- "Ward Cunningham":沃德坎宁安(wiki创始人)。
- "technical debt":技术债务。
- "term":术语。
- "coin":这不是硬币的意思嘛,很显然这应该是个动词,而不是名字,根据词典解释:
![]()
很明显是“创造”的意思。
- obligation:有多层函义,查看词典如下:
根据上下文,应该是“债务”的意思,因为在前面有一个“technical debt 技术债务”。
- incurs:会导致。
- approach:方法。
- impact:影响。
- in the short run:从短期看。
- in the long run:从长远来看。
- Agilists:敏捷开发。
- view point:观点。
- classify:分类。
- Martin Fowler:马丁福勒是国际著名的面向对象分析设计、UML、模式等方面的专家,敏捷开发方法的创始人之一,现为ThoughtWorks公司的首席科学家。
- financial:金额。
- in the forms of:以...的时形。
- extra effort:额外的努力。
- interest payments:利息支付。
- principal:本金。
- refactor ... into ...:重构成。
- pay down:偿还。
- reduced:减少。
- Steve McConnell:斯蒂夫·迈克康奈尔(Steve McConnell)是IEEE Software的总编,Construx Software的总工程师兼总裁,多家世界知名软件公司的顾问,在美国软件业享有很高的声誉。
- classify...into...:把...分类为...。
- two kinds:两种。
- Unintentional:非故意的。
- Junior:初级的。
- inexperience:缺乏经验。
- intentianal:故意的。
- conscious:有意识的。
- rather than:而不是。
- resolving the situation:解决这种情况。
- mess:混乱。
- are made based on:都是基于。
- risky:有风险的。
- beneficial:有益的。
- rational:合理的。
- layziness:懒惰的。
- unprofessionalism:非专业的。
- cleanliness:清洁。
- disciplined:有纪律的。
- mortgage:抵押贷款。
- squeaky:吱吱响的。
- disintegrate:分解。
- albeit:尽管。
- reckless:不计后果的。
- amplified:放大的。
- prudent:谨慎的。
- deliberate:深思熟虑的。
- inadvertent:无意中做的。
- quadrant:象限。
- foresight:远见。
- shortcomings:缺点。
- proactive:积极主动的。
- consequences:后果。
- ship:运送。
- is unaware of:也不知道。
- principles:原则。
- hence:因此。
- excellent:优秀的。
- approach:方法。
- inevitable:不可避免的。