How to learn to code: programming basic fundamentals
August 16, 2020
Most people think programming it is just decide which is the best programming language and begin to code, then jump right into syntax and creating apps. Although it is true that with newest tools and frameworks it is easier to start, we really should learn at first programming basics fundamentals to have solid knowledge and master it. We have the duty to recommend you to start with the right foot by inviting you to focus on learn and understand this world first. We will guide you on two articles in how to learn to coding with basics steps, because it is not just typing code!
Today, developer is top in-demand job and programming is one of the most sought-after skill, hence there is a huge competition in market. Next, we will introduce you the basis to become a good developer and to highlight on it:
Learn programming basic fundamentals
Programming fundamentals are building common foundations of any program. It is the first thing that we must strengthen to learn in order to master programming.
Let’s begin by make it clear three basic concepts that most people tend to confuse:
- Programming is an algorithm implementation in a programming language, to build a program.
- Algorithm is a finite, ordered and, most important of all, unambiguous sequence of instructions to be followed to solve a problem.
- Program is a set of instructions sequences and data structures that a computer can interpret and execute to achieve a goal, also called software.
Software creation process is a subject of Software Engineering, one of the branches of Computer Engineering.
Grow logical and abstract thinking
First, let’s define:
- Logical reasoning is the ability to analyze things, detect patterns and relationships and solve problems both basics or complex at intangible level.
- Abstract thinking is the ability to understand real concepts that not are directly tied to physical concretes objects or experiences.
In order to know how to solve problems by programming, we have to focus on learning computational thinking which is completely logical and abstract. So, we need to enhance our pattern recognition, abstractions and algorithmic skills. This can be achieved by putting our brain in a lot of practice. There are so many resources on internet like abstract reasoning tests questions and games that we can find.
Improve analysis and problem resolution
A good developer has to be a natural analyst. Knowing how to understand a problem, analyze all its edges and once understood, devise possible solutions, identify the best of them and try to solve it; all inputs, inherent processes and outputs have to be considered.
The solution of a problem may not be linear, but may require cycles and iterations, define conditions and exceptions, among others. The better you understand the problem, the easier it will be to design a better solution.
Effective problem solving takes some time and focus. Commonly is approached as follows: identify the issues; understand everyone’s interests; list possible solutions, evaluate them and pick some as option; document the agreement and agree on contingencies and monitoring.
Make algorithms before making programs
Algorithm derives from Greek and Latin “dixitalgorithmus” and also from the Persian mathematician Al-Khuarismi. As we see earlier, an algorithm is a finite, ordered, well-defined and unambiguous sequence of instructions to be followed to solve a problem. It must be clear that if we do not know how to solve a problem, we will not be able to write an algorithm to solve it. Every day, we frequently use algorithms to solve problems even without notice it.
Algorithms is not language–depending, can be expressed in many ways such as pseudocode, flowchart, programming language or even natural language. It is usually done by a high level description first, then a formal description and last by an implementation on something capable of carrying out instructions as result.
An algorithm must provide a problem resolution in a sequential way, generally speaking must:
- It has a beginning.
- It needs a reading or data entry.
- It does data processing.
- It gives an information outlet.
- It ends.
Pseudocode is a way of writing steps in a language, be it Spanish, English or any other. It is the narrative representation of the steps that an algorithm must follow. This method is easier to write and easier to transcribe into a programming language.
Actually, we could write the pseudocode as we wanted, since it is not really the program itself, it is only a help to carry out the program through the programming language that we will be using later. However, it is good to follow some basic rules so the “translation” to the programming language is more fluid, for example use terms with unique meaning, if “write” means to show something on the screen, then do not use “write” to refer to save in the database, use “write BD” or any other term that you can identify without any confusion risk. Most programmers tend to use a common vocabulary. So, if you know how to writea program pseudocode, converting it to any programming language is very simple; you only have to learn the commands equivalent to the instructions in pseudocode. Also, most languages use practically the same commands in their definition.
Flowcharts are a graphic representation of an algorithm where it is expressed through symbols arranged in an order, from top to bottom and left to right, following a established ISO specification. This symbols represents actions and how they have to occur, it flow is established through one direction arrows and it must provide clear, orderly and concise information on all the steps to be followed in order to problem resolution. They are effective and give an easy lecture of the resolution in case of small algorithms, but they can be cumbersome and difficult to build and read otherwise.
Flowchart provides quick understanding of relationships, effective analysis of different program sections, they can be used as working models in new programs design, it is easy to read for final user, provide accurate program documentation, promote productive developing and gives debugging and orderly testing of programs, among others advantages.
By using pseudocode and flowcharts avoids many natural language ambiguities, because they are an effective and structured way for algorithms representation and still they remain independent of a specific programming language.
Know data structures
Next thing you should do is learning and knowing existing data structures, we will need to use them in order to solve a problem, they will help us with storage, organization and access to data. Data structure is a set of data values and their relationships, also defines operations that can be applied to them.
Not all data structures can be used everywhere by acquiring advanced knowledge about the data structures will help us in choosing the right one for the problem that we have to solve. In general speaking, there are four forms of data structures:
- Linear such arrays, lists, etc.
- Trees like binary, heaps, etc.
- Hash as distributed hash table, hash tree, etc.
- Graphs of decision, directed, acyclic, etc.
Now that we know programming basic fundamentals
Now, we are prepared to go further and master programming because developing is one of the most job-wanted and there is a lot of competition out of there that is why we have to highlight on it.
Do not settle and learn even more!