Best Programming first language

  • Thread starter Thread starter Dtm
  • Start date Start date

Dtm

Joined
9/9/12
Messages
19
Points
11
What is the best first language to learn for programming to get into quant trading? I have some experience with javascript but that is it. Where is a good place to start?
 
C/C++.

It is much more difficult for a new programmer to move from Python (or even Java) to C/C++ than vice versa. Becoming knowledgeable and proficient in C/C++ will give you the tools you need to pick up other languages such as Python very easily and quickly. This is besides for the fact that Python itself is usually implemented in C (or, more rarely, Java) and it helps to know how C-type languages work beforehand.
 
C++.

It is much more difficult for a new programmer to move from Python (or even Java) to C/C++ than vice versa. Becoming knowledgeable and proficient in C++ will give you the tools you need to pick up other languages such as Python very easily and quickly. This is besides for the fact that Python itself is usually implemented in C (or, more rarely, Java) and it helps to know how C-type languages work beforehand.

Do you have any recommendations on C++ books if I am going to teach myself?
 
Do you have any recommendations on C++ books if I am going to teach myself?
It's really a matter of opinion, but I like C++ How To Program By Deitel and also like the Sams publishing ('learn ... in 24 hours) books for quick learning. Obviously, tons of practice and attempting to code real, relevant projects is much more valuable than any book.
 
Python. The reason is you can do so many useful things which will inspire you, where as it's a long time before you can create a genuinely useful C++ program. Definitely do not start with C++. FORTRAN is a great first language but nobody uses it in finance.

I'd start with Python, then move onto C++.
 
C++ is among the worst first languages to learn. In terms of bad choices, it's right up there with VisualBasic. If you want to code close to metal, learn C first. Then carefully select a subset of C++ that works for you.

...

Google uses a subset of C++. They don't use things like automatic ref counted pointers or multiple inheritance.

You can basically think of Google's C++ subset as C plus a bit of sugar:
  • The ability to add methods to structs
  • Basic single inheritance.
  • Collection and string classes
  • Scope based resource management.

In general, this makes the code cleaner without adding much complexity.

...

http://www.quora.com/Why-did-Google-choose-C-over-C-for-most-of-its-code
http://google-styleguide.googlecode.com/svn/trunk/cppguide.xml

If you want to be productive and need a language that is versatile enough to span prototyping, administration, modeling, and data munging, learn Python first. You'll have a reasonable object model along with functional constructs that will help you understand a wider variety of languages in the future (eg ML, Haskell, Clojure).
 
C++ is among the worst first languages to learn. In terms of bad choices, it's right up there with VisualBasic. If you want to code close to metal, learn C first. Then carefully select a subset of C++ that works for you.
This reminds me of a discussion we have recently over whether it's still worth it to learn C.
I'm also glad that Daniel Duffy has the foresight to dedicate the first two levels in our online C++ certificate to teach C. I know a lot of students questioned that mightily but I'm sure it will serve them well in the long run.

It's pretty tempting as a beginner to take a shortcut and jump to the latest, most fashionable language at the moment, be it C#, F#, Ocaml, whatever but it's good to build a strong foundation first. And it's clear that one needs to be versatile and should know more than just one language.
 
many people know how to code. but few know how to code cleanly. the mess of code created ultimately leads to confusion among developers, resulting in bugs, memory hogs, errors and even crashes. if i were to recommend a book to become a good developer it would be Clean Code, Head First Design Patters and books on unit testing. And oh, a good developer always write unit tests before implementing the actual codes.
 
many people know how to code. but few know how to code cleanly. the mess of code created ultimately leads to confusion among developers, resulting in bugs, memory hogs, errors and even crashes. if i were to recommend a book to become a good developer it would be Clean Code, Head First Design Patters and books on unit testing. And oh, a good developer always write unit tests before implementing the actual codes.
While I am sure that is a useful book, I highly doubt it would be of any use to the OP right now, who is looking to begin to learn programming
 
While I am sure that is a useful book, I highly doubt it would be of any use to the OP right now, who is looking to begin to learn programming

hi, haven you seen the contents of these books? i too am surprised at how the authors managed to present programming concepts at such understandable and simple level using simple examples. source codes provided.

afterall, you don't learn how to swim just by reading a book.
 
i'd go with gnu c++ in a linux environment. a simple text editor like gedit should suffice for a simple hello world program.

MS visual studio is fine, but i'll go crazy with all those fancy options. i'm just a simple guy.
 
I'm gonna start with c++. Are there any recommended compilers or editors?
People are going to hate me for saying this, but use Codeblocks: http://www.sci.brooklyn.cuny.edu/~goetz/codeblocks/

It is the simplest, cleanest, and requires nothing but a simple installation. From all of the compilers I have ever used this is the easiest. Might not be a hard-core programmers choice, but I love its simplicity.

C++ is among the worst first languages to learn. In terms of bad choices, it's right up there with VisualBasic. If you want to code close to metal, learn C first. Then carefully select a subset of C++ that works for you.

nkabir, you're a pretty hard core programmer. I think he just wants exposure to:

  • Loops
  • Functions
  • If-Statements
  • etc.
Even without going into Classes, first language doesn't really matter. From what I have mentioned C/C++/Java/etc. all pretty much use very similar syntax, or at least the same ideas. So why is C++ a bad start? He didn't say he want to stick with it, just get into programming.


To everyone else:
I am decent at C++ and a complete beginner at Python but from what I have seen so far it is pretty awesome. But as a first language? Going from C++ to VBA took me less than a week to write some decent code because I was so familiar with all the concepts. Python is so different from all of the other languages out there...
 
Go with C++, sooner you introduce yourself with languages like C++/Java better for you. Rest you can learn easily.
I don't think Python is so different. You pick up basics easily. May be for further expertise it requires a bit of effort.
Compare it with learning anyone of those functional programming.
 
Python is so different from all of the other languages out there...

Why do you say that? The differences I can see are that Python is a scripting language (versus compiled for C++), that it doesn't need a main() method, and that it doesn't have call-by-value (as everything is an object). Otherwise both Python and Ruby offer a painless introduction to both imperative and object-oriented styles. If you want to get quickly into implementing data structures and algorithms, I can think of at least four books that teach it in Python. There is a reason why schools like MIT and CalTech teach Python as a first language.
 
Why do you say that? The differences I can see are that Python is a scripting language (versus compiled for C++), that it doesn't need a main() method, and that it doesn't have call-by-value (as everything is an object). Otherwise both Python and Ruby offer a painless introduction to both imperative and object-oriented styles. If you want to get quickly into implementing data structures and algorithms, I can think of at least four books that teach it in Python. There is a reason why schools like MIT and CalTech teach Python as a first language.


And Berkeley and Stanford. Python is coherent enough to be taught to children yet scalable enough to run Google's infrastructure and flexible enough for AQR and Citadel.

...

It all got started, I believe, because the very earliest Googlers (Sergey, Larry, Craig, ...) made a good engineering decision: "Python where we can, C++ where we must" -- they used (a subset of) C++ for the parts of the software stack where very low latency and/or tight control of memory were crucial, and Python, allowing more rapid delivery and maintenance of programs, for other parts.

...

If you actually want to get work done, learn Python first. If you want to talk about how awesomely fast your quirky C++ code will be, by all means, learn it. But you're going to be surpassed in performance by people that use FPGAs and microwaves and surpassed in productivity by people that know shell and scripting languages.

...

The task:

Read a file of text, determine the n most frequently used words, and print out a sorted list of those words along with their frequencies.

Knuth came up with a typically clever, lengthy, low-level implementation [...]. McIlroy then somewhat perversely wrote a six-line shell script that did the job, basically changing the subject away from literate programming and toward a critique of Knuth’s doing something low-level and complicated when unnecessary.

...

The speed game has since moved on to electrical engineering and physics. And all those people may be shut down by congress.

To "not" quote Charles Darwin ;) :
"In the struggle for survival, the fittest win out at the expense of their rivals because they succeed in adapting themselves best to their environment."
 
Why do you say that? The differences I can see are that Python is a scripting language (versus compiled for C++), that it doesn't need a main() method, and that it doesn't have call-by-value (as everything is an object). Otherwise both Python and Ruby offer a painless introduction to both imperative and object-oriented styles. If you want to get quickly into implementing data structures and algorithms, I can think of at least four books that teach it in Python. There is a reason why schools like MIT and CalTech teach Python as a first language.

  • Python discourages loops in general and loops are core to MOST languages.
  • Python does many things very differently, like being contained in functions/classes is dependent on word SPACING, not closers or "End Loop".
  • If you search for even simple code in Python online you will see that the hard-core Python programmers use some funky way to program them and not at all traditional methods
Once again, I think it is cool and most likely will eventually adopt it as my primary language but since it so different from the other languages I would advise against it.

Again, nkabir: I don't dispute that it is better. And if the OP was asking "what is the ONLY language I should learn?" I would agree with you. But if he intends on learning other languages C++ is similar to most other languages.
 
  • Python discourages loops in general and loops are core to MOST languages.
  • Python does many things very differently, like being contained in functions/classes is dependent on word SPACING, not closers or "End Loop".
  • If you search for even simple code in Python online you will see that the hard-core Python programmers use some funky way to program them and not at all traditional methods
Once again, I think it is cool and most likely will eventually adopt it as my primary language but since it so different from the other languages I would advise against it.


Again, nkabir: I don't dispute that it is better. And if the OP was asking "what is the ONLY language I should learn?" I would agree with you. But if he intends on learning other languages C++ is similar to most other languages.

C++ is so fundamentally broken that Google invented another language to replace it.
 
Back
Top Bottom