Slashdot Mirror


Programming As a Part of a Science Education?

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?"

86 of 508 comments (clear)

  1. CMU by allanw · · Score: 5, Interesting

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

    1. Re:CMU by kaufmanmoore · · Score: 2, Informative

      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.

    2. Re:CMU by cashman73 · · Score: 5, Interesting

      I'm currently working in the computational biology department at the school across the street from CMU,... 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.

    3. Re:CMU by stephanruby · · Score: 4, 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.

    4. Re:CMU by tsm_sf · · Score: 2

      Not being able to manipulate data seems like it would be such a huge hole in someone's education.

      --
      Literalism isn't a form of humor, it's you being irritating.
    5. Re:CMU by caramelcarrot · · Score: 2, Informative

      Physicists here at Cambridge, UK use Excel in first year for a mathematical methods exercise, and then in second year we use excel again for another mathematical methods exercise and C++ (formerly Fortran) for a programming in physics course. I personally think Excel IS useful for seeing the flow of iterated algorithms, numerical integration and so on - but learning a proper language is important to if you want people to mature into programming at all. Plus programming seems so important in research environments that it'd be negligent not to. In addition, as part of the first year natural science course you can do half the first year computer scientist's courses, including ML and Java - so if you're interested you do learn "real" languages.

    6. Re:CMU by somersault · · Score: 5, Interesting

      Yep - one of the engineers at our company used to work for Rolls Royce in the 70s, and at some point was a professor at Aberdeen University. He used to use FORTRAN, possibly some other languages too, but basically at the moment he does most things in excel (I think he likes Matlab too but the stuff I've seen him do mostly involves Excel). It seems to be pretty powerful, and good for easily graphing results from large datasets, etc. I've been doing work converting a couple of the engineer's hydraulic simulation spreadsheets over to Delphi (so that people other than the engineers can use the calculations, and can't see or change what's going on behind the scenes, since these spreadsheets are simulating what the tools we build can do, and they don't want our competitors getting too much information). I can definitely see the attraction of doing calculations on large datasets the Excel way - or rather, the 'spreadsheet' way, since Excel isn't the only spreadsheet system, just the most common..

      --
      which is totally what she said
    7. Re:CMU by Jellybob · · Score: 2, Interesting

      I can definitely see the attraction of doing calculations on large datasets the Excel way - or rather, the 'spreadsheet' way, since Excel isn't the only spreadsheet system, just the most common..


      I once heard Excel described as the world's most popular functional programming language, which if you take away the GUI, it effectively is.

      Once you start looking at it that way, rather then "fucking Excel" it starts to be quite a lot more powerful.
    8. Re:CMU by TapeCutter · · Score: 4, Interesting

      My kids are both gorwn now but back in the early nineties one of my kids had a high school maths teacher who taught kids the basics of both algebra and programming using Excel.

      The same teacher also taught my older kid in programing using Pascal, my son came home from his class early in the year with a single sheet of paper. He gave me the sheet and said mockingly "the teacer reckons that assignment will take all year" (he already knew how to set up a BBS and I was teaching C lab classes at uni, so he thought he knew something). When I read the sheet I found it was a very clear requirements spec for a toy database that would indeed take him through all the common programming tasks like file handling, common data structures, sorting and searching, input parsing, relational data storage, resource management, display, etc. The project was broken into four phases that were worth 25% of the final mark. Only met the guy once or twice but his techniques rank him as one of the best programming teachers I've come across at any institution.

      --
      And did you exchange a walk on part in the war for a lead role in a cage? - Pink Floyd.
  2. Teach them Python by Anonymous Coward · · Score: 3, Informative

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

  3. Necessary Tool by MicktheMech · · Score: 4, Interesting

    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.

    1. Re:Necessary Tool by TheEldest · · Score: 2, Insightful

      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.

    2. Re:Necessary Tool by the+eric+conspiracy · · Score: 4, Insightful

      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.

    3. Re:Necessary Tool by kestasjk · · Score: 2, Interesting

      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.

      --
      // MD_Update(&m,buf,j);
  4. Excel can't handle real scientific data sets by smolloy · · Score: 4, Informative
    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.....

    1. Re:Excel can't handle real scientific data sets by paradoxSpirit · · Score: 4, Insightful

      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

      --
      "Sometimes the appropriate response to reality is to go insane" -PKD
    2. Re:Excel can't handle real scientific data sets by hubie · · Score: 4, 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.

    3. Re:Excel can't handle real scientific data sets by syousef · · Score: 2, Informative

      I agree that Excel isn't enough, but don't dismiss Excel as a tool.

      For doing some of the basic astrophysics in my Astronomy masters it was invaluable. Now I did this masters for my own learning and wasn't intending to use it professionally. To put it in perspective the course I took would make an okay stepping stone to teaching highschool physics/astronomy or first year university Astronomy but it was more an educator's course than a professional Astronomer's course. So much so that we were permitted to skip the Calculus if we wished. I'm certainly not saying a professional astronomer should learn nothing but Excel.

      By the way I'm a business programmer by trade. It's just where the opportunities were for me. You could call me a sellout, or you could choose to call me a realist. My dream of going into science just wasn't going to work out for me and I made the best of it.

      As much as I hate J2EE (which I do use day to day), I'd say Java's a good first language for a scientist to learn. It's grown up enough, but you don't have to deal with the machine and pointers right away.

      Check out this book and accompanying software. (Not affiliated with the author, and think the software has some problems, but it's the best I've seen in about 10 years. I'm part way through the book but I've stalled because my time is tight)
      http://www.gravityfromthegroundup.org/

      --
      These posts express my own personal views, not those of my employer
  5. C and FORTRAN by Odder · · Score: 4, Informative

    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.

  6. You can lead a horse to water... by sirwired · · Score: 4, Insightful

    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

    1. Re:You can lead a horse to water... by PitaBred · · Score: 2, Insightful

      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.

  7. why is your blood boiling? preconceived notions? by goofballs · · Score: 4, Insightful

    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)

  8. Excel in Science?: Python - All a Scientist Needs by stm2 · · Score: 4, Informative
    --
    DNA in your Linux: DNALinux
  9. Computational Physics by overshoot · · Score: 4, Insightful
    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.

    --
    Lacking <sarcasm> tags, /. substitutes moderation as "Troll."
  10. Perl, probably Python now by Average · · Score: 5, Interesting

    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.

    1. Re:Perl, probably Python now by CastrTroy · · Score: 2, Insightful

      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.

      --

      Anthropic principle: We see the universe the way it is because if it were different we would not be here to see it.
  11. Don't forget floating point .. and abstraction by NetSettler · · Score: 3, Insightful

    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.

    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 , the proper companion to Abelson and Sussman's popular CS text Structure and Interpretation of Computer Programs !

    --

    Kent M Pitman
    Philosopher, Technologist, Writer

  12. GNU Scientific Library. by Odder · · Score: 4, Insightful

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

    1. Re:GNU Scientific Library. by willyhill · · Score: 2, Insightful
      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.

      --
      The twitter monologues. Click on my homepage and be amazed.
    2. Re:GNU Scientific Library. by s4m7 · · Score: 4, Insightful

      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 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.
      --
      This comment is fully compliant with RFC 527.
  13. In a modern, educated nation... by uniquename72 · · Score: 3, Interesting

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

    1. Re:In a modern, educated nation... by Anonymous Coward · · Score: 2, Insightful

      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!

  14. Matlab by KalvinB · · Score: 4, Interesting

    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.

  15. Matlab/octave by drolli · · Score: 4, Insightful

    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.

    1. Re:Matlab/octave by 32Na · · Score: 2, Interesting

      Off on a tangent... You mentioned Mathematica, I've found at my University that many students got their first introduction to programming there, and continue to use it in research, in tasks it is arguably not well suited for. Mathematica is a good way to visualize math, and perhaps a decent intro to programming, but I'm very surprised to frequently find it used for extensive Monte Carlo simulations where floating-point calculations would be much faster and sufficiently precise.

  16. Computer Literacy vs. Computer Science by billstewart · · Score: 4, Insightful
    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.

    --

    Bill Stewart
    New Fast-Compression-only CPR http://preview.tinyurl.com/dy575ks
  17. all the cool kids use matlab by story645 · · Score: 2, Interesting

    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.

    --
    open source modern art: laser taggi
  18. Programming As a Part of a Science Education? by __aahgmr7717 · · Score: 2, Interesting

    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.

  19. That may be true by overshoot · · Score: 4, Funny

    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.
    --
    Lacking <sarcasm> tags, /. substitutes moderation as "Troll."
  20. Critical Thinking by Genda · · Score: 2, Interesting

    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.

  21. Re:programming for scientists by Vectronic · · Score: 2, Insightful

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

  22. The answer to the Excel argument... by raehl · · Score: 4, Insightful

    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.

  23. Why not Emacs? by pdq332 · · Score: 2, Funny

    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? ;-)

  24. Re:why is your blood boiling? preconceived notions by Genda · · Score: 4, 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.

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

  25. "Other parts of the world" by DancesWithBlowTorch · · Score: 5, Interesting

    My university is in the US, but how is this handled in other parts of the world?"
    I studied physics in Heidelberg, Germany. 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.
    1. Re:"Other parts of the world" by LihTox · · Score: 5, Interesting

      A word of warning about Mathematica, Matlab, Maple, etc: they're great when you're a student, but should you find yourself between jobs (e.g. teaching part-time while applying for tenure-track positions) for very long, you may be cut off and you won't know what to do. (Speaking from experience here.) This might not matter to an experimentalist who can't do research outside of a lab anyway, but for a theorist like myself it has been crucial that I be able to use open-source software (and therefore know how to do numerical integration, gradient searches, etc) so that I can maintain a research program, keep publishing, and not drop off the map professionally.

    2. Re:"Other parts of the world" by Bud · · Score: 5, Informative

      There's an OSS Matlab clone called GNU Octave, see http://www.octave.org/. It's mostly compatible with Matlab. I've been using it for handling larger datasets or maths-heavy stuff. Works fine. --Bud

    3. Re:"Other parts of the world" by highacnumber · · Score: 2, Informative

      If you haven't already, check out Sage: http://www.sagemath.org/ Here's a review of sorts from a heavy Matlab user: http://vnoel.wordpress.com/2008/05/03/bye-matlab-hello-python-thanks-sage/

    4. Re:"Other parts of the world" by c_sd_m · · Score: 2, Informative

      There's an OSS Matlab clone called GNU Octave, see http://www.octave.org/. It's mostly compatible with Matlab. I've been using it for handling larger datasets or maths-heavy stuff. Works fine. --Bud There's another called Scilab. It's worth checking out which one has better support for what you need. I switched to Scilab, even though it's less Matlab-compatible, for the graph data structures.
    5. Re:"Other parts of the world" by RandCraw · · Score: 2, Informative

      But Octave supports little more than the basic syntax of Matlab and omits most of its basic functions and all of its GUI (e.g. no graphing).

      As a better alternative to Matlab, I'd suggest SciLAB (http://www.scilab.org/). Not only does it support a much larger fraction of Matlab than Octave (including a lot of functions from the toolboxes), it's actively under development and actually has a GUI.

      In fact, SciLAB might be exactly what the Original Poster wants -- a flexible matrix-based programming language with some visualization primitives, that's 98% compatible with a standard programming language to boot.

              Randy

  26. Re:Science majors by arb+phd+slp · · Score: 4, Interesting

    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.
    --
    There's a perfect xkcd for my sig but I'm too lazy to look it up. sudo someone go find it.
  27. Numerical methods requires programming by davros-too · · Score: 5, Insightful

    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.

    --
    In theory, there's no difference between theory and practice; in practice there is.
    1. Re:Numerical methods requires programming by khb · · Score: 3, Informative

      The best single document would be the classic Goldberg paper on "What Every Computer Scientist should Know about Floating Point Arithmetic" http://docs.sun.com/source/806-3568/ncg_goldberg.html (originally published as an ACM paper; kindly corrected and republished by the Sun Floating Point Group (Goldberg worked at Xerox). It should be required reading.

      Beyond understanding the differences between conventional mathematical arithmetic and what computers actually do, the student really should have a formal introduction to data structures.

      Lastly, and why I hung the comment on this one, Numerical Recipes is well known to not be a good numerical choice. Making it the foundation of a class would be a real crime against computing.

    2. Re:Numerical methods requires programming by martin-boundary · · Score: 2, Informative

      Abramovitz and Stegun are the Table People! The numerical recipes people are Press et al.

  28. One course is dangerous by Anonymous Coward · · Score: 2, Insightful

    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.

  29. 07 Grad from Vanderbilt by Cokeisbomb · · Score: 2, Interesting
    I graduated from Vanderbilt in '07 with double major in math and physics. I'd say about half of the majors had some level of programming experience, or were taking those CS courses in addition to the physics.

    My programming was limited to one class on MATLAB. Learning to program was a common debate and conversation between the professors and management and the students.

    The major issue with knowing how to program was for people who intended to goto grad school. It's definitely a huge plus for graduate work in physics and should be a requirement for anyone who intends to go further than a BS. Because I wasn't planning to get a masters or Ph.D. it was never really a problem.

    A year later, I'm a SQL Server developer, so what do I know.

  30. Situation at University of Bayreuth, Germany by gmueckl · · Score: 2, Informative
    I'm a physics student at the University of Bayreuth, Germany, working on my diploma thesis, and what follows is my perception of the situation at said university:



    There are no strictly mandatory courses that teach programming. Even though, hearing a lecture on a programming language is recommended as is hearing a lecture on numerical computation which touches on numerical accuracy issues as well as basic numeric algorithms (interpolation, equation solving, splines...). Most students choose to follow that recommendation and end up hearing a lecture in C/C++ for the most part. Also, there is a lecture on computational physics, which introduces a wide set of useful tools for those that feel inclined to take that road. This lecture is purely optional and usually only attended by a couple of students.



    I am not aware of any diploma thesis that was completed lately that did not include some basic scripting or programming by the author. Most topics require the students to do either considerable numerical computations (theoretical topics, mostly) or some heavy data processing, often in the form of image processing (experimental topics). Most students seem to be prepared well enough for these tasks by the time they start with the thesis work. I have never heard of any problems that arose because a topic required more elaborate programming skills than the student had or was able to develop during the thesis work (which lasts for a whole year).



    Bottom line: the teachers here are quite aware that basic programming skills are necessary and although they do not force the students to acquire them, they still end up learning them.

    --
    http://www.moonlight3d.eu/
  31. About that Matlab thing.... by Anonymous Coward · · Score: 4, Insightful

    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.

    1. Re:About that Matlab thing.... by udippel · · Score: 4, Interesting

      I know Matlab has really low (or no) cost for educational use

      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.

  32. Concepts, but General Computing Knowledge Too by ilikepi314 · · Score: 2, Informative

    You're right, it's mostly the program flow/control issues that are needed in programming. Most interesting problems in physics require computers to solve, and so a good understanding of LOGIC is needed; once you know how to iterate with loops and use if-thens, its somewhat trivial to do so in any language you see fit. After that, you can focus on numerical routines for integration, differentiation, etc. Once they understand the basics, helping them to learn to use libraries (GSL? keep with the open source!) to tackle more difficult problems may be the best for undergrads.

    My university required an introductory software design course, which was one of those more theoretical things that covered the logic and design methods, and not so much a specific language. While not required, it was strongly suggested you then took introductory computational physics, which focused more on solving differential equations and setting up general problems, as well as little things to watch out for (preventing divide by zero, etc). Again, no specific language, and the professor even allowed you to use whatever language you wanted. FORTRAN (90/95) was the default, but if you had more C experience, that was ok too, for instance.

    It was also required we get some UNIX/Linux experience (apparently most of the supercomputers they used ran Linux and so they felt it was nice for us to have some familiarity with alternate OSes), so we had a computer lab with some Red Hat machines we were required to compile code on and make scripts for. In fact, it was funny, we had to scp our programming code (= homework) to the prof's computer for review, so that was another skill we learned.

    Those experiences and skills really come in handy a lot for me, and I'm glad we had that requirement. The numerical methods have come in handy for certain projects in my graduate courses. Somewhat off-topic, but that class was also my first experience with Linux, and after using it and seeing it wasn't hard to use, I got the itch to try it at home when Windows started flaking out. Also, colleagues of mine, when they got jobs at various research centers, were given laptops and said "Here, use ssh to get data", and so had we not had some experience, it may have been harder to start off and get used to.

    We recently had a talk here with faculty at my university about better integrating this type of stuff into the curriculum, even starting with the very first mechanics course. There are interesting equations of motion for somewhat simple problems that are tough to solve by hand, so instead of simply finding Lagrangians and calling it quits, why not ask them to use numerical routines (integrate, invert a few matrices, etc.) to solve those equations and do some sort of animation of the motion? It was suggested we use Mathematica for this reason, apparently the new version 6.0 has nifty easy-to-use animation functions --- I haven't used it yet, but if that's the case, nothing is better for developing some intuition and understanding than seeing things happen real-time.

    Besides Mathematica, other faculty use MATLAB and FORTRAN and C/C++ for their actual research, so if you had to choose some programming environment, those seem the most common to me, and thus probably the best choices. Even if Excel isn't a bad choice in principle, there are so many other environments that are more powerful that I can't really see a good reason to use it.

  33. Put aside aesthetics: Excel gives wrong answers by Polimath · · Score: 2, Informative

    I love all of these "reasons" for not using Excel that seem to boil down to "When I learned to program, we didn't have ones and zeros, just zeros, and were were glad to have 'em." I use Excel occasionally for fast, free-form calculations and even exploration, but never for real research. The reason is simple: it gives incorrect answers. Check out the the links here for details: http://scholar.google.com/scholar?hl=en&lr=&q=On+the+accuracy+of+statistical+procedures+in+Microsoft+Excel+97&btnG=Search This one is easy to read and gives a short, detailed list of some of the problems: http://www.amstat.org/sections%5CSRMS%5CProceedings%5Cy2001%5CProceed%5C00470.pdf

  34. Requirement? No. Useful? Yes. by Anonymous Coward · · Score: 2, Interesting

    The issue at hand is the degree to which a specialized curriculum should "require" specialized skills from an outside field. This is a gray area and needs to be determined by the governing body/committee for whichever university or better yet field oversees the degree program.

    My input...every scientist needs to understand the potential of computers and therefore programming languages but there's no need for them to be capable of programming. It's certainly a great asset if you can combine the scientific and practical capabilities into one person but there's really no need for it in the real world. If a physicist is capable of handling her work I don't actually care how she gets it done. All I ask is that the work be timely and correct.

    So if you want to encourage the use of computer programming you need to establish a curriculum that actually requires the use of computers. If a student is able to bypass the computer and still complete assignments, labs, and exams, then the computer isn't really a requirement.

    This is the view I take of virtually everything in life, if you have to question if something is a requirement than it's not a requirement becuase those are obvious ;-).

    As for languages or technologies...I think that's the wrong track. If you're a programmer, capable of programming, then by definition you can program in any language provided you have some reference books and time to learn. Stick with stupidly simple programming languages for beginners and focus on the fundamentals so they can transfer that knowledge on to other languages.

    Here's what I'd want any physics student to be able to do (regarding programming) after graduating from college with a physics degree.
    1) Conceptualize the power of computers so that they can consider the use of computers to solve "challenging" problems.
    2) Document the requirements of a test/model/project in a manner consistent with the principles of computer science so that they, or anyone else, can write a program using some computer language.
    3) Interact with programmers to build/test/improve programs related to physics problems.

    And the person I'd want to hire...the kickass physics major who doubled in computer science and is a contributor to the Linux kernel. :-)

  35. When I was an undergraduate... by frank_adrian314159 · · Score: 3, Interesting

    Back in 1974-78, all students in the University of Illinois' College of Engineering were required to take at least a semester of introductory programming. That included the Physics majors because the Physics department was under the aegis of the College of Engineering (unlike Chemistry, Biology, etc.). That this particular science was placed in the engineering school always seemed like a really weird, but good placement.

    --
    That is all.
  36. Teach a "power" language and scripting by itamblyn · · Score: 2, Interesting

    I am a PhD student working in computational condensed matter physics. My undergrad did not have a requirement for programming - it should have. As a result, I have had to waste time catching up. The argument "they can learn it on their own" could be said about a lot of skills taught in undergraduate physics. I probably could have learned how to use an oscilloscope on my own, but I didn't have to. It was something we covered in first year lab. As a result, I know how to use this instrument properly, and the learning process was efficient. Based on what I have seen in graduate school, I think that an undergrad should learn how to use a language like C, C++, or Fortran (I'm talking about f95 mind you), as well as some scripting (bash, perl, whatever) and command line plotting tools (gnuplot for example). While environments like matlab are nice, they make it more difficult to run your codes on machines you don't own. I do a lot of this. No matter what, excel (and variants thereof) should not be promoted as an approach to scientific programming. Physics is not point and click.

  37. Re:Science majors by BlueCollarCamel · · Score: 3, Funny

    typical /. posters to build a Core 2 Duo from stuff lying around their garage. Done, now lets see that column sum.
    --
    1&1 - Cheap domain and web hosting.
  38. Resume Buzzwords by fm6 · · Score: 2, Interesting

    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. And why is it better for a physicist to be able to put "C++" on their resume? Anybody of average intelligence can stumble their way through an elementary programming course. Doesn't make them an expert scientific programmer. That can only come through applying programming techniques as part of a larger study.

    I was once in a moderately prestigious science undergrad program. There were no programming classes as part of the curriculum. And no, this wasn't an oversight on the part of the people who designed the program. Because this was a computer science program.

    (Full disclosure: I didn't make it through. Had to admit that in case any of the profs who flunked me out read this.)

    That's not uncommon. MIT probably rates as the leading computer science school in the country, maybe the world. I don't know much about their program as a whole, but I do know their key freshman course spends almost no time describing any programming language. Of course, it helps that they do all their actually programs in Scheme, a language whose syntax you can write on the back of an envelope.

    Which is not to say that Scheme is a trivial language. Quite the contrary. But I doubt that anybody who makes it through SICP puts "Scheme" on their resume. No, they talk about their newfound knowledge of algorithmics and data structures.

    If you want to make your students skilled scientific programmers, don't make them take programming classes. Create physics classes where programming is a key element. Programming is just a tool, and do you have a class for every tool your budding physicists might use?
  39. FORTRAN? by EmbeddedJanitor · · Score: 4, Insightful
    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.

    --
    Engineering is the art of compromise.
  40. Mathematica and/or C++ by simonbp · · Score: 2, Interesting

    C/C++ is clunky, but once you know it, you can figure out most every other modern programming language.

    As a physics undergrad, I was required to take a Mathematica course. I already knew how to program, but for most of my classmates, it was their first time programming, with mixed results. Most ended up using it as glorified calculator, rather that actually creating structured programs...

    What really annoys me is the anachronistic faculty who force their grad students to use Fortran 77...

    Simon ;)

  41. YES! by cahkaylahlee · · Score: 2, Interesting

    Yes! Programming should definitely be a part of every physicist's and engineer's undergraduate education. As a physics undergrad I learned Maple and MatLab. The last course that was required was all about numerical methods to solve differential equations. Most problems that physicists encounter are too hard/tedious to work through by hand. (You can usually guess which problems will be on the test just by asking yourself what is doable in 1 hour.) Having all the students learn basic programming allowed the professors to assign homework problems that were more in depth and we could explore topics in different ways. As an experimentalist, I rarely use my programming skills in my research, and I'm certainly not the world's greatest programmer. However, I do find value my programming training, and it's something I've found that I (usually) enjoy learning. At my graduate institution, programming was not taught as part of the physics curriculum. I have been less frustrated doing homework than other students because I have not had to wrestle with learning a new program and solving a difficult problem at the same time. Also, I was taught good programming methods. Once I was able to solve a problem in 15 lines of code when it took my friend, who was self taught, about 1 1/2 pages of code. Needless to say, my solution was much easier to follow and understand what the program did. As an instructor for a 400 level class, I get frustrated that my students are so uncomfortable using a computer to generate plots and such for their homework (even with Excel). The previous instructor for the class did the homework solutions in Excel. Yes, Excel can do the problem. But it takes me far less effort to do the problems in Maple/MatLab.

  42. Constantly programming for science by CyberLife · · Score: 2, Insightful

    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.

  43. No column sums for you! by Gazzonyx · · Score: 4, Funny

    typical /. posters to build a Core 2 Duo from stuff lying around their garage. Done, now lets see that column sum. *Examines CPU* Hey! Wait a minute, this is a Celeron. Get back to work!
    --

    If I mod you up, it doesn't necessarily mean I agree with what you've said, sorry.

  44. And a follow up! by Gazzonyx · · Score: 2, Funny

    Forgot to mention... there's a reason you shouldn't give us programmers soldering irons. Did you know those things are really, really freakin' hot?! I never did get that firmware working again after that...

    --

    If I mod you up, it doesn't necessarily mean I agree with what you've said, sorry.

  45. MATLAB at the undergrad level by TheVaunted · · Score: 2, Informative

    The chair of the physics department here at Augusta State University is definitely all for we physics majors graduating here with plently of MATLAB experience. Several months ago, I overhead him commenting how he was disappointed with the lack of programming skills with the majority of the majors. So now, MATLAB is a staple of the computational physics and electronics II courses. Prior to this change, I, myself, had very little experience with programming. But I got on to a research project this past March and had to learn MATLAB very quickly. Now, two months later, I`m working everyday with MATLAB on an Ising Model program. Needless to say, from an undergraduate stand-point, it seems that the need to code and implement algorithms will be of vital importance to future physicists.

  46. Physics studies fundamental effects by Manzanita · · Score: 2, Insightful

    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

  47. Re:Science majors by ozmanjusri · · Score: 3, Insightful
    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.

    --
    "I've got more toys than Teruhisa Kitahara."
  48. experimentalist too: science is transparent. by freenix · · Score: 2, Insightful

    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?

  49. Leave teaching programming to the CS department by jma34 · · Score: 2, Insightful

    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.

  50. Re:Science majors by amirulbahr · · Score: 2, Funny

    Ok, so I've got some sand... now what do I do?

  51. Re:Science majors by FelixGordon · · Score: 2, Funny

    Right, so preheat your oven to 1900 ÂC...

  52. Re:Science majors by Jellybob · · Score: 2, Insightful

    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.
  53. When I was a young whippersnapper by Aging_Newbie · · Score: 2, Interesting

    Forty years ago, in the second semester of my freshman year, the physics prof told us of a wonderful opportunity to take a pass-fail class in FORTRAN. It was pass-fail because programmming was not really an academic subject, but, like using a slide rule, was necessary for doing physics. So, we all took the extra class in the evenings and did our homework with stacks of punch cards at 3AM just like all old-timers prattle on about.

    From then on, data for every lab were analyzed with programs and we had to turn in our program as well as our results. It was a really good way to learn physics and programming too.

  54. Re:Science majors by CmdrGravy · · Score: 3, Funny

    The first book I read on computers when I was 7 or 8 was sort of kids guide to the ZX Spectrum. I can't remember the name of it but it was a great book featuring the character "Speccy" and spent basically the first 4 pages explaining that nothing you could do would break speccy and not to be afraid to play around and do anything you liked which is probably the best advice you can give anyway trying to find there way around computers.

    Of course Speccy was wrong and met a premature end when switching him on and yanking out his joystick at the same time caused him to smoke and shortly afterwards to die.

  55. Survey of computation uses in undergrad physics by Norman_JC · · Score: 2, Informative

    To the troubled new faculty member at a well-guarded institution: you are not alone. Try reading the article below. In fact the entire issue is devoted to the theme of computation in undergraduate physics. R. G. Fuller, 'Numerical computations in U.S. undergraduate physics courses,' Computation in Science and Engineering. 8 (5), 16-21 (2006)

  56. I'm with you by Goldsmith · · Score: 2, Informative
    As a physicist, I agree that programming is absolutely necessary to an undergraduate degree. Most of the institutions I've been at have included programming with the mathematical methods courses (usually using Mathematica, and making "real" programs, not just one line math). This has been by far the most effective tool for getting the "masses" of physics students to learn some programming. I have used this mathematica toolset and really liked it.


    I have also had programming (not math methods) classes in Java and IDL from a physics department. While I enjoyed them, most of the students who did not have prior programming experience found those classes difficult and uninteresting. Most physics students aren't interested in learning the details of why or how a programming language works, simply what they can do with it. The students who had taken a math methods/programming course found "regular" programming courses much more useful.


    I've also had (and taught) classes with LabView. While theorists find LabView totally useless, it is by far the most common programming tool used in experimental labs. You can learn structure and flow with labview, but it's not a very useful learning "language". However, it can (and should!) be taught in advanced lab classes to make things like temperature controllers, timed electronic measurements, instrument control etc. The people who say experimentalists don't need to program are dead wrong. If you can't rig up a simple temperature controller, basic e-beam writing system or digital oscilloscope in software, you're going to be wasting money on hardware you didn't need to buy.


    I've had to teach lab classes where the students were forced to present the data in Excel, and that was bad enough. Good luck finding a graduate student in a physics department who's willing to teach VBA and Excel well enough to do anything useful. Use of Excel as a programming platform is not as common as your peers think. I would try very hard to get them to move to something like Origin or Igor, which are much more powerful, produce better graphs and actually ubiquitous.

  57. This is a current pedagogical topic in physics by baking3 · · Score: 2, Informative

    There is a fairly well organized group of physicists in the states that is promoting computational methods as an integral part of a physics undergraduate curriculum. There will be a working session at the Winter AAPT meeting in Chicago next February. Also take a look at the special issue "Computation in Physics Courses" of Computing in Science and Engineering (Sept/Oct 2006) to see what some other programs are doing (disclaimer: I wrote one of the articles). Also, the American Journal of Physics recently (April/May 2008) released a double issue in "Computation and Computer Based Instruction" with lots of information in it (especially the resource letter by Landau). As it happens, Landau, Jan Tobochnik (editor of AJP), and Norm Chonacky (editor of CiSE) are all part of the AAPT working group.

  58. Recent observation: some programming is essential by dsgrntlxmply · · Score: 2, Informative
    After 30+ years of writing code for a living, I decided to go back to university for a physics degree. My school (undergrad. state institution) has around 7000 students, and perhaps 35 of these are physics majors.

    My school requires a course in computer methods as a part of the physics major, and I have been afforded a very recent opportunity to observe traditional-aged fellow students while taking this course.

    Such a course is essential. While students at our school are introduced to Mathematica as part of the calculus sequence, this exposure is cursory and is only interactive; it does not require actual programming.

    My computer methods course was a first presentation for its lecturer, and arguably was a bit too ambitious in breadth. We had programming assignments in Mathematica (both procedural and rule-based), and interactive and programmed use of GNU Octave (Matlab clone). We also were required to write a program in C/C++.

    Throughout the class there was an emphasis upon learning and writing documents in LaTeX, including a considerable amount of equation-writing. We also used the old Bell Labs Graphviz "dot" program, both as an arcane and slightly bizarre introduction to programming per se, and to generate graph figures for inclusion into the reports written in LaTeX.

    Adding to the confusion from breadth is the fact that one professor, for his optics class, prefers and supplies his examples in Mathcad.

    I believe that it's fair to say that most students found this class to be a nearly excruciating experience, which is an indication that it had worthwhile and challenging content. The breadth and pace of presentation needed to be reduced a bit.

    Out of the 10 or so students in the class, only I had any previous programming experience. I found the work load challenging, more in the underlying problems than in the technical aspects of writing code. By contrast, at most one of the other students had previously used any text editor apart from Word, or were aware of TeX/LaTeX.

    The course had some challenging conceptual content (e.g. generating attractor maps by iterative solution of cubic equations with starting points gridded across a region of the complex plane) as well as fairly extensive technical content.

    I will admit a pathological allergy to Excel, with the exception that it is somewhat handy for graphing and doing simple regression fits. I am glad that this course did not spend time on Excel.

    Again, this course needed to be recalibrated downwards a bit in breadth of topics. Numerical stability and precision effects were only briefly mentioned, but did benefit by a good example or two.

    There is no way that a semester course could approach both the extensive technical topics, and actual numerical analysis. That needs to be a separate course.

    Also missing from this course was any coverage of experiment automation (which usually means LabView). This is another important topic, but there simply is not time in a semester to cover it alongside everything else.

    At least two of the students gained some enthusiasm for LaTeX as a result of this class, and have used it to write assignments for other classes.