Everyone now a days Interested in Information and technology as well as computer science. Now we are living in new era of Artificial Intelligence which is new advancement in computer science and we see it’s applications in different domains and business.
But so many computer engineers or people who want to get into IT, AIML, Computer field, they miss out on fundamentals which is What exactly coding and programming? How computer process instructions given by humans? what fundamental knowledge is required to become great programmer or coder?
In this article , we will cover basics of what is programming and coding? let’s first understand what is Programming.
How does computer works?
When we shut computers , they are just ideal machines made up by some metals and other materials. But when we turn on computers they become alive and starts executing tasks at lightening speed that’s how we able to see different buttons icons on screen.
Relationship between computers and electricity
Without electricity we can not turn on computers. If there is no enough charging to laptops or computers there are as good as metal toy.
Electricity has only two states – it can be either turned on or off.
Electricity being turned on and flowing represents true, it has the ‘on’ state. On the other hand, when it’s turned off and not flowing this represents false and the ‘off’ state.
It can only ever have one state at each point in time.
The two states of electricity are called Binary States, the prefix bi- meaning two.
What is binary code?
We heard multiple times that electrical switches we can call it transistors which carry electric current. Electrical charges exist only in two states and which are tie-ups with numeric in computer system which used in it’s hardware system. This is used to complete every task that is given. Which we call binary code exist in 0’s and 1’s. This binary code corresponds machine instructions, commands, and locations in the computer’s memory. Then computer reads and carries out particular task. In computer there are thousands of tiny electrical switches which carries electric current when they carry current we call it ‘ON’ state and when they don’t we call it ‘OFF’ state.
How this binary code works?
we know that computer works or execute tasks in 0’s and 1’s which we call binary code. but how exactly it works? we don’t directly deal with this binary code but CPU understand this. Are there literally 0s and 1s stored in our physical devices flowing and moving around? Not really. CPU’s consist of many microscopic digital circuits that carry information. With the help of the transistors that come together to form these circuits and their tiny sequences of electrical signals that are switched either on (1
) or off (0
), there can only be only be two types of voltages – a high and a low. And that results in the representation of different values, that is different instructions or calculations being performed. When these electrical signals from the transistor circuits and other electrical components are linked and combined/modified in a certain way, they can create a wide range of possible tasks and operations the computer can perform and see through.
How humans interact with computers?
Only Machine level language computers can understand. Binary code varies from machine to machine. But programs and software can’t be transferred to different systems. There are disadvantages of Machine level language :
they vary from operating system to operating system. Machine code or binary code may run very fast, they may be the computer’s native language, and they may be extremely efficient because the instructions are executed directly by the CPU. But it’s a very dull and monotonous – not to mention extremely error-prone – way to use a computer. Typing machine code or binary code manually for every transistor is very difficult. Making error and fixing it while you manage database or operations of computer is very very difficult. Machine-level languages are hard for humans to read, write, learn and understand. So programmers and computer scientists found a better and arguably easier way to solve problems. Things is , what computer do by itself is very very limited in scope for example: arithmetic operations.
New way to interact with computers:
computers do what exactly what we tell them to do. Computers at their core are machines that perform mathematical operations. But they are also good at displaying some text on the screen or repeating a task over and over again we can call it basic instruction set what computers have at their core. But computers are able to perform very complex operations given by set of instructions apart from their basic core operations using their multi layer abstraction level. But as a humans we can use this machine call computer to do what we want to do for example building applications, games, websites etc. what ever we can think of we can create program and bring that idea in reality.
Programming vs coding
Programming is the way we tell machine called computer what to do and how to do it. It involves providing well thought-out, methodical instructions we also call it Algorithm for your computer to read and execute. You have to break down large tasks into smaller ones. And you keep repeating that process of breaking something down into smaller tasks until you reach a point where you don’t need to tell the computer what to do anymore – it already knows how to do that task. The essence of programming is the process of problem solving, complex thinking, attention to detail, and reasoning – all using a computer. Programming involves thinking of all the different steps a user could take and considering all the different things that could go wrong. Once you’ve thought of all potential problems a user may encounter you have to find solutions before you code anything
Use Of Algorithm
When you’re problem solving using a computer, you need to express the solution to that problem according to the instruction set of the computer. Algorithm is systematic step by step approach to solve problem. Algorithms are an idea or method that’s expressed in a very concise and precise set of rules and step by step instructions. The computer needs to follow these instructions in order to solve the problem. Algorithms are machine independent.
When it comes to computers, algorithms need to be precise as computers take everything literally. They don’t read between the lines or make any assumptions.
There is no room for ambiguity, so algorithms not only need to be precise but also organized, correct, free from errors, efficient, and well-designed. All this helps minimize the time and effort the computer needs to spend to complete a task.
Computers execute algorithms in a mechanical way without putting much thought into each step. And they should work in the exact way we intended them to work.
A computer program is a collection of those instructions – or algorithms – in a text file which serves as an instruction manual.
It describes a very precise sequence of steps for the computer to follow. The computer performs a particular task, its hardrive executes the instructions, and you get the final desired result in the end.
Aside from the thinking, research, design, and in-depth planning, programming also involves testing, debugging, deployment, and maintenance of the finished result.
When you’re developing a program to solve a particular problem, you typically express the idea for the solution using an algorithm. Then developers code the program by implementing that algorithm. You use a language that has particular syntax and that both humans and computers can understand.
Coding
Coding is the process of transforming ideas, solutions, and instructions into the language that the computer can understand – that is, binary-machine code. Coding is how humans are able to talk with computers. Coding involves communicating and giving instructions for different actions we want our computers to perform using a computer programming language. Programming languages, like JavaSctipt, Java, C/C++, or Python, act as the translator between humans and machines These languages bridge the communication gap between computers and humans by representing, expressing, and putting algorithms into practice. They do this using a specific sequence of statements that machines understand and can follow. Programming languages are similar to human languages in the sense that they are made up of basic syntactical elements like nouns, verbs, and phrases. And you group these elements together to form something that resembles a sentence to create meaning These languages actually resemble and look a lot like English. But they offer a shorter, more precise and less verbose way to create instructions that the computer can understand.
Programming languages are a set of rules that define how you write computer code. In a nutshell, coding is the act of translating problems that are first in a natural, human language to a machine readable language. And that translation happens thanks to programming languages and coding.Coding requires that you understand the intricacies, the particular syntax, and the specific keywords that make up a programming language.
Once you know these features of a language, you can start developing applications coding is only the process of writing code to develop programs and applications Coding is a subset of programming, which entails the logical reasoning, analysis, and planning out a sequence of instructions for a computer program or application before any coding is done.
Coding is a subset of programming, which entails the logical reasoning, analysis, and planning out a sequence of instructions for a computer program or application before any coding is done.
Programming is the bigger picture in the process. Coding is a part of that process, but should always come after the programming, or problem-solving and planning stage.