Beta
×

Welcome to the Slashdot Beta site -- learn more here. Use the link in the footer or click here to return to the Classic version of Slashdot.

Thank you!

Before you choose to head back to the Classic look of the site, we'd appreciate it if you share your thoughts on the Beta; your feedback is what drives our ongoing development.

Beta is different and we value you taking the time to try it out. Please take a look at the changes we've made in Beta and  learn more about it. Thanks for reading, and for making the site better!

Programming As a Part of a Science Education?

Soulskill posted more than 6 years ago | from the part-and-parcel-of-the-information-age dept.

Programming 508

An anonymous reader writes "I'm a fairly new physics professor at a well-ranked undergraduate university. When I arrived, I was surprised to discover there were no computer programming requirements for our majors. This has led to a series of fairly animated faculty curriculum conversations, driven by the question: to what extent should computer programming be a part of an undergraduate science education (in particular, physics)? This is a surprising line of questioning to me because in my career (dominated by research), I've never seriously even questioned the need. If you are a physics major, you learn to program. The exact language isn't so important as is flow control, file handling, basic methods/technique, basic resource management, and troubleshooting. The methods learned in any language can then be ported over to just about any numerical or scientific computational problem. Read on for the rest of the reader's questions and his experiences dealing with faculty who have their own ideas.The reader continues, "I'm discovering the faculty are somewhat divided on the topic. There is even a bizarre camp that actually acknowledges the need for computer programming, but turns my 'any language' argument on its head to advocate the students do 'scientific programming' using Excel because it is 'easy,' ubiquitous, and students are familiar with it. They argue Excel is 'surprisingly powerful' with flow control and allows you to focus on the science rather than syntax. I must admit that when I hear such arguments I cannot have a rational discussion and my blood nearly boils. In principle, as a spreadsheet with simple flow control in combination with visual basic capabilities, Excel can do many things at the cartoon level we care about scientifically. But I'm not interested in giving students toys rather than tools. As a scientist raised on a heavy diet of open source software and computational physics, I'll hang my head in shame if our majors start proudly putting Excel down on their resumes. However, in the scientific spirit, perhaps I'm missing something. So I ask Slashdot, to what extent do you feel computer programming should be a part of an undergraduate science education? As a follow-up, if computing is important, what languages and software would best serve the student? If there are physics majors out there, what computing/programming requirements does your department have? My university is in the US, but how is this handled in other parts of the world?"

cancel ×

508 comments

Sorry! There are no comments related to the filter you selected.

CMU (5, Interesting)

allanw (842185) | more than 6 years ago | (#23594163)

The introductory physics classes at Carnegie Mellon use VPython [vpython.org] to run some simulations. It's pretty simple to use and intuitive. The textbook [ncsu.edu] makes use of it too.

Re:CMU (0, Offtopic)

phantomcircuit (938963) | more than 6 years ago | (#23594231)

You just wanted to put it out there that you went to Carnegie Mellon didn't you :D

Re:CMU (0, Offtopic)

allanw (842185) | more than 6 years ago | (#23594257)

You just wanted to put it out there that you went to Carnegie Mellon didn't you :D
I'm actually an incoming freshman but I've done my research ;)

Re:CMU (2, Informative)

kaufmanmoore (930593) | more than 6 years ago | (#23594235)

I was in the class taught by the authors of the textbook mentioned above. We had to write the code to model simulations of such things as magnetism and inertia/momentum. I enjoyed the labs that involved the programming, but I'm not sure what effect it had on other people who aren't as into computers.

Re:CMU (5, Interesting)

cashman73 (855518) | more than 6 years ago | (#23594459)

I'm currently working in the computational biology department at the school across the street from CMU [pitt.edu] ,... A lot of people don't think of "programming" and "biology" in the same sentence, and most biology programs are the last science programs that would even think of requiring programming as a prerequisite for graduation. However, once you get into the more specific structural and molecular biology fields, you almost can't escape programming. Almost on a daily basis, I use perl. Most of our software is probably coded in C or C++, and some of the older software is coded in Fortran, though that's not as common anymore. Some people in our department have been doing some stuff with Python, too, though I personally haven't. There's also quite a few genomic and database applications where SQL will come in handy for the database work, and an increasing amount of computational biology projects are coming online with web interfaces, so PHP could be useful.

"Other parts of the world" (5, Interesting)

DancesWithBlowTorch (809750) | more than 6 years ago | (#23594677)

My university is in the US, but how is this handled in other parts of the world?"
I studied physics in Heidelberg, Germany [uni-heidelberg.de] . During the first half of my first year (about 6 years ago), we had introductory courses in C (they liked to call it C++, but it really was glorified C). In the second half of the first year, there was a "technical informatics" (read: Hardware design) course, which involved every student designing a little 16bit chip which could decipher the DCF long-wave time signal. That part used mostly C, but had some bits were we had to gnaw through Assembler.

That was my formal introduction to computing. Later on in my course, I mostly used MatLab, and occasionally C. Sometimes I had to reverse-engineer old Fortran code. I wrote my Master's thesis in MatLab (even though it was a rather computationally expensive application. In scientific applications, the time saved during design time often easily makes up for the loss in computational efficiency).

Since I started my PhD, I've tried a lot of different languages, from MatLab to Java, C# Python and, recently, F#. Even though I was brought up with OSS (my laptop runs Debian next to Windows), I have come to value the rapid development capabilities of .NET (I know, it sounds crazy. Please try it out before you flame. Visual Studio is certainly the best (maybe the only good) piece of software Microsoft ever made). But I'm a theoretician, so my focus is on being able to rapidly change my code to incorporate new ideas. Experimentalists, who mostly just want to control their machinery, need to know more about Fortran, C, and on the high-level side, LabView and MatLab

I think my point is: It's probably a good idea to start with powerful low-level languages like C first, but don't overdo it. It's good if your students know about the existence of Assembler and Fortran, but the important point is that they lose their fear of computers. Nowadays, teenagers grow up with computers, but they never get to see behind the web 2.0 surface. Our generation grew up with text editors and batch files. They grow up with facebook. So it's important to give them a look behind the curtains. Let them feel the power of being able to control memory adresses. Once they have lost their fear of pointers, they can move on to use high-level languages that safe loads of design time, while being able to descend down into the architecture when it really counts.

Science majors (0)

Anonymous Coward | more than 6 years ago | (#23594177)

When I went to University to study Biochemistry you were required to do work on the computer (used as a tool including programing) but you used your own time to learn programing as you could have ready access to a computer. As the access to the labs was very limited it was a much better use of University resources to limit the formal education to the science at hand.

Re:Science majors (1)

gangien (151940) | more than 6 years ago | (#23594241)

I think even non science fields could benefit from having some basic programming course requried to graduate. like a quarter of haskell or something.

And if functional programming scares you, maybe something like QBasic (flame away, I think it's great for this sort of thing) or pascal. Of course the problem with those, is the students will lose interest in printing characters to a terminal, so maybe something more graphical, or a presetup environment that would allow you to graphically display things. I say this because a friend of mine took a programming class and while doesn't care to program, thought it was somewhat neat when he could see the actual results. and in the mean time he was doing some 3d math and programming.

Re:Science majors (4, Interesting)

arb phd slp (1144717) | more than 6 years ago | (#23594699)

I think even non science fields could benefit from having some basic programming course requried to graduate. like a quarter of haskell or something.
Programming?? You're shooting too high. I'd settle for using the right app for a given job.

I know this is going to confirm every bad stereotype the /. crowd has regarding social scientists, but the researchers in my program think I'm some kind of hacker genius because I can get Excel to sum a column and make a pivot table. The last project I got assigned to was keeping the raw data in Word tables.

Maybe next semester I'll do a research colloquium on SQL and basic database construction.

Teach them Python (3, Informative)

Anonymous Coward | more than 6 years ago | (#23594183)

While a lot of computational physics requires speed, I find myself on a daily basis needing to write simple programs to collect, filter, transform and plot data. I have found no better language for writing these quickie tools in than Python.

Once they know Python, then they can pick up C++ or Java as context requires it. And if they never have to deal with really huge amounts of computation, then Python + Scipy might get them by for most everything. (And if not, Python has bindings for everything, practically.)

programming for scientists (0)

Anonymous Coward | more than 6 years ago | (#23594185)

Programming is essential to the sciences. Having trouble with languages like C++ or Fortran I have found that graphical programming (e.g. LabVIEW) has worked well for me.

Re:programming for scientists (2, Insightful)

Vectronic (1221470) | more than 6 years ago | (#23594547)

"Programming is essential to the sciences."

I wouldnt say essential, but it certainly helps, although most sciences don't require programming to achieve their goals, the mode of thinking envolved in programming can be intrinsicly helpful to science. And as you said "graphical", 3D software in general certainly has its place.

Personally, I think at some stage in general curriculum (K-12) programming should be envolved. I was lucky enough to have a teacher in grade 5 that made/let us do basic (as in easy, not the language) programming, to draw and animate a worm doing [something]... although I had previously done PET/BASIC (Commodore) at home, it certainly helped in my general understanding of how things work, and most likely helped lead to my fascination with computers, programming, and 3D and therefore science and mathematics as a whole.

Necessary Tool (4, Interesting)

MicktheMech (697533) | more than 6 years ago | (#23594203)

Physics requires number crunching. It's that simple. It's not much use learning differential equations if you're incapable of solving anything useful. Any physics or engineering major should learn at least basic numerical methods and how to implement them. For me, we did it with C, nothing fancy. As far as using Excel for scientific computing, some of my classmates tried to pull this in a heat transfer class. It's a joke, it'll work for something really simple, but it's no good for any serious work.

GNU Scientific Library. (4, Insightful)

Odder (1288958) | more than 6 years ago | (#23594321)

The GSL [gnu.org] is mostly C. It's useful for students to take a numerical methods class and recreate the basics and to understand the limitations. Once they know, they can use libraries like GSL to get real work done.

Excel is not only a joke for real problems, it's a real problem to grade.

Re:GNU Scientific Library. (2, Insightful)

willyhill (965620) | more than 6 years ago | (#23594453)

Excel is not only a joke for real problems

Scientific problems, sure. It's not designed for that any more than GNUCash is. But let's not generalize, twitter. It's actually one of Microsoft's better products.

For complex charting and plotting I really like GNUPlot [gnuplot.info] .

Re:Necessary Tool (1, Interesting)

AsmCoder8088 (745645) | more than 6 years ago | (#23594457)

I have to disagree that Excel is a joke, or even toy, as the introduction claims. A close friend of mine works at ConocoPhillips and they do all of their modeling of low-sulful diesel fuel catalysts in Excel; in fact it is has transformed into a series of spreadsheets that have saved the company hundreds of millions of dollars.

These are very complex spreadsheets, not toys, and for the kind of work being demanded of them, they do a really nice job. In fact I have had the opportunity to look at some of them in the past they blew me away -- thousands upon thousands of datasets where each value can affect another one in a different dataset, etc... The complexity is overwhelming even for someone who has been in the software industry for over ten years.

Re:Necessary Tool (2, Insightful)

TheEldest (913804) | more than 6 years ago | (#23594521)

I think that one of the advantages that Excel has is that you can visually plot relationships. When you're building a complex computational spreadsheet, it's difficult to keep track of what's where. Excel gives you another way to keep track of everything. In addition to variable names and comments, you've the visual geographic element. You may need to do something to a specific variable, but you can't remember its name but you can remember where it's defined.

When doing complex computation, having a better understanding of the structure that you're building can be of immense value.

Re:Necessary Tool (4, Insightful)

the eric conspiracy (20178) | more than 6 years ago | (#23594545)

I think you have made the case for an applied math course in numerical analysis that contains about 2 hours of class lecture time in computer applications.

As far as requiring physics majors to take a programming course, I think that is ridiculous. I went through a PhD level applied physics program including writing a simulation of chemical reactions occurring on the surface of space shuttle heat shield tiles during re-entry and never found anything more than spending a few hours here and there reading language syntax. The applied maths literature is full of pidgin code for the algorithms that is easily translatable into the language of your choice. The courses in algorithm analysis and numerical methods are the rest if what you need. A formal course would have been both a terrible bore and a waste of time that should be spent on something more useful like quantum electrodynamics.

Re:Necessary Tool (1)

Colonel Korn (1258968) | more than 6 years ago | (#23594653)

Physics requires number crunching. It's that simple. It's not much use learning differential equations if you're incapable of solving anything useful. Any physics or engineering major should learn at least basic numerical methods and how to implement them. For me, we did it with C, nothing fancy. As far as using Excel for scientific computing, some of my classmates tried to pull this in a heat transfer class. It's a joke, it'll work for something really simple, but it's no good for any serious work.
I know a couple people who did the computational work that earned their professors a Nobel prize who used Excel to do it all. It took a couple years to run simulations that probably could otherwise have been done in a month, but while they waited for the computer they were busy doing other projects, and if they really wanted they could have used more than one computer at a time.

Numerical methods requires programming (5, Insightful)

davros-too (987732) | more than 6 years ago | (#23594703)

Every physics graduate should have a grounding in numerical methods. This requires some programming, but the critical point is that the numerical methods drives programming not the other way around.

Every physics graduate should have the ability to find and use Numerical Recipes by Abramowitz and Stegun. Doesn't matter if they're using the C version, Fortran or whatever. This means you need to teach some programming, but more importantly the skills to understand the recipes.

Re:Necessary Tool (2, Interesting)

kestasjk (933987) | more than 6 years ago | (#23594781)

At the uni I attend Computer Science and Physics can be bundled into a single 4 year course (CS or Phys individually would be 3 years), and I find the two complement each other very nicely. They almost feel like two sides of the same coin, somehow.

Excel can't handle real scientific data sets (4, Informative)

smolloy (1250188) | more than 6 years ago | (#23594245)

As someone with a physics doctorate, I am appalled to hear physicists suggesting the use of Excel for real scientific studies. What are those physicists going to do when faced with (for example) particle physics data stored in C++ objects? Or face a control system dominated by Matlab? Or are handed a simulation package built in Fortran?

I'm not suggesting that all physics students must learn C++ and Matlab, but they should be taught a grown-up computer language so that they at least understand the concept of C++ objects, or how to begin solving the problem of communicating with a machine via a Matlab environment.

My examples are very specific, but you get the idea. Physicists need to be aware of certain computer programming concepts (which cannot be gleaned from experience with spreadsheets) otherwise they will fall flat on their face when faced with a real research environment.

The specific language is not very important, but physics tends to be dominated by C/C++ and Fortran, so these would definitely be a good place to start.

Even BASIC is better than Excel.....

The answer to the Excel argument... (4, Insightful)

raehl (609729) | more than 6 years ago | (#23594557)

I assume that Physics majors at your university are required to take some level of math classes.

Excel is not sufficient instruction in programming any more than Algebra is sufficient instruction in math. So if someone suggests that all students need to learn is Excel, you may ask why the students are required to take more advanced math classes.

Re:Excel can't handle real scientific data sets (4, Insightful)

paradoxSpirit (1172919) | more than 6 years ago | (#23594559)

If I had mod points ...

I cannot agree more. After a master in high energy physics where I learned C++/matlab(or octave)/gnuplot/latex/... I decided to continue my career in medical physics.

I was shocked by the omnipresence of Word and Excel. I am sorry, but there should be corporeal punishment for people publishing scientific papers with figures made by Excel.

Now, with a good undergrad training in programmation we would avoid such abberations

Re:Excel can't handle real scientific data sets (0)

Anonymous Coward | more than 6 years ago | (#23594667)

Even BASIC is better than Excel

Isn't the actual language used in Excel VBA (ie. Visual BASIC for Applications)?

ISU (1)

TheEldest (913804) | more than 6 years ago | (#23594247)

Iowa State's Physics department doesn't require any programming course. It's just sort of assumed that you'll pick it up on the way

As far as using a language for computation is concerned, I've always felt that Mathematica is a powerful tool (great programming functionality along with the built-in math & physics functions makes it a logical choice. Along with the $50 student price tag).

You may argue that Mathematica isn't a true programming language, and I'd agree. But it gives you everything you would need for computational physics.

all the cool kids use matlab (2, Interesting)

story645 (1278106) | more than 6 years ago | (#23594421)

Kind of kidding-at least in my uni the engineering and science depts. seem to use matlab for all their computational needs. It's sort of integrated into the curriculum as part of calculus 3, so invariably all the science/engr. kids take it-plus it gets thrown into other courses too, so a student's almost forced to pick it up if you want to do well.

Re:all the cool kids use matlab (1)

TheEldest (913804) | more than 6 years ago | (#23594467)

In my intro classes, we were supposed to be using QBASIC. It works well enough, and is very easy for non-geeks to pick up quickly.

Later on (Particle Physics & Relativity), we used Mathematica, mostly because there's a great package that draws Feynman Diagrams for you.

Re:ISU (1)

treeves (963993) | more than 6 years ago | (#23594701)

Even if it's not good for Science, it's good for A New Kind Of Science (TM)

C and FORTRAN (4, Informative)

Odder (1288958) | more than 6 years ago | (#23594265)

All of the libraries and programs of interest are in C and FORTRAN. C++ is interesting and used but the other two still dominate. If you had to chose between the two for teaching people to program, take C. For utility, the two are about equal.

Re:C and FORTRAN (0)

Anonymous Coward | more than 6 years ago | (#23594323)

hi twitter. trying to recover [slashdot.org] that karma for the last of your sockpuppets that is not posting at -1?

You can lead a horse to water... (4, Insightful)

sirwired (27582) | more than 6 years ago | (#23594267)

It depends on what you feel they MUST learn.

Certainly Excel can be a powerful, and useful, tool in data analysis. But I agree, I would never call it programming.

For simulation, however, I would expect you need something a bit more powerful. Perhaps you can teach all the students how to use Excel to analyze experimental data, and design a separate course for simulation design, which would, in turn, use a far more featured language/toolset.

The big danger with trying to teach a "real" language is that you spend the whole semester teaching students with no aptitude for the work the basics of structured programming and they still won't have time for the numerical analysis that is important to them as scientists. Structured programming is as natural as breathing to a geek, but it would be a bit more of a struggle to somebody without the right mindset. I don't see any way of forcing two required semesters of programming on every student. Just not room in the schedule for it.

However, keep in mind that the purpose of college is not to get those students employed, it is to teach them to think. Your brighter students are going to figure out that as a practical skill, most of them will need to know how to program, and would possibly sign up for "Programming for Theoretical Science Majors" as an elective The not-so-bright students... well... they will struggle in the real world, just as they always have.

SirWired

Re:You can lead a horse to water... (1)

the eric conspiracy (20178) | more than 6 years ago | (#23594569)

Excel is unacceptable for numerical analysis. It is WAY too slow, and doesn't teach use of algorithms.

Re:You can lead a horse to water... (2, Insightful)

PitaBred (632671) | more than 6 years ago | (#23594717)

Not only that, but Excel "interprets" all kinds of things about numbers that you may not mean for it to (I run into this ALL the time). incorrectly [joelonsoftware.com] .

numerical routines in MSExcel? (1)

Crispy Critters (226798) | more than 6 years ago | (#23594637)

"Perhaps you can teach all the students how to use Excel to analyze experimental data,"

I seem to recall from the MSOOXML debacle that some of the numerical routines in Excel are based on incorrect definitions. I don't think I would suggest it for analysis of experimental data without some testing of the routines to be used.

why is your blood boiling? preconceived notions? (4, Insightful)

goofballs (585077) | more than 6 years ago | (#23594273)

learning to program in excel / vba DOES do what you CLAIM to want (flow control, file handling, basic methods / techniques, troubleshooting), so why is your blood boiling? preconceived notions? and yes, excel IS surprisingly powerful (those who don't think so aren't leveraging its capabilities). someone who can PROGRAM in excel / vba (versus just manipulate a spreadsheet) will be perfectly capable of programming in perl / python / fortran with very little additional work if the need arises.

(i'm an aerospace engineer, and for work, i program in c, fortran, java, vb, and yes, excel / vba,depending on the need)

Re:why is your blood boiling? preconceived notions (1)

thealsir (927362) | more than 6 years ago | (#23594343)

Word. I've used it and with combined with VBA with access to pull datasets from a database, it can be quite powerful, and do exactly what you need it to. In my case, it was handling scheduling for a 40,000+ student university. The datasets pulled easily ran into the millions of records.

Word is for wimps. (0)

westbake (1275576) | more than 6 years ago | (#23594631)

University scheduling with Word and VBA? That's nothing. I used Timex Sinclair BASIC to pull records from a database and used the results to navigate and control a nuclear submarine! The costs easily ran into the billions of dollars.

End joke. Please, end joke.

You can use assembly language to teach all the things the fine physics teacher needs but it's not practical. It will take a long time to teach, be a nightmare to grade, be system dependent and it teaches students nothing about the tools that people actually use for physics. Those libraries are written in fortran, C and have thousands of man years worth of testing in them. You should teach what you use because that's what you know and that's what you think is useful.

Re:Word is for wimps. (1)

willyhill (965620) | more than 6 years ago | (#23594755)

You already posted [slashdot.org] (twice) with one of your other accounts. Why don't you try sticking to just one per article? That way people will tend to give you more credibility, if that's at all possible.

And to stay on topic, I'd say that it's a little extreme to drop people into C without warning. Sure, they're going to need it to some extent eventually, but it shouldn't be so hard. Programming in science should be a tool, not what the scientists do.

I'd recommend a procedural interpreted language like Python or Perl. It will be useful beyond research and there are bindings for those two to most scientific and math libraries. No need for C.

Re:why is your blood boiling? preconceived notions (1)

PitaBred (632671) | more than 6 years ago | (#23594749)

Scheduling isn't scientific data. Excel doesn't have near the precision or consistency that's needed to really work with it. I have numerous examples from my work with just product data of Excel screwing up interpretations of data. I really wouldn't trust it with significant data.

Re:why is your blood boiling? preconceived notions (1)

dbIII (701233) | more than 6 years ago | (#23594539)

so why is your blood boiling

It gives the students the skill of pointing at pictures in Excel 2003 (or whatever release they use) which translates poorly into pointing at pictures in other versions of the same application and gives them no concepts they can carry to other applications or programming languages. Everything else forces the student to consider each action in such a way that it can be presented in several ways.

A good teacher could use macros to teach programming concepts but I suspect most students would merely be left with the memory of pointing at pictures with a mouse. If they are forced to do it as text the syntax they remember will be of very limited value as VB changes in very major ways (basic -> pascal -> java) every few years and there will be Excel specific behaviour.

It would even make more sense teaching them how to use logo.

Re:why is your blood boiling? preconceived notions (0)

Anonymous Coward | more than 6 years ago | (#23594661)

Ok, now I understand why NASA guys have so many troubles...

Re:why is your blood boiling? preconceived notions (4, Insightful)

Genda (560240) | more than 6 years ago | (#23594663)

I once had a friend who built an instantiation of LIFE in Excel. Using macros and stored VB code in each cell, he was able to have every cell look up the context of every other adjoining cell during each generation, and the cells would turn on and off accordingly.

...Of course it took forever to run a generation.

...And it was insanely complicated and wierdly convoluted.

...But he was able to demonstrate his mental capacity for having been able to visualize this arcane solution in the first place...

I'm not saying it can't be done in Excel. I'm saying just because you're versed in Excel, doesn't mean it's an expedient, or even appropriate tool for managing complex data structures, critical physical concepts, or large multidimensional problem sets.

For straight forward engineering and archtectual applications, it might well prove to be an excellent resource. It just seems a little like going next door via the polar route to try ways of making problems fit an inappropriate tool, vs finding an optimal tool in the first place and having it available for problems requiring greater flexibility, and less application related operational overhead.

Of course, when what you have is a hammer...

Would you want to grade that? Better is free. (1)

Mactrope (1256892) | more than 6 years ago | (#23594783)

Let's just say that it's easier to grade one or two pages of 80 column text than it is to click through each and every cell used in a calculation. That should rule out Excel/OpenOffice for all but trivial purposes.

Then you get to practical problems. Do you know it this guy has the latest and greatest version of Excel? Will he be able to render all of the fonts he might get? Do you really want to enable macros and take stuff from worm infested student machines?

Then there's cost. Why require your students to purchase an OS and Office when they could use GCC or Watcom [openwatcom.org] and learn something useful?

goofballs [anytestkits.com] are not good for the engineering or physics student.

Excel in Science?: Python - All a Scientist Needs (4, Informative)

stm2 (141831) | more than 6 years ago | (#23594277)

engineering class=programing required (0)

Anonymous Coward | more than 6 years ago | (#23594279)

As a mechanical engineer with a minor in physics we were required to take C programing (shortly after my class they moved to C++) as a first semester sophomore. About 4 other classes required us to activly use the programing to solve problems for class.

That was 8 years ago. I can tell you the one skill i use the most from engineering school every day in my carrier is the problem solving and analitical analysis of problems. It also taught me that if i didn't create the solution to the problem and merely relied on some generic output from some other 3rd part program, i am suspicious of it. (a reason the science and engineering world likes open source software)

Computational Physics (4, Insightful)

overshoot (39700) | more than 6 years ago | (#23594285)

Preface: I started out on a physics degree almost forty years ago but ended up with a CS. Meanwhile I have two children majoring in physics, and when I retire I plan to go back for the MS physics just for the Hell of it.

Bottom line: IMHO no special effort to add programming to a physics curriculum should be necessary. However, there are obviously classes where programming is essential to the physics content and for those you would horribly disserve your students by candy-coating the computational aspects.

Require programming as a pre-requisite where the class requires it, and if that means that none of the reasonable degree tracks are possible without it then you have your answer.

Try R (1)

qvatch (576224) | more than 6 years ago | (#23594297)

Its perhaps a bit Stats-oriented, but I do my data analysis in R (http://www.r-project.org/). Its free, syntatically similar to Scheme (so it teaches programming concepts), runs just about everywhere, and has good extentions to do data analysis. From its FAQ: "R is a system for statistical computation and graphics. It consists of a language plus a run-time environment with graphics, a debugger, access to certain system functions, and the ability to run programs stored in script files."

Perl, probably Python now (5, Interesting)

Average (648) | more than 6 years ago | (#23594303)

Back in undergrad, I helped my AtmoSci Masters' roommate out with several projects. At least in his case, the problems involved a lot of comma or space separated text files and mostly just limited data manipulation. Students had all been taught FORTRAN, weakly, and most classmates were trying to do it in FORTRAN. Several times, we created 20 line not-terribly-obfuscated Perl programs that worked much better than pages of FORTRAN for the task at hand.

Probably Python would be the 'cooler' kit these days. But, my former roommate, now with the National Weather Service, says it's all command-line Perl scripts there and working with me to learn Perl was one of the best things he got in college.

Don't forget floating point .. and abstraction (3, Insightful)

NetSettler (460623) | more than 6 years ago | (#23594313)

The exact language isn't so important as is flow control, file handling, basic methods/technique, basic resource management, and troubleshooting.

A solid understanding of the nature of floating point numbers wouldn't hurt either. For example, something like David Goldberg's What Every Computer Scientist Should Know About Floating-Point Arithmetic [sun.com] .

As to the language not being important, I don't know that that's entirely true. Each language offers a choice of types and some sets of choices are more instructive than others. I personally think Lisp or Scheme are good teaching candidates because they offer arbitrary precision integers and rational numbers in addition to basic floating point number types so that it's easy to see side-by-side the trade-offs being made between correctness on one hand and space/speed on the other hand that go along with choices in this regard.

Plus, if you go the Scheme route, you get teaching materials focusing on good abstraction like Sussman and Wisdom's Structure and Interpretation of Classical Mechanics [mit.edu] , the proper companion to Abelson and Sussman's popular CS text Structure and Interpretation of Computer Programs [mit.edu] !

MATLAB (1, Interesting)

Anonymous Coward | more than 6 years ago | (#23594327)

While MATLAB can be a bit quirky as compared to C++/Java, it's an invaluable tool for engineering and simulation related work.

I'm a pretty competent CS/EE guy so I could just as easily be doing everything in C, but whenever I'm running simulations for signal processing or approximating systems my first instinct is to go to MATLAB.

For Physics students, it would be _nice_ to learn all about memory and objects, but if they want to be useful in an experimental and simulation sense, they really ought to just learn MATLAB... it was designed for all that anyway...

Excel argument is halfway right (0)

Anonymous Coward | more than 6 years ago | (#23594331)

I'm currently a student doing a combined comp sci and physics program. Prior to this I have six years of experience with computational modeling in a professional context.

Very often when doing something I will first "draft" it out using an excel model. If I get a result that warrants more accuracy THEN I switch out of Excel - or sometimes just refine the spreadsheet.

While I certainly don't agree that an education in Excel can trump a few proper comp sci courses, it's not entirely useless.

In a modern, educated nation... (3, Interesting)

uniquename72 (1169497) | more than 6 years ago | (#23594333)

...one might expect, given the ubiquity of computers, that everyone (not just science majors) have some basic understanding of programming, even if it's just -- err --- BASIC.

I'll go even further and suggest that this isn't appropriate for college, but would fit nicely into 6th and 7th grade algebra.

That may be true (4, Funny)

overshoot (39700) | more than 6 years ago | (#23594509)

In a modern, educated nation one might expect, given the ubiquity of computers, that everyone (not just science majors) have some basic understanding of programming, even if it's just -- err --- BASIC.
However, I believe that we're discussing the United States.

Re:In a modern, educated nation... (1)

value_added (719364) | more than 6 years ago | (#23594615)

...one might expect, given the ubiquity of computers, that everyone (not just science majors) have some basic understanding of programming, even if it's just -- err --- BASIC.

One might, but they'd be wrong. And if from what I typically read on Slashdot is any indication, people like it that way.

I think the questioner's statement that "Excel can do many things at the cartoon level we care about scientifically. But I'm not interested in giving students toys rather than tools." accurately (and depressingly) sums up that part of my professional career administering Windows systems -- a cartoon playing with toys in a cartoon world.

I'll go even further and suggest that this isn't appropriate for college, but would fit nicely into 6th and 7th grade algebra.

I fully agree. But given that's about the same level where basic literacy is taught, why is it then that so many colleges and universities are faced with the prospect of offering remedial classes for their new students? Or are math and science the easy subjects?

Re:In a modern, educated nation... (2, Insightful)

Anonymous Coward | more than 6 years ago | (#23594673)

And perhaps we should also discuss how to replace the driveshaft in driver's ed, and teach our band students how to make flutes. In order to use a car, I don't necessarily need to know exactly how it was constructed and in order to use a computer I don't necessarily need to know how to program it.

Just because computers are so prevalent doesn't mean that everyone needs to know how to program. Effective programming is very analytical and structured and some people just don't work that way, and that's fine- we all have different strengths and weaknesses. Stop trying to make everyone fit into your mold. The *last* thing we need is for every Tom, Dick and Harry to think they know how to program because they can get the computer to print out "Hello World"

You enjoy listening to music, right? Well, I've heard you singing and believe me- stick to using the CD, don't try and create music!

Matlab (4, Interesting)

KalvinB (205500) | more than 6 years ago | (#23594355)

What good reason is there that would make Matlab insufficient for a physics major? What amount of programming does a physicist do on a given day at the job?

If a physics major wants to learn more about programming than is required to compute complex formulas in Matlab then they should probably minor or double major in Comp Sci.

I majored in Math and the only programming I did as part of my degree was in Matlab. And that was in applied classes. I was taught just enough Matlab to do the assignments.

C/Java courses would have been a waste of time. A physics major's time is best spent learning how to use existing tools rather than wasting time learning low level languages so they can reinvent Matlab functionality.

Gnumeric (1)

Besna (1175279) | more than 6 years ago | (#23594357)

Even better than open office.

Matlab/octave (4, Insightful)

drolli (522659) | more than 6 years ago | (#23594363)

I am a experimental physics postdoc. Nearly everybody i know uses Matlab/Octave (theoreticians Mathematica). For simple (not heavy number crunching), matlab/octave is the de-facto way to exchange numerical programs. You get without much trouble results and a plot within a few minutes. And your students will learn what vectorization is, if they use matlab long enough. (if you can write you operation in a vectorized form, you can also do heavy number crunching). The documentation of matlab is excellent, and there are a lot of toolboxes which actually solve detail work (they have their price). You can use instrument control and DAQ toolboxes to control experiments directly. The matlab support is responsive and not arrogant at all (reporting bug is more a "thank you, we'll look at it" experience instead of a "what the fuck are you doing to trigger this bug? dont do it."). One big problem about matlab is that it spoils the programming style a little bit, but after all, these are physicists. The ones who can not program when they enter university will never learn it fully.

Numerical Methods (1)

pavon (30274) | more than 6 years ago | (#23594609)

I just want to second this. Both universities that I have attended have had a Numerical Methods class taught in Matlab, and that class is fantastic for scientists and engineers. On one hand they learn all the fundamental, theoretical issues related to approximating calculations on computers, and on the other they learn a practical, industry-standard tool that they will use for the rest of their careers.

During my undergraduate I had issues with them teaching a proprietary language, but with the phenomenal progress that the Octave team has made in the 3.0 release, that simply isn't a concern anymore.

If you are going to have them take one class on programming this is it. If they are taking two, then they should learn C as performance still counts very much in this area.

Programming required for Econ degree (1)

Simonetta (207550) | more than 6 years ago | (#23594369)

When I was an undergraduate at Portland State University (Oregon USA) in the late 1970s, a semester of programming was required for us. In Fortran. Using punch cards. One card per line of code.

    I managed to take the course about three times (like most classes outside my major) before passing. The first time was with a Chinese Grad student teacher. We didn't even have a textbook. He recommended that we buy the Donald Knuth series of books at about the cost of fifty hours of minimum wage work. No chance of that. I lasted about three classes. With any luck this guy is destroying the Chinese educational system.

    The second class was with a computer technician who used what must have been a service manual for a mid 1960's 'big iron' mini-computer as a text book. I read the first two chapters about twenty to thirty times and still got nowhere.

    The third class in Fortran was with a textbook that was actually clearly written in English. Programming is not hard when explained clearly and fluently. The class was about two-thirds women from the Middle East. I nearly choked to death on their perfume every class but I was able to 'learn' Fortran enough to write about twenty assigned programs that had about 30 lines each. Boy, the machines that punched the holes in the cards was loud! We would bring our deck of punched cards to the operator's window. They would run the program in a big batch with all the other student work. A few hours later, we could pick up a printout of the results. One little pissant mistake and the whole process would have to be repeated. CompSci for non-CompSci majors in the 1970s.

    I bought my first microcomputer in 1984, a Radio Shack MC-10. Learned BASIC. Then mastered assembly language on the Commodore 64. Then Turbo C on the PC-AT 286. Then Visual Basic on the Pentium. Now I do assembler for Atmel AVR and C++ for the ARM. I believe that object oriented programming, like FORTH, is the product of a sick mind. But I do firmware and don't believe that any serious microprocessor should cost more than $2.50 US, which puts me into a limited subcategory of the programming community.

    Tell us about your programming experiences in 'school' and your best training. Especially if you live outside the USA. Thank you.

It's not necessary ... (1)

blitz487 (606553) | more than 6 years ago | (#23594371)

... for physics majors to be required to learn programming. Programming is simple for physics majors, and they'll pick it up just fine on their own.

Re:It's not necessary ... (1)

Falstius (963333) | more than 6 years ago | (#23594491)

I've known a great many physicists who were horrible programmers. That said, a programming class for scientists should focus on optimization and data display, hopefully they would pick up simple data flow easily. There are so many open source tools (PAW, SciPy, Octave, etc) available for this that to use a proprietary one to teach the basics is stupid.

not just physics (1)

story645 (1278106) | more than 6 years ago | (#23594375)

The psychology dept. likes me more for the science/programming background than any psych courses I've taken. Experiments have to be coded, data processed, etc. and having a student who has some background in coding is a big plus. I rec python 'cause it's an easy language that can handle pretty much anything a psychology student needs-but really any language would work, and I know some people in the dept. who like working in C/C++.

matlab/scilab (0)

Anonymous Coward | more than 6 years ago | (#23594385)

Seriously, don't they teach matlab/scilab in the modelling/statistical courses anyway? It's ubiquitous, free and purpose-designed.

Excel is awful - I use it at work and I hate it because it isn't built for experts.

Maple is also handy for the math.

Programming is great for theoretic and simulation (0)

Anonymous Coward | more than 6 years ago | (#23594387)

Programming is an important part of a theoretic program or simulation program. Many undergrad programs are so general they don't give much focus to programming.

IMHO, all natural science, applied science, and engineering students should have some level of training in programming.

Excel is OriginLab light (real scientists use it) (0)

Anonymous Coward | more than 6 years ago | (#23594395)

I would point out that Origin Lab is basically the same as Excel except that it has higher math functions available. Anytime you are using large data sets, you could certainly write your own programs to manipulate the data. However, what is the point of reinventing the wheel?

Much as I like some open source programs, they are not a panacea. The open office equivalents of Powerpoint and Excel are simply not as good as the original programs. Have you taken the time to use Excel and Powerpoint extensively?

As for the larger question of programming, what part of the physics curriculum would you give up in order to add a programming class? Undergraduates have to take about 60 credits or courses to achieve a physics or chemistry major whereas a liberal arts major, like English Literature, only requires 30 credits. How are you going to justify an additional requirement? I think that may be a bridge too far.

Re:Excel is OriginLab light (real scientists use i (1)

cashman73 (855518) | more than 6 years ago | (#23594549)

Anyone caught using Excel for real science, other than real quick and dirty stuff, ought to have their geek card revoked immediately. Lately, I've found that xmgrace and gnuplot are great plotting programs for linux, and freeware!

Re:Excel is OriginLab light (real scientists use i (1)

jeiler (1106393) | more than 6 years ago | (#23594747)

Anyone caught using Excel for real science, other than real quick and dirty stuff, ought to have their geek card revoked immediately.

Not all physics students are geeks. Indeed, not all science students are geeks, though the non-geeks do seem to be the minority.

Computer Literacy vs. Computer Science (4, Insightful)

billstewart (78916) | more than 6 years ago | (#23594399)

There's a certain extent to which students need to learn basic tools - I'm surprised to hear an assertion that they're already familiar with Excel but they should learn to use spreadsheets, because they're really convenient for many kinds of problems, just as (ahem) slide rules were when I was in college (and calculators were beginning to be, and PDP-11s were.)


But scientists are going to need to do increasing amounts of computer use as computers pervade and inform the sciences, and that means doing their own programming, including writing real programs and writing scripts to bash input or output data for other programs. So they not only need to learn some syntax, and some scripting languages, they need to learn basic data structures, efficiency issues, debugging, and one of the most important lessons from my CS100 days - "Never trust input" "Ever" . That means they need at least two semesters of programming.

As scientists, even if they don't ever end up doing much more programming than feeding input to other packages and interpreting the output, they need to be able to do it in ways that will run in finite amounts of time and produce correct output - and learning not to trust input is as basic as learning not to connect the 110volt power to a 5 volt device or use fire near flammable liquids.

My experience (1)

Agenor (1136719) | more than 6 years ago | (#23594419)

I graduated with a Physics BS recently and agree heartily that programming should be part of the physics curriculum. By not teaching programming you're depriving students of the ability to conduct sophisticated numerical experiments required to gain intuition for cutting edge problems. Not to mention programming skills puts you a step above cleaning glassware when you start doing 'research.'

I actually have experience using Excel for programming. I was never exposed to programming languages in middle school and instead started writing basic cyphers in Excel. I can imagine one could do some basic research in that environment and it offers a convent format for data entry BUT THAT'S IT. Now that I know half a dozen languages, I would never go back.

As far as preferred languages, I can recommend what I learned: a mixture of C, C++, and Matlab/Octave. I generally prototype in Matlab and if performance is too slow, drop into C/C++. I've also learned MPI and PETSc but haven't found occasion to use them in my research to date.

One final note. Any teaching of programming should be coupled with linear algebra and numerical analysis. Far too frequently I see students use very naive algorithms in their thesis work. One that particularly sticks out in my mind was a student using a rk45 algorithm to solve a 2D boundary value problem (shutter).

Good luck with the committee.

(P.S. My school required an intro to programming in Matlab, but no numerical methods courses for the Physics BS.)

Programming As a Part of a Science Education? (2, Interesting)

Goondra (855859) | more than 6 years ago | (#23594435)

I have mixed feelings on this topic.

With a BS and MS in physics I find programming to get in the way of what the physics is about.

On the other hand I have spent 40 years programming and find it forces one to clarify the ideas behind any area.

I was taught Algol-60 at Stanford from the computer science department. At that time the physics department did not require any programming.

The experience of Algol lead to SAIL (Stanford AI Language) and then MAINSAIL (Machine Independent SAIL) and later Oberon and now BlackBox/Component Pascal.

All of these languages were influenced by Nicklaus Wirth who taught at ETH Zurich. Dr. Wirth adopted from Albert Einstein the phrase "As simple as possible, but not simpler" as a slogan for the Oberon Language. Einstein got his undergraduate degree from ETH Zurich. So there have a beautiful blending of physics and computer science.

One needs to be able to think abstractly as well as concretely with physics. The ABSTRACT facility and Object Oriented aspects of Component Pascal aid here. But unlike Smalltalk one is not forced to use objects. One can get down to the machine level if need be using a CODE construct within the language.

Although I have seen but not used MathLab I believe such already written graphical facilities are a benefit. Why reinvent the wheel unless it is part of the learning process.

I whole heartedly reject the C/C++ class of languages as 'programming in a can'. Far, far, too complex and syntactically messy.

Keep it simple.

Varying levels (1)

LihTox (754597) | more than 6 years ago | (#23594439)

I'd like to make the point that physics majors are going to come in with VASTLY different levels of programming skill-- much more variation than in mathematical background. Some will have never programmed at all, while others may have programmed professionally. Any requirements you set up should take this into account: a placement exam of some sort is what I have in mind, although it could be relatively simple: "Have you programmed before? Do you know what a loop is?" etc. Even the simplest programming skills would be enough for students to get started, but you want to filter out those with ZERO aptitude so you can get them started before they actually need it (or before they've enrolled in a computational physics course

I am a physicist, and I learned how to program in BASIC when I was 8 or so. I took a class in Pascal my freshman year in college, and from there I learned what programming I needed as I went along: Mathematica as an undergrad thesis student, C as a graduate student, and C++ recently. It was possible to pick it up as I went along, given my background... but on the other hand, I was a third-year graduate student (doing hydrodynamics simulations for a professor who knew very little about computation) before I heard the words "Runge-Kutta" or discovered the inherent flaws in forward-Euler integration, so in retrospect a computational physics class would have been very useful indeed!

"Needs" Based Education (1)

DynaSoar (714234) | more than 6 years ago | (#23594443)

If they need to program to do their work, they need to learn to program. If they don't, well then, they don't.

If they need to know the conceptual basis, they can get that from math (which physics students get plenty of) or in a more explicit form, from a course in logic. These prepare one for programming by teaching those concepts and so already serve the purposes of background material. If the students needs training in the thinking process, these should do, or else they're not doing their jobs.

Teaching them to program without an explicit need for it is just putting up hoops for them to jump through. I hate hoops. I always hated them as a student, as most I'm sure most students also do, and I hate them as an educator as a waste of time better spent in more profitable work.

Another source of training in the orderly thinking required comes from teaching/learning methodology. What math doesn't cover, language does, and this is where it happens. Experiment design is programming of laboratory methods, including choice of the necessary math involved. If they graduate without being able to do this, they're much farther behind the curve than if they simply can't write a computer program. And if they can, then they know the thinking process.

People used to complain that handheld calculators would cause a loss of mathematical ability because people wouldn't bother to learn what button pressing could accomplish. Asimov rightly replied that the math would still be required to know what buttons to push. I reply that the complainers, Asimov, myself and virtually all reading this can't calculate things like the 7th root of a 9 digit number with arbitrary decimal place without very easily a calculator, yet virtually no one can write a program on a calculator to do these things which are already built in. And still no one decries the lack of programming education for handheld calculators.

Computation and Physics (1)

students (763488) | more than 6 years ago | (#23594447)

I'm a physics undergraduate and my research is computational, so of course I think programming proficiency is a wonderful thing to have. But many physics students and professional physicists never use it. I've found C++ to be the most useful, though a grasp of at least one common computer algebra system is also necessary. Avoid Maple. Also, many professional physicists have a terrible grasp of computer science. I can tell this even though I'm mostly self taught. Many physicists still think FORTRAN is great. This could be largely an age thing. Probably physics students should just go to the computer science department for electives if they want to learn to program.

Matlab? (1)

Ambiguous Puzuma (1134017) | more than 6 years ago | (#23594449)

It seems to me something like MATLAB would be much more appropriate. MATLAB is designed for numerical computing, and has a programming language that allows for easy manipulation of vectors and matrices and creation of graphs. Lots of common functions that would be useful for physics are built in.

The low level details that computer science students should be concerned with, like the internal representation of a matrix, are things that most physics students probably don't need to worry about.

UK Perspective (1, Interesting)

Anonymous Coward | more than 6 years ago | (#23594461)

Here in the UK its a standard requirement. Certainly at good unis (Oxbridge, Bristol, Manchester, Imperial, St Andrews).

At Imperial, they teach C in the first year (dressed up as C++, but mostly avoiding pointers + OOP). Standard 'big' project is a simplified double pendulum, numerically integrated & used to investigate chaos.

The second year sees OOP introduced rather counter intuitively via a HEP-orientated labscript. I don't like this second year script one bit, as it teaches the 'kids to program stupid access functions that never get use and build an enormous 500+ line cathedral to eventually do a calculation that could be written in three 5-line functions.

In the third/fourth year there is a computational physics option, partly lectured (FFTs,linear algebra,numeric integration,monte-carlo/Metropolis, lots more I've forgotten) and two bits of lab coursework (metropolis model of magnetic domains, solving a simple tight-binding model electronic structure with matrix method... others I've forgotten). Code can be written in any language, though most people keep on using C(++).

Other than the 2nd yr OOP via heartache, I think its pretty good.

I believe Oxford trialled using python to teach their course. You might even be able to google down the handbook.

That said; there really is room for teaching people basic data mangling (+ gnuplot scripting?) in the aim of training experimentalists to analyse their data. Its heartbreaking to watch PhDs struggle with origin to handfit things that should be batch scripted (with provisos to avoid certain areas of data from fit etc.), or hand edit a 1000+ line file of data in Notepad to cludge it into a binary-only analysis tool.

Not surprised, but still... (1)

bfwebster (90513) | more than 6 years ago | (#23594469)

Given the vagaries of university curricula, not to mention the ever-present inter-departmental fighting and politics, I'm not surprised that would be a lot of science departments that would not require a programming class of some kind.

Which is not to say that they shouldn't. I note that my own alma mater (Brigham Young University) has a required course in 'Computational Physics' for all Physics majors, but that is primarily solving integrals and differential equations using MAPLE. ..bruce..

From overseas... (1)

gclef (96311) | more than 6 years ago | (#23594471)

I did a Physics undergrad in the UK about 10 years ago, so I can give you one overseas data point.

They made us learn FORTRAN77 (shudder) for one semester, but it honestly wasn't used much in the curriculum beyond that class. I did a bunch of programming outside of that because my senior (third year...same thing) projects were entirely theoretical, but that was entirely self-taught...there was little to no formal system for getting students into serious programming.

For an undergrad curriculum, I'm not sure you really do need programming. For grad work, or for some of the advanced theory, you *definitely* need it.

The question is, are you aiming to teach just the science (which doesn't really need programming to be understood, let's be honest), or are you aiming to prepare students for research/grad school (where they will definitely need it)?

Real Question (0)

Anonymous Coward | more than 6 years ago | (#23594473)

The real question is, what are you going to remove from the degree in order to put in the programming requirement? Or are you going to make an already requirement-heavy degree program even more stuffed?

Part of a General Education (1)

fatray (160258) | more than 6 years ago | (#23594475)

I have a Ph. D. in Chemical Engineering and am from the old school -- I got my BS in 1973. I cannot understand a university who would allow graduates in science, math or engineering to not have some background in programming a general purpose language like Fortran, C, Python, etc. My preference would probably be Python, but I'm not going to get too excited if it was another mainstream language. Python is ubiquitous and easy, and after you have learned Python (or other general-purpose language), whipping up some VBA to automate an Excel sheet will not be a problem.

When I was an udergrad you were not considered an "educated person" unless you could speak a foreign language and I had to demonstrate a "reading abiltiy" of a foreign language for my Ph. D. You could argue that in the 21st century programming is at least as important as a foreign language. I have used the Fortran I learned as an undergrad a hell of a lot more than the French.

Secondhand experiences (1)

tirerim (1108567) | more than 6 years ago | (#23594479)

I wasn't a physics major myself, but I did know several in college (graduated five years ago), and they all had to do some amount of programming; if not for actual coursework, then for their summer research assistant jobs. As I recall, Fortran, Matlab, and IDL were all used, probably C as well. I don't think actual CS courses were a requirement, but I know that many of them took at least an intro CS course anyway. My take from this is that while it may not be necessary to require students to learn programming, they're pretty much going to have to do so one way or another.

Critical Thinking (2, Interesting)

Genda (560240) | more than 6 years ago | (#23594511)

I'm surprised this is even a question. There is a meaningful use for computers and information technology at virtually every level and function of Physics, save possibly the imagining part.

And even there, the mental muscles you acquire, solving puzzles, constructing semantic connections, seeing the big picture while managing the minutiae, all help to make you a better scientist, to see your problem newly. In fact a great physicist would want to try on at least two or three significantly different world views, just so they have the freedom to Grok their specific field in new and powerful ways. In my experience, getting mired in a narrow way of seeing things is the kiss of death for someone dancing on the fuzzy edge of unraveling the mysteries of existence and trying to see all in a meaningful and relevant way.

Additionally, the language of choice is clearly Vpython. Great for simulations, rich set of programmatic tools, quick prototyping, high level, easy to learn, tons of documentation, and huge user community with tons of ready made chunks of code available for the asking. Excel is a kiddie car. Forgive me, but trying to graphically express a tensor field in excel would be like trying to figure out how jerry-rig a Big Wheel to compete in the Indy 500. You're not going to achieve anything interesting in Excel, and it's a pitiful tool for expressing higher order concepts or visualizations. It's just not made for that for that purpose.

If you're looking to get a really sweet pie chart showing the distribution of funds for your next research grant, by all means, use Excel. If on the other hand you want to do a graphical simluation of branes colliding and view a number of possible outcomes, given by a select range of values for the simulations initial parameters, use Vpython. Let the tool fit the need.

simple (0)

Anonymous Coward | more than 6 years ago | (#23594519)

C, FORTRAN, Matlab
Latex is a plus

More appropriate goals? (1)

Crispy Critters (226798) | more than 6 years ago | (#23594537)

What is most needed by physics students? Here are my thoughts.

First, equation solving. This means numerical integration, root finding, and so on.

Second, spectral methods.

Third, numerical error. What does it mean for a numerical calculation to be ill-conditioned?

If they start out without the skills needed to write a trivial program, the physics department should not have to teach them. Don't people learn that much in high school?

The most important thing is the hardest to teach in a course of limited scope: writing readable, maintainable, debuggable code. Most scientists suck at this.

What language? Something that graphs! Something easy to debug (they don't need to spend their lives chasing one-off indexing errors). Good languages with OSS semi-equivalents are Matlab (Octave) and IDL (GDL). Is a spreadsheet appropriate? I don't know enough to say. If someone learns on a spreadsheet, will they be able to more-or-less understand a piece of code in F90? I also object to forcing people to purchase from Microsoft.

Programming? Yes! (1)

pablomme (1270790) | more than 6 years ago | (#23594565)

As a computational physicist my answer is probably biased, but I see programming as a fundamental tool one has to learn in the Physics curriculum.

As an undergraduate (in Spain) I had two courses devoted to numerical methods, with practicals in Fortran 77, and at least two more where coding was part of an optional practical. Then I had a PhD-oriented course about Fortran 90. At times I wish I had been introduced to C/C++, but switching languages is very easy compared to learning the first one. I did my PhD (in the UK) on Computational Physics, and now I'm working as a postdoc in the same field.

But regardless of whether the student uses programming as a tool afterwards or not, learning programming means learning different ways of thinking. You learn that problem-solving is a matter of dividing a complex task into trivial pieces and putting them together, and you learn to express your ideas into a strict language. This broadens the student's capacity to pose and solve problems, which is what Physics is all about.

Original work requires programming (0)

Anonymous Coward | more than 6 years ago | (#23594571)

If a scientist can't program they are extremely limited in what they can do. Not only is it impossible to do original work, it's not even possible to keep up with the state of the art. I'm continually amazed at colleagues who can only do what the commercial packages they use offer which is usually 10 years behind the literature and all too often wrong to boot.

BTW most of my exploratory analysis is done w/ awk & gnuplot though I can change to octave, C or FORTRAN in an instant if needed.

rhb

Programming and a Physics Degree? (1)

callistra.moonshadow (956717) | more than 6 years ago | (#23594575)

I don't see a correlation between a Science degree and programming. I don't see Biology, Chemistry, or Physics majors needing or necessarily gaining anything beyond an understanding of logic. Engineering and Math majors might be good candidates, or any other science type that saw a potential job in Information Technology and the degree as a way in. OTOH I have known several people with degrees in Physics, undergrad and grad that work as programmers. That said, unless a person KNOWS that they will not be working as Physicists, I don't see programming as being an integral part of the curriculum. Of course it does not hurt anything, I just believe it should not be required. There are already enough things required that are never used after graduation.

Why not Emacs? (2, Funny)

pdq332 (849982) | more than 6 years ago | (#23594593)

If Excel and Word are conceivably viable alternatives with VBA, why not Emacs? You could get lots of obscureness points for it being based on LISP, and you could write a grant proposal to develop it into something serious in, oh say, 20 years? (That's the way academia works, isn't it? ;-)

Interpreted languages (1)

rwa2 (4391) | more than 6 years ago | (#23594595)

Well, in my engineering physics classes we were put through lots of different programming regimes, ranging from: Excel, Matlab, and also NI Labview and C for collecting and processing data directly from sensors. They were all very different, but the emphasis was always to be able to graphically plot and present your data repeatably and consistently to others. If your students won't be able to do this, they will have to rely on others that can... and frankly you don't want to put them in that position. And even if they are in that position, they'll still have to have some rudimentary understand what the programmers will be doing with their equations and algorithms downstream.

On the other hand, the pure physics courses I took rarely needed anything more than a nice calculator - they were much more algebra and calculus dependent.

To support your arguments on expanding upon Excel, it might be fine for doing basic statistics but any "real" number crunching for analysis will be qualitatively different using just about any "real" language, and it's important to get your students to be able to think a little different. For example, they ought to know how to operate on variables and matrices rather than cells and cell ranges. Plus, it's much easier to show your work.

These days I'd recommend Python... in particular look at the SciPy and SimPy packages, which both have very good tutorials on doing very interesting things.

Yes (0)

Anonymous Coward | more than 6 years ago | (#23594605)

It ought to be a requirement in many technical/nontechnical degree programs methinks. Either that, or a choice of programming/math/logic/statistics/mixture of them. Visual basic is a dumb language to teach programming with, but one shouldn't get bogged down debating about what language/programming paradigm should be tought, etc. That might depend upon the student's goals or the particular major. The trouble with most of the pure sciences is that the typical student won't have a clue what to do with themselves after they earn their Batchelors unless they intend to go directly into grad school. The other thing to remember is that for physics, you should be very good at all forms of math and familiar with electronics.

University of York, UK (1)

bcmm (768152) | more than 6 years ago | (#23594619)

In my first year at the University of York, we had to learn Maple and had an optional FORTRAN 90 course.

Computer science students seem to think that FORTRAN is funny in some way...

Matlab (1)

LadyLucky (546115) | more than 6 years ago | (#23594621)

Our university taught Matlab. It simple enough to learn, has good library support.

Math is the language of Physics (1)

drerwk (695572) | more than 6 years ago | (#23594641)

I think it is much more important as a Physicist to be facile with math, hence my liking Mathmatica. It is very important that I can set up some DiffEq to represent my problem, but at least for me I need the help of something like Mathmatica to do anything beyond a simple harmonic oscillator. My limited (and ancient) experience at SLAC and LANL is the FORTRAN library is already written in most cases, and if it is not you still want to use FORTRAN if you want to run on a fast computer - Cray X-MP last time I did it.
And I say this as a professional programmer fluent in C++ and Java.

Programming is hard (1)

chrismcb (983081) | more than 6 years ago | (#23594709)

Computer programming is HARD. In fact it is so hard and difficult that I wouldn't force incoming students (in general) to take a programming class. Yes they should know how to work a computer, email, internet, etc. A specific degree, like Physics? How important is iit that they write their own program? Would it be easier to use prebuilt software? Excel IS a useful and powerful tool. Is your blood boiling because it isn't open source? In general Excel is fairly easy to use, and does allow one to focus on the science. The kids took Physic to learn physic, not to become computer scientists. Later in life if they need a more powerful language, they can hire a computer scientest.

Maybe. (1)

oneiros27 (46144) | more than 6 years ago | (#23594715)

I'll preface this with saying that I'm currently at the AGU Joint Assembly [agu.org] -- but I'm not a scientist. (I'm in information science, not physical sciences) I'd actually say that we're getting to the point where I could actually see that it's quite possible that future scientists might not need to learn how to program.

Now, there are going to need to be scientists who can program, but there were plenty of scientists in the past who couldn't program -- coming up with the theories and thinking about their given discipline in new and interesting ways are more important. Knowing how to program might make the scientists think about the problem in such a way that it fits within the given language -- and it might bind their hands, keeping them from thinking as freely about their disciple. (and that being said, you'd have to go to a completely non-number crunching educations system, where even spreadsheets aren't used).

But, there's another aspect -- all of the scientists I work with can program -- but to significantly varying degrees. Most of them don't keep up on the languages, so they're still writing Perl 4 code or IDL, Matlab, Fortran, whatever it was that they learned during grad school, and don't use the majority of the features of the language. If they learn a second language, they'll probably still write it as if it were their first language. (ever seen IDL code written in Perl? It's not pretty -- imagine pre-initializing the size of your array, rather than using 'push'.) In many cases, it may be better for scientists to have a pool of programmers to assign jobs to, sort of like the old secretary pools.

Also, if everyone knows how to program, they end up making their own solutions to every problem they run into, rather than looking for existing solutions. I just spent most of the day in session on data informatics, with people talking about how they're trying to get scientists to work to common standards, so that we can share data, and ultimately make better use of it. We won't need every new experiment to write all new visualization tools -- you make your data set, you register it with a federated data system, and you can plot / generate movies / whatever to your heart's content. With some of the new semantic systems being built (eg, SESDI), we're getting closer to that point.

That's not to say that there won't be a need for scientists who are programmers, or programmers who are scientists, I'm not saying that I don't think every scientist needs to be a programmer.

Depends on how it is taught (1)

aitala (111068) | more than 6 years ago | (#23594735)

I think the bigger issue may not be what language is taught but whether the teaching is applicable to actual scientific uses. As an undergrad astro major I took two CS programming classes, Fortran and PL/1.

While Fortran was the standard when I went into graduate school doing particle physics, it was not as helpful as one might think because of how it was used - learning how to do bubble sorts is nice, but not when you needed to interact with actual hardware, like NIM and Camac crates.

Similarly, when we were building the computer farm to process the data we brought in a sysadmin who just got her MS degree. While she knew a lot about OO programming, she could not swap a drive out of a server.

So what might be useful is providing some general background knowledge of programming methods, system admin, and hardware. One can then learn whatever specific language when needed, etc...

Eric

For undergrad, Fortran, then C, then Matlab (0)

Anonymous Coward | more than 6 years ago | (#23594757)

Have them learn Fortran. It's easy to pick up and well suited for number crunching. It would be useful for them to learn simple constructs in their first year and be required to solve some problems with it.

Later they can be introduced to C. It doesn't really help them understanding physics, but you can give them an appreciation of how the computer manipulates data and how tuning your algorithms i.e. considering things like cache and stride, can make intractable physics problems solvable.

Lastly, they can learn Matlab since QM is all matricies. I say Matlab last because I think the students will learn more if they actually have to work with the nuts-and-bolts of their first algorithms.

It doesn't matter, but here are some ideas anyway (0)

Anonymous Coward | more than 6 years ago | (#23594761)

"I must admit that when I hear such arguments I cannot have a rational discussion and my blood nearly boils"

Then your first order of business is to calm down. This isn't religion, and it's not a life-and-death situation. You're not going to accomplish anything if you stress out when your colleagues are making real arguments. (And if you say "toys rather than tools" you're not helping. It's possible to do great science and engineering with lousy tools.)

Have you calmed down yet? OK.

Figure out what you want students (or rather, graduates) to be able to do, and list why Excel fails at this. For example:
- be able to compute something on Linux (or a Mac or Windows box which doesn't have Excel)
- inspect the methods they're using
- compute something at greater than the CPU's default precision
- use complex numbers, or rationals
- load data from an arbitrary text file which random digitization device dumped on you
- deal with a dataset which contains 66,000 numbers

Perhaps give a homework project which is really hard in Excel, but really easy in Python, and then have an extra class showing how to do simple things in Python.

But I wouldn't worry about it that much. Is it important to be able to do this if you have a science degree? Maybe, maybe not. Just a couple years ago, it wouldn't have mattered, and it's not like science itself has changed *that* much. A degree (in science, especially) is about teaching yourself to learn, and not a specific set of techniques or technologies.

Fortran (1)

starvo (33598) | more than 6 years ago | (#23594765)

So long as its not fortran, you're in good hands.

So long as its not fortran, you're in good hands.
Load More Comments
Slashdot Login

Need an Account?

Forgot your password?