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

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

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

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


当前回答

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.

其他回答

在正式发布之前,没有缺陷是可能的。

这绝对不是真的,即使P2缺陷有时也会被打开。

后藤是有害的。

现在我们决定是继续还是中断。

如果我有一个像ML或Haskell中那样强大的静态类型系统,我应该使用它来编码尽可能多的不变量。只有有了经验,我才知道有时最好让不变量是动态的。

订阅许多RSS订阅,阅读许多博客并参与开源项目是很重要的。

我意识到,真正重要的是我花了更多的时间来写代码。我有阅读和关注许多博客的习惯,虽然它们是丰富的信息来源,但真的不可能吸收所有的东西。平衡阅读是很重要的,要多强调练习。

Reg。开源的话,我怕我不会受欢迎。我尝试过参与开源项目,大部分都是。net。看到许多开源项目甚至没有遵循适当的体系结构,我感到震惊。我看到。net中的一个系统没有使用分层架构,数据库连接代码到处都是,包括后面的代码,我放弃了。

我很早就开始学习编程了。那时我14岁左右。我有各种疯狂的想法,但不要问我准确的时间,因为那是很久以前的事了。

Ok, so, I believed for a while that if you use the term synchronize in Java, then Java solves this nasting synchronizing thing for you I believed for at least half a year, likely more, that static typing would improve performance. I believed that freeing something would return memory back to the OS. I believed that malloc calls boil down to checking if there is enough free space on the OS, so malloc would be inexpensive. I thought a long while that Java was built with all the benefits and flaws of the other languages in mind, into a "perfect blend" that would take the best properties of the other languages and reject the mistakes. I vastly overestimated the number of cases where LinkedLists outperform ArrayLists. I thought that NP-hardness was a proof that no INSTANCE could be solved efficiently, which is trivially false, for a while. I thought that finding the best flight-plan on travel agency web sites would take so long because of the "Travelling Salesman Problem", as I proudly chuckled to my relatives (when I was small, alright?!)

还能想出更多。不知道我坚持了多久。对不起。

PS: 啊,好吧,这个被清除得并不慢,但我看到新手时不时地这样做,所以我想你可能会感兴趣:我还认为要存储不确定数量的东西,你需要为每个东西声明一个新变量。所以我要创建变量a1 a2 a3…,而不是使用一个变量a,我将它声明为一个向量。