Computer language learning for a layman

  • #1
332
1

Main Question or Discussion Point

Hi

I'm neither a student of math nor of computer science. So, please keep your replies as simple as possible.

I have always been under the impression that learning an unnatural language such as a computer language, e.g. C or C++, is all about memorization as is learning DOS commands. Is this really so?

By the way, Why is it "C++" and not something else such as C+++++?

Please guide me. Thanks.
 

Answers and Replies

  • #2
jtbell
Mentor
15,500
3,296
I have always been under the impression that learning an unnatural language such as a computer language, e.g. C or C++, is all about memorization as is learning DOS commands. Is this really so?
No. To make two analogies:

Learning how to write an essay or book (i.e. more than a sentence or two) in a natural language is about more than memorizing grammar rules and the meanings of words. You have to learn how to organize your ideas in a logical way, and express them clearly and hopefully elegantly. You have to become familiar with basic patterns of writing. You have to practice a lot, and be ready to re-write things so they come out better.

Learning how to play chess effectively is about more than memorizing the rules for moving pieces. You have to learn strategy, and become familiar with basic patterns of play. And you have to practice a lot.

Similarly, when you learn a programming language, you have to learn more than the rules for writing "commands." (In a programming language, we usually call them statements.) You have to learn how to organize the program's actions and data into a logical and effective whole. You have to learn the common ways of doing various standard tasks (algorithms) and of organizing data (data structures). And you have to practice a lot, and be ready to re-write programs when you realize that you could have done it a different and better way.

Introductory programming courses usually focus on the rules for writing various kinds of statements (if-statements, loops, etc.), but they also introduce you to some basic algorithms and data structures. Beyond that, a computer science student takes whole courses in both algorithms and data structures.

By the way, Why is it "C++" and not something else such as C+++++?
In C and in C++, one way to add 1 to the contents of a variable is to use the ++ operator. If the variable "n" contains 5, then "n++" makes it now contain 6. That is, "n" now contains the "next number after 5."

C++ is basically C with a lot of new features added. So, "C++" is the "next language after C". :smile:
 
  • #3
332
1
Thanks a lot, JT. It was a wonderful explanation!
 
  • #4
703
13
By the way, maybe you've heard about C#, the sucessor of C++.
Think about it first why they chose #. Then read the surprising http://stackoverflow.com/questions/1991345/origin-of-the-c-language-name" [Broken] (for me at least).

And here is an http://thedailywtf.com/Articles/Classic-WTF-5-years-Cpound-experience.aspx" [Broken] about the pronunciation.
 
Last edited by a moderator:
  • #5
jtbell
Mentor
15,500
3,296
My understanding is that Microsoft intended C# to be a "competitor" more for Java, not for C++.
 
  • #6
724
0
The 2 extra +s are supposed to signify it surpasses C++, I guess.
 
  • #7
332
1
Thank you, everyone.
 
  • #8
332
1
Hi, again

Obviously I need your guidance so please help me. A programmer work with high-level language such as C++ and the compiler does the rest. Right? Are there some other kind of programmers who work in machine language directly or some other lower level language? Does the compiler convert the language code into machine language directly? If it does there is also something called assembly language and assembler where are they used then?
These steps are taken by a 'high-level language' programmer: Algorithm -> Flowchart -> Pseudocode -> Language code -> Feed the language code into the compiler

Please let me remind you again that I'm quite an illiterate in such stuff. Thanks for all the help.

These links have provided me a little insight:
1: http://cfs11.tistory.com/upload_control/download.blog?fhandle=YmxvZzIzODE4NEBmczExLnRpc3RvcnkuY29tOi9hdHRhY2gvMC8yMS5qcGc=
2: http://info.babylon.com/cgi-bin/bis.fcgi?rt=GetFile&uri=!!XVQ3V8DTBT&type=0&index=37
3: http://edwardbosworth.com/My3121Textbook_HTM/MyText3121_Ch01_V01_files/image002.gif
4: http://www.webopedia.com/FIG/PROG-LAN.gif
5: http://physinfo.ulb.ac.be/divers_html/PowerPC_Programming_Info/intro_to_risc/irt0_graphics/high-level_languages.gif
6: http://img.zdnet.com/techDirectory/COMPILE.GIF
 
Last edited by a moderator:
  • #9
chiro
Science Advisor
4,790
131
Hi, again

Obviously I need your guidance so please help me. A programmer work with high-level language such as C++ and the compiler does the rest. Right? Are there some other kind of programmers who work in machine language directly or some other lower level language? Does the compiler convert the language code into machine language directly? If it does there is also something called assembly language and assembler where are they used then?
These steps are taken by a 'high-level language' programmer: Algorithm -> Flowchart -> Pseudocode -> Language code -> Feed the language code into the compiler

Please let me remind you again that I'm quite an illiterate in such stuff. Thanks for all the help.

These links have provided me a little insight:
1: http://cfs11.tistory.com/upload_control/download.blog?fhandle=YmxvZzIzODE4NEBmczExLnRpc3RvcnkuY29tOi9hdHRhY2gvMC8yMS5qcGc=
2: http://info.babylon.com/cgi-bin/bis.fcgi?rt=GetFile&uri=!!XVQ3V8DTBT&type=0&index=37
3: http://edwardbosworth.com/My3121Textbook_HTM/MyText3121_Ch01_V01_files/image002.gif
4: http://www.webopedia.com/FIG/PROG-LAN.gif
5: http://physinfo.ulb.ac.be/divers_html/PowerPC_Programming_Info/intro_to_risc/irt0_graphics/high-level_languages.gif
6: http://img.zdnet.com/techDirectory/COMPILE.GIF
Compilers will translate one language into another. With C/C++ compilers, the code will be translated to a machine language definition, but also it will add specific data that the target platform needs.

For example Microsoft Visual Studio creates an executable that has windows specific information. Windows EXE's have not only the code, but they can have resources (like say pictures, tables, custom data and so on).

Likewise linux or unix based systems have their own special data in the executable.

Other languages though translate the code to an "intermediate" language. Examples of this include Java and anything in the .NET platform. The compiler turns the files into intermediate files that are not in machine language.

Assembler language is basically the lowest form of representing code aside from machine language.

In assembler you can have human readable labels, instructions, data and other things. In machine language everything is in binary.

There is a one to one relationship between an assembler instruction (like say MOV AX,BX) and its appropriate binary code. The translation between assembler and machine language is pretty straight forward since the instruction and its machine language equivalent is for the most part one to one (that means the assembler instruction has a direct connection with its machine language code)
 
Last edited by a moderator:

Related Threads for: Computer language learning for a layman

Replies
5
Views
2K
Replies
6
Views
1K
Replies
17
Views
2K
  • Last Post
3
Replies
60
Views
14K
  • Last Post
Replies
16
Views
541
  • Last Post
Replies
4
Views
2K
  • Last Post
Replies
6
Views
2K
Replies
1
Views
1K
Top