Programming language
Abstract
Mostly for Self- reference
Python
Introduction
- High Level language - Strong abstraction, easy to use and easy to understand syntax.
- General purpose programming language
- Indentation important
- Case Sensitive
- Supports multiple programming paradigms such OOP and functional
- Excellently documented and comprehensive standard library
- Dynamically but Strongly typed - Types are checked at run time and forbids operations that are not of the same type
- Garbage collected - Automatic memory management
Basics
- The Python Standard Library
- Built-in types
- list ,tuple, set, dict and others
- Built-in functions
- print() , len() ,range(),enumerate(),map(),zip() and others
- Built-in modules
- os,sys,itertools,collecations,math and others
- Built-in types
Few important methods and libraries
C++
Introduction
- The standard Template Library
- Sequence Containers - Vectors ,Lists, Stacks
- Associative containers - Sets , Maps
- Algorithms - Sort, Copy,Reverse , Min,Max
- Iterators - Abstracted objects that allow iteration across a container
- Input/Output - iostream ,fstream,string
- The Boost Libraries - Third-party libraries
- File System interface abstraction
- regular expressions
- threading
- smart pointers
- networking
- Object Oriented Programming
- Constructors - default , parameter , copy ,assignment operator(not a constructor technically)
- Destructor - deallocate any memory allocated upon object creation
- Selectors - ability to read member data and provide calculations based upon the data e.g. getter method
- Modifiers - able to read member data as well as change that data e.g. setter method
- Inheritance - Used to model a type of relationship between object known as is-a
For example American call option is a call option hence American call option should inherit all properties a call option possess such as strike price and underlying price.
Few important methods
Virtual Destructors - virtual destructor ensures that when derived subclasses go out of scope or are deleted the order of destruction of each class in a hierarchy is carried out correctly. If the destruction order of the class objects is incorrect, in can lead to what is known as a memory leak.
Template Classes
- They behave in a different way. They allow us to define classes without the need to specify the types of data that the classes will utilise upfront.
Cpython
R
SQL
Kdb+/q
- Why use KDB+/q
- Optimized for time-series data and real-time analytics
- Column-oriented storage structure
- In-memory first architecture for extremely fast processing (keep as much data as possible in RAM rather than on disk)
- Built-in programming language (q) that integrates with the database
- Excellent performance for large-scale time-series calculations
- list of all functions and statements
- tables[] - gives list of all tables stored in database.
- count db - returns number of rows
- cols db - retruns list of names of columns
- meta - gives meta data namely column type , foreign keys , attributes
- select from - selects all the columns
- where - conditional statement
git
SQL
Normalization
- Purpose
- To characterize the level of redundancy in a relational schema
- Provide mechanisms for transforming schemas in order to remove redundancy
- Types
- First normal form : atomic values and not a tuple in any column
- Second normal form : no partial dependencies
- Third normal form : no transitive dependencies
- Boyce-Codd normal form : For any dependency A -> B , A should be a super key
- Each normal form must satisfy the previous normal form