我正在对初级(也许是高级)软件工程师所犯的常见错误和错误假设进行一些研究。
你坚持时间最长、最终被纠正的假设是什么?
例如,我误解了整数的大小不是标准的,而是取决于语言和目标。说起来有点尴尬,但事实就是这样。
坦率地说;你有什么坚定的信念?你大概坚持了多长时间?它可以是关于一种算法、一种语言、一个编程概念、测试,或者任何关于编程、编程语言或计算机科学的东西。
我正在对初级(也许是高级)软件工程师所犯的常见错误和错误假设进行一些研究。
你坚持时间最长、最终被纠正的假设是什么?
例如,我误解了整数的大小不是标准的,而是取决于语言和目标。说起来有点尴尬,但事实就是这样。
坦率地说;你有什么坚定的信念?你大概坚持了多长时间?它可以是关于一种算法、一种语言、一个编程概念、测试,或者任何关于编程、编程语言或计算机科学的东西。
当前回答
OOP已经过时了:(直到今天我仍然后悔这么想。
其他回答
这真的很尴尬,但当我开始学习如何编程时,没有什么能让我满意。我想写电子游戏。而不是这些书里让我写的那些琐碎的小程序。所以我决定跳过10章,忽略基础知识。
所以我基本上忽略了变量!
问题是我没有从惯例中识别关键字:
Car car = new Car(); //good
Car test = new Car(); //wrong must be lowercase car!
for (int i = 0; i < 10; i++) //good
for (int test = 0; test < 10; test++)//wrong must be i
我这样做了一年多,甚至用3000行字做了一个井字游戏! 当时我为自己的厉害而激动不已,直到我在互联网上找到了150行一字棋。然后意识到自己是个白痴,就重新开始。
“这次会成功的”
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.
至少6年来,我一直坚信,每个问题都只有一个解。
完全不知道不同复杂性的多种算法、空间/时间的权衡、面向对象、功能和命令式、抽象级别和无法确定的问题。当那种幸福的天真被打破时,它打开了一个充满可能性的世界,关上了坐下来建造东西的大门。我花了很长时间才弄清楚怎么选一个然后用它来运行。
Python是一种不切实际的、令人讨厌的语言(我仍然可以读到一些关于我早期代码的注释,抱怨它),而c++是唯一真正的面向对象语言。
我错得太离谱了,到现在还觉得羞愧。