Am i being taught programming right?

Click For Summary
SUMMARY

The discussion centers on the educational approach of teaching programming in a "Numerical Programming for Geophysicists" course, which utilizes Octave instead of MATLAB and emphasizes terminal usage over GUI. Participants agree that while this method may seem unconventional compared to the Engineering curriculum using MATLAB on Windows, it fosters essential programming skills and problem-solving abilities. The consensus is that learning in a terminal environment and using open-source tools like Octave and Python prepares students for real-world applications and promotes good programming practices.

PREREQUISITES
  • Familiarity with Octave and its similarities to MATLAB
  • Basic understanding of terminal commands and Linux operating systems
  • Knowledge of Python programming language
  • Concepts of good programming practices, including code documentation and variable naming
NEXT STEPS
  • Explore advanced features of Octave for numerical analysis
  • Learn efficient Shell scripting techniques for automation
  • Study Python libraries relevant to geophysics, such as NumPy and SciPy
  • Research best practices in software development, focusing on code maintainability and documentation
USEFUL FOR

Geophysics students, educators in computational methods, and professionals seeking to enhance their programming skills in open-source environments.

Remixex
Messages
57
Reaction score
4
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
 
Physics news on Phys.org
That seems kind of strange to me. All of the "computational methods" courses I've seen use MATLAB, fortran, or Python.
 
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.
 
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.
 
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.
 
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.
 
  • Like
Likes   Reactions: billy_joule, symbolipoint, StatGuy2000 and 1 other person
axmls said:
That seems kind of strange to me. All of the "computational methods" courses I've seen use MATLAB, fortran, or Python.
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 let's 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:
  • Like
Likes   Reactions: Student100

Similar threads

Replies
10
Views
5K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 20 ·
Replies
20
Views
4K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 21 ·
Replies
21
Views
2K
  • · Replies 1 ·
Replies
1
Views
2K
Replies
2
Views
3K
  • · Replies 18 ·
Replies
18
Views
2K
  • · Replies 10 ·
Replies
10
Views
6K
  • · Replies 6 ·
Replies
6
Views
3K