10 ms·
Computer Science is Not Math
- zeteo 15y agoOh yes it is. Programming is exactly equivalent to writing mathematical proofs. http://en.wikipedia.org/wiki/Curry%E2%80%93Howard_isomorphism http://en.wikipedia.org/wiki/Curry%E2%80%93Howard_isomorphis...
- lincolnq 15y agoDid you even read the article? Edit: This is exactly what the author is arguing against. Yes, you're writing a proof, but that's not the point of what you're doing at all.
- zeteo 15y agoOf course I've read it. He says just the foundations are math. He says actual programs (e.g. those implementing networking protocols) are not math. Curry and Howard beg to differ.
- ArtB 15y agoThey can be interpreted as math, but they aren't really. If you are using Coq or something verified it can be, but especially when you are using a dynamic language and you have no idea of the types of objects that will be passed as parameters or when you are just slapdashing bits of scripts together (like, "hmm, that failed, maybe I should just +1 to it?") it's hard to compare that to the rigorous discipline called math.
- zeteo 15y agoMath went on for millenia without computerized proof checking and yes, some of those proofs were buggy. The difference between a professional mathematician and a software engineer is no more than that between a C and a Prolog programmer. Anyone who has written both proofs by induction and recursive programs can easily see the correspondence, even without the Curry-Haskell proof that the correspondence exists.
- scott_s 15y agoMost interesting programs cannot be studied analytically.
- cantankerous 15y agoThat's a pretty strong statement. Care to provide some examples?
- scott_s 15y agoYou are correct that it's too strong. Most interesting programs cannot be fully studied analytically. The largest piece of software that has been proved correct is less than 10,000 lines of code. (Sadly, I have no reference for that - a recent speaker here talking about software testing made this claim with a reference that I have forgotten.) But real programs very quickly get to the point that it's impractical to fully understand them analytically. We have to execute them and observe their behavior.
- cantankerous 15y agoSorry if I seemed offensively skeptical, it wasn't my intent. I was wondering if I was missing something obvious ...which happens more than I'd like to think about. I agree with you on the lines of code. I think SeL4 is about 9,300 and I can't come up with something much longer (I don't think CompCert can really count because it's really just a lot of separate smaller programs running in succession, and generally one probably doesn't count Coq code as part of the program being verified, but everybody's got their own opinion).
- deltasquared 15y agoI read the article and disagree. Computer science is a discipline of applied mathematics. Saying that computer science is not mathematics because it involves real world complications, is like saying that experimental physics isn't physics because it is not done by theorists.
- ColinWright 15y agoI'm having a hard time seeing how you can come to that conclusion based on the article you reference. Certainly a mathematical proof can be written in a program-style formal language, and then that type of programming becomes equivalent to those types of proofs. However, programming in general is simply not like that, and programming in general does not, to me, seem to be anything like doing math. And since that's a very personal statement, let me add by way of context that I have a PhD in math, I have programmed for a living, and I have written computer verified proofs. It seems to me that most of the people who claim that "programming is math" (and there are many, but perhaps not as many as the OP is implying) have never actually done any math at an advanced level. I'd be happier saying that programming is a lot like doing word problems, where it's essential not only to get the right answer, but also to use the the right terms, with the right grammar, and in a limited amount of space. And it's pass/fail.
- zeteo 15y ago>programming in general does not, to me, seem to be anything like doing math. Hi Colin, can you substantiate that? PhD in CS here and I've done some pretty hardcore math in my academic life. After writing lots of proofs and lots of programs the two activities don't seem that dissimilar. They are very different "programming languages" indeed, but debugging, modularity, recursion are important for both activities. To give a more concrete example: for my thesis I've implemented at one point a geometric algorithm. Some of the computer code proved buggy so I went to the white board and simply increased the complexity of the math formulas, which allowed me to write less code. I don't see an immense difference between this and, say, combining C and Python code in the same project.
- ColinWright 15y ago>> programming in general does not, to me, >> seem to be anything like doing math. > Hi Colin, can you substantiate that? It's a statement about what I feel. As I say, I have a PhD in math (Pure Math: Graph Theory and Combinatorics). I have written many, many programs (both for money and not for money, both for myself and for others.) Coming up with proofs of things believed true but not yet proven does not feel to me to be at all, in any way, like programming. > After writing lots of proofs ... What sorts of proofs? Are these proofs of theorems, or are they calculations of formulas? > I went to the white board and simply increased > the complexity of the math formulas This feels to me like you are using "doing math" in a similar way to the way that someone "uses math" when adding up the grocery bill or dividing a restaurant check (but obviously insanely more complicated). I, too, have frequently stepped to the whiteboard to make more complex calculations, or derive more complex formulas, in order to simplify computations that must be done. That's not what I call "doing math." As I say, programming feels more to me like solving word problems, and I suspect that most of the divide and argument around this topic is caused by a lack of precision in the definition of "doing math". Which is ironic. Edits have been made for clarity.
- jahewson 15y agoNo, no, no. The Curry-Howard Isomorphism applies to functional programming languages only.
- gatlin 15y agoAnd if those functional languages are Turing complete, then they are equivalent to all other Turing complete languages, and thus the C-H isomorphism would hold for all Turing complete languages.
- jahewson 15y agoNope. C-H concerns the simply typed lambda calculus which is not Turing-complete. Thus C-H only applies to non-recursive functional programs (or equivalent). A proof is a program, but a program is not always a proof (as proofs must terminate).
- gatlin 15y agoI concede. Thanks for the interesting tangent of reading that brought on, too!
- qznc 15y agocomputer science = information theory + software engineering My opinion is that education should split computer science into the information theory part and the engineering part. The information theory part might even merge back into the math departments where it came from.
- cantankerous 15y agoI think the integration of software engineering as the core of a computer science program essentially destroys the computer science program. Sure, many people with CS degrees wind up doing software engineering, but comparing CS to SE is like comparing a metallurgist to a blacksmith.
- xcallmejudasx 15y agoThat's exactly the comparison I was looking for. Sure the blacksmith and the SE can build the final products but without the CS or metallurgist to build the foundation they wouldn't have a job.
- cantankerous 15y ago:-) I think another important thing to note is that both software engineers and computer scientists reinforce and add value to each other's work. CS can improve and verify the methods employed by those in SE and those in SE can provide direction (necessity is the mother of invention) to and implement the methods developed by CS. It's a very unrefined observation, but I think it gets the general idea across.
- stcredzero 15y agoeducation should split computer science into the information theory part and the engineering part. Then the engineers will complain that "Software Engineering" doesn't have enough rigor to be called engineering. Actually, it's been happening for years. http://lesswrong.com/lw/9sv/diseased_disciplines_the_strange_case_of_the/ http://lesswrong.com/lw/9sv/diseased_disciplines_the_strange...
- stiff 15y agoThere is an article on the same topic by Professor Donald Knuth which I find much more insightful: http://mathdl.maa.org/images/upload_library/22/Ford/DonaldKnuth.pdf http://mathdl.maa.org/images/upload_library/22/Ford/DonaldKn...
- ArtB 15y agoI have a problem with his analogy to physics. The experimental physicist purpose is to verify in the real world the laws discovered... but the person actually using those laws to build products (I'm skipping a few steps) is called an engineer. Physicists prove the existence of atoms then engineers use knowledge of them to build chips. But we don't start grouping those engineers in with the physicists. We treat those as two separate disciplines. Well, lets keep computer science a theoretical science and call those people who apply those theoretical discoveries engineers. Much neater and cleaner and makes sense to me.
- scott_s 15y agoWhich is a fair point - I grapple with how much of what I do is science, how much is engineering, and how much is neither. But, the problem is, that's what the word "computer science" means now. We could try to retroactively redefine a word to fit what we feel is a more natural division, but how often is that successful?
- ArtB 15y agoIn what I do (mostly business cruds) it is mostly an art. The skill is not to get it done, but to organise the code effectively so that it will be easy to debug and adapt and reuse etc. It really doesn't feel like a science and more like being an editor of an anthology.
- scott_s 15y agoI consider that software engineering. "Doing" computer science means you're doing research. To keep abusing the physics analogy, your work (software engineering) is to mine (computer science) as mechanical engineers are to physicists.
- pm90 15y agoInteresting. I talked about this with a friend, who did her BS in Math and Physics and now is a PhD in engineering. What we finally agreed was that physics is just so vast, that the `practical' aspects have spawned engineering branches. i.e mechanics == mechanical engineering, electromagnetism == electrical engineering, atomic physics == nuclear engineering and so on. Maybe we should do the same with Computer Science
- vbtemp 15y agoNote to OP, I'm really not a huge fan of people posting links to their own blogs... And in response to your essay, which by and large was tldr, I don't think many people run around saying that CS is math. Many computer scientists, as I'm quite sure you know, need to model their computable structures formally, show reductions or equivalences to other well-studied constructs, and then use the properties of these constucts to establish the expressiveness/complexity/whatever of their model. If outstanding questions remain then it can motivate basic research into the relevant mathematical field (particularly true with cryptography). These people "do math" - many other's from a CS background don't.
- scott_s 15y agoI've been here for a few years. It's a common enough practice that I felt it was okay. Further, I wrote this because I have made the same comment here at least five times (http://news.ycombinator.com/item?id=3596446 http://news.ycombinator.com/item?id=3596446).
- nollidge 15y agoPeople post links to their own blogs all the time. There's nothing untoward about it.
- deleted 15y ago[deleted]
- alsothings 15y agois Computer Science the same as Software Engineering or Software Development? If it is then sure, this article makes a fair point, but I've always thought these were related but distinct things. And if they are in fact distinct, then Computer Science is the part that is Applied Mathematics by another name. But really, all of this is just quibbling about semantics.
- xcallmejudasx 15y agoAs much as I agree that everyone is just quibbling about semantics it is something that needs to be finalized and agreed on. In some states it's illegal to say you're an engineer unless you specifically have an engineering degree. Most CS degrees are offered as a science degree with an alternate Software Engineering degree being an engineering degree. There's also a noticeable gap in what you're taught depending on which path you take. Friends of mine who majored in software engineering ended up learning more practical languages, how to use source control, software engineering practices, and never had to take a class related to the theory side of it. Whereas half of my classes were information theory, and abstract or theory based math classes. Does this make them better programmers because they know more languages and tools? That's subjective. However, there are times when you need a computer scientist and not a software engineer but most companies and even developers themselves couldn't tell you the difference between the two. Purely hypothetical at this point but suppose you were tasked with creating the first ring based authentication system. This involves a decent understanding of group theory . I don't doubt for a second that a software engineer would be able to accomplish this after first teaching them self about group theory but my first bet would be to go to the person with the CS training. Sure they might not be able to code it as well but once the idea has been developed and proven to be mathematically sound it can just be sent off to the engineer.
- ekm2 15y agoProgrammers are perfectly comfortable talking about history,psychology,philosophy,economics,the arts,but when math comes up everyone starts crafting intricate theories why it really has nothing to do with his craft(and is therefore not worth wasting time on).Is this a rationalized adult version of math phobia?
- demian 15y agoThere are two "extreme" ways of doing things, the "crafting" way in one side of the spectrum and the "engineering" way on the other side. You can "craft" a car without knowing a single formula, but that proved to be inefficient. In programming is kind of the other way around. There is a way to use formal mathematical methods to "engineer" programs, but for general use they seem to be economically "inefficient".
- Dn_Ab 15y agoThe article can be efficiently summed as: Computer Science is not always Math, sometimes it is more of a Science or Engineering or something of all of them. I think this is one of those places where a word has different meanings to different people and correctness takes a religious quality and fruitful discussion requires telepathy. Also often depending on the resolution of the definition and where a person stands on if the thing and its description can/should be distinguished. People who say computer science is math I suspect are hard pressed to find anything that isn't. Myself for example, I define math as the maximal object that has something to say - about anything that has structure - in a systematic way. You magnify/exaggerate a certain aspect of the structure you think is key and explore it in a systematic way to gain insight on the whole thing. So while aspects of computer science are more engineering or science than math, I can look at the whole system of doing computer science in an engineer like function as mathematically describable.
- dsirijus 15y agoStill haven't read through all the articles referenced to in the comments, but please - do not equate "what I do every day as a computer scientist" to "what computer science is". Let's keep the ideals, shall we?
- cprussin 15y agoI would claim that Computer Science is a term that is supposed to apply to any science directly interested in computation. I really see no point in that. Mathematicians are interested in algorithms and complexity and the like, software engineers/db engineers are concerned with databases and UIs. There are different programming languages for each purpose. I see no reason to insist on clumping them in the same group. tl;dr: every study involving computation or programming doesn't need to be in the same department.
- demian 15y agoI believe that designing and building software systems is not "equivalent" to experimental physics, that it is not "experimental" computer science. Following the metaphor, I believe it's more accuarate to relate it to design and engineering. As in physics, there are very exact scientific theories that, mixed with technical/practical knowledge and insight about systems and people, can be used to create technology. But I would also argue that there may be a way to "experiment" in a similar way physicist do, and it's by looking at "computing" as a phenomenon of the natural world. Computing can be considered a science similar to phyisics, because it can be seen as laws that describe nature, or more specifically how information is processed in the natural world. This "computing" works at a "higher level" than physics, which studies the laws of the "hardware". The most used example is the DNA, with information in a higher level of abstraction than the chemical physical support. I always find amusing to imagine what if Newton had developed his theories as a way to solve practical problems instead of trying to explain motion laws[1], and how maybie that's what happened to "computing". [1](Physics = "Engine Sciences"?)
- generateui 15y agoAnd software engineering is quite dissimilar, if not completely different to computer science. Creating API's, building user interfaces, testing, has little to do with computer science, or information theory, or mathematics. Yes, it has some overlap, but not nearly as much as academics like to think. Take an example as implementing a 3D renderer. A computer scientist might argue that underlaying 3D calculations should be correct. A software engineer might optimize for speed, and simply allow incorrect/imprecise calculations, as long as the rendered result does not look very different.
- emmapersky 15y agoExcept underlying that 3D renderer is a whole bunch of Computer Science research that had to be done in order to allow the engineer to make an optimized implementation. And I doubt a decent Computer Scientists would argue that. In fact, you might need some more CS (or science in general) to figure out what tolerance can be allowed for. Further more, while an optimized implementation is good, an optimized algorithm is probably even better, and right there i more CS.
- terio 15y agoThis is a problem of definition more than anything else. I feel more comfortable thinking of Computer Science as the Math used to study algorithms and processes. The rest, although based on Math and the scientific process, looks more like Engineering to me.
- gatlin 15y agoComputer Science has always seemed to me to be the study of algorithms and information, correctness, methodologies, and their applications. Math is used in order to advance this knowledge. It is readily apparent to me that everything in CS is applied math and logic. And in the same way a mechanic uses physical principles (arrived at by way of math), software engineering uses insights, practices, methods, and languages (which are mathematical entities to control a Turing machine) developed by computer science. Computer scientists in turn also learn quite a bit from challenges found and attacked by the engineers. A few computer scientists I've met have math degrees and they enjoy exploring intersections of discrete math and formal methods; some also do research almost exclusively in engineering / application domains (e.g. computer graphics). And, some engineers I know do quite a bit of graph theorizing before hitting the keyboard (whether they recognize it or not) because it's useful. A good SE will be a computer scientist when faced with a new, challenging problem and a CS will engineer on occasion to help her research.