Grammar of CS

Basic Facts for Computer Science

The Grammar

1. Computer

What is a computer?

A computer is a machine that can be programmed to perform many types of operations.

2. Computer Program

What is a computer program?

A computer program is a set of instructions given to a computer to perform a task.

3. Statement

What is a statement?

A statement is a fundamental building block of a program that describes a single logical operation.

4. Expression

What is an expression?

An expression is a part of a statement that combines values and operators using specific rules to produce a value.

5. Variable

What is a variable?

A variable is a name in a program associated with a value that may be changed.

6. Variable Declaration

What is a variable declaration?

A variable declaration is a statement which names one or more variables, sometimes including the variable's type and initial value.

7. Assignment Statement

What is an assignment statement?

An assignment statement is a statement where a variable is given a new value in the form "variable-name gets expression" such as "x = 5".

8. Function

What is a function?

A function is a packaged set of instructions for a computer program that can be called over and over, normally expressed with a function name, argument list, function body, and return statement.

9. Data Type

What is a data type?

A data type is a classification of data into categories that determines the possible values and usage of the data.

10. Primitive Data Types

What are the primitive data types?

The primitive data types are boolean, integer, floating-point number, fixed-point number, string, function.

11. Data Structure

What is a data structure?

A data structure is a way of organizing data for efficient use.

12. Basic Data Structures

What are some basic data structures?

Some basic data structures are array, associative array, linked list, hash table, stack, queue, set, tree, graph.

13. Algorithm

What is an algorithm?

An algorithm is a set of step-by-step instructions.

14. Recursiion

What is recursion?

Recursion is the repetition of part of a program inside itself, simplifying a problem each time it is called until a base case is reached.

15. Operating System

What is an operating system?

An operating system is a computer program that manages computer hardware, provides services, and runs application programs.

16. Application

What is an application?

An application is a set of computer programs that perform coordinated tasks.

17. Internet

What is the Internet?

The Internet is a worldwide system of computer networks connecting billions of devices using the Transmission Control Protocol (TCP) and the Internet Protocol (IP).

18. Programming Language

What is a programming language?

A programming language is a formal structured language used to communicate instructions to a machine.

19. Compiler

What is a compiler?

A compiler is a computer program that translates source code written in a programming language to machine code or another lower-level programming language.

20. Interpreter

What is an interpreter?

An interpreter is a computer program that directly performs instructions written in a programming language without compilation.

21. Computer Hardware

What are some parts of a computer's hardware?

Some parts of a computer's hardware are central processing unit (CPU), graphics processing unit (GPU), random access memory (RAM), data storage, input devices, output devices.

22. Loop

What are the four major forms of loops?

The four major forms of loops are for, for-each, while, do-while.

23. Conditional

What are the four major forms of conditionals?

The four major forms of conditional statements are if-then, if-then-else, if-then-elseif-else, switch-case-default.

24. Functional Programming

What is functional programming?

Functional programming is a programming paradigm that evaluates only pure functions, avoiding side effects and mutable data.

25. Object-Oriented Programming

What is object-oriented programming?

Object-oriented programming is a programming paradigm where the building blocks are objects that manage their data (called attributes) using functions (called methods).

26. Class

What is a class?

A class is the definition of the attributes and methods for a type of object, which can be used to create new objects as instances of the class.

27. Constructor

What is a constructor?

A constructor is a special method of class used to create a new object and set it up in a specified way.

28. Method Overriding

What is method overriding?

Method overriding is the practice of creating a method of the same name in a subclass that replaces the method in the superclass.

29. Class Inheritance

What is class inheritance?

Class inheritance is the indication that a class (the subclass) should include all the attributes and methods of another class (the superclass), which may then be extended.

30. Polymorphism

What is polymorphism?

Polymorphism is the ability for the same programmatic structure to work on different types.

31. Boolean Operators

What are some boolean operators?

Some boolean operators are not, and, or, less than, greater than, equals, not equal to.

32. Bitwise Operations

What are some bitwise operations?

Some bitwise operations are NOT, AND, OR, exclusive or (XOR), bit-shift left, bit-shift right.

33. Binary Number

What is a binary number?

A binary number is a whole number represented as a list of bits which can be one or zero, starting with zero, one, one-zero (two), one-one (three).

34. Two's Complement

What is two's complement?

Two's complement is a way to represent negative binary numbers by subtracting one then inverting all the bits of a positive binary number.

35. Pointer

What is a pointer?

A pointer is a value holding the address of a location in memory where another value is stored.

36. Exception

What is an exception?

An exception is a unusual condition raised (or thrown) in a program which may be handled (or caught) to avoid program termination.

37. Scope

What is the scope of named entity?

The scope of a named entity is the area of a program where the name is valid, which may be global or limited to a module, file, function, block, or expression.

38. Function Overloading

What is function overloading?

Function overloading is the practice of creating multiple function definitions with the same name, whose arguments may vary in number or type.

39. Sorting Algorithms

What are some sorting algorithms?

Some sorting algorithms are bubble sort, selection sort, insertion sort, merge sort, quicksort.

40. Array

What is an array?

An array is a sequence of values where each value is accessed by appending an index in brackets (such as "a[5]"), normally starting with index zero.

41. Associative Array

What is an associative array?

An associative array, or map, is a collection of key-value pairs where each key appears only once and the corresponding value may be found quickly.

42. Call By Value

What is call by value?

Call by value is the process of sending an argument to a function as a copy of the value, leaving the original value unchanged by the function.

43. Call By Reference

What is call by reference?

Call by reference is the process of sending an argument to a function as a reference to the value, so the function may alter the original value.

44. Regular Expression

What is a regular expresion?

A regular expression is a sequence of characters that define a search pattern, often used for string matching.

45. JavaScript Object Notation

What is JavaScript Object Notation?

JavaScript Object Notation (JSON) is a data representation consisting of associative arrays, arrays, strings, numbers, and the constants true, false, null.

46. Extensible Markup Language

What is Extensible Markup Language?

Extensible Markup Language (XML) is a data representation consisting of elements which may have attributes, child elements, and text content.

47. Database

What is a database?

A database is a set of data organized so that questions about the data (called queries) may be answered efficiently.

48. Asymptotic Algorithm Complexity

What is asymptotic algorithm complexity?

Asymptotic algorithm complexity describes the number of steps required for an algorithm to complete as the input size becomes very large, often described in Big Oh notation.

49. Polynomial Time Algorithm

What is polynomial time algorithm?

A polynomial time algorithm is an algorithm whose asymptotic complexity is some polynomial expression of the input length.

50. P Problem

What is an P problem?

A P problem is a yes or no question that can be solved in polynomial time.

51. NP Problem

What is an NP problem?

An NP problem is a yes or no question whose solution can be verified in polynomial time.

52. NP-Complete Problem

What is an NP-complete problem?

An NP-complete problem is an NP problem that, if solvable in polynomial time, would make every NP problem solvable in polynomial time.

53. Stack Allocation

54. Heap Allocation

55. Mixin

56. Interface

57. Template

58. Deterministic Program

59. Nondeterministic Program

60. Reflection

61. Cryptography

62. Context-Free Grammar

63. Turing Machine

64. Open-Source Software

65. Closure

66. SQL Database

67. NoSQL Database

68. File System

69. Provisioning

70. Git

71. Linux

72. iOS

73. Android

74. Microsoft Windows

75. OS X

76. Alan Turing

77. Moore's Law

78. Driver

79. Computer Software

80. Anonymous Function

81. Lambda Calculus

82. Test-Driven Development

83. Unit Testing

84. Code Review

85. Integration Testing

86. User Interface Design

87. Web Browser

88. Integrated Development Environment

89. Linker

90. Assembler

91. Preprocessor

92. MapReduce

93. Dynamic Programming

94. Public Key Encryption

95. Application Programming Interface

96. Representational State Transfer

97. Encapsulation

98. Duck Typing

99. Virtual Machine

100. Mutex

101. Thread

102. Deadlock

103. Parallel Programming

104. Multithreaded Programming

105. Distributed Programming

106. Process

107. Scheduler

108. Concurrency

109. Atomic Operation

110. Throughput

111. JavaScript

112. C++

113. Python

114. Java

115. Artificial Intelligence

116. Data Science

117. Container