熟悉自然语言对编程有帮助吗?
我们都听说数学至少对编程有一点帮助。但我的问题是,英语或其他自然语言技能对编程有帮助吗?我知道它对技术文档有帮助,但是实际编程呢?编程语言中的某些结构在自然语言中也存在吗?了解如何撰写 20 页的研究论文是否有助于编写 20k loc 编程项目?
We all hear that math at least helps a little bit with programming. My question though, does English or other natural language skills help with programming? I know it has to help with technical documentation, but what about actual programming? Are certain constructs in a programming language also there in natural languages? Does knowing how to write a 20 page research paper help with writing a 20k loc programming project?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(5)
Dijkstra 甚至说:“除了数学倾向之外,对母语的出色掌握是一个有能力的程序员最重要的资产。”
编辑:是的,我相当确定他正在谈论工作的编程部分。这里有一个更完整的引用:
对于用 IBMerese 思考的人来说,一般的商业管理问题,特别是数据库管理问题太难了,再加上蹩脚的英语。
关于语言的使用:钝斧头不可能削铅笔。尝试用十把钝斧来代替同样是徒劳的。
除了数学倾向之外,对母语的出色掌握是一个有能力的程序员最重要的资产。
来自EWD498。
我当然不能代表 Dijkstra,但我认为不可能将实际编程的部分与与人交互的部分完全分开。举例来说,即使您独自工作,您也能够(清楚且明确地)理解您写下的有关要做什么、错误的性质等的注释,这一点至关重要。掌握良好的英语是必要的即使没有其他人参与(当然,除了琐碎的任务之外,这很不寻常)。
Dijkstra went so far as to say: "Besides a mathematical inclination, an exceptionally good mastery of one's native tongue is the most vital asset of a competent programmer."
Edit: yes, I'm reasonably certain he was talking about the programming part of the job. Here's a bit more complete quote:
The problems of business administration in general and database management in particular are much too difficult for people who think in IBMerese, compounded by sloppy English.
About the use of language: it is impossible to sharpen a pencil with a blunt axe. It is equally vain to try to do it with ten blunt axes instead.
Besides a mathematical inclination, an exceptionally good mastery of one's native tongue is the most vital asset of a competent programmer.
From EWD498.
I certainly can't speak for Dijkstra, but I think it's impossible to cleanly separate the part where you're doing actual programming from the part where you're interacting with people. Just for example, even when you're working alone, it's crucial that you're able to understand (clearly and unambiguously) notes you wrote down about what to do, the nature of a bug, etc. A good command of English is necessary even when nobody else is involved at all (and, of course, that's unusual except on trivial tasks).
我不知道因果关系,但是写好文章所需的技能与编程所需的技能有很多重叠:知道如何计划,能够保持无数细节的一致性,能够为未来弄清楚事情读者,知道如何组织你的想法和结果。这并不是说一个成功的作者会成为一名优秀的程序员,而是一个具有良好语言技能和相同逻辑/数学/演绎技能的程序员可能比语言技能较差的程序员更好——至少代码具有被理解的机会更大。
I don't know about causality, but the skill set required to write well overlaps quite a bit with those required for programming: knowing how to plan, being able to keep a myriad of details consistent, being able to make things clear for a future reader, knowing how to organize your thoughts and the resultant product. That isn't to say that a successful author would make a good programmer, but a programmer with good language skills and the same logic/math/deductive skills is probably a better programmer than one with poor language skills -- at least the code has a greater chance of being understandable.
是的。强大的自然语言技能可以帮助您以连贯的方式组织您的想法,以便他人轻松理解。这可以帮助改进您的代码,从命名变量、方法、类等到表达模型中对象的上下文。结对编程等实践要求您能够与合作伙伴进行良好的沟通,以便编写出好的代码。领域驱动设计等技术强调在代码中使用业务的领域语言。自然语言技能有助于这一点。开发行业对更自然语言的工具有着强烈的推动力,例如许多较新的测试工具,如 rspec、gherkin 等,正在向更自然语言的语法发展。许多人喜欢 Ruby 和 Python 等动态语言的原因之一是,代码读起来更像自然语言。
Yes. Strong natural language skills help you to organize your thoughts in a coherent way that can easily be understood by others. That can help improve your code in everything from naming variables, methods, classes, etc., to expressing the contexts of objects in your model. Practices such as pair programming require you to be able to communicate well with your partner in order to write good code. Techniques such as Domain Driving Design emphasize using the domain language of the business in your code. Natural language skills facilitate that. And there is a strong drive in the development industry toward more natural language-like tools, e.g. many of the newer testing tools like rspec, gherkin, etc., are moving toward more natural language-like syntax. One of the things many people like about dynamic languages like Ruby and Python are that the code tends to read more like a natural language.
让我陈述一下显而易见的事实:每个 12 岁以上的健康人都至少懂得一种自然语言。此外,每个12岁以上的健康人都能够生成和解析自然语言(一种复杂而丰富的语言),并表达和理解大量的想法。一般来说,人们讨论问题的能力不太可能受到语言的限制,而是受到他们经历和学到的事物类型的限制。
话虽如此,您可能已经考虑过几种与语言相关的技能。
写作风格。你具体提到了那些。书面语言不同于口语。不太直观。这是人们在教育系统中多年来必须接受写作指导的原因之一。
编码并不真正涉及写作。我的意思是,有评论,但它们可能相当简洁。当然,程序员的工作通常至少涉及一些文档的编写,以及能够发挥作用的写作能力。
分析能力。 分析技能是一个复杂(不是说模糊)的概念。分析技能实际上与语言无关,但就其教学和测试而言,分析技能是在撰写论文的背景下进行的。
分析能力显然在编程中非常重要。我不确定这些技能是否与写一篇关于安乐死或其他什么的好文章所需的技能完全相同,但是 正如之前所建议的,它们可能是相关的。
外语。对于母语不是英语的人来说,可能需要一定的英语能力。不是编码本身(了解“while”在英语中的含义对于理解它在 Java 中的作用并不重要),而是因为许多培训和支持材料主要以英语提供(有人提到 Stack Overflow 吗?)。不过,英语要求可能会因您所在的国家/地区以及您工作的公司而有所不同。
沟通技巧。嗯。我一直不太确定这到底意味着什么。也许这是一个文化问题。我确实怀疑这不是关于了解语言,而是更多关于了解人。
因此,对于某些人来说,Dijkstra 是一位令人尊敬的计算机科学家,但我不确定他对语言了解多少。
Let me state what should be the obvious: every healthy person above 12 knows at least one natural language. Moreover, every healthy person above 12 is able to generate and parse natural language a complex and rich language, and express and understand an extremely large set of ideas. In general, people are not likely to be limited in their ability to discuss issues by their language, but by the type of things they experienced and learned.
Having said that, there are several language-related skills that you might have thought about.
Writing style. You mentioned those specifically. Written language is different from spoken language. Way less intuitive. This is one reason people have to get coached in writing through their years in the education system.
Coding doesn't really involve writing. I mean, there's comments, but they can be rather laconic. Of course the work of a programmer usually involves at least some writing of documents, and writing abilities to make a difference there.
Analytical skills. Analytical skills are a complicated (not to say fuzzy) concept. Analytical skills aren't really about language, but insomuch they are taught and tested at all, it's in the context of writing essays.
Analytical skills are obviously very important in programming. I am not sure that these are exactly the same skills required to write a good essay about Euthanasia or whatever, but as was previously suggested, they may be related.
Foreign language. For people whose native language isn't English, a certain command of English may be needed. Not in the coding itself (knowing what "while" means in English isn't really critical to understanding what it does in Java), but because much training and support material is available mainly in English (did anyone mention Stack Overflow?). The English requirement may differ on the country you are in, and the company you work for, though.
Communication Skills. Ahhm. I was never exactly sure what this means exactly. Maybe it's a cultural thing. I do suspect it's less about knowing a language and more about knowing people.
So to some up, Dijkstra is a venerable computer scientist, but I am not sure he knew that much about language.
编程不仅仅是编写代码。在任何规模的任何编程项目中,都需要:
在我参与过的每个大型项目中,我猜我花了我至少 50% 的时间花在英文文档上。所以,是的,良好地解释和表达自己的能力非常重要。它会导致编写更好的代码吗?再次,我会说是的 - 提供清晰文档的需要延伸到编写更好的代码的需要,itnerfaces 等人。
Programming isn't just about writing code. On any programming project of any size there will be the need for:
On every big project I've worked on I'd guess I spent at least 50% of my time on the English language documents. So yes, an ability to explain and express yourself well is extremely important. Does it lead to writing better code? Once again, I would say yes - the need to provide clear documentation spills over into the need to write better code, itnerfaces et al.