Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I'm new at computer science and programming, and I was wondering, is there a difference between computer science and programming? and do you get to choose to study only one of them at the university, or both of them?

share|improve this question
30  
Bad analogy time. –  Mike Weller Feb 27 '12 at 13:16
8  
What's the difference between architecture and construction? –  Oded Feb 27 '12 at 13:19
6  
they are as far apart as geology and ditch-digging –  Steven A. Lowe Feb 27 '12 at 14:46
20  
Computer science is what you pay to learn. Programming is what you get paid to do. –  jfrankcarr Feb 27 '12 at 14:48
3  
The difference is what make you use smoothsort instead of bubble sort. –  deadalnix Feb 27 '12 at 15:12
show 7 more comments

We're looking for long answers that provide some explanation and context. Don't just give a one-line answer; explain why your answer is right, ideally with citations. Answers that don't include explanations may be removed.

12 Answers

up vote 45 down vote accepted

Computer science is the study of what computers [can] do; programming is the practice of making computers do things.

Take a look at the courses/syllabi offered by universities you're interested in to find out whether the course is a CS course, a programming course, something else (for example Software Engineering) or even a combination of the above. Many courses advertised as "computer science" offer a significant programming component, which may be so that you can put the theoretical parts of the course into practice, or may be for their own sake so that you can learn the skill of making programs.

share|improve this answer
1  
Very good answer, although it doesn't answer the practical part of the question ;) –  back2dos Feb 27 '12 at 13:49
    
@back2dos OK, I extended the answer. –  user4051 Feb 27 '12 at 14:04
    
It's important to note that most Computer Science courses aren't at all concerned with theoretical CS too, TCS is at least as separate from practical CS as CS is from programming. –  Ben Brocka Feb 27 '12 at 20:24
3  
I don't think you should tie CS (despite the name) too closely to computers: first and foremost, it is the study of information. It just happens that the term "computer" encompasses most of the different physical tools we use to work with information, so almost any study of information is going to involve programming a computer. –  Tikhon Jelvis Jun 2 '12 at 5:35
    
Taxonomy might fit under the monicker of information science. But it doesn't strike me as a fitting perfectly under CS. Useful in a cross-disciplinary sense but CS is inextricably in part about things we can do with computers, IMO. I might make your definition of whatever "computer" is, more general, but not the definition of CS. –  Erik Reppen Jul 4 '12 at 6:36
add comment

Computer science deals with the theoretical foundations of information, computation, and with practical techniques for their implementation and application. http://en.wikipedia.org/wiki/Computer_science

~

Computer science is no more about computers than astronomy is about telescopes. Edsger Dijkstra

Programming is the craft of creating a computer program.

share|improve this answer
add comment

A caveat: 'Computer Science' has become a muddied field in modern times because (at least in the United States) universities do not have degrees in "programming". This means that people interested in programming must sign up for Computer Science degrees, and as a reaction to that the Computer Science programs emphasize programming more and more.

That said, Computer Science itself is a strongly mathematical science -- Computational Mathematics might have been a better term. It involves the study of graph theory, algorithmic complexity, formal logic, automata, and in general any logical structure which can describe a transformation or response to input -- algorithms. A Computer Scientist in the classic sense could reason about rules that govern any computing system (including modern computers) without necessarily knowing the details of implementation on current architecture. A strong background in Computer Science gives you the ability to develop (or recall) efficient, scalable algorithms, anticipate logical reductions, and reason soundly about what is tractable.

Programming, by contrast, is what a person does when they use a programming language to transform an algorithm into something the machine can do. (That should make obvious the intimate connection to Computer Science, and where much of the confusion comes from.) A programmer (relative to an environment and language) should be able to take virtually any set of algorithms and transform them into a form both human- and machine-readable by writing code. A strong background in programming (as most CS degrees will provide) enables you to write better code -- where 'better' code is more easily understood by others and more successful in expressing the algorithm you are implementing.

There is a large amount of crosstalk, of course, and a high level of experience in one will correspond strongly with developing experience in the other -- as noted, a CS major is almost always a competent programmer, and a seasoned programmer has picked up many principles of CS. Think Physics and Engineering.

A good way of remembering the difference is this: if it requires a computer to see if it works it's programming -- if you can do it with pencil and paper, it's Computer Science.

share|improve this answer
2  
Aye, that last sentence is the rub, isn't it? It conjures images of rumpled professors with frizzy hair and chalky fingers waving around fistfuls of parchment, and brings to mind quotes like "computer science is no more about computers than astronomy is about telescopes." If the science doesn't eventually make it into a machine somehow, then what's the point? What astronomer in their right mind never looks through a telescope? –  Robert Harvey Apr 11 '13 at 16:57
add comment

Computer Science is, from my point of view, supposed to be a Hard Science like Physics.

It involves the study of compilers and compiler generators, hardware architecture concepts, various forms of number systems, algorithms and algorithmic efficiency / performance and the theory behind arithmetic operations on the processor. When I did CS at university we spent a lot of time mucking around with assembler, learning about the difference between compiling, linking and interpreting, etcetera.

A lot of this was done by programming - that is, the act of writing code which was then compiled or run via an interpreter, with the intention of generating results to solve a problem. That is, Programming is the act of solving problems which can be described with knowledge from Computer Science. It's kind of a Pure Maths / Applied Maths split.

You don't need a Computer Science degree to be a programmer, but a programmer with a CS background will likely have a deeper understanding of the behaviour of computer programs.

share|improve this answer
1  
I don't think CS students are any better than students of other programming courses. –  Tjaart Feb 27 '12 at 13:52
3  
I didn't say better, I said likely to have a deeper understanding. –  mcfinnigan Feb 27 '12 at 14:05
    
@mcfinnigan I'd say, more misguided. CS students who ground themselves in theory tend to have less understanding because they don't actually have the experience to know what computers can do, or how to get there in various languages. –  Izkata Feb 27 '12 at 16:29
2  
again, you misunderstand me. I'm saying that a programmer who's taken the time to acquire some of the actual CS theory is more likely to know why a Set is better than a List in certain situations, or why floating point is tricky. –  mcfinnigan Feb 27 '12 at 17:16
1  
@TikhonJelvis: engineering employs mathematics, but it's two steps away. CS is a branch of mathematics. –  kevin cline Jul 4 '12 at 15:54
show 2 more comments

I would reword your question as "What's the difference between Computer Science and Software Engineering?" After all both involve programming.

Computer Science is the theortical study of what computation is and what is and is not possible. It looks at things like Godels Theorem and the Halting problem.

Software engineering is how to write programs that do what they have been designed to do and are maintanable.

share|improve this answer
add comment

Computer science is the theory of programming. Programming is the implementation.

Computer science ...is the scientific and practical approach to computation and its applications. A computer scientist specializes in the theory of computation and the design of computational systems.

Its subfields can be divided into a variety of theoretical and practical disciplines. Some fields, such as computational complexity theory (which explores the fundamental properties of computational problems), are highly abstract, while fields such as computer graphics emphasize real-world visual applications. Still other fields focus on the challenges in implementing computation. For example, programming language theory considers various approaches to the description of computation, whilst the study of computer programming itself investigates various aspects of the use of programming language and complex systems. Human-computer interaction considers the challenges in making computers and computations useful, usable, and universally accessible to humans...

share|improve this answer
11  
I honestly believe computer science is more than programming. –  Ubermensch Feb 27 '12 at 12:15
2  
@Ubermensch: I honestly believe programming is more than computer science. –  Michael Borgwardt Feb 28 '12 at 13:38
1  
@MichaelBorgwardt Actually, both of our views are right. But computer science is still much bigger than programming (You can argue the other way round too). A famous quote from Niehls Bohr "There are two kinds of truth, small truth and great truth. You can recognize a small truth because its opposite is a falsehood. The opposite of a great truth is another truth." –  Ubermensch Feb 28 '12 at 14:10
    
@Ubermensch Your belief is fact. Computer science is NOT just the theory of programming. Computer science was around before computers were. –  Casey Patton Jun 2 '12 at 4:47
add comment

If programming is carpentry, then computer science is architecture/design.

Edit

More info: in carpentry, you're interested in things like what what order to build things in (frame, then subfloor, then interior walls, then drywall, etc.). How do you build it so that it takes less time to construct, but can be modified later.

In the case of architecture (the part of it like CS anyway), you're concerned with things like what are the capabilities of the materials, how big of a beam do you need to support this span of wall/roof?

Similarly CS is about the theoretical capabilities of computers, where programming is about the practical application of that knowledge.

share|improve this answer
3  
Bad analogy. If programming is carpentry then software design is architecture/design. Computer science is more like dendrology in that respect, or maybe biology in general. –  back2dos Feb 27 '12 at 13:38
    
Ok, maybe I was unclear, so let me explain why I think you analogy doesn't work. Being concerned with the capabilities of the material is material science, with the stability of the structure is statics. None of them are actually what design is about, they only constrain it. Design (software or buildings or anything) is about taking all requirements and constraints (technical, financial, psychological, ...) and architecting a solution meeting those. –  back2dos Feb 27 '12 at 14:24
add comment

Computer science is to programming as physics is to mechanical engineering.

Computer science is theoretical, it takes a scientific and mathematical approach to information and it's computation.

Computer programming is practical, it is the process of designing, writing, testing, debugging, and maintaining the source code of computer programs.

They are different, but related fields. Both have benefited from each other.

share|improve this answer
add comment

A degree in computer science is a lot broader in scope and covers the theory behind computing. A degree in computer programming, on the other hand, is focused on developing the coding or programming skills of students by training them in different programming languages. If you’re confused, you can browse through the details of both these programs at California College San Diego. That may provide you some clarity regarding the scope of these degrees!

share|improve this answer
add comment

Computer Science : It is the study of problem solving with computers/computational methods.

Computer programming : It is the part of this problem solving process that makes up the field of computer science. Computer programming is just a small subset of computer science.

share|improve this answer
add comment

Programming is about people. People read, write, and maintain code. Computer science is about mathematics- they implement and describe algorithms.

share|improve this answer
3  
@SK-logic and DeadMG. I've deleted all these comments. If you wish to have a discussion (or indeed argument) please take it elsewhere. –  ChrisF Feb 27 '12 at 14:43
1  
That's a little bit narrow. At the very least, the "Algorithms, Machines and People" lab at my university would like to disagree :). And that lab contains some of the top CS researchers, period. Also all the HCI people everywhere. I'm being a little facetious, but CS is really more broad than just algorithms and math. –  Tikhon Jelvis Jun 2 '12 at 5:47
add comment

Programming (development) is about making money. Science is about discovering new things.

share|improve this answer
5  
Someone forgot to the tell the open source community. –  webbiedave Feb 27 '12 at 19:29
2  
@webbiedave - well, there may be one or two true altruists out there, but in the end open-source is about making money as well. I dare say most people involved in open source projects do it to enhance their skills and/or CV:s and boost their future income potential. Many open-source projects also spawn commercial/enterprise versions to generate revenue from the project. So the open source community is very much in the loop when it comes to making money ;) –  pap Feb 28 '12 at 7:42
    
And the same isn't true for science? ;) –  webbiedave Feb 28 '12 at 16:33
    
@webbiedave - No, I don't agree it is. While money may be a bi-product of science, it isn't (and shouldn't be) the primary goal. Science is about discovery for the sake of itself. Companies do R&D, but that is not about discovering new things, it's about monetizing things already discovered. –  pap Feb 29 '12 at 7:46
    
The only reason most scientists want more money is so that they can do more research. I think the same thing counts for open source. Doing open source to enhance you're CV sounds like a road to failure for me. It should be about curiosity, discovery and scratching an itch. –  Tjaart Mar 1 '12 at 8:16
show 2 more comments

protected by World Engineer Sep 8 '13 at 16:09

Thank you for your interest in this question. Because it has attracted low-quality answers, posting an answer now requires 10 reputation on this site.

Would you like to answer one of these unanswered questions instead?

Not the answer you're looking for? Browse other questions tagged or ask your own question.