What is a programming paradigm?
A programming paradigm is a style of programming.
What is imperative programming?
Imperative programming is a programming paradigm that focuses on describing how a program operates step by step.
The code directly controls execution flow and state change, explicit statements that change a program state.
What is the procedural paradigm?
A form of imperative programming which uses functions, modules, procedures and other forms of structuring to describe the step-by-step operations of a program.
The code is organized as procedures that call each other.
What is the Object-oriented paradigm?
A form of imperative programming which is organized as objects that contain both data structure and associated behaviour, uses data structures consisting of data fields and methods together with their interactions to design programs.
What is the Declarative paradigm?
A form of non-imperative programming in which code declares properties of the desired result, but not how to compute it, describes what computation should perform, without specifying detailed state changes.
What is the Functional paradigm?
A form of non-imperative programming in which a desired result is declared as the value of a series of function evaluations, uses evaluation of mathematical functions and avoids state and mutable data.
What is a function in functional programming?
A function is a mapping from a set of inputs, called the domain, to a set of possible outputs, known as the co-domain.
They are first-class objects.
What is the domain in functional programming?
The domain is a set from which the function’s input values are chosen.
What is the co-domain in functional programming?
The co-domain is a set from which the function’s output values are chosen.
What is composition of functions in functional programming?
Using one function as an argument of another, is called composition of functions.
What is a first-class object?
These are objects which may appear in expressions, be assigned to a variable, be assigned as an argument or be returned in a function call.
What is statelessness in functional programming?
In a functional programming language, the value of a variable cannot change as there are no states, i.e. there is no before or after.
What is the only thing a function can do in functional programming?
The only thing a function can do is calculate something and return a result, and it is said to have no side effects.
What is function application?
The process of giving particular inputs to a function.
Partial function application is where a function is given a specific input in its definition rather than letting them all be assigned by the user.
What is a higher-order function?
A function is higher-order if it takes a function as an argument or returns a function as a result, or does both.
What is the map function?
Map is a higher-order function that takes a list and the function to be applied to the elements in the list as inputs, and returns a list made by applying the function to each element of the old list.
What is a list in functional programming?
A list is a collection of elements of a similar type, such as integers, characters or strings, which can be written in square brackets. A list is composed of a head and a tail. The head is the first element of the list, and the tail is the remainder of the list. They are immutable as with every other variable.
What is the filter function?
filter is another higher-order function which takes a predicate (to define a Boolean condition) and a list. It returns the elements within the list that satisfy the Boolean condition.
What is the fold function?
A fold (or reduce) function reduces a list to a single value, using recursion. The initial value is combined with the first element of the list, which is then recursively combined with the first element of the remaining list, and so on.
Fold functions can start with either the left or right most part of a list.
What are the basic list functions?
What is Big Data?
‘Big Data’ includes data that is collected on such a large scale that it cannot easily be analysed.
What are the three distinguishing characteristics of Big Data?
The three distinguishing characteristics of Big Data are:
- volume – too big to fit on a single server,
- velocity – there is only milliseconds or seconds to respond, particularly with streamed data,
- variety – the data may be in many forms such as structured, unstructured, text, multimedia.
What are the features of functional programming which make it useful for working with Big Data distributed across multiple servers?
What is the fact-based model?
A data representation approach that focuses on immutable facts: pieces of data that cannot be further deconstructed and remain eternally true.