这绝对是主观的,但我想尽量避免它变成争论。我认为如果人们恰当地对待它,这将是一个有趣的问题。

这个问题的想法来自于我对“你最讨厌的语言的哪五件事?”问题的回答。我认为c#中的类在默认情况下应该是密封的——我不会把我的理由放在这个问题上,但我可能会写一个更完整的解释来回答这个问题。我对评论中的讨论热度感到惊讶(目前有25条评论)。

那么,你有什么有争议的观点?我宁愿避免那些基于相对较少的基础而导致相当宗教的事情(例如,大括号放置),但例如可能包括“单元测试实际上并没有多大帮助”或“公共字段确实是可以的”之类的事情。重要的是(至少对我来说)你的观点背后是有理由的。

请提出你的观点和理由——我鼓励人们投票给那些有充分论证和有趣的观点,不管你是否恰好同意这些观点。


当前回答

汇编语言是最好的编程语言。

其他回答

代码==设计

我不喜欢复杂的UML图和无穷无尽的代码文档。在高级语言中,您的代码应该是可读和可理解的。复杂的文档和图表对用户来说并不友好。


这里有一篇关于代码即设计的文章。

我的观点是,有太多的人在做编程决策时不应该担心实现。

Linq2Sql并没有那么糟糕

我看到过很多诋毁Linq2Sql的帖子。我知道这并不完美,但什么才是完美的?

就我个人而言,我认为它有它的缺点,但总的来说,它可以很好地用于原型设计,或开发中小型应用程序。当我考虑到它为我从编写枯燥的DAL代码中节省了多少时间时,我不能抱怨,特别是考虑到我们不久前拥有的替代方案。

当我声称代码只是我的设计的一种表达时,我经常被人大声叫嚷。我非常不喜欢看到许多开发人员在编写代码时“匆匆忙忙”地设计系统。

当其中一个牛仔从马上摔下来时所浪费的时间和精力是惊人的,而且他们遇到的问题十有八九只要前期设计工作就能解决。

我觉得现代方法没有强调设计在整个软件开发过程中的重要性。例如,当你甚至还没有审查你的设计时,对代码审查的重要性!这是疯狂。

That (at least during initial design), every Database Table (well, almost every one) should be clearly defined to contain some clearly understanable business entity or system-level domain abstraction, and that whether or not you use it as a a primary key and as Foreign Keys in other dependant tables, some column (attribute) or subset of the table attributes should be clearly defined to represent a unique key for that table (entity/abstraction). This is the only way to ensure that the overall table structure represents a logically consistent representation of the complete system data structure, without overlap or misunbderstood flattening. I am a firm believeer in using non-meaningful surrogate keys for Pks and Fks and join functionality, (for performance, ease of use, and other reasons), but I beleive the tendency in this direction has taken the database community too far away from the original Cobb principles, and we jhave lost much of the benefits (of database consistency) that natural keys provided.

那么为什么不两者都用呢?