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

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

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

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


当前回答

用汇编语言进行优化=重写。

When I first really understood assembly (coming from BASIC) it seemed that the only way to make code run faster was to rewrite it in assembly. Took quite a few years to realize that compilers can be very good at optimization and especially with CPUs with branch prediction etc they can probably do a better job than a human can do in a reasonable amount of time. Also that spending time on optimizing the algorithm is likely to give you a better win than spending time converting from a high to a low level language. Also that premature optimization is the root of all evil...

其他回答

适合系统编程的语言必须支持可变变量。

在很长一段时间里,我认为糟糕的编程是发生在边缘的事情。正确做事是标准。我现在没那么天真了。

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

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

在学校里,你被教导编程是“读取输入,处理数据,写输出”。实际上,很少有处理步骤——大多数编码只是“读取输入,输出”。

一般来说,它要么是“从用户读取,写入数据库”,要么是“从数据库读取,显示在屏幕上”。这两种情况涵盖了大约95%的工作。

XML名称空间(或者更糟,格式良好)在某种程度上比没有它们要困难得多。

一个非常常见的错误,甚至在W3C!