views:

1088

answers:

30

I am wondering whether to do some extra studying around Physics as some people have advised me that having a background in Physics is good for programmers to have. I would be interested to here other peoples opinions on this.

+14  A: 

A background in any science can be helpful as programming uses very similar logical reasoning skills that an hard science such as Physics can enhance.

Of course, a background with Writing can also help a programmer as most programmers are logical by default but need the practice in the communication area. Just avoid the underwater basket weaving.

Godeke
I'll have you know underwater basket weaving taught me a lot about thread management!
Spencer Ruport
Unless programming for a particular science, Physics is better than the rest because of emphasis on word problems.
OMG Ponies
No *wonder* I keep nearly drowning in my asynchronous apps!
Godeke
Is there any evidence that having studied Physics makes you a better programmer? Or is it just a pre-conception that has stuck?
Corehpf
Having known and managed a lot of programmers, I will say that most of the "best" came from another science into the software arena. Which one brought the most to the table I can't rightly say, but I know at least a couple of them were physics majors. On the flip side, those with Information Technology degrees (as opposed to Computer Science) were in general pretty rubbish at code.
Godeke
Most of the best programmers I've ever worked with have been EE majors. And part-time sysadmins. Anecdotal of course.
Chris Kaminski
My experience has been that Biologists make lousy programmers... Anecdotes != data, and all that, but still multiple anecdotes... (Physicists seem fine)
Brian Postow
From all the comments, it sounds like its the "mindset" of the people that have studied a science-based degree. Science/physics is HARD, so it does imply that the person is probably fairly intelligent. And *thinking* is obviously going to help your code (and the big picture) and make you better. Incidentally, there's an art to managing intelligent people - don't control them, just set direction (sometimes a difficult one to remember)
Neil Fenwick
+1, any science background will do. A marketing friend once tried Java and it turned out to be a total disaster. There are skills we learn in science courses (e.g. being analytical) that are very useful in programming as well.
n002213f
+2  A: 

A background in physics would be useful if you're interested in graphics or image work.

Velociraptors
Why? Because images are made by physics? Or because you want to draw things moving?
mmr
Studying optics and understanding how light interacts with objects is pretty important for generating realistic images.
Velociraptors
The mechanics side of physics is also necessary for objects to move realistically.
Velociraptors
Physics is so broad though - would be a waste to do a whole physics course for just the mechanics subsection.
Neil Fenwick
Velociraptors
+1  A: 

Depends on what you want to do with programming. I've had to learn physics because the programs I develop have to do with physics, but I've known plenty of excellent developers who wouldn't remember Newton's formulae if they were hit on the head by an apple.

mmr
Maybe it's getting hit on the head that causes them to forget.
Nosredna
+3  A: 

It won't make you a better programmer directly.

It will make you a better mathematician if you where not already, and that can make you a better programmer (to a point).

There are also a number of specific programming jobs where knowledge of physics can be an asset, though depending on your choice of career the same is very true of accounting (if you want to be a game programmer, get some grounding in physics, if you want to program in business, get some background in accounting).

David
+3  A: 

Physics problem solving would teach you about algorithms, which is the essential part of how basic science and math applies to computer science. How you break down a complex problem in to simple steps is the essence of most computer science.

Algorithms were only a small part of my physics curriculum. To truly know about algorithms, one should study CS or math.
littlegreen
A: 

I'd second velociraptors' response about graphics or if you wanted to get into Hardware then Physics may be very useful. Alternatively, Mathematics can be useful for some programming concepts like Big-O or Boolean Algebra, for example.

JB King
Recalling Jurassic Park, I would think twice about seconding a velociraptors' response.
littlegreen
A velociraptor's response isn't the same as velociraptors' response as the latter has the apostrophe placed differently. Notice that there is a user with "velociraptors" as their name.
JB King
+3  A: 

Generally I'd think that it's more true the other way around. That is, having a background in computer science before studying physics. Especially in experimental physics where processing of maybe massive amounts of data is important. The work at CERN is an excellent example of this.

That said, a background in physics before doing computer science will help you primarily from a mathematical point of view. The reasoning is very similar.

In doing game development physics will also come in handy because you'll be able to describe the real world better.

anderstornvig
+4  A: 

First of all, my background: Electrical Engineering (2 years of Physics) so you understand the context of my answer.

Games Programming: Mechanics as a subject might be useful - not really physics. If you want to understand the dynamics of motion, object interaction, gravity, trajectory etc, study mechanics instead.

PC physical components (transistors / displays, colour, light): If you really want to understand whats happening at the silicon level, physics might help you. E.g. how electrons travel over transistor gates, effects of frequency. You'll learn how colour / light / frequency interact - although this is all probably more of interest than any direct relevance to programming.

My opinion, if its purely for programming reasons, focus on what you need, when you need it. "Physics" is too broad a topic to really say its useful. Maybe just interesting.

There are electrical engineering topics that you might be able to apply: e.g. Numerical methods (e.g. how to do calculus in code), statistics, signal processing - but then thats a 4 year degree.

If you're just interested in being a better programmer, without doing a whole degree, most of the same knowledge is spread around in books. Just read regularly. Check out the recommended reading section on Jeff Atwood's blog: http://www.codinghorror.com/blog/archives/000020.html He's even added some reviews.

Neil Fenwick
+1  A: 

In Physics you're forced to learn to manipulate things in your head, so it trains you for the complexity of managing your program in your head. Even though we try to make programs less complex, we can only go so far.

Lance Roberts
+3  A: 

Physicists make good quants.

I did a lot of physics (mechanics and optics) for games, but the majority of my coworkers didn't know much physics. There are specialists in videogames, and you can use physics libraries, so it's probably more important to have a feel for "fun" than for "physics."

I found that discrete time played havoc with physics concepts that assume a continuous world.

Nosredna
A: 

Hi

Your background in physics particularly areas related to interactions of different forms of matter to light would help you in Computer Graphics.

Reason - Computer Graphics is all about simulation of how light interacts with matter. With background in Physics you would be having a good know how on vector algebra, which comes handy in Computer Graphics.

cheers

Andriyev
A: 

You'd be much better off learning advanced mathematics such as Linear Algebra and Lambda Calculus. While physics will likely develop your problem solving abilities, advanced math will do the same and will be more applicable in general.

Corey D
In my career, I think school physics paid off more than math But for many jobs, I bet you're right. There's just so much variety in what programmers do I think it's hard to generalize. We all see our little piece.
Nosredna
A: 

You could make the same arguement for: math, any science, languages, business, psychology, etc. A well-rounded learner (don't confuse with someone with a degree) who has the ability and took the time to learn programming will probably go a long way.

Jeff O
+5  A: 

I think it's more likely that the kind of people attracted to studying physics are the kind of people who would make good programmers.

mbeckish
+3  A: 

I think its more likely that people who study Physics struggle to make a career out of it. When they are sitting around bored and unemployed at their computer they start to tinker, maybe at first with HTML and then maybe they move up to VB or .NET or C. (Some of them may have done bits of programming in C or Fortran on their Physics course.) Eventually they manage to learn a few bits and pieces about programming, maybe pick up a book or two. Then they write a few more programs to keep themselves busy. A few months down the line they are interviewing in front of a hirer who loves to talk about Physics and then bang the Physics background programmer is born ready to bore you to death about Quantum computing, quarks and a big pipe called Sern or something.

Nosrama
A: 

No.

A background in computers makes you a better programmer.

Devtron
Wrong...........
Janie
^ How is that "wrong"? What if my programming job is to calculate excel spreadsheets. How does physics help me with that? IT DOESNT!!
Devtron
+9  A: 

Personal perspective here: I bailed on a PhD physics program to get a job in software.

The problem-solving and mathematical skills I gained through my physics education have been very valuable in my career, but I suspect that a lot of these skills are also learned in a good CS program. For that matter, as others have posted, advanced mathematics would probably also teach similar skills.

On the flip side, there are problems that I struggle with, that would probably be much easier for me if I had studied CS.

I have never, though, used my physics knowledge in a domain-specific sense -- it's always been the problem-solving or the math, that has been helpful.

All in all, I would say that to the extent you do not neglect learning about software and computers, knowing physics can only help. If you know that you want to program computers for a living, neglecting learning about computers and software is unlikely to pay off, even if you do it to learn about the hard sciences.

You should, of course, ignore me if you want to work in a physics-heavy problem domain. Since I do not, I cannot say how you should strike that balance

peejaybee
+1. Unlike math, physics is not relevant to a coding career, unless you want to code scientific software. Of course, my physics degree and physics jobs have taught me loads of stuff that's also valuable for coding, like math, structured working, teamwork, oral/verbal/writing skills.. but it's nothing I couldn't have learned from a CS or math degree.
littlegreen
A: 

I know some outstanding programmers who were either mathematicians or physicists with no formal CS backgrounds.

Tim
+1  A: 

I'd say no. I'm completely self taught. Admittedly because of that, i've picked up a few bad habits, but I don't have a degree or qualification, but I got into the industry just fine and now I'm in an excellent job as a Web/BI Developer for quite a large retail company.

I'm not even that good at maths, but I can program. As long as you're passionate about it and it's something you enjoy, there's no reason why you can't be a good programmer through being self-taught.

I've picked things up along the way from people I've worked with that i think has made me a better programmer.

Liam
A: 

I have graduate and undergraduate degrees in physics, as well as 35 years' programming experience. I don't think my physics experience made me a better programmer, except perhaps in one respect: as a physicist I learned to do what one of my better instructors called "take an ax to a problem". This means, take a hard problem and simplify it down until you can make progress, even if this leads to ridiculous oversimplification. (Hence the joke whose punch line is "consider a spherical horse.")

As a programmer I have found this skill useful.

P.S. Perhaps physics also helpd me learn that complexity is the enemy.

Norman Ramsey
+2  A: 

The practices of defining complex, abstract systems are easily mastered, but a truly great programmer needs to study principles. There are no better lessons in elegance than those found in the natural world.

Physics is like the study of the natural world as though it were a computer program. Physicists reverse-engineer the abstract rules that define the world.

Physics will absolutely help you become a better programmer!

Evan Rogers
A: 

If anything, it definitely gets you comfortable with the 'Divide-and-conquer' approach.

Sergey
A: 

Studying physics for the purpose of becoming a better programmer may have some limited effect in improving your skills, but it is certainly not an efficient way to improve. You can spend the equivalent time studying things more directly programming related that will improve your programming skills significantly faster.

jwanagel
+1  A: 

Let me put this in the most simplest of ways:

I personally feel that a good Mathematician has the potential to be a good programmer.

Infact having known the semantics of a language, its basically effortless for a good mathematician to get trained to be a programmer.

As the old saying goes, a person good in physics is first of all a good mathematician.

so........ By transitive closure of the above statements ......

If i am not wrong, all major algorithms were devised by mathematicians

(on a personal note: My maths is pathetic)

Salvin Francis
"If i am not wrong" - well, the inventor of Quicksort was a Classics graduate.
Daniel Earwicker
hmm.....If i am not wrong, MOST major algorithms were devised by mathematiciansis that better ?
Salvin Francis
+1  A: 

A background in Physics is very useful for an embedded or systems programmer. The more you understand the physical system your sowtware interacts with the easier it is to write good code for it.

In general, any background which lets you understand the real-world problem domain better will make you a better programmer.

AShelly
A: 

Correlation is not causation.

I've known some top-notch programmers who studied physics---either at the undergraduate or graduate level. But I never got the impression that they were good programmers because they studied physics, but rather that they were good programmers who happened to have studied physics.

Keith Smith
A: 

No, the only one bulletproof thing that will make you a better programmer is a desire to constantly learn new things.

Martin
A: 

As far as I can understand the remarks in its manual, the distributed revision control system "darcs" is inspired by quantum mechanics. As the author notes:

``I think a little background on the author is in order. I am a physicist, and think like a physicist.''

``From the beginning of this theory, which originated as the result of a series of email discussions with Tom Lord, I have looked at patches as being analogous to the operators of quantum mechanics. I include in this appendix footnotes explaining the theory of patches in terms of the theory of quantum mechanics. I advise against taking this analogy too seriously, although it could provide some insight into how a physicist might think about darcs.'' (David Roundy: Darcs User Manual)

Another source:

``Darcs is decentralized, based on a “theory of patches” with roots in quantum mechanics.'' (DokuWiki, devel:darcs)

As for a personal remark: as I was deciding my choice among various revision contol systems, it was the cause that made me select darcs, this was the casue of my choice. I like if something is insired by laws that are ``out there''.

physis
A: 

A background in physics may help you get a job as a programmer. I can think of four people working on our product (a big one) off the top of my head with physics PhDs and one with a masters degree. I'd guess there's lots more, but once you get down into the code, becoming known as a domain expert of some sort, the original schooling doesn't matter so much (and nobody thinks to ask about it).

Peeter Joot
A: 

It's a double-edged sword in my experience:

On the plus side, physicists are generally great at abstract thinking.

On the minus side, they often carry a certain amount of "ego baggage" (i.e. "I'm the smartest person in the WORLD!") and can be difficult to give constructive criticism to (making code reviews particularly painful).

Your mileage may vary.

Drew Hall