What is Programming ? | Learn to Code! - Chapter 1

10:53 0 Comments



Today our focus is to familiarize you with the notions and the concepts of programming. First of all I feel like its an imperative to remove the misconception that programming is meant for any sort of geniuses or you need to be specifically good at maths to embark on this creative journey.

In-fact, it is believed that programming like many other subjects, is a tool for developing your creativity and enhancing your logical perception. Of course, it is true to some extent that some subjects related to programming do require you to know some fundamentals of advanced mathematics but for now , I assume that you have little or no programming experience , though it would be helpful if you are familiar with some concepts of elementary maths. Even if you don’t, you shouldn't have any problems understanding these tutorials. Before getting on the technical stuff, we will explore the meaning of programming itself.

Programming:

Programming is simply a way to define specific instructions or commands that are required to solve a given problem or achieve some purpose . It is true that even before computers were introduced into the world, the concept was long obeyed by humans even without knowing it.The idea is to define a sequence of detailed steps required to achieve some result or make a product ;Where every process requires us to:-

• understand the problem itself
• identify what needs to be the result
• define appropriate inputs
• devise suitable processes on the input to get the final result .

To understand it in the most generalized terms , think of it as inputs being your raw materials and processes being a way to convert your raw materials into some useful items , and outputs being the end result of those items ,that are put to a good use. Such a sequence of detailed steps working their way to complete a job is known as an algorithm.

For defining algorithms , different approaches can be used , such as :-

Structured English :  You can use plain commands in your natural language to design a solution.

Flow charts: Graphical representation of the whole number of processes that take place for every process that defines a particular mechanism,where the basic  diagram symbols used are these :



Pseudocode : Well, pseudo means false. It actually resembles the real code, written in programming languages, but the one which cannot be executed.

Programming languages: For communicating with computers we need some languages which help us convey our message to the machine or write actual executable programs while following a particular syntax(like Grammatical rules in English language) . (Though, if it does not make any sense ,we will be discussing that later, so you don’t have to worry too much about it.) Examples include:- Java , C, C++, FORTRAN, Python and many more.

Machines are no different either , they are insensible . Unlike humans, they can't learn, adapt , create or produce . In-fact , its our job to give machines a particular algorithm to have it do some work for us. For example there is a simple algorithm presented in flowchart, psueodocode  or structured English for converting a length in inches to centimeters. Now , jumping to the basic ideology of writing any algorithm, we again need to know what the problem actually asks from us.

We need to get an input that is the length in inches:-

Structured English:

• Read length in inches from user
• Convert into cm
• Store the result
• Output the result

Further illustrations define the same algorithm in different forms:

Flow chart :


Psuedocode:

input inches
CM=inches*2.54
output CM

STILL CONFUSED?
or WANT TO KNOW MORE?
Have a look at our video tutorial for this Chapter:



                     

                                   
For the sake of simplicity , today we will not discuss  the context of any programming language.
But we know for sure that any process or system obeys the very sequential and algorithmic approach taken by computers.

Addition :
In the next chapter, we will be discussing what is known as variables, Constants and about primitive eliments.

Click the Subscribe button to get notified about the next chapter!



Some say he’s half man half fish, others say he’s more of a seventy/thirty split. Either way he’s a fishy bastard.

0 comments: