I'll probably be flogged alive on this forum, but I honestly can't see the connection between C++ and economy. Certainly not in a way that I couldn't see with Java, or C#, or Visual Basic or,... you get the idea.
Frankly, were I in your shoes, and not wanting to be a programmer, but still wanting to get a good enough grip on programming knowledge to give me some added tools as an economist, I'd choose something that would offer me a more practical approach. Java or C# being today good candidates and already packed with all sorts of libraries that will simply just reduce the time between deciding what program you need and finishing your program. These are also more permissive tools. C++ is very demanding on the programmer, in that it demands a very good grasp of the language in order to produce a finished product of good quality.
I'd stay away from C++ if, like you say, you don't want to become a programmer.
He'd learn everything he needs to know by reading what you quoted, which is why I posted it.
Originally Posted by MK27
Haha I bet, SAS is way different than most anything else out there, in my opinion. I learned things like C, LISP and Python and then just recently learned SAS. It's a different way of thinking for sure.
Originally Posted by pantera
That's cool that you do use SAS, again, I love SAS.
I don't really agree with what you've been told though. MATLAB and SAS are 4th generation programming languages, that is, developed for specific purposes and much of the actual work abstracted by high level functions. However, MATLAB is "low-level" enough to have that complete control. If you learn MATLAB, you can minimize both human time and running time (if you really care about how long it takes to run a program, I don't know how big your data sets are). If you just google "MATLAB performance", MathWorks has a few articles telling you how to write MATLAB programs for speed, doing things like preallocating arrays as I mentioned earlier, and using parallel for loops when possible.
I'd say, if you want to learn how to make your own programs, then go ahead and learn C++, otherwise I'd stick with MATLAB.
- is low level enough to let you do most anything manually and define your own functions, yet has so many built-in functions that you also have the ability to take the easy way out if you want to
- has a free clone, GNU Octave
Maximizing MATLAB Performance (Programming and Data Types) - straight from MathWorks
Originally Posted by MK27
% test2.m, same as test1.m but with array preallocation
y=zeros(1,100000); % equivalent of calloc()
% test3.m, vectorized, just for reference
Elapsed time is 6.54621 seconds.
Elapsed time is 6.5474 seconds.
Elapsed time is 6.57896 seconds.
Elapsed time is 6.15879 seconds.
Elapsed time is 6.16064 seconds.
Elapsed time is 6.12372 seconds.
Elapsed time is 0.0375661 seconds.
Elapsed time is 0.0275859 seconds.
Elapsed time is 0.039516 seconds.
Originally Posted by Epy
I just say this because I will often write something quickly in perl, and then later if I like it, have time, etc, go back and re-write it in C (or more recently C++, which is closer match with the OO, but less optimizable IMO). There is a big big difference in the time required to do the work, and unless you are intent on a "production" quality product or dealing with incredibly massive amounts of data, it's probably not worth it (beyond, of course, personal satisfaction as applicable).
This is a pretty interesting site:
It's primary criteria is execution speed, so you get C/C++ at the top, but it includes criteria for memory usage (which drastically divides the C from the C++) and code base (where C/C++ is closer to the bottom).