We are not talking about becoming the best programmer; we are talking about how to become an exceptional one. We are going to teach you three techniques that will help you become more effective in programming. This article is going to show you:
- Why it is easier for designers to learn their craft than for programmers.
- How to improve your skills with coding and create a thought algorithm, which will help you increase excellence.
- Where to begin and how to check everything written.
Have you ever thought about why there are more design specialists than software engineers? Many IT professionals and freelancers know this. More than 50 people applied for a designer vacancy in the one hour after it was published, while there may be no specialists at all in the programming sphere. This is because product design professionals use world-famous software that helps to process photos, videos, all sorts of images and illustrations, and create 3D models. This is based on the fact that all the commands and functions in the software are represented by icons and different visual images — you can see examples of those in the picture below.
Their quantity and these visual images help shape human cognitive abilities based on templates that facilitate understanding of all kinds of work with programs. Programmers have no templates. They are learning while understanding existing algorithms. It is good if they have already been implemented. They can be run and tested to make sure that the code works and the computation process goes as intended by the programmer. Proficient programmers use mathematical articles to implement different algorithms. They work with pseudo-code and mathematical expressions that are not always possible to understand. For us to also be able to process different mathematical concepts, techniques, and algorithms, we have a method that will help us understand and improve our skills and abilities. Here, three techniques come to the foreground, which we will call the method, which will be useful to all programmers, both beginners and experienced, to work on algorithms.
Using a template approach, programmers have in their arsenal a block diagram of algorithms.
And we have a method to improve mastery, based on three techniques, which, if we start to practice, will help us improve our proficiency.
THE THREE TECHNIQUES
The first is templates and visualization. Using block diagrams and algorithmic constructs, we can begin to shape the thought patterns of computational processes.
The second is algorithm tracking. Donald Knuth, in his book “The Art of Programming” (we will return to this book often, since it is a world-famous classic work and our handbook) very often calls for calculating an algorithm on a piece of paper. Here is a quote from his book:
The third technique is to break down the problem, formalize it, and reveal this algorithm’s data structure. The process of breaking down a task is to identify a basic computational procedure or repetitive computational steps. Complex computational processes are easier to comprehend in parts, step by step. Formalization is the process of moving from the abstract to the concrete. Most often, a high level of abstraction of mathematical features can lead to a stopper, which will then lead to the factuality that the task cannot be understood and, as a result, it’s impossible to implement it into the program code. Also, Nikolaus Wirth said, “data structure plus an algorithm equals a computer program,” therefore, it is always necessary to separate the algorithm and the data structure in this process.
After breaking it down, identifying the key construction of the algorithm, and formalizing the problem, we should initialize the data structure and carry out the calculation. Therefore, this method is an excellent approach for working on an algorithm for better understanding.
Of course, it will be quite pertinent to question how to apply all this and how to work on the algorithm for a better understanding of it. Within the framework of the practice and illustration of the above three techniques, we will consider a classic and very interesting problem — Euclid’s Algorithm.
An interesting fact — This is the first algorithm that Donald Knuth considers in his famous book The Art of Programming. And I also really like the quote (one of my favorites) from Bill Gates about those programmers who actually read and work with algorithms.
If you think you’re a really good programmer … read Knuth’s Art of Computer Programming… You should definitely send me a resume if you can read the whole thing
I am using the above method; we will start working with Euclid’s algorithm, learn it, and implement it in the python programming language.
SO, LET’S BEGIN:
- This algorithm has the following block diagram. First, study the algorithmic constructs of the algorithm. Then, try to implement it on your own. I assure you there is nothing complicated about it.
Here we will demonstrate a written form of Euclid’s algorithm.
2. After you have studied the visual block diagram of Euclid’s algorithm, you should proceed to trace the algorithm. Let’s record the tracing of the algorithm in a table. Here is an example of tracing this algorithm to illustrate how it is done on paper with a pencil.
3. Finally, we will demonstrate how this task can be broken down, formalized, and reveal the data structure for easy assimilation. First, splitting up the problem into smaller pieces reveals the underlying computational procedure or repetitive computational steps. In this example, we can see that items 3,4,5 (in the table) are the main computational procedure. Secondly, formalization — here, we took specific natural numbers m = 24 and n = 16; this is formalization. And thirdly, the data structure here are two variables to which natural numbers are assigned. Now we have finished executing our method of three techniques which we applied to Euclid’s algorithm. It seems that it was not too difficult.
We are now acquainted with the method, which contains three techniques that will help us become excellent quality programmers. But for this, you still need to work hard and accumulate your card index of algorithms. We studied two algorithms, one of which we described according to our method, and the second is presented in the block diagram — try to implement it yourself.