我正在对初级(也许是高级)软件工程师所犯的常见错误和错误假设进行一些研究。

你坚持时间最长、最终被纠正的假设是什么?

例如,我误解了整数的大小不是标准的,而是取决于语言和目标。说起来有点尴尬,但事实就是这样。

坦率地说;你有什么坚定的信念?你大概坚持了多长时间?它可以是关于一种算法、一种语言、一个编程概念、测试,或者任何关于编程、编程语言或计算机科学的东西。


当前回答

我相信创建程序就像在课堂上教的一样……你和一群人坐在一起,讨论一个问题,想出一个解决方案,等等。相反,现实世界是“这是我的问题,我需要解决它,开始”,十分钟后你又遇到了另一个问题,让你没有真正的时间来有效地计划解决方案。

其他回答

ide会变得更快。

以某种方式,一个运营大量相当高调/高流量网站的公司实际上知道他们在做什么。结果他们在很大程度上毫无头绪,而且非常幸运地处于他们所处的位置。所以我想寓意是,

可靠的软件工程和最佳实践=业务成功

还是……

大多数关键的软件系统==垃圾

让非程序员明白我在说什么。

当然,您可以查看FindBugs和PMD,但这些是我最喜欢的陷阱和技巧(所有Java):

字段没有被覆盖,而是被遮蔽。

没有显式的super。超级访问。

未定义构造函数的类具有隐式零参数构造函数。今年我犯了一个与此相关的实际错误。

要获得对内部类的父类的引用,可以使用“Outer”语法。这“消除方法调用或同步的歧义”。

在c++术语中,类是“它们自己的朋友”,该类的任何实例的私有方法和字段都可以从同一类的任何方法引用,甚至是静态方法。这将使我早期的一些clone()和copy构造函数简单得多。

在扩展类的静态上下文中可以访问受保护的方法和字段,但前提是该类在同一个包中。我很高兴flex.messaging.io.amf不是一个密封的包。

我仍然对以下的一些误解感到困扰——尽管我知道这些误解是正确的,但我仍然试图抓住它们不放:

All stakeholders will make decisions about software design objectively. Those that aren't embroiled in writing the code make all sorts of decisions based entirely on emotion that don't always make sense to us developers. Project budgets always make sense - I've seen companies that are quite happy to drop [just for example] $50,000 a month for years rather than pay $250,000 to have a project completed in 6 months. The government for one loses their annual budget if they don't spend it - so spend it they will, come hell or high water. It astounds me at how many project dollars are wasted on things like this. You should always use the right tools for the right job - sometimes this decision is not in your hands. Sometimes it comes down from on high that "thou shalt use X technology" for this project, leaving you thinking "WTF! Who came up with that ridiculous idea?"... the guy paying your paycheque, that's who, now get it done. Programming ideology comes first and foremost, everything else is secondary. In reality, deadlines and business objectives need to be met in order to get your paycheque. Sometimes you make the worst decisions because you just don't have time to do it the right way... just as sometimes that word is on the tip of your tongue but the minute it takes to recall it makes you choose a different and less ideal word. There isn't always time to do it right, sometimes there is only time to do it - however that may be. Hence oft' seen anti-patterns used by so called experienced developers who have to knock out a solution to a problem 10 minutes before the presentation deadline for the software being delivered to your best client tomorrow.