Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!

 



Forgot your password?
typodupeerror
×
Programming Education IT Technology Science

Programming As a Part of a Science Education? 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?"
This discussion has been archived. No new comments can be posted.

Programming As a Part of a Science Education?

Comments Filter:
  • by sirwired ( 27582 ) on Thursday May 29, 2008 @08:11PM (#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
  • by goofballs ( 585077 ) on Thursday May 29, 2008 @08:11PM (#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)

  • by overshoot ( 39700 ) on Thursday May 29, 2008 @08:14PM (#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.

  • 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]!

  • by Odder ( 1288958 ) on Thursday May 29, 2008 @08:18PM (#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.

  • Matlab/octave (Score:5, Insightful)

    by drolli ( 522659 ) on Thursday May 29, 2008 @08:21PM (#23594363) Journal
    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.
  • by billstewart ( 78916 ) on Thursday May 29, 2008 @08:26PM (#23594399) Journal
    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.

  • by willyhill ( 965620 ) <`moc.liamg' `ta' `kaw8rp'> on Thursday May 29, 2008 @08:31PM (#23594453) Homepage Journal
    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 (Score:2, Insightful)

    by TheEldest ( 913804 ) <{theeldest} {at} {gmail.com}> on Thursday May 29, 2008 @08:39PM (#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 (Score:5, Insightful)

    by the eric conspiracy ( 20178 ) * on Thursday May 29, 2008 @08:41PM (#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.

  • by Vectronic ( 1221470 ) on Thursday May 29, 2008 @08:41PM (#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.
  • by raehl ( 609729 ) <(moc.oohay) (ta) (113lhear)> on Thursday May 29, 2008 @08:43PM (#23594557) Homepage
    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.
  • by paradoxSpirit ( 1172919 ) on Thursday May 29, 2008 @08:43PM (#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
  • 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...

  • by Anonymous Coward on Thursday May 29, 2008 @08:57PM (#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!

  • by davros-too ( 987732 ) on Thursday May 29, 2008 @09:01PM (#23594703) Homepage
    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.
  • 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].
  • by Anonymous Coward on Thursday May 29, 2008 @09:15PM (#23594839)
    There are those that don't know how to program. They generally respect those who do.

    There are those that study programming and are respected by others who know what they are doing.

    And there are those (probably managers) who have one course in programming and have written a 50 line program (probably in Basic). They think they know programming. Those people are dangerous.
  • by CastrTroy ( 595695 ) on Thursday May 29, 2008 @09:37PM (#23595009)
    I remember trying to help some chemical engineers out with their third year programming assignments for numerical analysis. I didn't understand any of the numerical analysis aspects, and they didn't understand any of the programming aspects. Made for a really frustrating time. Trying to explain to someone how to program something you which you don't understand how it works is very complicated. I don't think I ended up being much help on the assignment, even though I am quite a good programmer. Programming is a very important part of any science. I think it should be mandatory. The scientist who understands the science and understands just a little programming will be able to write a better program than someone who knows how to program but doesn't understand the science.
  • by Anonymous Coward on Thursday May 29, 2008 @09:42PM (#23595051)
    I know Matlab has really low (or no) cost for educational use, but could you guys please switch over to GNU Octave (matlab clone) or SciLab/SciCos (similar but different & has a Simulink equivalent)? That way, after school people can keep using low cost tools in industry. My department spends a ton of money for those tools simply because the people who make decisions don't know about good/cheap alternatives. And guess where these guys learned Matlab. Yep - back in school.
  • by s4m7 ( 519684 ) on Thursday May 29, 2008 @10:12PM (#23595259) Homepage

    It's actually one of Microsoft's better products.
    I'll grant that Excel is really quite simple and flexible. However it has some serious drawbacks when compared with something like SPSS [spss.com] when it comes to the management (and analysis) of actual data. like how sorting can be limited to one column and botch all your data. Like how data types aren't strictly enforced. Like how a single sheet can be only 256 columns wide or some such nonsense. (maybe they've fixed that since?) Excel is a toy when it comes to serious manipulation of data, and if you don't agree, you haven't actually done any. I was a data processor at a market research firm, and they seriously expected me to combine and normalize 20 different international datasets (60k+ records with ~350 fields) in Excel. Were it not for SPSS, I would have lost the scant scraps of sanity I have remaining.
  • Re:CMU (Score:5, Insightful)

    by stephanruby ( 542433 ) on Thursday May 29, 2008 @10:22PM (#23595333)

    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.

  • FORTRAN? (Score:5, Insightful)

    by EmbeddedJanitor ( 597831 ) on Thursday May 29, 2008 @10:44PM (#23595493)
    Want to crunch numbers, then Fortran is better than C. Even Java is better since it gives stronger type checking. Python is probably good too (but maybe a touch slow).

    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.

  • by CyberLife ( 63954 ) on Thursday May 29, 2008 @11:10PM (#23595655)
    I'm a programmer that worked in the software industry professionally for a good 13-years or so before switching to science. I personally find that I'm always writing little scripts and other programs to carry out all manner of tasks. Everything from gathering data to organizing it, analyzing it, charting it, reporting it, sharing it ... you name it I do it. Now I cannot say whether this is a truly necessary function or whether it's due to my background. I am, if you will, a biased sample. It is a valuable skill, nonetheless. It saves a tremendous amount of time.
  • by Manzanita ( 167643 ) on Thursday May 29, 2008 @11:49PM (#23595941)
    As an undergrad in physics you need to learn about the fundamental laws that have been established before you came on the scene. I believe that, from a physics point of view, it is important to have a class that teaches about computers from the lowest level, giving a good overview of how gates are made from transistors, binary logic is implemented with gates, and how to program a little in assembly language. More specific classes on programming can be left to the computer science department and upper division classes in computational methods. I do believe that a basic programming course in the computer science department should be required for the undergraduate physics degree. This is completely separate from the question of what tool you will use for analyzing data, which is what you are talking about when you consider Excel.

    As for the specific tools the students use for solving problems or analyzing data, sometimes Excel is all that is needed, and it is part of a physics education to develop a sense for the right tool for the job. It was suggested in another post to encourage the use of MatLab, which is one good choice among many powerful tools. Each has trade-offs and a learning curve. I have used Excel, Kaleidagraph, Mathematica, Labview, Matlab, Maple, Origin, Igor and others. A friend of mine uses MathCad very effectively. Excel will not do the job of one of these more sophisticated analysis tools. Because it takes a while to climb the learning curve on any of these it is important to choose one and stick with it. I never had the benefit of a class that covered one of these but it would be a great idea.

    Nevertheless it is not the place of these tools to teach you programming. Understanding the fundamentals of how to program well deserves a class of its own. I studied Fortran for my first computer class as a physics major, which would probably still be just fine. C might be more appropriate now. Some of the above tools can also call routines written in C. I don't have a broad enough perspective to come up with the best curriculum for such a course off the top of my head, but it is certainly more than can be contained within the context of Excel.

    Didn't the Computer Science department at your university ever offer a programming class geared toward physics and engineering students?

    -Dan
  • Re:Science majors (Score:4, Insightful)

    by ozmanjusri ( 601766 ) <aussie_bob@hotmail . c om> on Thursday May 29, 2008 @11:56PM (#23595989) Journal
    Back in the early '80s when I did my studying, a course called "Scientific Communications" was a prerequisite for a BSc. The programming language of choice was Fortran, and we were taught TeX for document creation.

    Something like Pascal or Python would probably have been better for learning programming, but Fortran was/is the language for science and engineering.

    I'm very glad I wasn't introduced to something as inconsistent and inelegant as VB(A) so early in the learning process. It's much harder to unlearn than it is to extend your knowledge.

  • by freenix ( 1294222 ) on Friday May 30, 2008 @12:08AM (#23596071)

    Even experimentalist need to know what functions are applied to their data and they should use tried and true software. Stable free software comes with transparency which is nice.

    The cut off thing happens to more than scientists. Engineers, CAD people, graphic designers, anyone who uses their computer for more than word processing faces the expensive software trap.

    I imagine a theorist like you can run rings around most at the kinds of things Mathematica and Maple do. What do you use them for and what do you suggest as replacements?

  • by jma34 ( 591871 ) on Friday May 30, 2008 @12:08AM (#23596075)
    Speaking as a graduate of physics, I don't know that requiring a programming course is really that useful. I am currently working on a high energy particle experiment and most of what I do each day is write computer programs. None of my programming knowledge was gained in a class at the undergraduate or graduate level. I currently work in C++, Perl, and Tcl. The department can check with the CS department and give recommendations on classes to be taken during your undergraduate education, but making it a requirement seems a bit over the line.

    A good researcher is going to learn to use his tools, one way or another. Most (probably all) physics students are geeks plain and simple. Figuring out a computer language isn't really that hard. Learning good programming practices is harder, but truth is that most "trained programmers" have poor practices too. In my field, mission critical software is written by a people who have degrees in computer science and the like not by physicists. We also have frequent workshops and seminars to help us learn to effectively use the computing infrastructure built up around our experiment. This is big science with huge collaborations and millions of dollars, but I've also worked in a small AMO group and it wasn't that different.

    Leave the heavy computing tasks to the pros, and let the scientists do what they do best tinker, experiment, learn and discover. I won't dispute the need to program, but I still don't think that there needs to be required courses on it in science curriculum in general.
  • Re:Necessary Tool (Score:1, Insightful)

    by Anonymous Coward on Friday May 30, 2008 @05:35AM (#23597309)
    I am a IT engineer and have worked on the development of a CFG-toolkit. On the team there where math PHDs, physics PHDs and civil engineers. It was a relative programming intensive work and they got it working. But the thing is that they made (to me) obvious mistakes that had a detriment on performance, memory usage, system stability and maintainability.

    I think any science major should take a programming course and properly learn the language he / she is using. You must not only fully understand the numeric methods use, you must be able to implement them in a clean and feasible way.

    It it has to be a requirement of a science program I do not know. But one thing is important, don't try to teach them the difficult languages first (like C), something easy like python will do most jobs. If that does not cut it they can step it up and learn C++ or so...
  • Re:Science majors (Score:3, Insightful)

    by Jellybob ( 597204 ) on Friday May 30, 2008 @05:45AM (#23597345) Journal

    I've never understood how people who are generally very intelligent can fail to grasp the most basic computer concepts so completely.


    Fear. Plain and simple. I've seen too many otherwise intelligent people completely freeze up when presented with a computer.

    I used to think that it was a case of the older generation not being used to them, but I still see it happening with people who are younger then me.

    Once you get beyond things that they know how to do people seem to have an irrational fear of breaking things. Personally I think the first lesson in any basic IT course should be showing people just how hard it is to completely break modern computers.
  • Re:Science majors (Score:1, Insightful)

    by Anonymous Coward on Friday May 30, 2008 @06:31AM (#23597517)
    "I've never understood how people who are generally very intelligent can fail to grasp the most basic computer concepts so completely."

    Intelligence is weird. Swap "computer" for "English" in your sentence, and you'll see demonstrations of the same issue every day in /. I mean, the things I've seen done here to the poor apostrophe. It isn't THAT hard.

    People's brains are an odd combination of hardwiring and practice, and it is quite common for extreme skill to be demonstrated in one area while other areas are as extreme in their weakness. When someone is truly "generally intelligent", we usually call them a genuis, and it's quite a rare thing (and it ain't me!). From my experience, the expression of intelligence can be highly variable depending upon the skill being exercised.

    Also, computers being a relatively new thing in society, there is a whole generation that grew up using them, and a whole generation that didn't, which probably leads to more disparity than usual.

And it should be the law: If you use the word `paradigm' without knowing what the dictionary says it means, you go to jail. No exceptions. -- David Jones

Working...