Saturday, July 5, 2014

You wish to start programming but which language should you use?

You've decided you want to venture into this world where every programmer says different and every one of them claims one language are better then the other for various diffrent reasons. You start asking your self  "but how can I know if this guy is right and the other one is not?! why is this language better that this guy say it is then the other one?!". Truth is, some programers like so much their languages as they probably started with it and stick to it forever. I'll try to point out some differences between few languages and why I believe the programming language you should start with is...

C programming language

- Wether you are programming in Java, PHP, Python, ActionScript or C# and C++ they are all based on programming language C. Operating systems are written in C, if not they do at least posses standard libraries of C. You might be wondering "why?!" and thats probably because of the fact that C is language very close to a machine language. If you would want to program a street light, calculator, tv-remoter etc. to work with programing language, you'd probably go for C or C++. Both of them are very close to a machine except that C++ has some sorts of an object programming. I do not know the C++ very well as I never used it but being based on C things can't be far then they are in other Object Oriented Programming languages and C it self.

- Main reason why I belive if you get to start with C other languages will be much easier to get along with, is right because of that mechanic or machine language level. If you can understand why in C things are being called when you execute something, or why is compiler executing this and not that, and why pointers are calling to other pointers when you tell them to, why is the "for-loop" working the way it is and other loops as well, once you get a handle of those in C, everything else and EVERYWHERE else 90% of things are the same. What can be diffrent is...

Syntax in programming languages

- Main difference between every language is its own syntax. You might wonder "what is that?". Well the syntax of a computer language (for example: Java) is the set of rules that defines the combinations of symbols that are considered to be correctly structured documents or fragments in that language. For example, in C# you have to define a variable that remembers whole numbers by writting an "int" and giving it a value by adding "int = 5", while in PHP just write "$a = 5" or "$b = 5" or any letter but do you notice the difference? That is syntax. That is how one set of rules is documented for a C# and other one for PHP. Next to syntaxes there is also Object Oriented Programming or otherwise written as...

OOP - Object Oriented Programming

- Some languages like C, Erlang also some older languages like BASIC they do not posses this feature. What this means is that those programs run from the begining to the end. Straightforward. From top to bottom. BASIC had GOTO statement in order to skip around in a program but it was hard to do so if the program was larger. Main problem with programs like these were that you could easily loose up in code not be able to follow where is what. The answer to solve this is Objects.

- Maybe this might be a bit confusing to understand or for me to explain the whole picture but a main thing you should have in mind, for a start, is that Objects are self-contained; protecting their own data who are only accesible via an interface of the public member functions (encapsulation) which allows you to avoid mistakes you would otherwise do if you would have all in one program of 4500140284224 lines of codes... Also the inheritance allows you to write much less code allowing you to large projects manage easier.

- That is why programing languages like C#, Java, PHP, Action Script 3.0, Python and many others have a lot of classes in their libraries, as those classes are objects that are being use or you can use during your projects.


- I hope I managed to point out few of the things you will come across when dealing with programing languages and what you should have in mind when starting to code. However I am always staying open minded and I always wish to hear what other people think. Do you have better experience when starting with some other programming language? Do you think something else would have been better for a beginner? And why would you say so?