Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Dec 8th, 2005, 9:50 PM   #11
DaWei
Resident Grouch
 
DaWei's Avatar
 
Join Date: Jun 2005
Posts: 6,453
Rep Power: 10 DaWei is on a distinguished road
Quote:
Some people go so far as to say it is impossible to learn more than one language when you are starting out.
Actually, this isn't the case. I learned Fortran, Basic (not VB, the original Dartmouth variety), and two assembly languages simultaneously. One has to do one's work, and it didn't seem inordinately difficult.
__________________
Abstraction doesn't make it impossible to write bad code; it makes it possible to write superior code.
Contributor's Corner: Grumpy on C++ Exceptions DaWei on Pointers
DaWei is offline   Reply With Quote
Old Dec 8th, 2005, 10:34 PM   #12
grumpy
Programming Guru
 
grumpy's Avatar
 
Join Date: Jun 2005
Location: Adelaide, South Australia
Posts: 1,203
Rep Power: 5 grumpy is on a distinguished road
I agree with Dawei. It is possible to learn more than one language at once. It is a fair call that it is more difficult to do that, but it is certainly not impossible.
grumpy is offline   Reply With Quote
Old Dec 9th, 2005, 11:03 AM   #13
Arevos
Programming Guru
 
Arevos's Avatar
 
Join Date: Aug 2005
Location: England
Posts: 1,499
Rep Power: 5 Arevos is on a distinguished road
Quote:
Originally Posted by grumpy
You are focusing only on syntax. Number of words known isn't the only measure of fluency in a natural language. There is also the semantics and grammar. It just happens that the process of learning a natural language happens to result in a student having a working knowledge of semantics and grammar at about the point where s/he has learnt 6000 words or so.
Even so, it only takes a few weeks at most for an experienced programmer to learn all the syntax of a new language. Now, I might be a little slow, but for a natural language I'd take years to get such a complete grasp of grammatical rules.

Quote:
Originally Posted by grumpy
The reason that similarities between syntaxes of programming languages appear to run deep is that those syntaxes are actually based on english, and hence readable to the native english speaker.
I suspect that today it's more due to programming tradition.

Quote:
Originally Posted by grumpy
For example, a construct "if (x = 1)" is actually readable (in a "big hands, small maps" kind of way) to someone who has a little knowledge of english. That is a property of the syntax of the language. But the actual meaning of that construct is where the differences between languages come in. For example, "if (x = 1)" has a markedly different effect in C than it does in Basic.
You're looking at it from a superficial perspective. Whilst the names and symbols may change, the structures underneath are the same. If and While are constructs found in most computer languages; even if they were named Foo and Bar, it would not take long for a programmer to get used to typing Foo in place of If, and Bar in place of While.

Likewise, even if you associate assignment with '=' and equality with '==', it's not going to take long before you learn that in BASIC, '=' has both meaning, depending on whether it is inside or outside a boolean condition..
Arevos is offline   Reply With Quote
Old Dec 9th, 2005, 12:41 PM   #14
Kilo
Expert Programmer
 
Kilo's Avatar
 
Join Date: Nov 2005
Location: In Pink Clam?
Posts: 542
Rep Power: 0 Kilo is an unknown quantity at this point
Send a message via AIM to Kilo
Quote:
Originally Posted by darkone916
I am not experienced but i think C++ OpenGL API is good.
that is not really 'another' language though? Just different API within one language (and i disagree i wouldn't refer OpenGL to anyone, DirectX all the way buddy ro)
__________________
"When in Rome, Do as the Romans Do"
"Beauty is in the eye of the BEER holder"
"Save your breath your going to need it for your blow up doll later"

SearchLores.org
Kilo is offline   Reply With Quote
Old Dec 9th, 2005, 1:10 PM   #15
Polyphemus_
Expert Programmer
 
Polyphemus_'s Avatar
 
Join Date: Aug 2005
Location: Rotterdam, the Netherlands
Posts: 942
Rep Power: 4 Polyphemus_ is on a distinguished road
Quote:
Originally Posted by Kilo
that is not really 'another' language though? Just different API within one language (and i disagree i wouldn't refer OpenGL to anyone, DirectX all the way buddy ro)
I have worked with both OpenGL and DirectX, and the API of Direct3D sucks bad, and is certainly not for starters.
Polyphemus_ is offline   Reply With Quote
Old Dec 9th, 2005, 2:01 PM   #16
UnKnown X
Hobbyist Programmer
 
UnKnown X's Avatar
 
Join Date: Dec 2005
Location: Sandvika, Norway
Posts: 114
Rep Power: 0 UnKnown X is an unknown quantity at this point
Send a message via MSN to UnKnown X
So, should I learn C++ itself first, then OpenGL and then DX?
UnKnown X is offline   Reply With Quote
Old Dec 9th, 2005, 2:28 PM   #17
Polyphemus_
Expert Programmer
 
Polyphemus_'s Avatar
 
Join Date: Aug 2005
Location: Rotterdam, the Netherlands
Posts: 942
Rep Power: 4 Polyphemus_ is on a distinguished road
Quote:
Originally Posted by UnKnown X
So, should I learn C++ itself first, then OpenGL and then DX?
No, just OpenGL is fine, but that's a matter of opinion. You should have a look at both APIs, and see which you like the best.
Polyphemus_ is offline   Reply With Quote
Old Dec 9th, 2005, 6:14 PM   #18
grumpy
Programming Guru
 
grumpy's Avatar
 
Join Date: Jun 2005
Location: Adelaide, South Australia
Posts: 1,203
Rep Power: 5 grumpy is on a distinguished road
Quote:
Originally Posted by Arevos
Even so, it only takes a few weeks at most for an experienced programmer to learn all the syntax of a new language. Now, I might be a little slow, but for a natural language I'd take years to get such a complete grasp of grammatical rules.
There is a difference between an experienced programmer learning the syntax of the language and being able to use it in earnest to solve complex problems.

The learning curve of most programming languages, for someone with experience, tends to be something like (there is some degree of parallelism between these phases);

1) Learn the basic syntax
2) Learn grammar and semantics
3) Learn techniques well enough to be able to do things competently in the new language, but still make mistakes in practice. This is the stage where the programmer initially works by "I do this in this way in <first language>; not to map it to <second language>".
4) Unlearn techniques from previous languages that make things difficult in the new one. This is the stage when one starts learning to solve programmin problems in the new language without thinking initially in the older language.
5) Refine skills in the new language. This is the stage when advanced idioms in the new language are learnt.
6) Achieve complete mastery of the new language.

In your discussion, you are focusing on the first step (and, partially) on the second. It is the last three steps that take the time.

Compare this with the learning curve of a natural language, which goes something like;

1) Learn the basic syntax
2) Learn grammar and semantics
3) Learn expressions and idiosyncracies in the new language, but still (in ones head) have to translate from the first language. This is the reason why a competent german who can speak english will sometimes as "how do I say <german expression> in english?"
4) Unlearn techniques from previous languages that make things difficult in the new one. This is the phase in which a native german speaker learns to speak english without an obvious german accent.
5) Refine skills in the new language. This is when one learns the more difficult parts of the new language (eg colloquialisms, things that don't easily translate into the language the person started with).
6) Achieve complete mastery of the language.

There is a one-to-one mapping between the phases for learning programming languages and learning mapping language. The main difference is that, for learning ones first "natural language" most people will eventually get to step 5. When learning one's first programming language, a lot of people will only get to step 2 or 3, and will assume they have mastery. In effect, however, they have skills comparable with what what they had in their first natural language at the age of 5 or so.

When learning a second natural language, relatively few people get past step 3: which is why native speakers of one language can easily spot people who are speaking it as a second language.

One difference is that most people, even with their first programming language, achieve the equivalent of what a 5 year old would do with the first natural language --- they only get to step 2 or 3. So, when they get to step 2 or 3 in a second language, they incorrectly assume they have mastery; in reality they have not advanced much past the baby-talk stage in either language.

Interestingly enough, a similar sequence comes up when learning music (which a lot of people don't realise is also a language of it's own). In terms of the above steps, a person learning the piano will be able to hit individual keys at step 1, play scales at step 2, basic tunes at step 3, advanced music at step 4, will be a concert pianist when they reach step 5, and will be a composer of the likes of Beethoven or Bach when they reach step 6.

Quote:
Originally Posted by Arevos
I suspect that today it's more due to programming tradition.
Possibly. Most designers of modern languages assume programmers are english speakers (although they don't necessarily assume that english is the first language of the programmer).

Quote:
Originally Posted by Arevos
You're looking at it from a superficial perspective. Whilst the names and symbols may change, the structures underneath are the same. If and While are constructs found in most computer languages; even if they were named Foo and Bar, it would not take long for a programmer to get used to typing Foo in place of If, and Bar in place of While.
As a matter of fact, I'm saying you're looking at it from a superficial perspective because you're focusing only on syntax. Quite a few modern languages support if and while. Relatively few older languages support the notion of while (they do it via a goto).

Syntactic changes are the trivial bit in going from one language to another. Expressing yourself in the new language, in a way that a native speaker in the language can't spot it is your second language, is much more difficult.

Quote:
Originally Posted by Arevos
Likewise, even if you associate assignment with '=' and equality with '==', it's not going to take long before you learn that in BASIC, '=' has both meaning, depending on whether it is inside or outside a boolean condition..
You missed my point. The C code
   if (x = 1)
        something();
always executes something(). While it is true that a C programmer can go quite easily to BASIC with such a test (the BASIC interpreter complains bitterly when it sees "if (x == 1)", the reverse is not true. I've lost count of the number of times I've seen people with a BASIC background learning C, and not understanding why the above code always executes something(). While it is true that a C compiler can often be coerced into giving warnings about such things, such compiler options are only used by people who are advanced enough in their knowledge of C to know there is a pitfall (eg at level 3 in the learning sequence I discussed above).
grumpy is offline   Reply With Quote
Old Dec 17th, 2005, 3:36 AM   #19
coldfx
Newbie
 
coldfx's Avatar
 
Join Date: Dec 2005
Posts: 11
Rep Power: 0 coldfx is an unknown quantity at this point
For me it helps A LOT! I work with C++, Qbasic, and many Web languages. Oddly enough it gives me ideas and a lot of techniques work in different context. (But converting the languages can be a little complicated)
__________________
I know the meaning of life. Well I almost did but then my dictionary fell apart so I lost it =(
coldfx is offline   Reply With Quote
Old Dec 18th, 2005, 7:46 AM   #20
Klipt
Hobbyist Programmer
 
Join Date: Dec 2005
Posts: 118
Rep Power: 0 Klipt is an unknown quantity at this point
Quote:
Originally Posted by grumpy
1) Learn the basic syntax
2) Learn grammar and semantics
3) Learn expressions and idiosyncracies in the new language, but still (in ones head) have to translate from the first language. This is the reason why a competent german who can speak english will sometimes as "how do I say <german expression> in english?"
4) Unlearn techniques from previous languages that make things difficult in the new one. This is the phase in which a native german speaker learns to speak english without an obvious german accent.
5) Refine skills in the new language. This is when one learns the more difficult parts of the new language (eg colloquialisms, things that don't easily translate into the language the person started with).
6) Achieve complete mastery of the language.
I'm sorry, but I disagree with your ordering here. A good language learner will pay attention to accent right from the start, since in learning new words you practise their pronunciation anyway. If a German speaker doesn't bother to look up the English phonetics and assumes that the words are pronounced as they would be in German, he's simply building up habits he'll have to unlearn later, if he ever manages to unlearn them.

Perhaps in the context of programming languages this would translate to: don't write C programs in Python; instead pay attention to the idioms used by experienced Python programmers?

To stretch the analogy further, could you compare a programming library to a specific set of jargon? I've heard that one can hold a 'basic conversation' using only 1000 words in a new language. If you want to talk about computers, or politics, or art though, you need a set of words (phrases, idioms) related to that subject. These words will still fit into the 'framework' (grammar) of the main language you're using.

Similarly, learning the core keywords of a programming language won't help much when it comes to building a client-server application - you need to learn a particular library which you call within the framework (syntax) of the language.

(This last point is a bit arguable when you're dealing with domain-specific languages which incorporate what would be libraries in other languages into their keyword set...)
Klipt is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 8:19 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC