Suggestions to learn any programming language after Matlab [closed]
I've taken a course in C++ in my freshman year in undergrad. However once it was over I never employed it in any project or use. I am familiar with some average topics in C++ prior to where开发者_开发问答 'link list' starts. Once I got the opportunity to do my first project after Sophomore year, I was suggested by my prof. to learn Matlab which is widely used in mathematical and engineering projects. But I often hear from people that Matlab is not a language and that it can't take the place of any programming languages like C++, Java, Fortran etc. I am also concerned about its inability to run using executable files unlike Fortran, C++ etc.
I am wanting to learn a programming language:
1) Which takes care of the above, and other, issues which Matlab lacks in many aspects.
2) Which is widely used and available in industry and research centers.
3) Which is relatively easy and quick to code, and powerful in its capabilities.
Also please:
1) Give the advantages and disadvantages (over Matlab) for the language you suggest.
2) The best way to learn it.
3) The proper sequence of topics to learn knowing that I am familiar with the programming concepts.
4) A source, which is easy, good and interesting, to learn from.
Thanks for your suggestions.
From matlab, I would go to python.
First, I want to dispel of a myth. Matlab is used in industry. However, it isn't as common, and is pretty specific. It's often used for prototyping and proving mathematic analysis, not to deploy systems to customers. Once the smart mathematicians prove their ideas out in Matlab, it falls to developers to build a real system out of it. That real system is usually done in C,C++,Java and deployed to the customer.
But, first, ask yourself why you want to learn this language.
- Is it just to get exposure? To learn more about programming? Almost any language will get you that.
- Do you want to be able to quickly fire off some scripts? Python would be better.
- Do you want to develop large scale systems that leverage every ounce of processing power at the expense of development speed? C/C++/Java would be a better path.
- Do you want to become more attractive to recruiters? Java probably has the highest amount of "want-ads", followed by C++, then maybe Python or C#.
- Do you want to remain in a specific industry (e.g. scientific computing)? Pick out a few companies that interest you and find out what they use in-house.
Remember, the language is not really a goal in itself, it's just a tool to get you where you're going! :)
1) Which takes care of the above, and other, issues which Matlab lacks in many aspects.
Yes, Python is an industry acceptable programming language with many great programming features - list comprehensions, duck typing, a strong standard library.
2) Which is widely used and available in industry and research centers.
It is fairly widely used, and growing. Especially for research and prototyping. Very large scale systems will still mostly be in Java or C++, but those are harder languages to learn.
3) Which is relatively easy and quick to code, and powerful in its capabilities.
This is python in a nutshell.
And:
1) Give the advantages and disadvantages (over Matlab) for the language you suggest.
Matlab has some really cool features, but as an industry programming language, I wouldn't call it top of the line. However, the syntax is probably closest to python. Python can give you true object oriented development, and has a much richer standard library to go beyond matlabs walls.
2) The best way to learn it.
Start with a tutorial and move on to coding small projects. Move up from there. Learn by doing.
I've recently taken to learning Scala (just 'cuz) by doing problems at http://projecteuler.net, and it's been fun! (for an extremely nerdy definition of fun)
3) The proper sequence of topics to learn knowing that I am familiar with the programming concepts.
Read code, read questions on StackOverflow. Read blogs and books about programming concepts - how to structure code, how to refactor, how to design, etc. Then, just solve problems you encounter. If you can, find a mentor or ask a lot of questions on SO.
4) A source, which is easy, good and interesting, to learn from.
StackOverflow. A mentor, if you have one accessible. Open source is good too.
I often hear from people that Matlab is not a language
You're hearing nonsense. Matlab is a perfectly good language, if a bit strange to people who've been conditioned by FORTRAN, C, or C++. Also, it is heavily used in engineering and in many of the natural sciences. Your question as stated gives no good reason why you should go on to something else except the nebulous objections of people who sound like they have axes to grind.
I strongly recommend that you continue using Matlab until it stops being effective for you. At that point you will have a particular problem (scale, parallelism, performance, whatever) which one hopes will also be representative of problems you will encounter in the future. You'll be much better off learning a new language at that point than you will guessing what language might help you with unknown problems you might encounter in the future.
P.S. There have been a number of papers on compiling Matlab to executable binaries containing native machine code. I don't know if this work has made it out into the wild yet.
Python.
The syntax is relatively similar to Matlab (not exactly, but fairly easy to get used to).
You also have the matplotlib
python library, which gives some of Matlab's functionality while trying to provide the same API (i.e. function names etc.). This could be a starting point for you to start using Python, while staying in a familiar ground.
To learn Python, I'd recommend the Official Python Tutorial - which IMO is quite good for beginners.
Matlab is extremely widely used in industry for scientific and engineering computing. It has its faults, certainly, but it provides a good platform for rapid development of algorithms. I work in the oil industry with a team of research geophysicists; they all use Matlab all the time, developing computational electromagnetic codes. Defence, the car industry, increasingly the biosciences, and many others are heavy users of Matlab. Check out the job ads.
So if your sole concern is getting a job, I suggest that your next programming language should be Matlab -- it hits at least 2 of your 3 desiderata. I suspect that your understanding of Matlab's deficiencies is, in part, based on your lack of in depth knowledge of the product.
Having said all that, what do you want to learn another programming language for ? If you want to continue to develop sci/tech/eng programs then Fortran is a good choice, as too are C and C++. I'll leave others to support C and C++, since we use Fortran for the heavy lifting here.
The main advantage that Fortran has over Matlab is speed of execution; where I work that matters a lot, some of our computations take days on 100s of processors. Which indicates another advantage that Fortran has, which is that Fortran, through OpenMP and MPI (and similar) is one of the most easily parallelised languages around.
To learn modern Fortran, I suggest the book 'Fortran 90' by Ellis et al, and the book 'Fortran 95/2003 Explained' by Metcalf. Then, in your situation, I'd start translating some of my Matlab programs into Fortran. This will give you a good appreciation of the relative strengths and weaknesses of the two languages. Your Matlab programs also provide a good specification for what your Fortran programs are to do, so you have the tests already written.
Well Matlab is widely used in industry to do simulations and especially in R&D departments. Of course in a software company, you're not going to sell Matlab scripts if the client has nothing to do with Matlab.
I would go for Java:
1) Platform independant, easy to use. As you said, Matlab is a scripting language living in a software, so the advantages of any language over Matlab should be obvious. (If you're thinking about applications outside of the engineering / simulation world).
2) Use the language and program!
3) Take a little project and start working on it. The best way to learn is by doing it.
4) To be honest, buy a good book and use Google. In the end, that's what I would do even though one could go and talk pages and pages about what is in theory the best way of doing it.
Kind Regards,
I often hear from people that Matlab is not a language
If that's the case, then the people around you are often wrong. Matlab is a real programming language. It's never going to replace C++ or Java because they're used for different things. But Matlab works quite well for the kind of work it's designed to do.
I mostly used Matlab for calculations when I was getting my degree in physics. Now I do web-based development mostly using C# and ASP.Net. But perhaps my transition is atypical.
My recommendation is this: Find an industry you want to work for, look at the job listings, and see what languages they ask for. Then learn one of those. In my experience it's not too hard to learn enough to land an entry-level position, and then you'll learn a lot more during the course of your employment.
Another vote for python here, from a heavy user of both Matlab and Python. Something that no one mentioned yet is that both languages play very well together, and have compatible strengths.
I'll often use python scripts to pre-process data that will be fed to Matlab (python parsing functions are much more pleasant to work with than Matlab's, in my opinion). Or I'll use python to simulate a process (since our production system is in C++ and python), and use the graphing and analysis power of Matlab to handle the visual display or the statistical analysis.
Also, as Stephen mentioned, in the industry, Matlab is often used in the prototype stage. The concepts are then translated to another languages; in my company, that other language is python, and translation from one to the other is generally very straightforward.
Python is also a good all purpose scripting language for command line automation, file management, etc... (think bash replacement), so it's a good language to have in one's toolbox.
Ill just throw JavaScript into the mix here purely because it's the most widely installed language in the world. Its gaining momentum in non browser installations. I predict there will be a real shortage of quality JS programmers in the next few years.
I would personally recommend Java.
Adv:
1) Easier to learn compared with C++
2) Powerful and up-to-date, with a lot of libraries to use and wide range of functionalities
3) It is mature and stable, suitable for research
4) very well documented
disadv:
1) not the fastest kids around
The best way to learn it:
: read a book, and program with it, maybe rewrite one of your existing project
The proper sequence of topics to learn knowing that I am familiar with the programming concepts:
: again get a good book. it should be all there.
A source, which is easy, good and interesting, to learn from: : again get a good book. and Google and Java's official website
You could start another question for good Java book for beginners. I am sure you will get a lot of good answers
A source, which is easy, good and interesting, to learn from.
If you choose Python, Dive into Python is a good source. Many of the examples have a practical flavor, and you can get a free electronic copy of the book.
The language that you should learn depends on what your research entails. If you are doing lots of numerical work, then MATLAB, R and Python are the three obvious languages to work in.
Python has been mentioned a lot in the answers, so I'll just quickly touch upon R. R is free, open source software that is the de facto language for statistics and data analysis. It also has (imho) the best data-vis tools around.
You other option is to learn web-programming, since it is very useful to be able to share your research with others via a web app. Try some basic HTML coding, then look into a JavaScript framework like jQuery.
If you aren't a software dev, then forget compiled languages like Fortran and the C variants (C++/C#/Java). You won't need them.
In terms of learning to program, it's almost always worthwhile taking a look at Software Carpentry.
精彩评论