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

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

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

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


当前回答

上大学的时候(90年代中期),他们的计算机实验室只有Windows 3.11的机器(我知道,很奇怪的大学)。

有一段时间,我认为作为一个专业程序员,只有Windows平台与我相关,而所有其他平台都只是从历史的学术角度来看有趣。

从学校毕业并学习了现代unix和linux环境后,我不禁对我蹩脚的学校感到愤怒和失望。

我现在还不敢相信,我在计算机工程学位毕业时从未见过bash shell,甚至没有听说过emacs或vim。

其他回答

Windows中的线程很便宜。

事实证明,这只是部分正确。线程有一定的开销,需要自己的地址空间,在那里它可以生存和快乐。因此,如果我发现自己在一个应用程序中处理数十个线程,我会问自己如何将所有内容简化并整合到更少的线程中。

@Kyralessa: It's worth noting that on most processors, in assembly/machine language, it's possible for functions to return someplace other than their caller while leaving the stack in good condition. Indeed, there are a variety of situations where this can be useful. One variation I first saw on the 6502, though it works even better on the Z80, was a print-message routine where the text to be printed immediately followed the call instruction; execution would resume after the zero terminator (or, as a slight optimization when using the Z80, at the zero terminator, since letting the zero byte be executed as a NOP would be cheaper than trying to avoid it).

有趣的是,在许多现代语言中,函数都有一个正常的退出点(将在调用之后恢复执行),但也可以通过抛出异常退出。即使在C语言中,也可以使用setjmp/longjmp来模拟这种行为。

我的编程如果由我一个人来执行会更快更好。

我记得我10岁的时候,有人让我相信,将来会有一种计算机能够在3秒内运行一个无限循环。

编程是给后辈的,最好的项目经理是不会编程的人。