我正在对初级(也许是高级)软件工程师所犯的常见错误和错误假设进行一些研究。
你坚持时间最长、最终被纠正的假设是什么?
例如,我误解了整数的大小不是标准的,而是取决于语言和目标。说起来有点尴尬,但事实就是这样。
坦率地说;你有什么坚定的信念?你大概坚持了多长时间?它可以是关于一种算法、一种语言、一个编程概念、测试,或者任何关于编程、编程语言或计算机科学的东西。
我正在对初级(也许是高级)软件工程师所犯的常见错误和错误假设进行一些研究。
你坚持时间最长、最终被纠正的假设是什么?
例如,我误解了整数的大小不是标准的,而是取决于语言和目标。说起来有点尴尬,但事实就是这样。
坦率地说;你有什么坚定的信念?你大概坚持了多长时间?它可以是关于一种算法、一种语言、一个编程概念、测试,或者任何关于编程、编程语言或计算机科学的东西。
当前回答
我不知道在Javascript中除以0是无穷大(IEEE 754算术)。最近经历了惨痛的教训。
其他回答
如果每一行都计算条件,如果你写这样的代码:
Dim a as Boolean = True
If a Then
Console.WriteLine("1")
a = False
Console.WriteLine("2")
Else
Console.WriteLine("3")
End If
那么输出将是:
1
3
我以为静态输入就是你一动不动地坐在键盘前。
我很早就开始学习编程了。那时我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,我将它声明为一个向量。
我是一名初出茅庐的年轻开发者,希望从事专业的开发工作,因为这是我所热爱的,以下是我曾经持有的一些观点,这些观点都是我在短暂的经验中学到的,但都是错误的
当你根本不把用户界面和逻辑分开时,你最终会遇到的可怕的混乱是可以接受的,这也是每个人写软件的方式
不存在太多复杂或抽象的东西
一类责任——我从未真正有过这个概念,它对我来说是非常正式的
测试是我在卧室里编写代码时不需要做的事情
我不需要源代码控制,因为它对我所做的项目来说是多余的
开发人员什么都做,我们应该知道如何设计图标和做出漂亮的布局
Dispose并不总是需要结束符
任何类型的错误发生时都应该抛出异常
异常是针对错误情况的,很多时候只返回一个指示失败的值就可以了。我最近才明白这一点,我一直在说这一点,并且在很长一段时间内仍然抛出异常
我可以编写一个完全没有错误的应用程序
我一直认为,任何为任何语言编写任何代码的人都会使用编辑程序。
I was working with a client of mine who had me on mostly as support and to write some of the more complex things for him. Well one day he messed up a file, big time. He accidentally saved over three hours worth of his own work, and when I asked him why he didn't save more often he replied with, "because I wasn't done". Naturally, this was not an acceptable answer, and I poked and prodded a little further. I eventually came to find out that he he has never used any editing program, EVER! Not even notepad.exe! He had been using an online CPanel editor for files! It didn't even have a 'Find' function. He couldn't ever save until he was done because he was editing the live file on the site!
不用说,我很惊讶,他至今仍在使用CPanel编辑器……