1. Limited time only! Sign up for a free 30min personal tutor trial with Chegg Tutors
    Dismiss Notice
Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Am i being taught programming right?

  1. Aug 25, 2015 #1
    I'm an 2nd year student aiming for the major "Geophysics", my course, "Numerical Programming for Geophysicists" is teaching me how to use Octave, not Matlab, and they force me to use the terminal, not the GUI, on top of that we use Linux, i am also learning Shell and Python.
    Regarding the question on top, are they doing the right thing? is this how it's going to be in the future or is this a completely different picture?
    Just a general concern i have, Engineers on my same university use Matlab and Windows, that's why i ask.
    Cheers and thanks for the guidance
  2. jcsd
  3. Aug 25, 2015 #2
    That seems kind of strange to me. All of the "computational methods" courses I've seen use MATLAB, fortran, or Python.
  4. Aug 25, 2015 #3

    George Jones

    User Avatar
    Staff Emeritus
    Science Advisor
    Gold Member

    Does your school have a site license for MATLAB, or does Engineering have its own license? Octave is somewhat similar to MATLAB, but Octave is free.
  5. Aug 25, 2015 #4
    Well it's not necessarily strange to be using one of the ones I mentioned, but programming in the terminal seems extraneous for a computational methods course.
  6. Aug 27, 2015 #5
    the way you are being taught makes me think the teacher is a CS/CE open source diehard linux fanbody.
    Usually they teach programming like this to software engineering students who must not be bound to tools and interfaces, not the others.

    But you shouldn't worry, as long as you're learning the stuff you have to learn you will totally be fine. MATLAB may have some different functions but it's mostly the same as octave, the GUI and the MATLAB stuff really make it easier and more comfortable to use (it has suggestions and input history and a very useful help documentation and stuff) but learning the hard way can only be better, as long as you can keep up with the class. At the end of the day you have to learn to code to solve problems, and that's about the same in Octave and MATLAB.

    Shell and python might come in handy in the future too. You don't learn that if you only use matlab on windows and that's it.
  7. Aug 27, 2015 #6


    User Avatar
    Science Advisor
    Gold Member

    I am a computational geophysicist for a living, and I have worked with a lot of scientists/engineers who use computation as a primary tool. Some of them prefer Windows or Mac as a platform, but many also prefer to work in Linux. I do everything open source myself. This is partly because the code I write can then be made freely available to the larger community, and such things go over well with the agencies that fund my research. Also, I tend not to operate on a large budget.

    As long as you are learning how to think your way through problems and not treat computational routines as black boxes, you are probably on the right track. Also important is that you adopt good programming practices, like designing your programs well before writing them, naming variables descriptively, and internally documenting your programs. That way if you or someone else needs to use your program months or years down the road, the code will not be incomprehensible.
  8. Aug 27, 2015 #7


    User Avatar

    Staff: Mentor

    I'd never heard of Octave, but 15 seconds on the website makes it look to me like a modern version of fortran, which along with Maple and MATLAB is what I first learned on in the 1990s. Not being a programmer, I'm wondering if fortran has some limitations, because my experience was indeed terminal based and maybe Octave is superior if it can run fully on the PC. In addition, being open source means being free and I would never quibble with that given how expensive everything can be in college. So I'll agree that it's "strange" when compared with my 20 year old baseline, but that doesn't necessarily make it a bad thing. What I'm seeing implies it is a good thing.

    And from the OP:
    "...and they force me to use the terminal, not the GUI..."

    Yeah, that's probably a good thing. Being able to generate the program from scratch instead of having a GUI assist, at least once in your life is a good thing. If nothing else, it teaches you to write efficient code. A little anecdote:

    One of my biggest shortcomings on PF comes from exactly this problem:
    I entered college in 1995 and was the first class at USNA to receive a computer with neat-o things like a web browser (Netflix 1.0), the first modern format version of Windows (95) and Office. I was instrumental in convincing a professor to let us use Office's "equation editor" module instead of LATEX. At this point, I don't even know how that would have worked - was it a separate word processor? Did it generate photos to insert into Word from a separate program? In any case, I never learned to program LATEX and don't use it much on PF.

    Does that hurt me much as a professional? No, maybe not (sorry, Greg), but I do consider that one small piece of a 2-credit Wind Tunnel lab course to be a skillset that I'm lacking today. I do indeed still use Word's GUI to generate equations, but still type-in much of the html code that I did learn manually.

    Back to the OP: I obviously don't use fortran today (does anyone, anywhere?), but the little bit of programming logic and syntax that I learned helps me today writing complex Excel equations and macros. I consider it a key item in the toolbox I took home from college.

    Ok, maybe more direct: I often use macros to filter large sets of data in Excel. One basic one that I use is a "delete every other row" macro, that combined with a quick moving-average calc lets me make the data set smaller. I've had data sets so large that it takes hours to run that macro. Learning logic skill required to write efficient code to overcome that problem was very useful.
    Last edited: Aug 27, 2015
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook