Serving the Quantitative Finance Community

 
User avatar
J
Posts: 1
Joined: November 1st, 2001, 12:53 am

Language for Beginners

July 23rd, 2002, 1:55 pm

I've roughly gone through "Teaching yourself C++ in 21 days". I dont prefer to its ways of teaching. It is too sloppy not concrete!!!
Last edited by J on July 22nd, 2002, 10:00 pm, edited 1 time in total.
 
User avatar
alvincho
Posts: 0
Joined: February 20th, 2002, 5:13 am

Language for Beginners

July 24th, 2002, 2:31 pm

After so many professionals recommended C/C++, my opinion is different. C is good for experienced programmers, and C++ is good only for experienced++ programmers. For someone just start to learn programming, Pascal might be a good choice. But to learn how to program is not a easy job, to be a good programmer is much harder. It usually take years of experience in programming and thousands of sample code to read. To choose the programming language, it depends on why you want to learn programming:If you will be a quant or programming will play an important part of your job, you can start to learn C or Pascal. I recommend Pascal is a good language for beginners because Pascal have almost all major characteristics of C and much more readable than C. And if you have learned Pascal, you can easily understand Basic, and part of C. Learn basic programming skills then learn what OOP is. Get Turbo Pascal if you can, Delphi is second choice, both from Borland. Start from C is not bad but it might take a longer time to get used to it.If you are financial specialist and only need some programming skills, Basic is good enough and is all you need. To learn Visual Basic has many advantages: you can easily use it, and you can use it on Excel, Word, Access, and ASP for web pages. You should learn Basic after you are familiar with all functions in Excel.Basic has some disadvantages, but I love it. I use C only when performance is matter. I usually test my codes in ASP, then paste them to Excel or VB applications. Basic has great portability in financial world where Excel play a major role. Maybe there are someone don't use Excel, but I think it is the most important application we need. If yes, then Basic should be an option.By the way, the most important part is to design the software, not the programming language. All these language can do almost the same things. The language so-called BASIC is acronyms of Beginner's All-purpose Symbolic Instruction Code, it was designed for beginners. Strange, it's the most popular language now.
 
User avatar
mholm

Language for Beginners

July 24th, 2002, 3:20 pm

Learning Pascal is a bad idea because you would almost never use it in the real world anymore. Don't waste your time learning VB6 either because its dying. I would start by learning one of the .NET languages like C++.NET, C#.NET, VB.NET or even Java would be helpful. Look into taking a beginners course at a local college. Once you understand the basics you can buy advanced books on that language or teach yourself a different language.
 
User avatar
OTM
Posts: 0
Joined: April 19th, 2002, 1:35 pm

Language for Beginners

July 24th, 2002, 3:37 pm

QuoteOriginally posted by: alvinchoAfter so many professionals recommended C/C++, my opinion is different. C is good for experienced programmers, and C++ is good only for experienced++ programmers. For someone just start to learn programming, Pascal might be a good choice. But to learn how to program is not a easy job, to be a good programmer is much harder. It usually take years of experience in programming and thousands of sample code to read. To choose the programming language, it depends on why you want to learn programming:alvincho, C++ is the world we live in. I too like other langauges and firmly believe horses for courses, but the majority of the quant code I see is in C++ or sometimes C. Although I write boot-strap/wrapper routines in other langauges (usually VBA !) my understanding of the c++ code means I get more out of my interaction with it than it I just blindly compiled it.QuoteOriginally posted by: alvinchoIf you are financial specialist and only need some programming skills, Basic is good enough and is all you need. To learn Visual Basic has many advantages: you can easily use it, and you can use it on Excel, Word, Access, and ASP for web pages. You should learn Basic after you are familiar with all functions in Excel.Visual Basic development (by MS) has been terminated at version 6. Unless you have legacy code to deal with don't go there - it's like learning to program COBOL in the hope that you'll be first in line for the next Y2k1!!!QuoteOriginally posted by: alvinchoBasic has some disadvantages, but I love it. I use C only when performance is matter. I usually test my codes in ASP, then paste them to Excel or VB applications. Basic has great portability in financial world where Excel play a major role. Maybe there are someone don't use Excel, but I think it is the most important application we need. If yes, then Basic should be an option.Very few of us don't use a spreadsheet and almost always Excel - VBA is a must for most all of us. Vicious rumour has it that even Office will not be imune from the dot-net-isation but thankfully it'll take a number of years for the finance houses to catch up!!!
 
User avatar
J
Posts: 1
Joined: November 1st, 2001, 12:53 am

Language for Beginners

July 24th, 2002, 5:36 pm

I dont see it is really necessary to know C in order to learn C++. Couples of my friends learned C++ as their first programming languag when they were in junior high school.
Last edited by J on July 23rd, 2002, 10:00 pm, edited 1 time in total.
 
User avatar
Onuk

Language for Beginners

July 24th, 2002, 6:00 pm

Alvincho >> I recommend Pascal is a good language for beginners because Pascal have almost all major characteristics of C and much more readable than CAlvincho, how can you say these things? OK, first I have to declare an interest, I like C++, and a deficiency, I didn't use Pascal since I was at school, further I never used Delphi. That said I can't agree at all. First, as OTM says, BASIC and Pascal are dated in the sense that they are less supported every day. Second, although I don't say new==good, they are dated in that newer and better programming structures/methodologies have arisen. I don't think that C++ globally speaking is the best language to learn, but at least it is in the right direction. OO is something to improve program structure and development, because it maps closer to intuition and good organization; I don't see why these features should be reserved for 'experts', if anything they are most powerful for beginners. That is why SmallTalk is so easily learnt; this might be a good language to start with, but sadly it is under-represented in business. Nevertheless C++ could be used without pointers, just with references and simple classes (say all virtual functions) and one would have a similarly easy system. I would also dispute the 'easy to read' claim, but I know this is a question of personal taste.Alvincho >> If you are financial specialist and only need some programming skills, Basic is good enough and is all you need.Alas I agree that C++ is hard to start with if you only want to make simple programs; not I would say because of the language but because it has been reserved for 'experts', hence the tools which surround it are rather intimidating and suited only to larger projects, as the initial effort is rather large compared to an interpreted language. It is hard to suggest Java from this perspective as the performance is rather inferior, maybe C# (I don't know enough yet), maybe Ruby/Python but again performance is a problem for numerics (I guess).
 
User avatar
alvincho
Posts: 0
Joined: February 20th, 2002, 5:13 am

Language for Beginners

July 24th, 2002, 7:20 pm

QuoteOriginally posted by: mholmLearning Pascal is a bad idea because you would almost never use it in the real world anymore. Don't waste your time learning VB6 either because its dying. I would start by learning one of the .NET languages like C++.NET, C#.NET, VB.NET or even Java would be helpful. Look into taking a beginners course at a local college. Once you understand the basics you can buy advanced books on that language or teach yourself a different language.VB6 is dying but BASIC will survive in some sort of forms, such as VB.NET. Microsoft will never give up BASIC programmers since they support the diversity of applications under Wintel architecture. The scripting language will still be VB in the form of VBA and VBScript. I don't suggest anyone to use Pascal to develop any kind of software, that's why I said get a copy of Turbo Pascal instead of Delphi. I don't think Delphi is a good development tool. But Pascal is a good language.
 
User avatar
mholm

Language for Beginners

July 24th, 2002, 7:40 pm

VBA and VB Script are also dying because VB.NET and C# will take its place. BASIC will only exist in VB.NET. The majority of VB6 programmers will convert to C#. I believe M$ is trying to get away from VB thats why they introduced C#. After all " VB.NET + ; = C# "
Last edited by mholm on July 23rd, 2002, 10:00 pm, edited 1 time in total.
 
User avatar
alvincho
Posts: 0
Joined: February 20th, 2002, 5:13 am

Language for Beginners

July 24th, 2002, 7:42 pm

QuoteOriginally posted by: OTMalvincho, C++ is the world we live in. I too like other langauges and firmly believe horses for courses, but the majority of the quant code I see is in C++ or sometimes C. Although I write boot-strap/wrapper routines in other langauges (usually VBA !) my understanding of the c++ code means I get more out of my interaction with it than it I just blindly compiled it.It is always good to know as many languages as you can. C++ is a beauty in programming language and I hope everyone know it well, unfortunately it is impossible. The concept of object-oriented programming is so abstracted and only small part of programmers can develop in OO manner. Honestly once you learned Basic, you might not understand C codes, but inversely yes. That's why Basic is good for beginners.QuoteOriginally posted by: OTMVery few of us don't use a spreadsheet and almost always Excel - VBA is a must for most all of us. Vicious rumour has it that even Office will not be imune from the dot-net-isation but thankfully it'll take a number of years for the finance houses to catch up!!!I think the future Office will absolutely use VB as its macro language. Today's Office is lack of motivation to upgrade to new version. If Microsoft drop the support of VBA in next Office release, how many people will upgrade to it?
 
User avatar
alvincho
Posts: 0
Joined: February 20th, 2002, 5:13 am

Language for Beginners

July 24th, 2002, 7:48 pm

QuoteOriginally posted by: JI dont see it is really necessary to know C in order to learn C++. Couples of my friends learned C++ as their first programming languag when they were in junior high school.Anyone can start from C++ without any difficulty, but it will take longer time to get used to it. Even you use C++, you always need the basic skills of structured language such as branchs, iterations, and variable types, etc. The only difference is if you start from C++, you may purely design your software in OO way, not the traditional way. But I still think it's very difficult.
 
User avatar
alvincho
Posts: 0
Joined: February 20th, 2002, 5:13 am

Language for Beginners

July 24th, 2002, 8:33 pm

QuoteOriginally posted by: OnukAlvincho >> <i>I recommend Pascal is a good language for beginners because Pascal have almost all major characteristics of C and much more readable than C</i>Alvincho, how can you say these things? OK, first I have to declare an interest, I like C++, and a deficiency, I didn't use Pascal since I was at school, further I never used Delphi. That said I can't agree at all. First, as OTM says, BASIC and Pascal are dated in the sense that they are less supported every day. Second, although I don't say new==good, they are dated in that newer and better programming structures/methodologies have arisen. I don't think that C++ globally speaking is the best language to learn, but at least it is in the right direction. OO is something to improve program structure and development, because it maps closer to intuition and good organization; I don't see why these features should be reserved for 'experts', if anything they are most powerful for beginners. That is why SmallTalk is so easily learnt; this might be a good language to start with, but sadly it is under-represented in business. Nevertheless C++ could be used without pointers, just with references and simple classes (say all virtual functions) and one would have a similarly easy system. I would also dispute the 'easy to read' claim, but I know this is a question of personal taste.Pascal is not a must in our programming life. But if the programming ability is 'path-dependent' (sorry I borrow the word), I think Pascal is a good start point. It's true Basic and Pascal are both old-fashioned languages and getting less supported, but that doesn't mean they are useless. Some programming languages were hot decades ago but still survive in some fields. I agree SmallTalk is a good language to start with, but only when you want to be a full-time programmer and develop your software in OO way. I don't agree everyone should learn OOP, since OOP is good for larger systems. Start with Pascal/Basic/C or SmallTalk/C++/Java might be a choice, traditional way or OO way. I think both are acceptable.Easy to read is not just a question of personal taste. You don't have to learn any programming language before you can read a COBOL program (but you have to learn English). As a experienced C++ programmer, you must can read Basic/Pascal codes although you are not familiar how to write. But no matter how experienced a Basic programmer is, he/she will hardly know C/C++ codes. On the other hand, Pascal codes are readable by other Pascal programmers, but C/C++ codes are difficult to understand by other C/C++ programmers if no comment or documentation available. No Forth programmer can read Forth codes written by others (I guess). QuoteAlvincho >> <i>If you are financial specialist and only need some programming skills, Basic is good enough and is all you need.</i>Alas I agree that C++ is hard to start with if you only want to make simple programs; not I would say because of the language but because it has been reserved for 'experts', hence the tools which surround it are rather intimidating and suited only to larger projects, as the initial effort is rather large compared to an interpreted language. It is hard to suggest Java from this perspective as the performance is rather inferior, maybe C# (I don't know enough yet), maybe Ruby/Python but again performance is a problem for numerics (I guess).If everyone can learn only one programming language in his/her life, C++ will be my choice. But in the real world, we don't have to limit ourselves. Performance is not the only issue when you choose your languages or systems. If yes, Assembly will be the only language available. Using C/C++ will take a longer time to develop and debug than Basic/Pascal if the software is small. And with no doubt that all beginner's programs are small.
 
User avatar
alvincho
Posts: 0
Joined: February 20th, 2002, 5:13 am

Language for Beginners

July 24th, 2002, 9:02 pm

QuoteOriginally posted by: mholmVBA and VB Script are also dying because VB.NET and C# will take its place. BASIC will only exist in VB.NET. The majority of VB6 programmers will convert to C#. I believe M$ is trying to get away from VB thats why they introduced C#. After all " VB.NET + ; = C# "I can't imagine how millions of VB6 programmers will convert to C#.... Basic programmers are much more in numbers than C programmers. It's as difficult as to teach all Frenchmen using English....VB, VBA, VBScript, VB.NET are all just tools. They are some ways to use the language, BASIC. I don't care what is the name of next release, I do care whether my codes and experience are portable and reuseable. If C# can compile Basic codes + ";", why not? But it's no need to combine two differnent languages.Java is much more similar to C++ than Basic. Why Microsoft deliver J# and C#?
 
User avatar
J
Posts: 1
Joined: November 1st, 2001, 12:53 am

Language for Beginners

July 24th, 2002, 10:19 pm

Anyone can start from C++ without any difficulty, but it will take longer time to get used to it. I think you need to compare two cases. A: BASIC->C->C++B: C++For a freshman without any mental burden (having to pick up BASIC & C),he just needs to take ideas of C++ for granted straightly. Why can he not do that? For those who feel OO is hard, one of reasons is that they cannot forget shapes of procedures type languages.
Last edited by J on July 24th, 2002, 10:00 pm, edited 1 time in total.
 
User avatar
alvincho
Posts: 0
Joined: February 20th, 2002, 5:13 am

Language for Beginners

July 25th, 2002, 7:18 am

QuoteOriginally posted by: JAnyone can start from C++ without any difficulty, but it will take longer time to get used to it. I think you need to compare two cases. A: BASIC->C->C++B: C++For a freshman without any mental burden (having to pick up BASIC & C),he just needs to take ideas of C++ for granted straightly. Why can he not do that?Because from the day he start learning, he will encount a lot of bug burden. I think if a student can pick up all major components of C in 2 months, then he can easily pick up BASIC in 2 weeks. For a beginner, in my opinion, the most important thing to learn is how to use some instructions to do something for himself. After he can manage all the programming skills, it's not difficult to learn another language, although OO design is another story. I know many people can't program very well because they are afraid of the programming language, they think the computer is too difficult to control.OO design is an art of programming. For a beginner, it take long time to manage. And it doesn't make sense to learn OO before knowing assignment, comparison, loop and subroutines. If a C course have 48 hours and a C++ also have 48 hours, the first 24 hours might be the same. I don't know how a instructor might design the course, but I will do that. If the first class is let the students know what is inheritance, what is polymophism, I will fall asleep in the class.QuoteFor those who feel OO is hard, one of reasons is that they cannot forget shapes of procedures type languages.That's true. I remembered Stroustrup ever mentioned in his book (I forgot which one) that why the language is called C++ instead of D (C is named after a programming language named B). Because C++ make a big step but not a new one, all the basic element remains the same as C. The most impressive one is the operator ++ because n++ need only 1 to 3 ticks to finish but n=n+1 take at least another 3 ticks of CPU time. So he named the language as C++. He also describe C++ is a better C. Learning C and Learning C++ is the same thing in the begining. But if a student always use C++ and OO concept in his software, he might have stronger OO sense.
 
User avatar
OTM
Posts: 0
Joined: April 19th, 2002, 1:35 pm

Language for Beginners

July 25th, 2002, 7:40 am

Alvin,I disagree strongly with your (9:18am) reply to J.One either learns to program "properly" at the beginning or spends many many years of constant effort trying to reprogram themselves to do it "correctly". A similar example is driving - 'unlearning' bad habits allowed by a slack instructor is really quite difficult.Kind regards.PS: I wish my French was not so poor that Parisians feel compelled to reply in English on home turf.
Last edited by OTM on July 24th, 2002, 10:00 pm, edited 1 time in total.