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

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

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

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


当前回答

My co-workers were/are producing supposedly bad code because they sucked/suck. It took me a while to learn that I should first check what really happened. Most of the times, bad code was caused by lack of management, customers who didn't want to check what they really wanted and started changing their minds like there's no tomorrow, or other circunstances out of anyone's control, like economic crysis. Customers demand "for yesterday" features because they are stupid: Not really. It's about communication. If someone tells them it everything can really be done in 1 week, guess what? they'll want it in 1 week. "Never change code that works". This is not a good thing IMO. You obviously don't have to change what's really working. However, if you never change a piece of code because it's supposedly working and it's too complex to change, you may end up finding out that code isn't really doing what it's supposed to do. Eg: I've seen a sales commission calculation software doing wrong calculations for two years because nobody wanted to maintain the software. Nobody at sales knew about it. The formula was so complex they didn't really know how to check the numbers.

其他回答

我喜欢编程。通过研究SICP的书,我发现我一无所知。至少现在我更深入地研究编程了。

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

如果每一行都计算条件,如果你写这样的代码:

Dim a as Boolean = True
If a Then
    Console.WriteLine("1")
    a = False
    Console.WriteLine("2")
Else
    Console.WriteLine("3")
End If

那么输出将是:

1
3

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

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

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

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

不用分析我就能知道性能问题出在哪里