Skip to content
Building A Better World One Student At A Time
facebook
twitter
instagram
EduTainment
Email Support myeducite@gmail.com
Sociology notes has been updated based on popular demand.....||| March 2022 Past Questions for CIE are being updated at the moment....||| Feel Free to send us a mail if you encounter difficulties along the line....|||
  • AS & A-Level
    • Business
      • Business & its Environment
      • People in Organisations
      • Marketing
      • Operations & Project Management
      • Finance & Accounting
      • Strategic Management
    • Economics
      • BASIC ECONOMIC IDEAS & RESOURCE ALLOCATION
        • Scarcity, Choice & Opportunity Cost
        • Positive & Normative Statements
        • Factors of Production
        • Resource Allocation
        • Production Possibility Curve
        • Money
        • Classification of Goods and Services
      • Government Macroeconomic Intervention
        • Maximum and Minimum Price
      • The Macro Economy
      • Government Macroeconomic Intervention
  • CIE IGCSE
    • Accounting – 0452/0985
    • Biology 0610/0970
    • Business Studies 0450/0986
      • Understanding Business Activity
        • Business Activity
        • Classification of Biz
        • Enterprise, Business Growth and Size
        • Business Organisation
        • Business objectives and stakeholder objectives
      • People in Business
        • Motivating Employees
        • Organisation and Management
        • Recruitment, Selection and Training of Employees
        • Internal and External Communication
      • Marketing
      • Operations Management
        • Production of Goods and Services
        • Cost, Scale of Production and Break Even Analysis
        • Achieving Quality Production
        • Location Decisions
      • Financial Information and Decisions
        • Business Finance
        • Cash Flow Forecasting
        • Income Statement
        • Balance Sheet
        • Analysis of Accounts
      • External Influences on Business Activity
    • Chemistry 0620/0971
    • Economics 0455/0987
      • Basic Economic Problem
        • The Nature of Economic problem
        • The Factors of production
        • Opportunity Cost
        • Production Possibility Curve
      • The Allocation of Resources
        • Microeconomics and Macroeconomics
        • Demand
        • Supply
        • Price Determination
        • Price Elasticity of Demand
        • Price Elasticity of Supply
        • Market Economic System
        • Market Failure
        • Mixed Economic System
      • Microeconomics
        • Money & Banking
        • Households
        • Workers
        • Trade Union
        • Firms
        • Firms and Production
        • Firms’ Cost, Revenue & Objectives
        • Market Structure
      • The Macro-economy
        • Macroeconomic aims
        • Fiscal Policy
        • Monetary Policy
        • Supply Side Policies
        • Economic Growth
        • Employment
        • Inflation
      • Economic Development
        • Poverty
        • Living Standards
      • Int’l Trade & Globalisation
        • Foreign Exchange Rates
    • History 0470 / 0977
    • Sociology 0495
      • Theory & Methods
      • Family
      • Media
      • Education
      • Key Terms
    • Geography 0460
    • Information & Communication Technology -0417
    • Physics 0625
    • Religious Studies 0490
  • Edexcel IGCSE
    • Religious Studies
      • Authority of the Bible
  • International Baccalaureate
    • Business Management
      • BM Key Terms
      • Business Organization & Environment
        • Role of Business
        • Key Terms
      • Finance & Account
        • F&A Key Terms
      • Human Resource Management
        • HR Key Terms
      • Operations Management
        • OM Key Terms
    • Economics
      • Introduction to Economics
      • Microeconomics
      • Macroeconomics
      • The Global Economy

Coding: How it Works

Home > Education > Coding: How it Works

Coding: How it Works

Posted on July 25, 2019July 25, 2019 by admin
0

Computer code is very important. Almost every electronic device you use relies on code. The way things work can seem quite confusing, but when you break it down it’s actually simple.

People who make code are called programmers, coders or developers. They all work with computers to create websites, apps, and even games! Today you’ll learn what code it, what it is for, and how to start learning code yourself.

What Is Code?

Computers have their own language called Machine Code which tells them what to do. As you can see, it doesn’t make a lot of sense to humans!

Each number or letter is telling the computer to change something in its memory. This could be a number or word, or a little part of a picture or video. By themselves, computers don’t know how to do anything. It is the job of the programmer to give them instructions.

It is possible to learn Machine Code, but it would take a long time! Luckily there is an easier way to communicate with computers.

What Is a Programming Language?

 

Now, this looks a little easier to understand! This picture shows how to tell the computer to say Hello, world. Instead of using machine code, it uses a programming language called Python.

Almost all programming languages work the same way:

  1. You write code to tell it what to do: print(“Hello, world”).
  2. The code is compiled, which turns it into machine code the computer can understand.
  3. The computer executes the code, and writes Hello, world back to us.

There are hundreds of different programming languages which can seem confusing, but they all do the same thing. You type in what you want it to do, the compiler turns it into language the computer understands, then the computer does it, which is called executing the code in programming speak!

What Is Coding?

 

Coding is the process of using a programming language to get a computer to behave how you want it to. Every line of code tells the computer to do something, and a document full of lines of code is called a script.

Each script is designed to carry out a job. This job might be to take an image and change its size. It might play a certain sound or piece of music. When you click like on someone’s post on social media, a script is what makes it happen.

Unlike people, computers will do exactly what you tell them to. This might sound great, but it can cause problems. If you tell a computer to start counting upwards, and don’t tell it to stop, it’ll keep counting forever! Being a good programmer is all about knowing how to tell a computer to act.

What Is a Program?

Scripts by themselves can only do things if they are compiled and then executed. This is useful while you are still working on it, but when you are done, you want people who aren’t programmers to be able to use your script. What you need is to turn your script into a program.

 

When you are happy with your script, you can compile it into a program. As you already know, compiling changes the code from your programming language into machine code the computer can understand. This time, the machine code is stored in a program which anyone can download and use. Every kind of app, game, or website is a program.

Is Coding Hard?

Coding can be very simple, and anyone can learn the basics. A good analogy is to think of coding like books in a library. Some books use simple language, and the stories are easy to understand. Others use very complex words and have stories that seem to make no sense. Whether they are simple or hard to read, they are all books.

The more books you read, the better you get at it. The complicated language or confusing stories get easier to understand until one day you can read things that you wouldn’t even dream of in the past!

 

Learning to code is the same. The first time you try to code you will find it hard, but every time you do it you get better. If you find learning a programming language hard, you can still learn the important ideas behind it using a visual coding language.

What Does Code Look Like?

The image above shows a script called hello_name. You’ve already seen that a single line of code can make the computer print to the screen. Let’s say that instead of just saying hello world, you want the user to type in their name, and for the computer to greet them by name? Let’s break down what is happening here.

  1. When the script starts the computer prints a question to the screen.
  2. Next the computer waits for the user to input their name, and saves it.
  3. “Hello” prints to the screen, along with the saved name.
  4. In the Cmder window, the script compiles and executes using Python.
  5. The script ran just the way it was designed to, before exiting.

This example shows you a simple piece of code written in a code editor, and run in Cmder which is a type of terminal window. Don’t worry too much about what either of these things is for now. You now know what Python code looks like and how this script works.

How Code Becomes a Program

If you are totally new to code, you might still wonder how scripts like the one above become the kind of programs you are used to using. In the image above, the window on the left is a tool to turn Python scripts into programs. The window on the right has an icon called hello_name.exe. I think you can guess what happens if you were to click on it!

From no code, to a finished program. This example is really simple, but this is how almost all coding works. Every day, people use programming languages they have learned, to write scripts, which will become programs we all use.

credits to makeuseof.com

Views: 750
Share on Facebook Share
Share on TwitterTweet
Share on Pinterest Share
Share on LinkedIn Share
Share on Digg Share

Tags: code, programming language

Archives

  • August 2020
  • June 2020
  • May 2020
  • April 2020
  • February 2020
  • January 2020
  • December 2019
  • November 2019
  • October 2019
  • September 2019
  • July 2019
  • June 2019
  • May 2019

Recent Posts

  • Post Covid: 10 Teaching tips every teacher should know
  • 21 Icebreakers That’ll Make Your Online Engagement Interesting
  • Inspire Your Kid’s Creativity With These 12 Online Art Resources
  • Why You should Earn a Certification in your Field of Expertise
  • How to Teach Online Like a Superhero

Calendar

July 2019
M T W T F S S
1234567
891011121314
15161718192021
22232425262728
293031  
« Jun   Sep »

Archives

  • August 2020
  • June 2020
  • May 2020
  • April 2020
  • February 2020
  • January 2020
  • December 2019
  • November 2019
  • October 2019
  • September 2019
  • July 2019
  • June 2019
  • May 2019
Please donate to us. Bitcoin: 1PxhrA2u1W2b3G4x4y6VjKJMf9m6z9TfwT
© 2021 All Right Reserved | MyEducite