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

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

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

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


当前回答

如果您的文本编辑器不能很好地完成代码,那么您就是在浪费每个人的时间。

Quickly remembering thousands of argument lists, spellings, and return values (not to mention class structures and similarly complex organizational patterns) is a task computers are good at and people (comparatively) are not. I buy wholeheartedly that slowing yourself down a bit and avoiding the gadget/feature cult is a great way to increase efficiency and avoid bugs, but there is simply no benefit to spending 30 seconds hunting unnecessarily through sourcecode or docs when you could spend nil... especially if you just need a spelling (which is more often than we like to admit).

当然,如果没有为您的语言提供这种功能的编辑器,或者任务简单到足以在加载更重的编辑器所需的时间内完成,那么没有人会告诉您Eclipse和90个插件是正确的工具。但是请不要告诉我,像1999年那样使用H-J-K-L的能力真的比每次需要方法签名时按escape键节省了更多时间……即使你觉得这样做不那么“黑客”了。

想法吗?

其他回答

所有源代码和注释都应该用英文编写

用英语以外的语言编写源代码和/或注释会降低可重用性,如果你不理解它们所使用的语言,就更难调试。

SQL表、视图和列也是如此,特别是在使用缩写时。如果它们没有缩写,我可能能够在线翻译表/列名,但如果它们被缩写,我所能做的就是选择并尝试破译结果。

Xah Lee: actually has some pretty noteworthy and legitimate viewpoints if you can filter out all the invective, and rationally evaluate statements without agreeing (or disagreeing) based solely on the personality behind the statements. A lot of my "controversial" viewpoints have been echoed by him, and other notorious "trolls" who have criticized languages or tools I use(d) on a regular basis. [Documentation Generators](http://en.wikipedia.or /wiki/Comparison_of_documentation_generators): ... the kind where the creator invented some custom-made especially-for-documenting-sourcecode roll-your-own syntax (including, but not limited to JavaDoc) are totally superfluous and a waste of time because: 1) They are underused by the people who should be using them the most; and 2) All of these mini-documentation-languages all of them could easily be replaced with YAML

创建类似于带有疯牛病的椒盐卷饼的UML图的能力实际上并不是一种有用的软件开发技能。

图代码的全部意义在于可视化连接,看到设计的形状。但是一旦你通过了一个相当低的复杂水平,想象就太多了,无法在精神上处理。只有在坚持使用直线的情况下,图形化地建立连接才比较简单,这通常会使图表比沿着基本方向巧妙地分组和路由连接更难阅读。

仅在广泛的交流目的下使用图表,并且仅当它们被理解为谎言时使用。

不是很有争议,但是… AJAX早在这个术语被创造出来之前就已经存在了,每个人都需要“放手”。人们用它做各种各样的事情。但是没有人真正关心它。

然后突然嘣!有人创造了这个术语,每个人都加入了AJAX的潮流。突然之间,人们成了AJAX的专家,好像动态加载数据的“专家”以前并不存在似的。我认为这是导致互联网被残酷摧毁的最大因素之一。还有“Web 2.0”。

PHP文件中过多的HTML:有时是必要的

PHP文件中Javascript过多:触发猛禽攻击

虽然我很难弄清楚在echo和?>< ?php 'ing html之间的所有切换(毕竟,php只是html的处理器),但添加的一行又一行javascript使它完全无法维护。

人们必须明白这一点:它们是两种独立的编程语言。选择一种作为你的主要语言。然后继续寻找一种快速、干净、易于维护的方法,使你的主要语言包括第二语言。

你之所以总是在PHP、Javascript和HTML之间切换,是因为你对这三种语言都不在行。

好吧,也许这并不是很有争议。我的印象是,这是一个普遍的沮丧发泄话题:)