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

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

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

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


当前回答

我认为要提高数据库性能,我所需要做的就是将数据库转换为第三范式。

其他回答

人们会关心最佳实践,甚至一致性。

OOP的好处是你可以重用对象,而实际上它是通过创建一个具有相同接口的新对象来重用其余的代码。

实际上,对象可能占代码的2%,因此重用只会给您带来2%的好处。真正的好处是通过创建一个新对象来重用其他98%的代码,从而允许所有其他代码完全不同。现在您重用了98%的代码。把一个东西写为一个对象所花费的时间延长3倍是值得的。

例如,如果你有一个绘图程序,突然有一个你想要绘制的新形状,你只需要改变ShapeObject(同时保持界面相同)。项目中的其他内容都不需要改变。

喂!,

我只是在设计和写代码。

没有需求收集、文档或支持。

欢呼,

总是没有足够的时间在最后期限前完成。

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.