a standard way a group of programmers will follow for their identifiers, often languages will have an associated naming convention because the programmers all follow similar, but it isn’t typically restricted to that convention Snake-casee.g. linked_list, is_sorted Pascal-casee.g. LinkedList, IsSorted Camel-casee.g. linkedList, isSorted juxtapositione.g. linkedlist, issorted
Category Archives: CS Concepts
Namespace
a set of signs (names) that are used to identify and refer to objects of various kinds, typically used to group symbols and identifiers with a particular function, and to avoid name collisions between multiple identifiers that share the same name
End-of-line characters
used to create a new line in printing output, sometimes using escape characters for the new line depending on language Note that most high-level languages’ compilers or interpreters will account for differences in target machine interpretation of end-of-line (e.g. C++ end of line is std::endl), some lower-level languages need different new line (e.g. C endContinueContinue reading “End-of-line characters”
Escape sequence/character
when trying to print a reserved or special character (e.g. ‘ ‘ single quotes in C++ which typically are used to indicate to compiler the start and end of literals), the escape character is used to indicate the next character is to be interpreted alternatively e.g. in C++, to print ‘ single quote, you needContinueContinue reading “Escape sequence/character”
Program make-up
a computer program is generally made up of a combination of the below items: Pre-processor directivesLiteral dataIdentifiersOperatorsDelimiters
Main function
in a computer program there can be many functions, and when this code is compiled as a whole, then the executable is run, the main function is the first to be called and run e.g. in C++, the function “main()” is a reserved keyword for this specific reason
Identifier
the name associated with a function, special type, object, or action – usually tied to the language being used Some identifiers are keywords inherent to the programming language (think return for C++), but most identifiers will be named and given by the programmer (e.g. getResultant function identifier was named by programmer who wrote function)Different programmers/companiesContinueContinue reading “Identifier”
Function Declaration and Definition
Function Declaration: tells the compiler about a function’s name (aka identifier), return type, and parameters e.g. in C++type functionName( type [argname], etc ); Function Definition: provides the actual body of the function e.g. in C++type functionName( type [argname], etc) {Action 1;Action 2;return 0;}
Pre-processor directives
an instruction typically at the start of a program that indicates that a particular file should be included to the compiler (e.g. can include source code you wrote with custom functions you want to use in this program) e.g. C++ uses “#include <>” as the command for pre-processor directives
Language Implementation Types
Code that is not in binary (i.e. not machine code) cannot be read by machines, and therefore must be translated to a series of instructions that a computer can understand and execute The machine code is specific to the target machine (e.g. code compiled for Windows can’t run on Mac), and the language implementation typesContinueContinue reading “Language Implementation Types”
Code Types
The are multiple ways to categorize code: source vs machine codehigh level vs low level code Source code: human-readable code, which is the majority of code written by developers which needs to be translated to machine code for executionMachine code: binary code read directly by the machine, specific to the target machine (e.g. machine codeContinueContinue reading “Code Types”
Loader
is the part of an operating system that is responsible for loading programs and libraries. It is one of the essential stages in the process of starting a program, as it places programs into memory and prepares them for execution The loader also keeps track of the free RAM using stack pointers
Computer program
Programs in general receive input, communicates with other devices, processes data, reads and stores data onto external storage, and produces an output Programs are data (in stored program computers), which operates on data, and can manipulate other programs (e.g. viruses, Operating systems) Without extra information or context, we can’t distinguish what is data or instructionsContinueContinue reading “Computer program”
Functional Programming
a programming paradigm sub-type (sub-type of declarative programming) in which the program’s desired result is declared as the value of a series of function applications
Object Oriented Programming
a programming paradigm sub-type (sub-type of imperative programming) in which the program is built by breaking the task down into objects that exhibit behavior (methods) and data using interfaces (contract that states what an object that implements the interface must implement) and messages (communication between objects) OOP groups instructions into objects that exhibit behavior (methods)ContinueContinue reading “Object Oriented Programming”
Lambdas / Anonymous Functions / Blocks
Lambdas typically (and most usefully) define closures – a block of code plus the bindings to the environment they came from Anonymous function is a function without a name, which assigns a function to variable to call it through that variable (a type of callable unit)
Function / Subroutine / Callable unit / subprogram / procedure
a sequence and package of instructions that performs a task. Functions are made to be used in programs wherever that particular task should be performed (i.e. gain reusability for common tasks) In different programming languages, a function may be called a subroutine, subprogram, method, or procedure. Technically, these all have different definitions with slightly differentContinueContinue reading “Function / Subroutine / Callable unit / subprogram / procedure”
Procedural Programming
a programming paradigm sub-type (sub-type of imperative programming) in which the program is built by breaking the task down into a collection of variables, data structures, and subroutines e.g. Matlab is “multi-paradigm” but typically used with the procedural programming paradigm
Common Programming Paradigms
Programming paradigm is a style or way of programming describing the general thought process or way of thinking about the programming method Languages can be used with multiple paradigms, e.g. Javascript has implemented Lambdas more suiting functional paradigm vs it’s traditionally OOP paradigm structure imperative (also called procedural): a paradigm that uses statements that change a program’s state,ContinueContinue reading “Common Programming Paradigms”
Declarative Programming
a general paradigm where the programmer merely declares properties of the desired result (what the program should accomplish), without how to get it. You declare what you want to happen, not how it’s done.There are no loops or conditional statements There are plenty of filters and operations on the data as a whole, but theContinueContinue reading “Declarative Programming”