
Computer Science and Math - nkurz
http://deanzchen.com/computer-science-education-and-math
======
stiff
Professors or not, this is a quite mediocre discussion. For one, "discrete"
and "continuous" mathematics are not disjoint things, and the "discrete" math
that you can do without touching "continuous mathematics" is for the most part
too simplistic to serve as a model of any real world phenomena, probably
including most practically useful algorithms. Almost any "discrete" problem at
the real-world level of complexity requires tools from real analysis, and in
fact more often than not from complex analysis.

For example, the "Concrete mathematics" book by Knuth that is praised so much
is mainly a book about generating functions in the form of power series of a
complex variable. Despite the problem being discrete, you only get to get
answers by setting up those power series with the discrete coefficients in
front of the complex powers, and then obtain answers by differentiation and
whatnot.

You do not get any "mathematical thinking" without understanding calculus,
this is non-sense. The theory of real variables is not only one of the most
ubiquitously practical one, but it is also the model for many other theories.
Modern probability theory is largely advanced calculus in a particular
setting, for example.

That is not to say that calculus is all there is. You just need to know a
whole lot of math to apply it fruitfully in modern complicated settings, and
calculus is some of the math that you need to know if you want to work on
machine learning or robotics. If you want to work on webapps on the other
hand, you do not need almost any math at all, but then you also do not need a
university to learn in in the first place.

~~~
sanxiyn
How does, say, encoding and decoding error-correcting codes require analysis
in any way?

I protest that formal power series and formal derivative should not be counted
under calculus or continuous math. You can define and prove properties of
formal derivatives without any reference to continuum whatsoever.

Math has unity, real numbers are great, but I think people are overselling
continuous-discrete connections. Dividing line between continuous math and
discrete math is one of the most clear boundary in math, and there are huge
amounts of useful discrete math which does not require continuous math.

If you work on machine learning, learn continuous math. On the other hand, if
you work on programming language, learn logic and discrete math instead of
continuous math. If you work on web applications, well, good luck. :)

~~~
ColinWright
My PhD is in discrete math and graph theory, and yet I find calculus and
probability to be indispensable tools. I devise algorithms that work on images
and streams of text, and yet I use power series and vector spaces over the
complex numbers to analyze them.

Writing code to implement error-correcting codes doesn't use continuous math,
but some error-correcting codes are best understood as working in polynomial
rings over finite fields, and many of the ideas and tools are directly linked
to similar structures in infinite continuous spaces.

Limiting yourself to learning only about discrete math that does not require
any continuous math is like limiting yourself to using only one style of
programming, or one language, or one operating system, or one hardware
platform. If you don't mind being so limited, fine. If you want to understand
things in greater depth and thus give yourself more opportunities and have
more tools in your arsenal, learn both.

They support each other in ways you can't imagine without actually learning
them.

~~~
sanxiyn
I am not saying connection does not exist (it certainly does), but I am saying
connection is oversold. They support each other, but they don't support each
other _that much_.

While I don't have PhD in math, I did learn calculus and probability. I am
still not convinced that they should come before logic.

~~~
ColinWright
See, that's the thing. People who _don 't_ have all the tools to hand think
that the connections are over-rated. People who _do_ have more of the tools to
hand think that it's much more important than is realized by people who _don
't_ have all the tools to hand.

It's the blub[0] paradox all over again. I would suggest that you haven't
(yet) learned enough to realize that the connections are much deeper,
stronger, and important than you realize.

It may well be that you don't need to know that the derivative of 3x^2 is 6x,
but the influence on working with discrete math of a deeper understanding of
continuous math is real, but subtle and hard to explain. Like Spock said when
McCoy asked what it was like to be dead:

    
    
        McCoy: Come on Spock this is me, McCoy!! You really
               have been where no one has been before, can't
               you tell me what it felt like?
    
        Spock: It would be impossible to discuss the subject
               without a common frame of reference.
    
        McCoy: You're joking - you mean I have to die before
               we can discuss your insight on death?
    

We can't all learn everything. I'm not advocating that everyone should get a
PhD in cross-disciplinary math subjects, just as I'm not advocating that
everyone should become fluent in Japanese, Russian, and Finnish, or that
everyone should become fluent in Scheme, Haskell, and Erlang. What I am saying
is that I, who do have a PhD in math, believe that the connections are more
extensive and useful than you realize.

[0] [http://www.paulgraham.com/avg.html](http://www.paulgraham.com/avg.html)

~~~
ejk314
The connections may be more extensive than the average software developer will
ever see. But does that make them useful? How can unrecognized connections be
useful? And if those connections are not useful without the higher education
he/she will not receive, then what was the point in learning them?

~~~
ColinWright
If you'll never program in Lisp or Haskell, is there any value in learning
them? Those who do learn them say yes, that doing so has changed for the
better the way they think.

Similarly other subjects in math that do not, on the surface, seem to be
relevant.

------
14113
One quote that struck me was this:

> For too long, we have taught computer science as an academic discipline (as
> though all of our students will go on to get PhDs and then become CS faculty
> members) even though for most of us, our students are overwhelmingly seeking
> careers in which they apply computer science.

This attitude strikes me as fundamentally wrong - universities are _not_ and
should never be trade schools. The point of a university should be to put you
in contact with the cutting edge, and allow you to broaden your horizons, not
train you for some specific software development job!

~~~
nathas
Then why do other engineering disciplines go onto practice in industry?

There should be computer science, and then there should be software
engineering. One is in the sciences school, one is in an engineering school.

I bet the engineering enrollment would be significantly higher.

~~~
acbart
There should be a College of Computing, offering several different majors:
"Computer Science", "Software Engineering", "Human-Computer Interaction", and,
damn it I want this even if there's only 3 or so people qualified in the world
to teach it, "Computer Science Education". They should also offer a 3-credit
general elective named "Computational Thinking" that's comparable with an
English 101 course.

------
my3681
Imagine trying to teach philology, while also teaching them their first
language! This is exactly the problem that CS program directors face.

I work as a researcher in the computer science department at the University of
Alabama, and I can tell you this is an ongoing conversation/debate not only
here, but at many schools across the southeast. Unlike the valley, we have a
tremendous shortage of developers, and that pressure ends up being felt at the
university level.

To combat this, classes have been opened that expose the students to software
engineering principles while not losing the theory that differentiates
computer science from programming. This is largely helping, but is still, in
many respects, an experiment.

Also at play is the notion that there are people in computer science that fall
more into the design disciplines (i.e. HCI, UI, UX people). Right now, we have
nothing for these people except double majoring with art/phycology and the
occasional HCI class, but this may change soon. There are certainly frontiers
in this area yet to be explored!

Either way, it's a big problem worth discussing, so I am happy I see it here.

*Edited for clarity

~~~
shabadoop
>Also at play is the notion that there are people in computer science that
fall more into the design disciplines (i.e. HCI, UI, UX people). Right now, we
have nothing for these people except double majoring with art/phycology and
the occasional HCI class, but this may change soon. There are certainly
frontiers in this area yet to be explored!

Whenever I read articles about social network-type sites that are doing UI
changes it seems like there's pretty extensive use of data analysis based on
A/B testing for different changes that are being made. Wouldn't a practitioner
still need solid coding skills and a strong base in statistics?

------
jnbiche
So, as I think most of us can reasonably agree, there's _computer science_ ,
and then there's _software engineering_ / _software development_. Two separate
endeavors with a few shared skills.

I'm continuously frustrated by the number of people on the "software
engineering" side of the fence who confuse the two, and who demand computer
science skills in applicants to develop web apps.

By the same token, it appears here that we have someone on the other side of
the fence (computer science in the academy) making the same error. He refers
repeatedly to "programming" and its application as a job skill. He then
rightly states that few programmers need calculus for their job. But from
there he extrapolates that _computer scientists_ don't need calculus for their
job, which is not only a huge logical jump, but also makes this age-old error
of confusing computer science and "programming" as a job skill.

~~~
klunger
You said basically what I was thinking. I just want to add the importance of
_experience_ in differentiating the two.

With more experience, I think you can become a better software
engineer/developer. With computer science, it seems to be more of an "either
you get it or you don't" situation, rather like higher level math. This is why
you will get some really great developers that were just willing to put in the
sweat equity, but maybe have a hard time with the only tangentially relevant
math requirements.

------
reader5000
Calculus as typically taught is just a series of symbolic-manipulation rules.
It's not taught as math. Ironically CS is probably many students' first
exposure to actual math, by which I mean reasoning about (and proving things
about) abstract entities.

The requisite calculus could very well be covered in an Intro to CS class
itself "hey by the way there are these numerical functions and they have rates
of change. Moving on..."

Much more important mathematics for CS is Logic. Linear algebra.
Combinatorics. It's true at some point "it all ties together" and there are
some combinatorial problems that can be solved with complex analysis.

But to me, calculus as it is generally taught (heres a polynomial calculate
its derivative using the symbol-manipulation rules you memorized), is the
complete opposite of what CS and actual mathematics is. I think logic or maybe
combinatorics are the easiest-to-grasp domains that capture the actual type of
reasoning problems CS people encounter.

------
ssdfsdf
I had the opposite problem. I took my degree because I was hoping to become a
CS academic or at least be involved in theoretical work. I ended up with a
vocational course. I was/am extremely unhappy.

~~~
tegeek
I had the opposite experience. I went to study Software Engineering (in 2009)
and during first semester I happened to attend a class Programming Paradigms
(topic was Functional Programming that day).

The lecture was being delivered by John Hughes, one of the researcher &
designer of Haskell. In 1 hour class he blew my mind and I was sold to
Computer Science in general and Programming Languages in specific. Next day I
registered myself in Introduction of Functional Programming class. The Haskell
language broke me from inside out and I failed the course. But I got one of
the biggest pleasures of my life. It was about thinking in terms of
mathematics, lambda calculus and building a life long love for mathematics. I
then studied courses in Logic, compilers, and frontiers of programming
language technologies. I started job during the education and couldn't
complete my masters degree but that 1 year of studies in CS changed my mind
forever. And I'm very thankful for the 1 hour I spend with John Hughes.

------
dkural
Mathematics is the only way I know how to solve technical problems from first
principles, and not get stuck when existing solution X doesn't fit problem Y.

If people want to start programming trade schools, that's fine, but that's not
"Computer Science", or "Software Engineering" for that matter. Engineering
means being able to solve _novel_ problems in an applied manner. You can't do
that without mathematics.

Calculus is ultimately symbolic manipulation, as another commenter said.
Mathematica / Matlab can do calculus. So should you.

------
ottocoder
Hmmm, I would agree that some areas of mathematics are more "easily
applicable" to programming.

However, mathematics is really all about reasoning and dealing with
abstractions. A proof in linear algebra is not much different than proofs in
real analysis or topology, in my opinion (the content might be very different,
but the methods of reasoning are the same). So I think it really comes down to
the answer to two questions: why study CS and why study math?

If we are a little more precise, and split "CS" into "computer science - the
study of the theory of computation" and "programming" while also splitting
"math" into "mathematics - the art of mathematical reasoning" and "a tool to
solve problems" we can cross those two sets (to be a little math-nerdy :) and
we get the following tuples:

(computer science, math for reasoning), (computer science, math as a tool),
(programming, math for reasoning), (programming, math as a tool)

The problem is that people who have little or no exposure (and some people who
have lots of exposure) may not think about/be aware of the difference between
each of the tuples. Furthermore, by the time you understand the differences
and what your personal preference is, you may have invested too much time into
one particular school/program of study/however you're learning to switch.

------
Paul_S
The article keeps using webdevs as an example of programmers who don't need
maths. I really don't get that and it reminds me of that humorous programmer
hierarchy diagram. Maths will make you better at your job no matter the field
and the idea that webdevs are some lesser breed that couldn't benefit from
maths because all they do is bang rhythmically on their keyboards is rather
patronising and not explained in the article.

------
_tb
This topic always makes me bitter, if what you want is write some fancy apps
or games, and don't like math, please don't go to CS.

You don't need a college degree for that, you just want to be a software
bricklayer-monkey, learn it by yourself.

anyways, CS is full of guys like that. ...I should have gone full math.

~~~
nathas
Except for all of those employers that want a CS degree that are writing web
apps.

------
kenster07
The fundamental problem is actually the arbitrary separation of the practical
and theoretical. They should be informing one another.

Consider this: many great "theoretical" discoveries in history, including
those in CS, were not theoretical at their inception. They were the result of
people trying to solve practical problems -- not the product of a bunch of
debt-ridden students trying to maximize GPA in an ivory tower. This cannot be
overstated.

At the end of the day, the distinction between academic and practical is
largely self-imposed, at least partially ego-driven, and probably highly
inefficient for society as a whole. If you want "practical" people to engage
"theoretical" problems, then make it practical for them.

~~~
dkural
On the other hand, the Turing machine (a machine capable of universal
computation.. ie a computer) was invented as a method of solving a highly
theoretical, seemingly useless mathematics problem called the
Entscheidungsproblem, in Hilbert's list:

10\. Determination of the solvability of a Diophantine equation. Given a
Diophantine equation with any number of unknown quantities and with rational
integral coefficients: To devise a process according to which it can be
determined in a finite number of operations whether the equation is solvable
in rational integers. The Entscheidungsproblem is solved when we know a
procedure that allows for any given logical expression to decide by finitely
many operations its validity or satisfiability ... The Entscheidungsproblem
must be considered the main problem of mathematical logic.

Computers may seem obvious in hindsight but it was formally defined to solve a
theoretical mathematics problem by the mathematician Alan Turing.

------
cessor
Let's ask this question in a more general fashion...

I believe I share this view on maths and cs. There appears to be a gap between
computer science and software-making (writing, coding, engineering,
"bricklaying", "applied cs"). The first thing is academic and scientific, the
second is a craft. I know educated computer scientists who couldn't program to
save their mothers and I know programmers in the industry who never went to CS
class and taught themselves, and they keep reinventing the wheel over and over
again (poorly). I believe these are different disciplines, although they are
related. The academic part surely benefits from understanding maths, but for
the "making" part, where people write rails apps, rest apis or websphere
portlets, these skills aren't necessary (although I'd say one always benefits
from deeper knowledge).

I am making the same experience in another field: Psychology. Most of my
costudents wish to become Psychotherapists. Yet the bachelors degree is mostly
limited to scientific examinations of the field. There is a gap between
"psycho-science" and psychotherapy as well. I believe one can become a very
good, practical, experienced and effective therapist without reading hundreds
of papers from all different fields such as social, cognitive, work. Instead
they could specialize in the things that require treatment such as depression
etc. Again, knowing the science behind the practical stuff might help a
therapist to gather deeper insights, but aren't always necessary.

The seats to study Psychology in Germany are scarse and limited to students
with the very best grades. Most students appear to get very bored by the
scientific aspects but have to go through the whole system in order to get a
degree, which is required if you wish to work as a therapist. Therefore they
keep blocking the spaces for people who are genuinely interested in the
scientific aspects.

There - at what point in time may a practical discipline emancipate itself
from its scientific origin, thus freeing up resources and gaining through
specialization? Should programmers really have to study cs, or whould a new
"software crafting" subject be sensible?

~~~
dkarapetyan
You don't need a CS degree to be a programmer. If you want to be a programmer
but still need to go to school then learn something that you consider fun just
so you can say you have a degree and just program on the side. I don't see how
schools are getting in the way of people becoming programmers when the craft
of programming is accessible to anyone with an internet connection or even a
local library.

------
brudgers
Learning math doesn't limit anyone's options. Not learning math does. Not
providing people with access to the tools needed to actualize their potential
is a real injustice, and a computer programmer/engineer/scientist with less
understanding of mathematics will be more limited on average than one with
more.

And the problem is that second semester college Freshmen aren't really in a
position to know what will really matter in the long term. Professors of
course aren't either, it's just that personal study and research and the 900
years of institutional experience inherent in the university meme are likely
to produce slightly better intuitions.

Can math be taught better? Hell yes, and we will see a significant change as
Common Core bubbles upward. We'll also see changes as university education
continues to become less elite and the institutions more 'customer' driven to
less rigorous requirements. I mean the gist of the article is: standards are
too high.

There's some truth to that. Widening the funnel inherently means lowering the
standards - business schools used to mostly train accountants, now they
produce a lot of marketing degrees. What is really needed is colleges of
computing.

Of course those 900 years come back to bite. Someone loses the turf war:
Engineering, Mathematics, or Business. Maybe the best place to teach the
computing _crafts_ would be the studios of the College of Art, particularly if
mathematics is pushed to the periphery.

Why would a computer scientist need calculus? Because what calculus provides
is training in replacing equations from one domain with equations of another -
it provides a background in high level symbol manipulation. Doing it well
requires competence in algebra, and algebra is the cornerstone of analysis of
algorithms, and analysis of algorithms is what distinguishes computer science
as a subset of all programming related activities.

The question is where does the line get drawn between programmer and software
user when we talk about the person at the keyboard - or which side dominates
when we are talking about building something with Rails: knowledge of
relational algebra or ~rake db:migrate~?

------
wisienkas
For computer science, yes you need to know your math, since it will involve
math and expect you to know math.

If you however were going into a 3½ IT programmer degree, it is a whole other
story.

------
ivan_ah
The hidden assumption behind the "you don't need math" camp in the discussion
here is that math is somehow very difficult to learn. Nope. The ideas from
high school math have been around for thousands of years. How hard could they
be to learn?

And calculus, calculus is just _calculations_ on functions. Not very profound,
but not very difficult either. Interestingly, I find the procedures of
calculus to be very similar to iterative programming procedures. A limit is
kind of like a while loop, a sequence is an iterator, etc... For example

    
    
       lim_{n->∞} n    <==>   while(true){  n++; }
    

Perhaps the best "pitch" for acquiring math knowledge is the power you'll gain
for modelling the real world. In that respect physics is useful too, since it
also deals with models for the real world (kinematics model, momentum model,
energy model, etc.)

------
conformal
if anyone thinks that a few semesters of introductory mathematics or science
courses is "not relevant" for a CS program, they have completely missed the
point. this is a fool's complaint, like saying that "because i'm a political
science major, i don't need to learn anything about actual science".

in reality, the point of introductory level math and science courses in
college is to show you a rather narrow skillset: you are given what amounts to
a toolbox with a couple dozen tools and asked to use this small set of tools
to solve problems that require application of, at most, 2 or 3 of these tools
in succession. a fair analogy is that it is a multistep "put the round peg in
the round hole" problem.

if assembling a small toolbox of skills and trying to apply the correct tools
in short succession is too much for you, just quit university and code some
stupid app. is it really that hard to understand why basic math and science is
relevant?

DISCLAIMER: i was a teaching assistant for undergrads for 3 years during
undergrad and grad school.

~~~
sanxiyn
If math is relevant for a CS program mainly as a problem solving training, I
really think calculus should be dropped. Logic provides the same problem
solving training, and content is actually relevant.

The article is not arguing "math is too much". It is arguing "if math is for
problem solving, why not choose math with some relevant math content instead"?

------
henrik_w
I found "Do software engineers need mathematics?" quite interesting:
[https://www.maa.org/external_archive/devlin/devlin_10_00.htm...](https://www.maa.org/external_archive/devlin/devlin_10_00.html)

------
sanxiyn
I agree that having calculus and continuous math in CS curriculum is deeply
unfortunate. There are lots of more relevant math, such as first-order logic,
combinatorics, and information theory. I would take logic class over calculus
class any day.

~~~
stiff
I would love to see how far you can develop combinatorics or information
theory without using any calculus. Even in combinatorics "continuous math" has
been used for centuries already for difficult problems:

[http://en.wikipedia.org/wiki/Analytic_combinatorics](http://en.wikipedia.org/wiki/Analytic_combinatorics)

~~~
sanxiyn
Coding theory is largely developed without any calculus.

~~~
leephillips
I don't think so. It's based on information theory, which was based on the
concepts of thermodynamics. Everything in thermodynamics, even temperature, is
defined as a partial derivative. So the root concepts of coding theory can not
even be expressed without the language of calculus.

------
mh_yam
Programming is not the same thing as computer science...you can get very far
in programming without knowing much math, but not in computer science.

