我正在对初级(也许是高级)软件工程师所犯的常见错误和错误假设进行一些研究。
你坚持时间最长、最终被纠正的假设是什么?
例如,我误解了整数的大小不是标准的,而是取决于语言和目标。说起来有点尴尬,但事实就是这样。
坦率地说;你有什么坚定的信念?你大概坚持了多长时间?它可以是关于一种算法、一种语言、一个编程概念、测试,或者任何关于编程、编程语言或计算机科学的东西。
我正在对初级(也许是高级)软件工程师所犯的常见错误和错误假设进行一些研究。
你坚持时间最长、最终被纠正的假设是什么?
例如,我误解了整数的大小不是标准的,而是取决于语言和目标。说起来有点尴尬,但事实就是这样。
坦率地说;你有什么坚定的信念?你大概坚持了多长时间?它可以是关于一种算法、一种语言、一个编程概念、测试,或者任何关于编程、编程语言或计算机科学的东西。
当前回答
不是持有时间最长的,但在某一时刻,有几年的时间,我:
以为微软Windows是世界上唯一的操作系统(那是1992年) 了解DOS对于拥有“高级”操作系统知识已经足够了。
这就是为什么我在高中没有选择“计算机课程”。我以为我对计算机已经了解得够多了。
后来在大学里,出于我的错误:
我认为UNIX操作系统/程序是完美的,DOS/Windows永远不会接近它(那时候看起来很真实,我猜Linus也是这么想的,这就是为什么Linux和UNIX如此相似,而不是。其他操作系统)
最后,在很长一段时间里,我想:
只有我的软件很糟糕,而商业软件是完美无缺的,因为……它是“商业”软件 美国的软件/工程师/产品是优秀的同义词,其他的都只是糟糕的尝试。
其他回答
所有面向对象语言都有相同的面向对象概念。
Java接口=方法的接口。 Java接口是针对需要具有多重继承的特定于语言的解决方案。Ruby的mixin尝试解决同样的问题。 Javascript中提供的开箱即用的继承与Java实现继承的方式非常不同。
考试只是拖延的另一种方法。
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.
喂!,
我只是在设计和写代码。
没有需求收集、文档或支持。
欢呼,
@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来模拟这种行为。