Module 7.4- Understanding Programming Language Categories Flashcards

(14 cards)

1
Q

High-level Languages

A
  • these are languages designed to be easy for humans to read and write
  • they abstract away the complexities of hardware operations, allowing you to focus on solving problems rather than managing system details
  • Easier to Learn- high-level languages are closer to natural language, which makes them easier to learn and use, especially for beginners
  • Automatic Memory Management- these languages often handle memory management and other low-level details automatically
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
2
Q

Popular High-level Languages

A
  • Python- known for its simple, readable syntax, and is widely used in web development, data science, and automation
  • Java- used in enterprise environments, Android development, and large-scale applications
  • JavaScript- a must for web development, JavaScript enables dynamic and interactive websites
  • e.g. if you’re building a web app, you’ll likely use JavaScript on the frontend and Python or Java on the backend- both are high-level languages that let you focus on building features rather than worrying about how the machine operates behind the scenes
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

Low-level Languages

A
  • these are closer to machine code, meaning they give you more control over the hardware but are harder to read and write
  • Direct Hardware Control- low-level languages allow direct manipulation of memory and hardware components, making them ideal for tasks like writing operating systems or embedded systems
  • Less Abstraction- require the programmer to manage system resources like memory, making them more complex but also more powerful in specific use cases
  • Assembly Language- used for direct hardware control and performance optimisation; very specific to the hardware architecture
  • C- while often considered a high-level language, C can also be used for low-level tasks, such as writing operating systems or performance-critical applications
  • e.g. if you’re developing software for a microcontroller or need to write a device driver, you might use Assembly or C to get the level of control required for optimal performance
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

Compiled Languages

A
  • Faster Execution- because the code is already translated into machine code, compiled languages tend to run faster than interpreted ones
  • Error Checking Before Execution- the compiler will catch many errors before the program is even run, which can save time during the development process
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
5
Q

Examples of Compiled Languages

A
  • C++- commonly used in game development, high-performance systems, and software requiring efficient memory management
  • Java- while it’s often considered a mix of both compiled and interpreted, Java first compiles code into bytecode, which is then interpreted by the Java Virtual Machine (JVM)
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
6
Q

Interpreted Languages

A
  • code is translated and executed line by line by an interpreter at runtime, rather than being compiled into machine code first
  • More Flexible and Easier to Debug- since the code is executed line by line, you can easily test and debug parts of your program without recompiling the whole thing
  • Platform-Independent- interpreted languages tend to be more portable since they don’t need to be compiled for a specific system architecture
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
7
Q

Examples of Interpreted Languages

A
  • Python- known for its readability and is often used in rapid development environments due to its interpreted nature
  • JavaScript- in web development, JavaScript is interpreted by the browser, allowing for dynamic, real-time interaction on websites
  • e.g. when writing a Python script, you don’t need to compile the entire program beforehand- can run your code and fix any errors as they occur, which is particularly useful during development and testing
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
8
Q

Procedural vs Object-Oriented Programming (OOP) Languages

A
  • these paradigms represent different ways to organise and structure your code
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
9
Q

Procedural Programming

A
  • Linear Flow- program is executed step-by-step, making it easy to follow and understand
  • Functions and Procedures- tasks are broken down into small, reusable functions, each handling a specific task
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
10
Q

Examples of Procedural Programming

A
  • C- one of the most widely used procedural languages, especially in system-level programming
  • Pascal- an older procedural language often used for teaching programming concepts
  • e.g. if you’re writing a simple calculator, you might use procedural programming to create functions for each operation (add, subtract, multiply) and call them when needed
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
11
Q

Object-Oriented Programming (OOP)

A
  • the focus is on objects-self-contained entities that represent real-world items or abstract concepts
  • Objects and Classes- objects are instances of classes, which define the structure and behavior of those objects
  • think of a class as a blueprint and an object as a specific instance of that blueprint
  • Encapsulation- OOP promotes encapsulation, meaning data is hidden inside objects and only exposed through specific methods
  • Reusability- OOP allows for code reuse through inheritance, where one class can inherit properties and methods from another
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
12
Q

Examples of OOP

A
  • Java- known for its strong support for OOP concepts, it’s widely used in enterprise software and Android development
  • Python- while Python supports multiple paradigms, it’s often used in OOP projects because of its flexibility
  • e.g. in a game, you might define a Character class with properties like health and speed- then, you can create multiple character objects e.g. hero, villain that share those properties but have their own unique behaviours
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
13
Q

Scripting Languages

A
  • commonly used for automating tasks, handling lightweight jobs, or extending the functionality of larger programs
How well did you know this?
1
Not at all
2
3
4
5
Perfectly
14
Q

What are Scripting Languages used for?

A
  • designed to automate repetitive tasks or control other applications
  • usually interpreted, meaning they don’t need to be compiled, making them ideal for quick development and execution
  • Automation- scripting languages are often used to automate tasks, such as running backups, processing files, or deploying code
  • Glue Code- they are also used to “glue” together different software components, allowing programs to work together
  • Bash- often used in Unix/Linux environments for automating system tasks
  • JavaScript- go-to language for web browsers, adding interactivity to websites
  • Perl- known for its text processing capabilities, Perl is often used for automating tasks in web development and network programming
  • e.g. a system administrator might use a Bash script to automate server backups, ensuring that data is saved at regular intervals without manual intervention
How well did you know this?
1
Not at all
2
3
4
5
Perfectly