Tech

More Programming Notes…

Value–the representation of some entity that can be manipulated by a program. The members of a ‘type‘ are the values of that type.

Data are characteristics, or information, usually numerical, that are collected through observation. In a more technical sense, data are a set of values of qualitative or quantitative variables about one or more persons or objects, while a datum (singular of data) is a single value of a single variable. In academic treatments, data are simply units of information.

Data re employed in virtually every form of human organizational activity. Data are measured, collected & reported, and analyzed.

Raw data (“unprocessed data” is a collection of numbers or characters before it has been “cleaned” and corrected by researchers. Raw data needs to be corrected to remove outliers or obvious instrument or data entry errors (e.g., a thermometer reading from an outdoor Arctic location recording a tropical temperature). Data processing commonly occurs by stages, and the “processed data” from one stage may be considered the “raw data” of the next stage.

Data has been described as the new oil of the digital economy; “an immensely, untapped valuable asset”. Remember, without data a program cannot perform any useful function.

Data type‘ or simple ‘Type‘ is an attribute of data which tells the compiler or interpreter how the programmer intends to use the data. A data type constrains the values that an expression, such as a variable or function, might take. This data type defines the operations that can be done on the data, the meaning of the data, & the way values of that type can be stored. A data type provides a set of values from which an expression (i.e. variable, function , etc.) may take its values.

Data structure–a collection of related data items ( Ex’s: arrays, lists, queues, stacks, trees)

*Code cost–Always Be Conscious of how much a bit of code costs in terms of performance & in terms of memory space. This is an “old-school” programming concept, or way of thinking. Be mindful of “how expensive’ a bit of code can be.

Note: Also, and why is it useful to know the memory address? References & Pointers are important in C++, because they give us the ability to manipulate the data in the computer’s memory–which can reduce the code and improve the performance! These two features are one fo the things that make C++ stand out from other programming languages, like Python or Java.

  • A type defines a set of possible values and a set of operations (for an object).
  • An object is some memory that holds a value of a given type.
  • A value is a set of bits in memory interpreted according to a type.
  • A variable is a named object.
  • A declaration is a statement that gives a name to an object.
  • A definition is a declaration that sets aside memory for an object.