Delphi Coding Standards [duplicate]

穿精又带淫゛_ 提交于 2020-01-01 10:56:08

问题


I am in the process of writing (down) our companies coding standards for Delphi programming, so what would anyone suggest to have as a basis, anything that you would recommend to use / not use ?


回答1:


I used Delphi Language Coding Standards Document as a basis for an internal document.

The Object Pascal Style Guide could probably be termed the "official" one, I think - as far as there is such a thing.




回答2:


Be careful not getting too anal about forcing standards. You might want to collect a few sample examples from your most experienced programmers, get them to agree, and use those as templates for everyone.

Jeff Atwood recently had an interesting Blog entry about just a single aspect of standards: "Death to the Space Infidels!" and in there he says:

"It doesn't actually matter which coding styles you pick. What does matter is that you, and everyone else on your team, sticks with those conventions and uses them consistently."




回答3:


Coding standards are a classic bike-shed topic. People argue and fight about this stuff BECAUSE it's little, and ultimately not as important, as good design. Clean, readable code is worth having, and clean readable badly designed code is very little better than unreadable badly designed code. Maybe the most readable bad code makes it easier to figure out that it needs throwing away.

Efforts to encourage team members to contribute clean readable code can include the promotion of style guides. Style guide reviews where you bash someone repeatedly for using the wrong style, are counter productive. If someone has trouble using an acceptable style, introduce them to the joys of using some tools. Do not make a highly competent programmer buckle under the strain of too much criticism over very minor points.



来源:https://stackoverflow.com/questions/765163/delphi-coding-standards

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!