Beginner Language

  • Thread starter EJC
  • Start date
  • #26
DrDu
Science Advisor
6,089
800
I started programming some 35 years ago in high school using basic on a pdp-11, learned pascal on an apple 2e, used fortran77 during my study and thesis. In the last years I was mostly doing statistical programming with SAS (Stress And Suffer, not recommended) and used Fortran 90, Java and Python for some spare time projects.
My advice is the following: If you are going to do heavy numerical work, C, C++ or maybe Fortran90 is the way to go. If you are going to do a thesis in engineering or physics, you probably will spent most of the time diagonalizing big matrices and these languages are fast. If you are working in a field touching life sciences, you will probably need scripting languages like perl, python in combination with C.
In the outside world, most people are working on shared applications, e.g. for the web, data storage etc. and the faster number crunching languages are of little market value. You need to know there object oriented languages like java and phython (which also has some nice statistics packages called Panda) and others who are more modern than I.

Python may be quite a good starting point as it has a readable syntax, comes with handy packages for almost everything.
I would recommend not to rely on an IDE for the beginning, but at least to use a classical editor for the first steps.
This doesn't leave you completely helpless when you have to change a program in some other language on a remote computer via a vt100 terminal.
Personally, I don't understand why so many persons are using Matlab. It is slow and quite expensive if you aren't a student.
 
  • #27
f95toli
Science Advisor
Gold Member
3,090
580
Personally, I don't understand why so many persons are using Matlab. It is slow and quite expensive if you aren't a student.
Matlab isn't nearly as slow as most people think. Most of the time the time consuming bits (e..g actually solving a ODE or inverting a matrix) are are actually done by functions that are coded in C. Matlab actually uses some very well-optimized libraries "under the hood" (LINPACK, FFTW etc) and with the parallel programming toolbox you can also use multiple cores and GPU accelerated commands. Nowadays you can also get away with using loops since the JIT compiler is reasonably efficient if you think a bit about how you write the program (I've been using Matlab for about 20 years, loops were very horribly slow until they introduced the JIT compiler in 2004 or whenever it was).

That said, I don't consider Matlab to be a proper programming language; it is a scripting language for doing numerical calculations and is simply too different from a conventional language . Hence, I would also vote for Python as first language. I would stay away from C as a first language, it is too easy to get into bad habits and it is also a bit outdated (although still widely used). C++ or perhaps C# would be a better option but perhaps it would be best to start with Python.
 
  • #28
jtbell
Mentor
15,719
3,851
Either way I'd recommend a simple environment (command-line compiler, lightweight text editor) to start with.
Agreed. Sophisticated integrated development environments (IDEs) are valuable for managing large programs with lots of modules, subroutines and/or files. However, in the beginning they add another level of complexity beyond the language syntax and semantics issues that the student should be focusing on. I taught two-semester intro programming courses for many years, that used command-line tools and a simple text editor. I still use such tools for my personal programming.
 
  • #29
mheslep
Gold Member
311
728
Agree. For instance, there is a big speed difference for the ones targeted for physics calculations. MATLAB is SLOW (maybe 100 times slower than C). ...
That depends. MATLAB can be hard to beat for some large matrix operations, say inverting a 1k x 1k. MATLAB's code is optimized for that kind of thing, I suspect running LAPACK/BLAS internally, and on a multicore machine it will run the operation in parallel across the cores. Doing all that in C, or in anything else, takes some work.
 
  • Like
Likes FactChecker

Related Threads on Beginner Language

  • Last Post
Replies
21
Views
9K
Replies
19
Views
1K
  • Last Post
Replies
4
Views
3K
  • Last Post
Replies
18
Views
3K
Replies
11
Views
1K
  • Last Post
Replies
13
Views
3K
  • Last Post
Replies
9
Views
375
  • Last Post
Replies
1
Views
810
Top