Slashdot Log In
Programming As a Part of a Science Education?
Posted by
Soulskill
on Thursday May 29, @07:58PM
from the part-and-parcel-of-the-information-age dept.
from the part-and-parcel-of-the-information-age dept.
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?"
Related Stories
Firehose:Programming as a part of a science education? by Anonymous Coward
The Fine Print: The following comments are owned by whoever posted them. We are not responsible for them in any way.
Full
Abbreviated
Hidden
Loading... please wait.

CMU (Score:5, Interesting)
Reply to This
Re:CMU (Score:5, Interesting)
Reply to This
Parent
"Other parts of the world" (Score:5, Interesting)
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
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.
Reply to This
Parent
Re:"Other parts of the world" (Score:5, Interesting)
Reply to This
Parent
Re:CMU (Score:5, Insightful)
With one of my professors, it was "You can use any language you want as long as it can do the job it's required to do and your TA is willing to accept it". That approach worked really well for us. The TAs were very flexible. In fact, I would tend to think the job of grading projects was much more interesting because of all the variations in the student's work. Remember, you've said it yourself, this is not supposed to be a class on syntax. At my school at least, they didn't teach us the languages, they taught us the concepts (and you were supposed to learn the computer languages on your own, and of course, every Professor had their favorite pet language they had been developing/using for the last twenty years).
For the lecture itself, I think the choice should be left to the Professor teaching the class in question. If the Professor is an expert in Logo, let him use that -- if that's what he wants. If the Professor is an expert in pseudo-code and wants to use that -- let him use that. If the Professor is an Expert in VBA, let him use that if that's what he wants to use. Hopefully, your faculty is made up of smart people. If they're smart, just let them use the tool of their choice -- they'll probably do a far better job with them (than giving them some pre-assigned tool). An chances are, the students will gravitate toward the common tools already used in the industry.
The thing is, VBA may not be considered a grown-up language to you, but I can almost guarantee that if you run into a Physics Professor who's an expert in VBA -- he/she will be able to do things in it that you couldn't even dream was possible. So I would advise you against going down that road of trying to prove them wrong, I'm pretty sure you won't be able to. So let that Professor teach in VBA if he wants to, but don't let him force you to teach in a tool you don't want to teach in.
Reply to This
Parent
Re:CMU (Score:5, Interesting)
Reply to This
Parent
Necessary Tool (Score:5, Interesting)
Reply to This
Re:Necessary Tool (Score:5, Insightful)
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.
Reply to This
Parent
Numerical methods requires programming (Score:5, Insightful)
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.
Reply to This
Parent
FORTRAN? (Score:5, Insightful)
Just like they say "Don't give a programmer a soldering iron", giving physicists something like C is probably giving them more than they need for most number crunching.
Reply to This
Parent
Re:GNU Scientific Library. (Score:5, Insightful)
Reply to This
Parent
Excel can't handle real scientific data sets (Score:5, Informative)
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.....
Reply to This
The answer to the Excel argument... (Score:5, Insightful)
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.
Reply to This
Parent
Re:Excel can't handle real scientific data sets (Score:5, Interesting)
There are whole classes of problems that Excel is well suited to solve. Linear propagation models, optical ray tracing for instance, is one. I remember back in the early 80's spreadsheets in general were touted as a good way to solve complicated 2-D boundary value problems via iteration because you are given a nice cell grid to start (I have foggy memories of doing this myself on whatever preceded Excel). I have seen some very impressive models built out of spreadsheets; it wouldn't have been my tool of choice, but the people putting them together could really do some impressive things.
At the undergraduate level I don't know what to say. I don't know how much programming I would force on the physics major. I am a very strong advocate of teaching mathematical methods for the major, as I had been. My professor spent some time having us learn FORTRAN, but I wouldn't say it was very productive because we were learning it for the sake of knowing it, not because we had a task to use it for (and so it really didn't set in). I didn't do any serious programming until graduate school, where I ended up becoming a FORTRAN expert after all.
I do agree that Excel can't handle real data sets, especially with the limitations of plotting 32k data points and only holding 64k in a column. On the other hand, not too much data handling you do at the undergraduate level deals with that much data.
I wouldn't say the students would be at a major handicap having only used Excel at the undergraduate level. If they are handed that particle data set in C++ objects, they'd do what I would have to do: learn C++. Between undergraduate and graduate school I made a conscience decision to learn either C or FORTRAN, since those were the languages of physics. I settled on C, picked up some books and started teaching myself. When I got to graduate school, the research I inherited was all FORTRAN, so I ended up betting on the wrong horse (at first, at least). When I got out of graduate school, I ended up learning C for the job I was doing at the time (I've since drifted into the IDL/Matlab world and now I find I'm rusty in all of them!).
You also have to be careful what you consider a grown-up language. By the time I got out of graduate school, C++ was all the rage and I kept hearing how they couldn't believe that any serious programmer would program in a non-object-oriented language unless they were either old or a Luddite.
Reply to This
Parent
Re:About that Matlab thing.... (Score:5, Interesting)
Usually I don't feed ACs, but here I am astonished and ask for clarifications, because we, as educational institution with a 'university' in its name, have to pay horrendous sums for the licenses of Matlab. One single seat license is close to the campus license price of Microsoft.
Reply to This
Parent
You can lead a horse to water... (Score:5, Insightful)
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
Reply to This
Excel in Science?: Python - All a Scientist Needs (Score:5, Informative)
Reply to This
Computational Physics (Score:5, Insightful)
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.
Reply to This
Perl, probably Python now (Score:5, Interesting)
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.
Reply to This
Matlab (Score:5, Interesting)
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.
Reply to This
Matlab/octave (Score:5, Insightful)
Reply to This
Computer Literacy vs. Computer Science (Score:5, Insightful)
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.
Reply to This
Re:why is your blood boiling? preconceived notions (Score:5, Insightful)
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.
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...
Reply to This
Parent
Re:Science majors (Score:5, Interesting)
I know this is going to confirm every bad stereotype the
Maybe next semester I'll do a research colloquium on SQL and basic database construction.
Reply to This
Parent
No column sums for you! (Score:5, Funny)
Reply to This
Parent