# Which programming language should I learn? Worth it to minor in CS?

 3 I'll be starting a masters in OR. Which programming language would be most useful to learn? From what I've read on the internet, it seems python would be a good choice. I have some knowledge of C currently. Would it be worth it to minor in CS or should I learn it independently so I can minor in something else? asked 23 Sep '12, 23:20 SantyClaus 61●1●4 accept rate: 0%

 7 Let me first give a little context to my answer. I'm self-taught as far as programming and programming languages go. As a doctoral student (math), I took three CS courses but did not minor in it. Instead, I picked up an MS in probability and statistics, with an emphasis on the probability part (queueing, Markov chains, ...). I agree with Bo's comment about the value of good CS "skills". If you're going into industry, some of the "softer" CS skills (how to manage a team of programmers, how to set milestones and deal with version releases, ...) will be important. If you program for your own research, it's not so important. I didn't learn a version control system until a few years before my retirement. Good programming technique (including liberal documentation -- even if the code is for personal use) are important. Whether you get those in a CS minor is an open question. What are in my mind the most critical take-aways from CS courses are an understanding of object-oriented programming (in my day it was "structured programming") and the importance of choosing the right data structure for the job. As an illustration of the latter, see this blog post, where the author substantially speeds up Dijkstra's algorithm by changing a data structure or two. answered 24 Sep '12, 17:00 Paul Rubin ♦♦ 14.6k●4●12 accept rate: 19% Good point that although CS is important, some aspects of it (releases etc) are not. Personally, I 'd still consider version control important, as during experiments there's noting as handy as reverting part but not all of an experiment with "git revert" or "git reset --hard". (25 Sep '12, 03:26) Geoffrey De ... ♦ 1 @Geoffrey: I agree about reversion, but a lone programmer doesn't really need VCS for that. I discovered that the Netbeans IDE automatically maintains a "local history" on each source file and will let you revert changes. I also put my source directories on Dropbox, which maintains a history. The one time I might want to deal with a VCS is if I want to branch (fork) code to try something significantly different, rather than incremental. (25 Sep '12, 09:29) Paul Rubin ♦♦ @Paul good point, I didn't think of that. Although, if NetBeans is anything like IntelliJ, it doesn't (and can't) logically group a changeset over multiple files (into a single "commit"), so with many changes, it might be harder find all changes to revert. (25 Sep '12, 09:34) Geoffrey De ... ♦
 5 Not the exact same question, but there's some advice in this too : Old Thread answered 24 Sep '12, 00:35 Bo Jensen ♦ 5.0k●2●9●19 accept rate: 14% (24 Sep '12, 05:43) yeesian Thanks @yeesian ! (24 Sep '12, 05:51) Bo Jensen ♦ No problem! I'm actually hoping for a deeper discussion about the specific problems that graduate students (and not so much practitioners) might experience during the course of their studies, and the solutions they've found that worked well for them (since it hits closer to home) (24 Sep '12, 06:02) yeesian
 5 This is kinda of a religious question (everyone will defend their own faith and you'll see my faith shining through), but here goes; in order of importance: First, learn an enterprise Object Orientated language: Java (Oracle, IBM, Red Hat, Google, …): C++ made easier to use C++ (IBM, Red Hat, Google, …): C with OO C# (Microsoft): Microsoft's answer on Java These languages are the languages of enterprise middleware. These are the languages in which enterprises can buy tooling from Oracle, IBM, Red Hat, Microsoft, Google, etc. These are the languages on which big enterprises risk the existence of their IT architecture. You will often find that an enterprise is referred to as a Java shop , Microsoft shop, IBM shop, …: this basically means that they only accept software from a shop that meets those criteria. Talk about an interesting language like Lisp and they will humor you, debate with you, but - unless you're the architect - there is no chance in hell that they 'll actually use it and deal with the integration pain. If you're into web development, learn a major web development language, take a look at: PHP: Facebook uses it. A favorite of startups. Java with GWT: Google uses it. A favorite in Java shops. Java with JSF: A favorite in Java shops. C# with ASP.net: A favorite in Microsoft shops. Ruby on Rails (or JRuby): easy to get going. A favorite of startups. JavaScript: unavoidable (unless you go GWT) For your system administration needs (quick and dirty): Shell scripting: not a programming language, but open your shell or get cygwin and learn it. Python (or Jyton): used a lot in the academic field to set up research experiments. Groovy: can reuse Java code For low level hardware programming, learn C. For mobile work, learn Java (Android) or Objective-C (iPhone). Learn a Functional language! Lisp: The mother of all functional languages. Pretty old. Closure: Lisp that can reuse Java code Scala: Does OO too. Twitter uses it. Pretty damn complex to read. Can reuse Java code. Ceylon: Does OO too. Very new, structured, readable and powerful. My personal favorite. Can reuse Java code. Extra advice: Despite job adds, ignore Cobol. Cobol is a former enterprise language and therefore still has job adds, but it's a dead end. Production code gets read 10 times more than it is written. Prefer readability and expressibility over writeablility. Being able to write a bubble sort in a single line, is only good for code that is never used or shared. Resources to look at: To anyone: feel free to add links/languages to this answer. answered 24 Sep '12, 03:26 Geoffrey De ... ♦ 3.6k●3●27●64 accept rate: 6% Any reason why my text is not showing up? (24 Sep '12, 03:29) Geoffrey De ... ♦ 2 The '.' in 'ASP.net' was causing your troubles. ("Escaping" the dot helps, ...anyhow, this bug is seriously annoying.) (24 Sep '12, 04:19) fbahr ♦ @fbahr Thanks :) (24 Sep '12, 09:35) Geoffrey De ... ♦
 5 I second Paul Rubin's answer and want to stress few points. First of all, if you are better at programming, then you will spend less time writing code once you have got the idea you want to implement. This can represent a huge amount of time over a lifetime. It is certainly worth investing in it Second, if you're better at programming you implement your ideas more efficiently. They will run faster, with less computing resources. This can make a difference between something that works and something that is useless. Then the question becomes: how to become a better programmer? Minoring in CS can help as it helps you have good mental models of how a given language code will run. You will also need practice and learning from real code. joining an open source project is probably a good idea, as you'll learn from reading other people code. I realize this is not a direct answer to your question, but there is more than just, say, the syntax of the language you'll pick. Understanding its computation model is key. answered 25 Sep '12, 04:27 jfpuget 2.5k●3●10 accept rate: 8%
 4 I would agree with you that Python would be a good choice. It is a really nice language, and is directly useful with the Gurobi python interface, or opens source systems like PuLP. It has good support for scientific computing with Numpy, Scipy, and matplotlib. R would be another good choice, as it is often used for interactive data analysis and machine learning applications. Doing a minor in CS would be good, but you can also certainly learn on your own. Most of the OR people I know who program tend to be self taught. It really depends on how you learn best. answered 24 Sep '12, 21:15 Craig 151●1●1●3 accept rate: 0% Some things are hard to learn on your own, especially theoretical stuff like as BigO and multi-threading concurrency. (25 Sep '12, 07:20) Geoffrey De ... ♦

As with all things, I think it depends on a number of factors:

## The programming language(s) used in the classes you will take

If you're taking a class/doing a project in optimization, where the professor is most comfortable with MATLAB, it might be a good idea to spend some time learning MATLAB, as compared to say python (unless you've already had some experience, and is willing to "fill in the gaps" yourself, and the professor is willing/open)

## The programming you're likely, or want, to perform (outside of your classes/projects)

If it involves alot of visualisation/plotting, R/MATLAB/(python - matplotlib) are popular choices. If it involves writing performance/enterprise-related code, you might want to work in C/C++/C#/Java. If you're required to do a number of different tasks (writing scripts to do some data processing, calling the api of some solvers, do some plotting/visualisations, etc), I assume you'll be fairly comfortable with looking/asking for help (on your own), and heartily recommend python.

## The amount of time you're willing to put into picking up "bicycle skills"

If you don't foresee yourself having the time (outside your classes/meeting deadlines), beyond learning one of the modelling languages (AIMMS/AMPL/CPLEX/Gurobi/GAMS/etc), it might be a good idea to learn just enough to perform whatever you're required to complete (afterall, there is life after you graduate). What you can do, is to anticipate the skills you'll want to pick up, and to take classes that demand those skills (as part of their assignments/projects/etc). I tend to pick things up much faster that way.

answered 24 Sep '12, 05:36

yeesian
846210
accept rate: 3%

2

BTW : IMO good general CS skills is really important. To be awesome you need to master (or learn quick) what ever language is needed and especially be able to work with the common development tools i.e adapting the systems/languages the particular company uses, so you can contribute at day one. I do realize one has to start somewhere though :-).

(24 Sep '12, 06:06)
1

I agree, haha. But s/he has classes to attend and deadlines to meet, and only some knowledge in C (thus far) though; a lot depends on his/her motivation for doing programming. But I guess you've answered the OP's question: yes, it is worth it to minor in CS!

(24 Sep '12, 06:27)
 toggle preview community wiki

### Follow this question

By Email:

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

Markdown Basics

• *italic* or _italic_
• **bold** or __bold__
• 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

Tags:

×28
×1

Asked: 23 Sep '12, 23:20

Seen: 4,425 times

Last updated: 25 Sep '12, 09:34

### Related questions

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