34

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?

gnat
  • 21,442
  • 29
  • 112
  • 288
xXSarahXx
  • 393
  • 1
  • 4
  • 9

12 Answers12

69

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.

  • 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. –  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 02 '12 at 05: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 04 '12 at 06:36
36

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.

shanef22
  • 471
  • 3
  • 2
  • 4
    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
  • I don't think I've ever been asked to "transform an algorithm into something the machine can do" in the last 30 years. What you are thinking about is not a programmer, but a compiler. – gnasher729 May 16 '15 at 19:25
  • 3
    @gnasher729 Ok, let's say I have the algorithm "For each word in a list, if it starts with an A, move it to the beginning." What compiler would you recommend? – shanef22 May 18 '15 at 03:26
18

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.

Gary Willoughby
  • 2,067
  • 16
  • 19
11

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.

mcfinnigan
  • 478
  • 2
  • 7
  • 1
    I don't think CS students are any better than students of other programming courses. – Tjaart Feb 27 '12 at 13:52
  • 5
    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
  • 4
    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
  • I think your statement is too open to interpretation. Computer programs behave on many different levels. Someone with a CS degree may not know MSIL, but a .Net expert would. At that level the .Net expert is more knowledgeable. I think the generalisation is wrong. – Tjaart Mar 18 '12 at 16:46
  • Except it's not really a "science" in the same way as physics or chemistry: we don't even pretend to follow the scientific method. Even the "soft" sciences do experiments with control groups and the like; CS has more in common with engineering and math than actual science. – Tikhon Jelvis Jun 02 '12 at 05:38
  • 2
    @TikhonJelvis: engineering employs mathematics, but it's two steps away. CS is a branch of mathematics. – kevin cline Jul 04 '12 at 15:54
3

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.

Jaydee
  • 2,667
  • 1
  • 18
  • 17
  • No. Why reword his question? He asked what he asked. Software Engineering is different from programming and is ALSO controversial because it means different things in different countries (e.g. USA and Canada) – Douglas Held Jun 11 '16 at 19:04
2

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...

gnat
  • 21,442
  • 29
  • 112
  • 288
Tom Squires
  • 17,695
  • 11
  • 67
  • 88
  • 13
    I honestly believe computer science is more than programming. – Ubermensch Feb 27 '12 at 12:15
  • 3
    @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 02 '12 at 04:47
1

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.

Scott Whitlock
  • 21,874
  • 5
  • 60
  • 88
  • 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
1

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.

bbb
  • 27
  • 1
0

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!

user45390
  • 9
  • 1
0

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.

ramneet
  • 17
  • 1
-1

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

DeadMG
  • 36,794
  • 8
  • 70
  • 139
  • 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"](http://amplab.cs.berkeley.edu/) 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 02 '12 at 05:47
-1

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

pap
  • 1,290
  • 6
  • 8
  • 7
    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 07: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 07: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 01 '12 at 08:16
  • Also, most of the people I know working as programmers don't do it for the money (although the money certainly doesn't hurt!): they do it because they *love* programming and they love making stuff and they love solving hard problems. Some of the smartest people I know could be making far more money in finance or the like, but instead they work for a startup or Google or Facebook just because they really love it. (Of course the salaries there aren't shabby either.) – Tikhon Jelvis Jun 02 '12 at 05:41
  • I could definitely be making about 20-40 grand more working for total douchebags in the financial sector. It's not what I want. I've learned more simply through the opportunity to actually try things differently, (my boss/owner of the company also writes our app code) that wouldn't be possible in environments where middle managers are constantly stepping in to "manage risk." I love what I do. I make a decent buck. I hope to build up some notoriety by introducing some stuff on Github because I think I've got some nice ideas. Professional ambition isn't just about money. – Erik Reppen Jul 04 '12 at 06:45