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

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

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

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


当前回答

代码行数越多,软件就越好。

其他回答

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

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...

我从没想过我会成为一名专业程序员,我以为我会从事电子工作。但最终,编程更容易,薪水也更高,所以最初的副业变成了我的主要工作。

这个:

SomeClass object(initialValue);

这:

SomeClass object = initialValue;

保证在c++中是等价的。我认为第二种形式肯定会被解释成第一种形式。并非如此:请参阅c++初始化语法。

您无法诊断生产中的“间歇性错误”。重新启动服务器是解决这个问题的唯一方法。

也许在我早期的ASP编码中更真实。但是有很多很好的分析工具可以发现内存泄漏和其他奇怪的问题。Perfmon还提供了许多良好的诊断数据。另外,您应该在应用程序中编写诊断日志。

你需要一个客户规范来完成一个项目。很多时候,你从一个销售会议和一个记事本开始。当然,在会议结束时,他们想要一个最后期限,“只是大概的时间”。