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

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

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

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


当前回答

In the early days, most personal computers had a cassette tape interface for loading and storing programs. I did not have a computer at this time but read everything I could get my hands on (mostly magazines) that had anything to do with computers (this was the late 70's - no internet for me). For some reason I was under the impression that programs were executed directly from the cassette tape and that the only reason computers had any RAM was to store variables while the program ran. I figured that when the code had to execute a jump instruction, it would somehow rewind or advance the tape to the correct position and continue from there.

其他回答

这种简单性几乎总能战胜复杂性。愚蠢的规则。

编辑:正如葛格所说,我把这个颠倒了。我的思绪一定是在回复中迷失了。如果使用得当,简单性几乎总是能让代码变得更好。

软件工程师总是诚实地告诉你他们现在在做什么,或者过去对你的软件做了什么。

我以为静态输入就是你一动不动地坐在键盘前。

在正式发布之前,没有缺陷是可能的。

这绝对不是真的,即使P2缺陷有时也会被打开。

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

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

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

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

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

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

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