Computer language learning for a layman

In summary, Compilers are used to translate code from one language to another, such as from a high-level language like C++ to a machine language. Some languages, such as Java, use an intermediate language which is then translated to machine language by a virtual machine. Assembler language is a low-level language that translates directly to machine language and is used for tasks that require a more direct and precise control over the computer's operations.
  • #1
jackson6612
334
1
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.
 
Technology news on Phys.org
  • #2
jackson6612 said:
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
Thanks a lot, JT. It was a wonderful explanation!
 
  • #4
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" (for me at least).

And here is an http://thedailywtf.com/Articles/Classic-WTF-5-years-Cpound-experience.aspx" about the pronunciation.
 
Last edited by a moderator:
  • #5
My understanding is that Microsoft intended C# to be a "competitor" more for Java, not for C++.
 
  • #6
The 2 extra +s are supposed to signify it surpasses C++, I guess.
 
  • #7
Thank you, everyone.
 
  • #8
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 -> Langauge 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_con...mczExLnRpc3RvcnkuY29tOi9hdHRhY2gvMC8yMS5qcGc=
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_ht...o_risc/irt0_graphics/high-level_languages.gif
6: http://img.zdnet.com/techDirectory/COMPILE.GIF
 
Last edited by a moderator:
  • #9
jackson6612 said:
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 -> Langauge 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_con...mczExLnRpc3RvcnkuY29tOi9hdHRhY2gvMC8yMS5qcGc=
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_ht...o_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:

What is computer language learning?

Computer language learning refers to the process of acquiring the skills and knowledge needed to understand and use programming languages to create computer programs and applications. It involves learning the syntax, structure, and logic of a particular programming language.

Why is it important for a layman to learn computer language?

Learning computer language can provide a better understanding of how technology works and can help individuals become more proficient in using computers. It can also open up job opportunities in the tech industry and allow for more control and customization over computer programs and applications.

What are some common programming languages used in computer language learning?

Some common programming languages used in computer language learning include Python, Java, C++, HTML, and JavaScript. Each language has its own syntax and purpose, and it is important to choose a language that aligns with your goals and interests.

Do I need any prior knowledge to learn computer language?

No, you do not necessarily need any prior knowledge to learn computer language. However, having a basic understanding of computers and technology can make the learning process easier. It is also helpful to have a logical and analytical mindset, as programming involves problem-solving and critical thinking.

How can I get started with learning computer language?

There are many resources available for learning computer language, such as online courses, coding bootcamps, and self-study materials. It is important to find a learning method that works best for you and to practice regularly to improve your skills. Additionally, joining online communities and collaborating with others can also be beneficial in learning computer language.

Similar threads

  • Programming and Computer Science
Replies
15
Views
1K
  • Programming and Computer Science
Replies
8
Views
880
  • Programming and Computer Science
Replies
16
Views
1K
  • Programming and Computer Science
Replies
16
Views
2K
  • Programming and Computer Science
Replies
14
Views
2K
  • Programming and Computer Science
Replies
6
Views
3K
  • Programming and Computer Science
Replies
8
Views
1K
  • Programming and Computer Science
Replies
8
Views
357
  • Computing and Technology
2
Replies
44
Views
3K
Back
Top