制定标准的重要性和意义
The working world would be nice if we could only develop and maintain our own code. The reason being: we would inherently understand the concepts, work-flow, and logic within it. But like every working developer I’ve ever known, including myself, our days are filled with maintaining existing programs – sometimes a process not for the feint of heart.
如果我们只能开发和维护自己的代码,那么工作世界将是美好的。 原因是:我们会固有地理解其中的概念,工作流程和逻辑。 但是,就像我所认识的每个在职的开发人员(包括我自己)一样,我们的日子充斥着维护现有程序的工作-有时是一个不诚实的过程。
As a long-time programmer, often with a staff of other programmers to watch over, I learned early in my career how important enforcing programming standards is in contributing to the overall success of a project. Not only do standards affect an individual’s production of code, but they ensure that anyone else who may contribute code later can do so with a reasonable expectation of consistency.
作为一个长期的程序员,经常有其他程序员来照料,我在职业生涯的早期就了解了实施编程标准对于项目的整体成功有多么重要。 标准不仅会影响个人的代码生成,而且会确保以后可能提供代码的任何其他人都可以在合理的一致性期望下这样做。
My own experiences have shown that while the practice of non-standard coding appears across the entire spectrum, from beginner through the seasoned professional, the vast majority of violations seem to happen with beginners, entry level or least supervised programmers. Why, one might ask? Simple! The developers’ supervisors did not live up to their responsibility of encouraging standard coding practices.
我自己的经验表明,尽管从初学者到经验丰富的专业人员,整个领域都出现了非标准编码的实践,但绝大多数违反行为似乎发生在初学者,入门级或受过最少监督的程序员身上。 为什么会问? 简单! 开发人员的主管没有履行其鼓励标准编码做法的责任。
Exactly what are standard coding practices? There is no one book; no one Internet site; no one master plan that describes such standards. Oh, there are formatting standards used widely within certain circles. But for most of the on-site projects I’ve seen in my 35+ years of analysis and design there usually only exists a semi-formal standardization plan that was decided by someone, somewhere, responsible for the production of the project. It doesn’t matter what the standards are as long as they convey the expectations for coding and documentation. While rules sometimes exist to be broken, standards should change only for the better to assure the application yields even better and more consistent results.
究竟什么是标准编码惯例? 没有一本书。 没有一个互联网站点; 没有一个描述此类标准的总体规划。 哦,某些圈子中广泛使用了格式化标准。 但是对于我在超过35年的分析和设计中所见过的大多数现场项目,通常只存在一个半正式的标准化计划,该计划由负责项目生产的某人决定。 只要能传达对编码和文档的期望,标准是什么都没有关系。 尽管有时可能会违反规则,但标准应该只是为了更好地进行更改,以确保应用程序产生更好,更一致的结果。
And so, what should be standardized? The simple answer is… everything! From a project manager’s view this would include program naming conventions, field names, function names, report layouts, database layout, testing procedures, development platforms, etc. You’ll see how standardization efforts will link all the components of a project, in time, to form one homogeneous entity which becomes much more easily understood, easier to understand in the future, and also much more easily maintained.
那么,应该标准化什么呢? 简单的答案是……一切! 从项目经理的角度来看,这将包括程序命名约定,字段名称,函数名称,报告布局,数据库布局,测试过程,开发平台等。您将看到标准化工作将如何及时链接项目的所有组件形成一个同类实体,该实体变得更容易理解,将来更容易理解,并且也更易于维护。
So what does one do when there is no existing standards? Two words: create them. I will admit that creating a new standard for everything is no trivial task, but you’ll will find that the efforts will yield productive results. You don’t have to create them from scratch – many open source projects have published their standards and guidelines online and you are free to use them as the basis for your own; you can adopt one wholesale or pick and choose elements from several, whichever makes the most sense for your team. It’s not as important as what the standards are, but rather that there are standards in place.
那么,在没有现有标准的情况下该怎么办? 两个词:创建它们。 我将承认为所有事物创建新标准并不是一件容易的事,但是您会发现,这些努力将产生丰硕的成果。 您不必从头开始创建它们-许多开源项目已经在线发布了它们的标准和指南,您可以自由地将它们用作自己的基础。 您可以采用批发方式,也可以从几种方式中选择一种,这对您的团队最有意义。 它不像什么是标准那么重要,而是有适当的标准。
If you are a lower level programmer, always follow any established standards. If a standard can be improved or expanded, discuss it with your supervisor who should greet your comments with enthusiasm. If you are a supervisor, welcome such suggestions. Even if you are a single person programming shop, you will benefit greatly if you take the time to create your own standards then adhere to them throughout the development of the project.
如果您是较低级别的程序员,请始终遵循任何已建立的标准。 如果可以改进或扩展标准,请与您的主管讨论,该主管应该热情地欢迎您的意见。 如果您是主管,则欢迎此类建议。 即使您是单人编程商店,如果您花时间创建自己的标准然后在项目的整个开发过程中遵守这些标准,也会从中受益匪浅。
Hopefully this information will not fall on deaf ears (or eyes as the case may be). Industry experience has proven that establishing standards and adhering to them yields better production results and make day-to-day life easier because of the order that comes with them. My personal experience also tells me that once one implements and works with standards, they never turn back.
希望这些信息不会落在耳聋(或视情况而定)上。 行业经验证明,建立标准并遵守这些标准可以带来更好的生产结果,并且由于随附的订单,使日常工作变得更加轻松。 我的亲身经历也告诉我,一旦实施并使用标准,他们就再也不会回头。
Image via oconner / Shutterstock
图片来自oconner / Shutterstock
翻译自: https://www.sitepoint.com/the-importance-of-standards/
制定标准的重要性和意义
相关资源:JRT0105-2014银行数据标准定义规范