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

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

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

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


当前回答

不熟悉SQL和关系数据库的过程开发人员/程序员不需要任何正式的培训,也不需要了解如何使用SQL,快速阅读SQL For Dummies之类的东西就足以使用像Oracle和SQL Server这样的关系数据库。

在处理存储在关系数据库(如Oracle和SQL Server)中的数据的应用程序中,许多错误往往是由于缺乏对关系数据库语言的理解或如何使用造成的;SQL。

I used to work for a software vendor who had the mentality that all a developer needed was the SQL For Dummies book or something similiar and they would be fully equipped to handle any relational database issue. Now that the clients of this vendor have databases measuring in hundreds of gigabytes this lack of SQL knowledge is coming back around in a negative way. It's not just bad performing lookups and or updates and inserts that are a problem but the actual design of the database itself that is the real obstacle.

如果当时开发主管能够像对待他们构建应用程序所用的语言那样对待SQL和关系数据库,那么所有这些都是可以避免的,而且成本也会低得多。

不要认为SQL不重要,因为它最终会回来困扰你。你可能可以在一段时间内摆脱它,甚至几年,但你最终会达到一个断点,在没有完全重新设计数据库的情况下,你无法继续前进,那是成本最高的时候。

其他回答

@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来模拟这种行为。

这很尴尬,但很长一段时间我都没有真正理解引用类型和值类型之间的区别。我以为你必须使用ref关键字来改变一个对象在不同的方法。

这是我应该知道的c#最基本的概念之一。

该条件检查如下:

if (condition1 && condition2 && condition3)

以不确定的顺序执行…

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

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

我曾经认为编写Win32应用程序就足够了。

而且每个程序都必须有一个GUI,因为命令行已经“过时”了。