我正在对初级(也许是高级)软件工程师所犯的常见错误和错误假设进行一些研究。
你坚持时间最长、最终被纠正的假设是什么?
例如,我误解了整数的大小不是标准的,而是取决于语言和目标。说起来有点尴尬,但事实就是这样。
坦率地说;你有什么坚定的信念?你大概坚持了多长时间?它可以是关于一种算法、一种语言、一个编程概念、测试,或者任何关于编程、编程语言或计算机科学的东西。
我正在对初级(也许是高级)软件工程师所犯的常见错误和错误假设进行一些研究。
你坚持时间最长、最终被纠正的假设是什么?
例如,我误解了整数的大小不是标准的,而是取决于语言和目标。说起来有点尴尬,但事实就是这样。
坦率地说;你有什么坚定的信念?你大概坚持了多长时间?它可以是关于一种算法、一种语言、一个编程概念、测试,或者任何关于编程、编程语言或计算机科学的东西。
当前回答
这很尴尬,但很长一段时间我都没有真正理解引用类型和值类型之间的区别。我以为你必须使用ref关键字来改变一个对象在不同的方法。
这是我应该知道的c#最基本的概念之一。
其他回答
我仍然对以下的一些误解感到困扰——尽管我知道这些误解是正确的,但我仍然试图抓住它们不放:
All stakeholders will make decisions about software design objectively. Those that aren't embroiled in writing the code make all sorts of decisions based entirely on emotion that don't always make sense to us developers. Project budgets always make sense - I've seen companies that are quite happy to drop [just for example] $50,000 a month for years rather than pay $250,000 to have a project completed in 6 months. The government for one loses their annual budget if they don't spend it - so spend it they will, come hell or high water. It astounds me at how many project dollars are wasted on things like this. You should always use the right tools for the right job - sometimes this decision is not in your hands. Sometimes it comes down from on high that "thou shalt use X technology" for this project, leaving you thinking "WTF! Who came up with that ridiculous idea?"... the guy paying your paycheque, that's who, now get it done. Programming ideology comes first and foremost, everything else is secondary. In reality, deadlines and business objectives need to be met in order to get your paycheque. Sometimes you make the worst decisions because you just don't have time to do it the right way... just as sometimes that word is on the tip of your tongue but the minute it takes to recall it makes you choose a different and less ideal word. There isn't always time to do it right, sometimes there is only time to do it - however that may be. Hence oft' seen anti-patterns used by so called experienced developers who have to knock out a solution to a problem 10 minutes before the presentation deadline for the software being delivered to your best client tomorrow.
与UNIX相比,NT操作系统的设计有缺陷。事实证明,NT内核和设计决策与任何现代的UNIX类系统非常相似,内核中的大多数问题都是由有漏洞的公司编写的第三方漏洞驱动程序造成的。
我的错误假设:虽然总是有一些改进的空间,但就我而言,我已经是一个尽可能好的程序员了。
当我刚从大学毕业的时候,我已经用C语言编程6年了,知道所有关于“结构化编程”的知识,认为“OO”只是一种时尚,并认为“天哪,我很好!!”
十年后,我在想“好吧,那时候我远没有我想象的那么好……现在我有了多态性的想法,以及如何编写干净的OO程序…现在我真的很好。”
所以,不知何故,我总是很好,但也总是比以前好得多。
在那之后不久,我终于有了“一些”谦卑。总是有更多的东西要学(还没有用像Haskell这样的纯函数式语言写一个合适的程序)。
作为一名老的过程式程序员,当我第一次开始为一个业余项目用Java编程时,我并不真正理解OO。编写了大量的代码,却没有真正理解接口的意义,试图通过将所有东西都强制放到继承层次结构中来最大化代码重用——当一个层次结构无法容纳清理时,希望Java具有多重继承。我的代码成功了,但我现在对早期的东西感到畏缩。
When I started reading about dynamic languages and trying to figure out a good one to learn, reading about Python's significant whitespace turned me off - I was convinced that I would hate that. But when I eventually learned Python, it became something I really like. We generally make the effort in whatever language to have consistent indent levels, but get nothing for it in return (other than the visual readability). In Python, I found that I wasn't doing any more effort than I had before with regard to indent levels, and Python handled what I'd been having to use braces or whatever for in other languages. It makes Python feel cleaner to me now.
分析和性能分析是一回事。
然后我发现,虽然分析器总比没有强,但它包含错误的假设,比如:
只有总量才重要,细节无关紧要 统计精度是定位性能问题的必要条件 测量时间和定位不必要的耗时操作是一回事