There might be various definitions or various thoughts to define the word programming. In my view, programming is writing a solution in such a way that a machine (computer) can understand to depict the solution, which you can identify manually.
For example, let’s say you have a problem statement: find the total count of vowels from this book. If you want to find the solution to this statement, what will you do?
The probable steps for the solution to this problem are as follows:
- First, get the right book. I am assuming that you know the vowels (a, e, i, o, and u).
- How many vowels did you find in a book?--0 (zero).
- Open the current page (initially, our current page is 1) and start reading to find vowels.
- If the letter matches a, e, i, o, or u (please note that the case doesn’t matter, so the letters might as well be A, E, I, O, and U), then increase the vowel count by one.
- Is the current page completed?
- If the answer of step 5 is yes, then check if this is the last page of the book:
- If yes, then we have the total vowel count in hand, which is nothing but n, where n is the total number of vowels found in the current chapter. Move to step 8 for the result.
- If this is not the last chapter, move to the next chapter by adding 1 to the current chapter number. So, we should move to 1 + 1 = 2 (Chapter 2).
- In the next chapter, repeat steps 4 to 6 and until you reach the last chapter of the book.
- Finally, we have the total vowel count, that is, n (n is the total number of vowels found).
The preceding steps just described how we reached a perfect solution for our problem statement. These steps showed how we manually found the answer to our problem of counting all the vowels in the book's chapters.
In the programming world, such steps are collectively known as an algorithm.
When we write the preceding step(s)/algorithm in such a way that a machine/computer will be able to follow the instructions, it is called programming. These instructions should be written in a language understood by the machine/computer, and this is what is called a programming language.
In this book, we will use C# 7.0 as the programming language and .NET Core as the framework.