Computer Programming

From AbarikWiki
Jump to: navigation, search

Programming Languages

This page holds all information related to Computer Programming

  • There exists a main wiki page for each language or any cross-language programming information
  • Finally, If you want to look at all the list of pages present in this wiki, go to Special:AllPages

Python

C

JS

Java

WebGL

Basics

Code

  • Code generally means a piece of meaningful text with proper syntax, that you have written to perform a task (e.g printing "Hello World")

Source Code

  • This is the human readable code that performs a task
  • This code is present generally in a text file
# Python
# ./helloworld.py
print("Hello World")

Executable Code

  • This is the final form of code, in bits, that is read and executed by Computer

Interpreter

  • Interpreter converts the #Source Code into #Executable Code line by line (as provided by the user using an Software like Python CLI), and then each line of code is executed. #Ref1

Compiler

  • Compiler converts the entire #Source Code into #Executable Code and then executes the entire program
  • Generally, C and Java have compilers and Python and Ruby have Interpreters
  • Therefore, if you have your source code (for Python its .py, for C its .c files), you just can't run them right away. You will need to use a compiler to compile the code 1st or use Interpreter to run your program

Development Process

  1. Write code: Computer Networking/Development
  2. Test code: Computer Networking/Testing
  3. Automate build and test: Computer Networking/Continuous Integration

FAQ

How to Compile C Code

  • Use GCC #Ref2
  • For large projects, use make

What is the difference between make and gcc

http://stackoverflow.com/questions/768373/what-is-the-difference-between-make-and-gcc

  • GCC is simply a compiler to compile one or more source code and turn it into exec code
  • make is a utility that uses GCC, which is used in large projects to manage lot of source codes (e.g in C)

References

Ref1

http://www.engineersgarage.com/contribution/difference-between-compiler-and-interpreter

Ref2

http://www.wikihow.com/Compile-a-C-Program-Using-the-GNU-Compiler-(GCC)