1) How essential is the programming knowledge in masters Studies in OR (and even professional work) ?

2) Is FORTRAN of any use ?

My Background:

During my bachelors (Chemical Engineering), I used Fortran for complex numerical method problems. So, I can say that, I can work well with Fortran. But apart from Fortran i do not know any other programming language.

Kindly suggest crtical programming/computer skills needed, if any, so that i can equip myself for masters studies.

asked 09 Oct '10, 16:31

Ram's gravatar image

accept rate: 0%

1) Programming skills may not be absolutely essential, but they are definitely highly desirable. In your studies, they will enhance your understanding of algorithms that you learn about and they'll broaden the set of opportunities that you have for working on research or consulting projects. (I'm constantly competing with my colleagues for access to students with good programming skills.) In industry, there is no question in my mind that they will sharply improve your marketability.

2) Lots of legacy code in OR is in FORTRAN 77. New codes seem to be a broader mix of languages--some F77 (from the old guard); Fortran 0x, C, or C++ for core numerical methods; Java; Python, some Matlab, maybe some R.

An agenda for general skills:

  • Learn another language. I'd suggest an object-oriented one (C++, Java, Python) if you don't have that background yet. Once you know a couple, it will be easy to pick up others. The same goes for the categories below.

  • Get comfortable with a couple of different operating systems and development environments. Windows/Visual Studio, Linux/Unix (various tools and IDEs, including Eclipse and NetBeans), and Mac are the big ones. (Mac is really Unix inside.) Most high-performance computing (i.e., big parallel clusters) is Linux/Unix based, although Microsoft has started to play in this arena recently.

  • If you're interested in high-performance computing, get acquainted with MPI and OpenMP, and definitely make Linux/Unix one of your OS choices.

  • Get some familiarity with a statistical package (R, Minitab, SAS, SPSS). Get some familiarity with a math programming modeling tool (AMPL, MPL, GAMS, AIMMS) and solver. Find a simulation tool (can't advise you on this, unfortunately).

Obviously, you don't have to do this all at once, but work toward it. The last group you can pick up along with course work in those subjects. The HPC stuff you can work on if you have an opportunity in a class or project.

Good luck. The more of us there are out there with good computing skills, the better for the profession.


answered 09 Oct '10, 18:00

Matthew%20Saltzman's gravatar image

Matthew Salt... ♦
accept rate: 17%

edited 17 Oct '10, 20:43

@Matthew, well said, I was about to give similar answer, but you beat me to it. Though I am biased, I think good computer/programming skills is very helpful in becoming successful in OR. The list of skills might look a little frightening, but if you are really good in one programming language, then it is not that hard to switch to another.

(09 Oct '10, 18:11) Bo Jensen ♦

Regarding the OS comments, I should add that it's my experience that most commercial OR users are using windows and visual studio. Which also makes learning .NET a plus. I am a linux user myself and believe you learn more and become more productive from developing on linux, but that's just a personal opinion :-)

(09 Oct '10, 18:21) Bo Jensen ♦

Matt's answer is dead on. I'll just add one more thing about FORTRAN (and this comes from a former very happy FORTRAN user who was dragged, kicking and screaming, into the C/C++ world). You will probably find yourself using code libraries, either commercial or open-source, to do the "heavy lifting" for you when you write your own programs. For the most part, those libraries will not be legacy code. They'll provide APIs in one or more common programming languages, and in my experience it is very unlikely that there will be a FORTRAN API. In my early days of using CPLEX, I seem to recall using a "bridge" module that converted FORTRAN function calls (from my code) to C function calls (for the CPLEX library), but I have not done (nor seen) anything like that in quite a while. So, bottom line, you really should become functional in a language for which APIs to key code libraries are commonly available ... which of late seems to mean C++, Java or Python.


answered 09 Oct '10, 19:06

Paul%20Rubin's gravatar image

Paul Rubin ♦♦
accept rate: 19%

For optimizers I don't think any of the larger vendors offer fortran API and they are mostly written in C internally, though some older codes still use fortran. In my opinion learning C/C++ is a safe bet and excellent base knowledge to expand later.

(09 Oct '10, 19:11) Bo Jensen ♦

In most systems I'm familiar with, the underlying calling conventions are based on C. Compilers for other languages that allow calling non-native libraries convert native calls to C-style calls, but they may do so in proprietary or system-dependent ways. For FORTRAN 77, most of the details of the calling conventions are transparent, but string parameters are not. For C++ and other object-oriented languages, the convention is usually handled by "name mangling," i.e., changing function names internally to include type information.

But Paul's main point is well taken.

(09 Oct '10, 19:18) Matthew Salt... ♦

Just a quick trick: One can use Fortran inside python (with the numpy library) to connect to CPLEX or Gurobi

(10 Oct '10, 09:35) Mark ♦

@mark, in a commercial application you do not have the freedom to choose programming languages, this is in most cases a decision already made. And I really doubt you will be allowed to use fortran, even it is done inside python. I agree fortran skills is not wasted and can easily be used to learn other languages, but I think it's fair to say you would be better of with C than fortran.

(10 Oct '10, 10:26) Bo Jensen ♦

@Bo: I went FORTRAN to C to C++ to Java (with some other languages like SNOBOL, Pascal and Modula on the side), but I think today I might recommend Java ahead of C/C++ for someone coming from a non-object-oriented language like FORTRAN. IMHO Java syntax is a bit easier to learn, Java does a better job of protecting a programmer from his mistakes than C++ does, and (importantly) it takes work to create a memory leak in Java. The transition from Java to C++ should be easier than from FORTRAN to C++.

(10 Oct '10, 15:27) Paul Rubin ♦♦

@Paul, I was only saying C was preferred from Fortran as a skill. I write the core of optimization software, so I don't have the luxury to use java. I recently moved from C to C++ (but still mostly C style), because I have to be more productive. Regarding memory leaks in C++ vs. java, I think you are right, but if you use smart pointers in C++, you are definitely closer to removing memory leaks.

(10 Oct '10, 18:16) Bo Jensen ♦

@Bo: You've identified a key point here. People who write the libraries used in OR will tend to need C (or maybe FORTRAN or C++) to get high performance out of the libraries. People who use the libraries are more likely to need a language (Java, C++, VBA ...) that lets them create decent user interfaces. I'm in the second category.

(11 Oct '10, 15:18) Paul Rubin ♦♦

@Paul, yes I know and agree :-)

(11 Oct '10, 17:05) Bo Jensen ♦

@Paul Rubin wrote 'in my experience it is very unlikely that there will be a FORTRAN API. In my early days of using CPLEX, I seem to recall using a "bridge" module that converted FORTRAN function calls (from my code) to C function calls (for the CPLEX library)'

Well, as a clue, it was called CPLEX, not FortranPLEX.

(01 Mar '16, 10:00) Mark L Stone
showing 5 of 9 show 4 more comments

I'd like to add Visual Basic for Applications (VBA) to the list of programming languages worth knowing. For commercial environments running under windows, this usually involves the spreadsheet application Excel.

The languages mentioned above are most useful when OR is deployed as a component of a custom-built software. For some companies though, an Excel spreadsheet is usually enough to be the platform of choice for OR implementations (e.g. use of the add-in Excel Solver or its commercial alternatives). Exce/VBA appears to be a good combination in providing OR-based decision support tool to end-users.

An Interfaces article which I find helpful in illustrating the use of Excel/VBA in deploying OR solutions is the following: Implementing Large-Scale Optimization Models in Excel Using VBA


answered 11 Oct '10, 06:45

cy's gravatar image

accept rate: 0%

I suppose this could be attributed to personal bias, but I wouldn't choose VBA as a training language. It would go on my list of languages that would be easy to pick up if you need it after you have the basic skills.

As Dijkstra said, "It is practically impossible to teach good programming to students that have had a prior exposure to BASIC: as potential programmers they are mentally mutilated beyond hope of regeneration"

(12 Oct '10, 12:21) Matthew Salt... ♦

@Matthew: Yes, I completely agree with your statement. VBA is not the language one could use to build solid and disciplined programming skill. I'd just like to point out that spreadsheets are ubiquitous as a decision-support tool, so the knowledge of Excel/VBA is a valuable skill.

(18 Oct '10, 07:00) cy

If you are a Fortran user and know how to code efficiently in Fortran you already know that it is super fast. This speed can help you when you blend your fortran code into other newer languages.

If you want to use major MIP solvers like CPLEX and Gurobi the quick trick is to use their Python API and wrap your Fortran code with some Python scripts (There are many ways to do it, one is by using F2py in the NumPy library).

I think your programming skills can easily translate to other languages. I highly suggest R as a very easy language that can give you some edge. you may want to learn Python too as it has many libraries for OR as well (SimPy, APLEpy, and many more)


answered 10 Oct '10, 09:38

Mark's gravatar image

Mark ♦
accept rate: 9%


Although I use R a fair bit, I think I would suggest Python ahead of R, since Python has more general uses.

(10 Oct '10, 15:23) Paul Rubin ♦♦

R is widely used in statistical work. One major benefit of Python is that it is the engine and extension language for Sage, the open-source symbolic mathematics tool. (Just wanted to get a Sage plug in here somewhere...)

(10 Oct '10, 16:19) Matthew Salt... ♦

+1 for Sage (although my impression, as I start to learn it, is that it's mainly a tool for "pure" mathematicians).

(11 Oct '10, 15:15) Paul Rubin ♦♦

Just an extra remark to this thread.

Though arguably not the complete truth :


This should give you an rough indication on how "hot" a programming language is, and as you can see fortran does not even make it to the top 20 (and most likely has a even more downward trend over the coming years).

You can argue that optimization application has a bias towards being written in some very fast language, but since the commercial vendors have a rich set of interfaces (at in most cases acceptable low extra cost), you can get fast optimizers within a more productive language like python or even higher level modeling languages.


answered 07 Nov '10, 10:07

Bo%20Jensen's gravatar image

Bo Jensen ♦
accept rate: 14%

1) In industry: essential.

2) Many high-quality algorithms still have their best or only implementations in Fortran. L-BFGS-B comes to mind and for machine learning, random forests.


answered 06 Mar '16, 12:53

Petter's gravatar image

accept rate: 0%

edited 06 Mar '16, 12:55

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here



Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "Title")
  • image?![alt text](/path/img.jpg "Title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported



Asked: 09 Oct '10, 16:31

Seen: 4,768 times

Last updated: 06 Mar '16, 12:55

OR-Exchange! Your site for questions, answers, and announcements about operations research.