Since I know multiple programming languages: C, C++, Python, PHP, Perl, Java, C#, I would like to share about my rules of thumb to choose which language during the development. So, when do I use these languages?
When doing the web development, I will definitely use PHP. It is easy to configure with Apache and MySQL.
When doing the text processing, cleaning the unwanted text, search and replace, I will definitely use Perl, because of the power of regular expression it provides. However, if the search and replace pattern is simple, then I will just use “sed” command or “awk” command.
Then, if I want to develop an application rapidly, Python is my first choice. The GUI can be used with PyGTK.
If I want to develop an end user application, then I will use C++. Because it will produce compiled executable binary. No interpreter needed.
When the application I want to build needs to be cross-platform, from the desktop to the web, then I have no choice, but choosing Java. I don’t choose over Java in developing general application because Java uses Swing, but I prefer GTK (in the sense of development, not the Look and Feel).
For the C#, I learnt it because of curiosity. I will not use it if possible.
Then, for the shell script, which I prefer bash. I will write a shell script when processing a bunch of files with other command-line tools, such as perl, sed, rsync, etc.
As a conclusion, my most favourite programming languages are C++ and Python for desktop application development, then PHP for the web development.