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

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

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

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


当前回答

默认情况下,数组应该基于1,而不是基于0。系统实现语言不一定是这样,但是像Java这样的语言吸收了更多C语言的奇怪之处。“元素1”应该是第一个元素,而不是第二个,以避免混淆。

计算机科学不是软件开发。毕竟,你不会雇佣一个只学过物理的工程师。

尽可能多地学习数学。您不会使用大部分的知识,但是您需要能够以这种方式思考才能擅长软件。

目前标准化的唯一最好的编程语言是Common Lisp,尽管它很冗长并且有从零开始的数组。这很大程度上是因为它被设计成一种方式 来写计算,而不是抽象的冯·诺依曼机器。

至少90%的对编程语言的比较批评可以归结为“语言A有C特性,而我不知道如何在语言B中实现C或类似的功能,所以语言A更好。”

“最佳实践”是我所见过的“平庸”最令人印象深刻的拼写方式。

其他回答

缺陷和增强请求是相同的

Unless you are developing software on a fixed-price contract, there should be no difference when prioritizing your backlog between "bugs" and "enhancements" and "new feature" requests. OK - maybe that's not controversial, but I have worked on enterprise IT projects where the edict was that "all open bugs must be fixed in the next release", even if that left no developer time for the most desirable new features. So, a problem which was encountered by 1% of the users, 1% of the time took precedence over a new feature would might be immediately useful to 90% of the users. I like to take my entire project backlog, put estimates around each item and take it to the user community for prioritization - with items not classified as "defect", "enhancement", etc.

在我的工作场所,我一直试图引入更多的敏捷/XP开发习惯。持续设计是迄今为止我觉得阻力最大的一个。也许我不应该说“让我们召集所有的架构团队并射杀他们”……;)

我们是软件开发人员,不是C/ c# / c++ /PHP/Perl/Python/Java/…开发人员。

After you've been exposed to a few languages, picking up a new one and being productive with it is a small task. That is to say that you shouldn't be afraid of new languages. Of course, there is a large difference between being productive and mastering a language. But, that's no reason to shy away from a language you've never seen. It bugs me when people say, "I'm a PHP developer." or when a job offer says, "Java developer". After a few years experience of being a developer, new languages and APIs really shouldn't be intimidating and going from never seeing a language to being productive with it shouldn't take very long at all. I know this is controversial but it's my opinion.

你应该一直使用的唯一“最佳实践”是“动动脑子”。

太多人跳上了太多的潮流车,试图把方法、模式、框架等强加到不值得他们去做的事情上。仅仅因为某事是新的,或者因为受人尊敬的人有意见,并不意味着它适合所有人:)

编辑: 澄清一下——我认为人们不应该忽视最佳实践、有价值的意见等。只是人们不应该盲目地扑向某样东西,而不去思考为什么这个“东西”这么棒,它是否适用于我正在做的事情,它会带来什么好处/缺点?

大多数语言的支持者制造了很多噪音。