编程需要数学吗? [英] Is mathematics necessary for programming?

查看:82
本文介绍了编程需要数学吗?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

在大学期间,我偶然与一位朋友辩论,高级数学对任何资深程序员来说都是必要的.他过去经常对此进行激烈辩论.他说,程序员只需要高中或大学一年级数学的基础数学知识就可以了,而且几乎不需要高级数学就可以完成几乎所有的编程任务.但他认为算法是基本的&实用程序.程序员必不可少的资产.

I happened to debate with a friend during college days whether advanced mathematics is necessary for any veteran programmer. He used to argue fiercely against that. He said that programmers need only basic mathematical knowledge from high school or fresh year college math, no more no less, and that almost all of programming tasks can be achieved without even need for advanced math. He argued, however, that algorithms are fundamental & must-have asset for programmers.

我的立场是,所有计算机科学的进步都几乎完全取决于数学的进步,因此,对程序员有深入了解的数学知识将为他们在处理现实世界中的难题时提供很大帮助.

My stance was that all computer science advances depended almost solely on mathematics advances, and therefore a thorough knowledge in mathematics would help programmers greatly when they're working with real-world challenging problems.

我仍然不能确定论点的哪一边是正确的.您可以根据自己的经验告诉我们您的立场吗?

I still cannot settle on which side of the arguments is correct. Could you tell us your stance, from your own experience?

推荐答案

要回答您提出的问题,我必须说:不,数学不是编程所必需的".但是,正如其他人在该主题中所建议的那样,我相信理解数学与能够从算法上思考"之间存在关联.也就是说,能够抽象地思考数量,过程,关系和证明.

To answer your question as it was posed I would have to say, "No, mathematics is not necessary for programming". However, as other people have suggested in this thread, I believe there is a correlation between understanding mathematics and being able to "think algorithmically". That is, to be able to think abstractly about quantity, processes, relationships and proof.

我大约9岁时就开始编程,要说到那个阶段我已经学了很多数学,那是一小段时间.但是,通过一点点的努力,我就能够理解变量,循环,goto语句(原谅我是Vic 20 BASIC,但我还没有读过Dijkstra)和基本的坐标几何图形,以便将图形显示在屏幕上

I started programming when I was about 9 years old and it would be a stretch to say I had learnt much mathematics by that stage. However, with a bit of effort I was able to understand variables, for loops, goto statements (forgive me, I was Vic 20 BASIC and I hadn't read any Dijkstra yet) and basic co-ordinate geometry to put graphics on the screen.

我最终与一名计算机科学辅修了纯粹数学的荣誉学位.尽管我主要侧重于分析,但我还研究了很多离散数学,数论,逻辑和可计算性理论.除了能够将统计学,概率论,向量分析和线性代数的一些思想应用到编程中之外,我所学的数学很少,直接适用于我的本科学历以及随后进行的商业和研究编程.

I eventually went on to complete an honours degree in Pure Mathematics with a minor in Computer Science. Although I focused mainly on analysis, I also studied quite a bit of discrete maths, number theory, logic and computability theory. Apart from being able to apply a few ideas from statistics, probability theory, vector analysis and linear algebra to programming, there was little maths I studied that was directly applicable to my programming during my undergraduate degree and the commercial and research programming I did afterwards.

但是,我坚信数学需要的形式化思维方法-认真的推理,寻找反例,建立公理基础,发现概念之间的联系-当我处理大型复杂的编程项目时,这是极大的帮助.

However, I strongly believe the formal methods of thinking that mathematics demands — careful reasoning, searching for counter-examples, building axiomatic foundations, spotting connections between concepts — has been a tremendous help when I have tackled large and complex programming projects.

考虑运动员为运动而训练的方式.例如,足球运动员无疑将大部分训练时间都花在了基本足球技能上.但是,为了提高他们的总体健康水平,他们还可以在健身房里骑自行车或划船机,做举重等.

Consider the way athletes train for their sport. For example, footballers no doubt spend much of their training time on basic football skills. However, to improve their general fitness they might also spend time at the gym on bicycle or rowing machines, doing weights, etc.

学习数学可以比作重量训练或交叉训练,以提高您的智力和编程耐力.练习基本的编程技能是绝对必要的,但是学习数学是一种令人难以置信的心理锻炼,可以提高您的核心分析能力.

Studying mathematics can be likened to weight-training or cross-training to improve your mental strength and stamina for programming. It is absolutely essential that you practice your basic programming skills but studying mathematics is an incredible mental work-out that improves your core analytic ability.

这篇关于编程需要数学吗?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆