We can solve complex problems with different paradigms

A Microprocessor from a Technical University
A Microprocessor from a Technical University

When I dedicated my life to more technical activities as computer programming I was a strong defender of C/C++ as a programming language to do the most sophisticated tasks. As many thoughts, this thinking was based on a certain historical situation. When I was at the University, computers were very different to those we have got nowadays. A lot of common technologies they incorporated today did not exist, and the world was less interconnected than today.

Although I have got postgraduate education on business administration and mostly my career has been developed in management, I have a high ranking engineering degree (a six years degree). I have been specialized (during the last of those six years) in Electronics and automation. This implies that my education provided a strong knowledge about hardware. In fact I was lecturer of some of the practical lessons about computer science for other colleagues, showing the students the architecture of an i386 microprocessor and how we could program an x86 PC in assembler operating directly with the registers of the microprocessor. People with different education that begin to program computers usually are comfortable only with high level programming and C/C++ seems very complex and error prone for them. I am sure that there are not much managers that can swank for having a so technical experience, even teaching university students how to do low level programming.

C/C++ is very error prone because the compiler lets to do many things that cannot be done in other languages, although it is a high level language if the programmer has knowledge enough he can program in a way that microprocessor registers are used in a more fast and efficient way. Other languages are strongly typed, in those languages you cannot assume how the data can be used by the microprocessor and they do not let that the programmer can write code fast and efficient; however, it lets that the final program can have fewer errors in execution time. People with similar education like mine can think that C/C++ is a language for truly professionals, because, there is not risk if you know well how the compiler is working.

Well, this last sentence should be true if software were done as in the past, however, nowadays, computers, for instance, have different architectures (32 and 64 bits). Most of programs should run in different computers with different architectures. C/C++ can be used in this situation but you cannot use it with a near low-level style.

There are other reasons to use different programming languages in addition to portability. It is more important that common projects involve a group of people, and C/C++ can be used in a way that a program cannot be understood later by another programmer ever by the author. If you think that lawyers can confuse people with legal slang, you have not seen what a C programmer can do using a direct conversion of types to create a structure with pointers to functions that is being passed as an argument to another function. Of course, this is only courtesy of the programmer. The work in group is another reason to prefer different programming languages. Java is much extended due to its portability, its more typed design, and it is not error prone by an odd use of pointers.

I continue trusting in C/C++ because I understand well how a compiler can be implemented. It is common in any IT university degree that students program a compiler of a language in other language, or even with the same. Java ties the hands of the programmer avoiding he can solve the problems in a fast and efficient way. On the other hand, java is usually implemented on a virtual machine. The compiler generates a code for a machine that does not exist physically, and some low level software makes the conversion for us. This is the reason of its great portability.

There are other solutions that can be chosen in order that we can implement other algorithms. Languages as python provide complex data structures that we cannot find in C/C++ directly as lists, tuples, sets or dictionaries (hash tables). This lets the programmer to be centered in the high level problem when he is working in complex problems that require more complex tools to cope with them. Python is an interpreted language that it is used as a scripting language, a concept totally different to C/C++, but it has some advantages: You can test your changes avoiding a new full compilation of the program.

Complex problems are characterized by a huge amount of data that are linked among them and can change in an unexpected way. Python complex types provide an easy way to join linked data to be processed in an efficient way. I have found that python can be a useful tool, and you can both use the python interpreter inside a C/C++ program and call C/C++ code from python.

Python has great characteristics that java does not have. For instance, in java there is not virtual inheritance, however, in python all the child objects are virtual. This can provide an scheme of managing objects similar to the characteristics of C/C++.

The old paradigm of a programmer thinking that data are collected by a low level program getting a piece of data from the memory, putting into a register to be processed and sent back to the memory as if it was an administrative secretary is obsolete from a lot of years ago although some people do not want to accept it. Today, programs are complex entities that provide complex solutions for complex problems from a complex set of paradigms.

The name of Python is itself a new way to understand how a language can be confusing. The word Python was not selected by Python’s authors because of the snake, but they were fans of Monty Python. Despite this brief discussion, it is less confusing (complex) a program written in C/C++ than the natural language we use everyday. The error prone characteristic of C/C++ is due to the structure of a computer program instead of the uncertainty that provides the language. However, the natural language can introduce a lot of uncertainty in our mental processes although a name is only a word that designates an object because we can associate the object with many other different concepts.



Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s