Lesson 1: Let's start programming
Why do we need Programming?
What do ATMs, the internet, gaming consoles, smartphones and drones have in common? They all require computer hardware "under the hood" in order to work. These computers use something called binary code to get stuff done. The processor (i.e. the brain) within a computer is capable of understanding binary code. To a computer processor, something is either off or on, which is represented by 0 or 1 in binary code. Combining sequences of 0s and 1s enables the computer to do the work that powers smartphones, ATMs etc.
So, we have established that the computer hardware (i.e. the processor) requires a sequence of binary code to do something.
It is a very hard task for people to create the correct sequence of binary code to make a processor do something. This is where programming languages come in. Programming languages add a layer above binary code. Programming languages are easier to learn and write. It works like this:
- We can write a program using a programming language
- That program gets deployed to (i.e. put onto) a computer
- The computer compiles (i.e. changes) the program into a sequence of binary code that it can understand and the program runs as expected
Why are there different programming languages?
Programming languages are just different ways to express ideas, similar to human languages.
For example, you can write a computer program that displays the sentence "Hello there!" using most programming languages. The general concept is the same, but the syntax (i.e. words and style) differs depending on the programming language:
- Java:
System.out.print("Hello there!");
- Python:
print("Hello there!")
- Javascript:
console.log("Hello there!")
- C++:
cout -- "Hello there!";
Each programming language was developed by a person or group of people. As a result, the syntax, concepts and use-cases for each language differ. For example:C++ and C are used in high-performance scenarios. The Windows operating system is built using C.
Java can be used to create many types of applications. Minecraft is developed using Java. Android apps are often created using Java too. Java is also in business applications too, such as online banking.
Javascript, although similar in name to Java, is a completely unrelated language, and is mainly used to create websites and applications.
Python is regarded as a user-friendly programming language. It is a good introduction to programming and can be used in multiple areas; from one-off applications that analyze data, to microservices (i.e. small computer applications) that power web applications.
As a side note, HTML is not exactly a programing language. It is used in website development to tell a browser what the webpage should look like, but it relies on other programming languages (e.g. Java/Javascript/Python etc.) to do the hard work.
Why is Python selected as the primary choice for the Leaving Cert?
- It is easy and quick to get started
- The syntax (i.e. words and style) is user-friendly compared to other coding languages
- It is a popular programming language and has a large, active community base
Related Games