(Photo by Christina Morillo: https://www.pexels.com/photo/person-using-macbook-pro-on-person-s-lap-1181298/ )
ā
Hi, I thought I should to start posting about "how to start your coding journey". This post serie will help me create knowledge base to my future projects.
In this post, I want you to start thinking like a true programming specialist. There are many ways of thinking about how to code a program. The ways of thinking are interpreted in coding languages.
For example you have a Java language, which is mainly object-oriented programming where you think about program as a bunch of objects like in a real world. What I mean by that is that you can describe there everything like you would describe anything in a real world. One of the simplest example would be a car.
You know that the car has a usually a 4 weels, at least 2 seats inside, can move, stop, can turn on a light and etc. All of this you can describe as a multiple object, starting from a car object and going deeper into details what it has inside and what you can do in that car.
Another way of thinking is in C++ language and imperative paradigm, where you write a bunch of statements which changes how your program behaves line after line. In that way of thinking you treat program usually like line by line commands, which are executed by a computer. Nowadays Java and C++ contains both object oriented, imperative way and now you have a functional programming.
Functional programming is a way of thinking of being everything a function. Function programming language would be a **Haskel. **Haskel force you to think like everything is a function and where you can reuse your code make it more universal and easier to matematicaly proven to working as you wanted to work.
Easy example is say I want to calculate number 5 to power of 2 and usually you would think like 5*5 = 25. In a functional way you image it like a function first so let me take any number, we could say a natural numbers ( ...,-3, -2, -1, 0, 1, 2, 3, ...) and multiply that number by itself. So it would look like this:
**take natural number X and calculate natural number X multiplied by natural number X **
which in more pseudo code would look like
function (x) return x * x
when you replace x with a any number, you get power of 2 the number which you put instead of x.
There are a lot of other way of coding and thinking in programmer way, but all of above is the most popular right now and most modern programming languages has all of those ways of programming (Java, Javascript, C++, etc...)
Next post is going to be about cooking, but we are not going to make a cookies :) We will create our own recipe, not food but our first instruction on how to "paper computer" is going to behave line after line.
It would be great if you rate and post a comment, so I will know if I should continue posting this kind of knowledge. If there is something to improve I would gladly get any feedback.