A group of related variables, will become a data structure. Several related statements (or algorithms) will become a function. A function, can be a command (command-line). Combining data structure and algorithm, will become a program. Yet, combining related variables and functions, will also become an object. The variables are attributes, and the functions are methods. A group of related objects, will become a package, which uses namespace.
Data structure is most important, but algorithm cannot be neglected. Everything we are dealing in programming, is input and output. Thus, data will be conveyed as input and output. However, the process of conveying the data, is the algorithm. Hence, algorithm is depending on the data structure. Algorithm can also be assumed as data structure, if it is distributed as source code.
Everything is come from low-level to high-level. Low-level, meaning that it is dependent: machine dependent, OS dependent, language dependent, etc. More independent, more high-level. That is why, Java and C# are the high-level programming.
C/C++ programming language is low-level, yet higher level than assembly language. Because C programming language is portable. However, C/C++ standard library is low-level because it has limited features. However, the power of the C/C++ can be enhanced through a lot of libraries. By using these libraries, C/C++ can produce cross-platform applications. Because these libraries wrap the low-level functions to produce high-level functions, thus programmer does not need to write the code from low-level.
Learning C and C++ programming helps us know more about the basics of computer science. C programming let us know the fundamental elements, such as initialisation (or create, allocate, construct, etc) and unintialisation (or release, free, destruct, etc). Everything has its opening and closing. And these opening and closing are performed in the algorithm. And all the data is stored in data structure.
C++ proposes an object-oriented concept. This allows us to assume that everything is object, has attributes and methods. C programming simplify the algorithm by using functions; C++ simplify the data structure and algorithm using encapsulation. Hence, not everything in an object we need to know, we need to access. Moreover, manipulating the attributes of the object, is through the methods: “get” and “set”. “get” and “set” is just same as the concept: read and write.
The followings are my favourite C and C++ libraries:
- GUI widgets
- 3D engine
- 2D engine
- Haaf’s Game Engine
- Expat XML Parser
- Computer vision
- Regular expression
In my opinion, the “popularity” is the best factor for you to choose the programming language (if you are a newbie). Popularity has its own meaning. If a programming language is difficult to learn, difficult to use, difficult to find resources, how can it becomes popular? Thus, choosing a popular programming language is a good start. Have a look for this page.
Acquire one programming language is not really enough.
Start with C programming language is very good. C programming, a very low level programming language. Because of the low level, it is also very portable programming language. If you are developing Win32 application and building shared library (DLL), C programming is best to make the DLL functions to be exported for other uses, including interoperating between other languages. Besides that, C programming is easier to be understood. Because the most important parts of C programming are “data structure” and “algorithm”. Study the data structure and algorithm, we can easily get the concept and port to other languages.
C++ programming is very powerful. The object-oriented paradigm is not easy to be understood. But, the use of object-oriented programming really reduce the works of the programmers. Especially when we are dealing with the dynamic memory. In C programming, we need to allocate the memory, and free the memory to avoid memory leaking. However, using the C++, with the power of class, we can allocate memory in “constructor”, free memory in “destructor”. And every data structure can be replaced with the concept of object. Each object has its methods. The use of C++ is to categorise everything into object.
However, the polymorphism and the inheritance of the object make us difficult to study the algorithm of the C++. Besides that, DLLs built by C++ language are compiler dependent. That means, if you use VC (Microsoft Visual C++) to compile a DLL, the functions cannot be easily to be exported and used by the other compiler, such as GCC. This is because of the name mangling problem. However, ‘extern “C”‘ is very good to be used to create the functions which are compatible with C programming language.
Another powerful feature of C++ is the STL (Standard Template Library). Using STL, we can create a vector of class, or a linked list, queue, stack, etc. It is really convenient. Though C programming can also create linked list, it is exhaustive and inconvenient. In C++, linked list is used as template, we can use the linked list for our own class, struct, or any data type. Finally, C++ allows us to create our own template also.
Assembly language is the lowest level programming language. Though programmers do not require to know the assembly language, it is better to understand how the assembly language works, especially reverse engineering. Assembly language is platform dependent. The instruction sets for x86 platform is different from ARM (PocketPC). Thus, assembly language does not have the portability like C programming language. However, the object can be assembled and integrated to C compiler. This is another interoperability of the programming languages.
C and C++ are old programming language. There are a lot of disadvantage if only uses the standard library. C and C++ do not provide any GUI implementation, no network feature, no regular expression, no XML parser, no image I/O, etc. Do we need to write everything be using standard library in order to perform networking? Not necessarily. In order to do these, we can use the other libraries written in C and C++, such as Boost, wxWidget, Qt, libpng, libjpeg, etc.
But we need to collect everything by our own. Using these libraries are good to understand more about the programming. However, for faster approach, we can use Java.
Java is a great. Because provides a lot of features, such as GUI development, networking, image I/O, XML parser, etc. Not only that, it is cross-platform. Because Java uses a JIT (Just In Time) compiler. So that, if your computer has the JRE (Java Runtime Environment), then you can run the Java application. Not only cross-platform, it is also used in mobile development.
Besides that, Java can interoperate with C/C++ programming using JNI (Java Native Interface).
To compete with Java, C# is designed. It uses .NET Framework to perform JIT compilation like Java. .NET Framework not only works with C#, but also other programming language such as VB.NET. Similar to Java, C# can also develop GUI application. It is also used in Windows Mobile.
Python is a scripting language. It is different from JIT compiler and other compiled language. The syntax is far different from C, C++, Java, C#. Python can also integrate with C language because it offers C API. It also provide GUI development, which uses Tk. Not only extended with C programming, it can also be embedded in C programming. That means, Python can be used as a scripting language as a component of an application written by C/C++. For example, 3D modelling application, “Blender”, is one of the application that uses Python script to perform extra functions.
Besides that, Python interpreter also implemented in mobile. It can also be used in web development for server side coding.
Is programming language enough? There are a lot of programming languages. Not only programming languages, the markup language is also important, especially we want to do the web development.
Currently, Flash is a very common component in web development. Flash can produce RIA (Rich Internet Applications). One can use Flex SDK (free) to develop Flash application and integrate to a webpage.
The above statements are related to the client side development. To do the server side development, there are more things we need to know. A server side scripting language is needed, such as: PHP, Perl, Python, Ruby, etc. Using these scripting language for the server, the webpages browsed by the users can have dynamic contents. C programming and C++ are lessly used in web development. This is because web development involves a lot of text. To deal with the text, scripting language normally offers regular expression feature. It is faster to use scripting language to perform text functions rather than using C/C++ language.
Furthermore, database might also needed for the server side development. When dealing with database, MySQL is one of the popular database(s). Besides that, we also need to know the SQL (Structured Query Language) in order to interact with database.
Web development is difficult. It is better to be developed by more than one person. This is because web development involves a lot of component, especially usability of the website.