我正在对初级(也许是高级)软件工程师所犯的常见错误和错误假设进行一些研究。
你坚持时间最长、最终被纠正的假设是什么?
例如,我误解了整数的大小不是标准的,而是取决于语言和目标。说起来有点尴尬,但事实就是这样。
坦率地说;你有什么坚定的信念?你大概坚持了多长时间?它可以是关于一种算法、一种语言、一个编程概念、测试,或者任何关于编程、编程语言或计算机科学的东西。
我正在对初级(也许是高级)软件工程师所犯的常见错误和错误假设进行一些研究。
你坚持时间最长、最终被纠正的假设是什么?
例如,我误解了整数的大小不是标准的,而是取决于语言和目标。说起来有点尴尬,但事实就是这样。
坦率地说;你有什么坚定的信念?你大概坚持了多长时间?它可以是关于一种算法、一种语言、一个编程概念、测试,或者任何关于编程、编程语言或计算机科学的东西。
当前回答
Python是一种不切实际的、令人讨厌的语言(我仍然可以读到一些关于我早期代码的注释,抱怨它),而c++是唯一真正的面向对象语言。
我错得太离谱了,到现在还觉得羞愧。
其他回答
用汇编语言进行优化=重写。
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...
人们知道他们想要什么。
在很长一段时间里,我以为我会和人们交谈,他们会描述一个问题或工作流程,我将其放入代码并自动化。结果每次发生这种情况,他们以为自己想要的并不是他们真正想要的。
Edit: I agree with most of the comments. This is not a technical answer and may not be what the questioner was looking for. It doesn't apply only to programming. I'm sure it's not my longest-held assumption either, but it was the most striking thing I've learned in the 10 short years I've been doing this. I'm sure it was pure naivete on my part but the way my brain is/was wired and the teaching and experiences I had prior to entering the business world led me to believe that I would be doing what I answered; that I would be able to use code and computers to fix people's problems.
我想这个答案类似于Robin关于非程序员理解/关心我所谈论的内容的回答。这是关于将业务作为一个敏捷的、迭代的、交互的过程来学习。它是关于学习编程猴子和软件开发人员之间的区别。这是关于意识到两者之间的区别,并且在该领域真正优秀,不仅仅是语法和输入速度。
编辑:这个答案现在是社区-wiki,以安抚人们对这个答案感到不安,给我代表。
像Python或Ruby这样的动态类型语言不太适合用于大型项目。
代码行数越多,软件就越好。
事实证明,在Linux下是否检查内存分配是否返回一个引用并不重要,因为它实际上会欺骗你,在未来的某个时候实际分配内存,或者如果它没有你需要的内存,就完全终止你的程序。