Contents

Software

See also: Electrical Engineering.

Computer science

Algorithms and data structures

https://en.wikipedia.org/wiki/Template:Data_structures_and_algorithms
See also Optimization

Sorting

Hashing

Binary search tree: O(log d), can become imbalanced e.g. sorted inputs

Heap: root > children

B-tree is a sorted, balanced search tree allowing many children per node. More shallow and thus faster than a binary search tree. Common in filesystems and databases.

Red-black tree

Algorithmic paradigms

A stack is last in first out (LIFO).
A queue is first in first out (FIFO). Efficiently implemented using a circular buffer.

Search

Strings

Mental calculation

Multiplication algorithm

Computational geometry

https://en.wikipedia.org/wiki/Interval_tree

A zipper is a “derivative” of a data type, representing it as a sequence of basic operations. Useful for traversing and functional editing of data structures.

roaringbitmap.org
https://en.wikipedia.org/wiki/Shunting_yard_algorithm

https://en.wikipedia.org/wiki/Expectation%E2%80%93maximization_algorithm
https://en.wikipedia.org/wiki/Forward-backward_algorithm
https://en.wikipedia.org/wiki/Horner%27s_method#See_also
https://en.wikipedia.org/wiki/List_of_algorithms

Graphs

See also graph theory.

https://en.wikipedia.org/wiki/Template:Graph_traversal_algorithms

Representations

dfs: tree, back, forward, cross edges

topological sort

Minimum spanning tree MST

Dijkstra’s single-source shortest paths, without negative edges:

Negative edges (no neg cycles): Bellman-Ford: update all edges V times

Dag shortest paths: update all edges in source linearized order = O(E)

All-pairs shortest paths: Floyd-Warshall, DP on set of allowed intermediate nodes, O(V^3). Also Johnson’s alg.

https://en.wikipedia.org/wiki/Graph_rewriting

Complexity

Models of computation

Other complexity classes

Method of conditional probabilities: choose random actions so that the conditional probability of failure, given the current state, is less than 1. Can approximate the probability using a conditional expectation of the number of bad events, or a pessimistic estimator.

Probabilistically checkable proof

PCP theorem: PCP[O(log n), O(1)] = NP. NP is defined as PCP[0, poly(n)].

Information theory

1948. Claude Shannon.

Codes can be fixed-length or variable length.

Compression

In a prefix code, no codeword is a prefix of another codeword, so it is uniquely decodable without markers.

1949. Complementary sequences have 0 autocorrelation.
1953. A Barker code has an ideal autocorrelation. Used as a synchronizing pattern.

A self-synchronizing code can recover from bit slips like insertions or deletions. No overlapping part of two codewords is a valid codeword.

Noisy-channel coding theorem defines the Shannon limit assuming Gaussian noise. Entropy coding approaches the Shannon limit.

Arithmetic coding represents the message in a single arbitrary-precision fraction, q between 0 inclusive and 1 exclusive.

Burrows-Wheeler transform: sort all rotations and read off the last column and the index of the original string. Decoding: sort the characters for the first column, then sort the pairs to derive the second column, and so on. Linear time complexity with a suffix array. Combine with run-length encoding in bzip2.

Adaptive coding updates the data model.

Gray code or reflected binary code. An ordering of binary strings such that two successive values differ in only one bit. Equivalently viewed as a traversal of the hypercube with edges between vertices with one bit difference.

A universal code is a near-optimal prefix code over the natural numbers. For any true probability distribution p(n) that decreases monotonically in n, the expected length is within a constant factor of optimal.

Error correction

Cryptography

Symmetric encryption needs a shared key.

Asymmetric encryption: messages encrypted with a public key can only be decrypted by the recipient’s private key.

Block cipher

Cryptanalysis

Classic ciphers


Lattice problems underlie lattice cryptography.

Grammar

A formal grammar specifies syntax (what strings are valid).

formal grammar

Parsing

Compilers

Fortran did not have pointer aliasing. Thus, in a function that writes to output and repeatedly accesses input values, the inputs are guaranteed not to change and can be cached in registers. Whereas in C, the input and output pointers could be aliased and thus overhead logic is needed to reread the input variables after each write.

Static analysis

Data-flow analysis

Compiler

https://en.wikipedia.org/wiki/Template:Compiler_optimizations

bootstrapping: https://github.com/fosslinux/live-bootstrap/blob/master/parts.rst

Interpreter

https://en.wikipedia.org/wiki/Bytecode
https://en.wikipedia.org/wiki/Virtual_machine
https://en.wikipedia.org/wiki/P-code_machine
https://en.wikipedia.org/wiki/Java_bytecode

Type theory

Polymorphism dispatches implementations based on object type

Curry-Howard correspondence: constructive proofs are typed programs. Showing an example of a proposition is equivalent to showing an element of a type.

Type systems

A monad is a monoid in the category of endofunctors of some fixed category. Endofunctor maps a category to itself.

A monoid M has two morphisms:

Monads are associative with identity. For f: V -> Monad[V],

Theorem proving

Boolean satisfiability problem: is there an interpretation (assignment of variables) that satisfies a Boolean formula (evaluates to true).


Version space learning for binary classification

A rough set approximates blurry concepts

Pattern matching
https://en.wikipedia.org/wiki/Forward_chaining from facts
https://en.wikipedia.org/wiki/Backward_chaining from goals
Rete algorithm https://news.ycombinator.com/item?id=40480242

Logic programming and constraint programming

Automated theorem proving and proof assistants

Modeling

Testing

Systems

Computer architecture

https://en.wikipedia.org/wiki/Patch_(computing)

Processors


Instruction pipelining

A microarchitecture is a processor design that implements an ISA.

https://en.wikipedia.org/wiki/Register_file

Arithmetic logic unit (ALU)

Interrupt or trap

Signal

Watchdog timer triggers a reboot

Instruction set architecture (ISA) defines machine code or bytecode.

x86

Instruction encoding is variable length.

General-purpose registers, 16-bit. Can also access low and high half separately (al, ah).

Other registers

Instructions

Assembly consists of alphabetical machine instructions.

https://en.wikipedia.org/wiki/Firmware

https://en.wikipedia.org/wiki/Embedded_system
https://en.wikipedia.org/wiki/System_on_module
https://en.wikipedia.org/wiki/Single-board_computer

Operating systems

A process is a program in execution with its own program address space.

Early function calling did not use a stack and could not support recursive function calls. Every local variable was assigned a static address at compile time. The previous function would pass arguments in registers or global variables, then jump to the start of the function. To return, the function would jump to the link register holding the return address. The branch with link instruction automatically stores the next address in the link register. The branch to subroutine bsr instruction stores the return address in the first word of the subroutine, and begins execution and the next word. To return, the subroutine executes an indirect jump to the address stored at its first word.

Machine representations

Memory management

Memory access

Virtualization

Object files contains object code and symbol table.

Execution

Kernel is the core of an OS.

John Hennessy and David Patterson’s Computer Organization and Design
https://news.ycombinator.com/item?id=22116914

https://en.wikipedia.org/wiki/Template:Firmware_and_booting

Mobile devices

Android

https://github.com/seemoo-lab/openhaystack
https://makezine.com/projects/find-my-diy-airtag-tracker/

Samsung Find and Offline Finding protocol
https://www.usenix.org/conference/usenixsecurity24/presentation/yu-tingfeng

Tile
pet GPS trackers

Fleet managment SIM tracks location

SIM + phone that replies to text with location data.

User space

User space or userland for the rest of the OS (application software, UX).

Environment variables

File systems

1983. Richard Stallman: GNU Project

https://en.wikipedia.org/wiki/Systems_management

Databases

https://en.wikipedia.org/wiki/Database
Relational database management system (RDMS) based on relational algebra

The rowstore data format stores rows in a B-tree. Most common and optimal on real-time table seeks for specific rows.

A columnar data format is optimized for OLAP.

Databases

Parallel processing

Amdahl’s law: latency speedup is limited by the portion that is not parallelizable.

Flynn’s taxonomy on instruction vs. data streams

Dining philosophers

Concurrency control

Consensus and synchronization

Multiprocessing uses multiple CPUs or cores.

Multithreading

Atomic instructions

Distributed computing

https://en.wikipedia.org/wiki/Template:Parallel_computing

Security

Foundational

Human level

Hardware

Process level

https://en.wikipedia.org/wiki/Improper_input_validation

Authentication, authorization, and accounting (AAA)

Web security

https://en.wikipedia.org/wiki/Security_engineering

Networking

Network topology

OSI seven layer model

  1. Physical layer
  2. Data link layer
  1. Network layer:
  1. Transport layer
  1. Session layer: HTTP
  1. Presentation layer: HTTP
  2. Application layer: HTTPS, FTP, SMTP

NAT: network address translation. Router modifies IP headers to map IP addresses.
DHCP: Dynamic Host Configuration Protocol server assigns IP addresses over UDP.

STUN: session traversal utilities for NAT. A STUN server helps clients behind routers form peer-to-peer (P2P) connections by providing their private IP address and port number.
TURN: traversal using relays around NAT
ICE: interactive connectivity establishment selects the best communication option between devices.
Proxy server forwards requests.

Reverse proxy: forwards client requests to multiple web servers: Apache, Nginx, HAProxy, Squid.

https://en.wikipedia.org/wiki/End-to-end_principle

https://en.wikipedia.org/wiki/Regional_Internet_registry

https://en.wikipedia.org/wiki/Template:Internet

nVidia GPUs

CUDA

https://en.wikipedia.org/wiki/OpenCL compute API

Programming languages

https://en.wikipedia.org/wiki/Applications_architecture
https://en.wikipedia.org/wiki/Client%E2%80%93server_architecture

Imperative programming: carry out tasks in order.

Object-oriented programming: based on instances and classes, which provide encapsulation and inheritance. A class is an interface and a template for creating objects.

Functional programming: functions can be passed as arguments and return values. Natural way to express transformations on data. Minimizes mutable state (pure functions) making it easier to reason about, debug, and rerun code.

Dispatch

Declarative programming like SQL and Prolog

https://en.wikipedia.org/wiki/Domain-specific_language (DSL)

https://en.wikipedia.org/wiki/Template:Programming_paradigms_navbox

https://en.wikipedia.org/wiki/Evaluation_strategy

Python and Java: variables are bindings and not pointers. There’s no way to directly modify memory locations and variable reassignment doesn’t affect the underlying object. Function arguments don’t copy so mutations will change the object. “Pass references by value”.

    void pass_by_pointer(std::string* s);
    std::string s = "a";
    pass_by_pointer(&s, n);
    s->insert(0, "b"); // or (*s).insert

Garbage collection frees memory used by inaccessible objects

https://en.wikipedia.org/wiki/Product-family_engineering
https://en.wikipedia.org/wiki/Component-based_software_engineering
https://en.wikipedia.org/wiki/Anti-pattern

Data

Metadata
Transactional data
Hierarchical data
Unstructured data

Business intelligence (BI)

https://en.wikipedia.org/wiki/Data_integration

https://en.wikipedia.org/wiki/Cluster_analysis

Embedding and clustering

Visualization

Graphics

Gamut is the set of colors that can be accurately represented by a device.

https://en.wikipedia.org/wiki/Digital_image_processing

Graphics pipeline

Rendering

Photogrammetry: measurement through photography.
https://en.wikipedia.org/wiki/Photogrammetry
https://en.wikipedia.org/wiki/Collinearity_equation
https://en.wikipedia.org/wiki/Bundle_adjustment
https://en.wikipedia.org/wiki/3D_reconstruction

https://github.com/leandromoreira/digital_video_introduction

Collision detection GJK
https://news.ycombinator.com/item?id=40660761

Web

Languages

UX

https://ux.stackexchange.com/questions/456/when-should-i-use-a-select-box-instead-of-radio-buttons

UI elements

https://en.wikipedia.org/wiki/Mode_(user_interface)

https://en.wikipedia.org/wiki/Internet_service_provider
https://en.wikipedia.org/wiki/Session_ID
https://en.wikipedia.org/wiki/HTTP_cookie

Artificial intelligence

Information science

https://en.wikipedia.org/wiki/Symbolic_artificial_intelligence
https://en.wikipedia.org/wiki/Structure_mining

https://en.wikipedia.org/wiki/History_of_artificial_intelligence

Decision tree

Search

Planning

Knowledge representation and reasoning (KRR)

https://en.wikipedia.org/wiki/Ontology_(information_science)


2012. Wikidata

Ontology or taxonomy

Properties

Authority ID properties

Property constraint P2302

https://query.wikidata.org
https://www.wikidata.org/wiki/Wikidata:SPARQL_query_service/queries/examples

# note that ?p is a wd:, while ?pd is a wdt:
# wdt: does not have readable labels or any properties at all
SELECT ?p ?pLabel ?o ?oLabel {
  wd:Q31 ?pd ?o .
  ?p wikibase:directClaim ?pd .
  SERVICE wikibase:label { bd:serviceParam wikibase:language "en" }
}
LIMIT 40

# directClaim allows removing common filters:
# schema:description, schema:version, schema:dateModified
# FILTER(!STRSTARTS(STR(?property), "http://schema"))
# FILTER(!STRSTARTS(STR(?property), "http://wikiba.se/")) # wikibase:statements
# FILTER (?property NOT IN (rdfs:label, skos:altLabel))

defaultView:BubbleChart

Cloud

Infrastructure as a Service (IaaS) includes virtual private servers (VPS).
Platform as a Service (PaaS)
Software as a Service (SaaS).

Smaller providers: Alibaba Cloud, IBM Cloud, Oracle Cloud, Rackspace, DigitalOcean, Salesforce

Amazon Web Services (AWS)

Largest and most mature.

Compute

Storage

Database

Networking

Analytics

Management

CI/CD

Microsoft Azure

Second-largest.

Google Cloud Platform (GCP)

Vertex AI (ML), AI Platform Notebooks
Compute Engine (VM), Kubernetes Engine (containers), App Engine, Functions (serverless)
Cloud Storage, Cloud SQL, Cloud Spanner (relational), BigQuery warehouse, Cloud Bigtable (NoSQL), Dataflow (Apache Beam processing), Pub/Sub message delivery
Cloud VPN (connect on-prem and cloud), Load Balancing, CDN, DNS
Monitoring, Logging, IAM, Armor (DDoS, etc protection), Key Management Service, Security Command Center

History

First computers

Mainframes

Internet

Misc

Recover Python code
https://news.ycombinator.com/item?id=13847465

C# GUI programming: https://www.unterminated.com/random-fun/how-to-copy-a-file-from-a-30-year-old-laptop

github.com/maybe-finance/maybe shows bank accounts and credit cards.

https://en.wikipedia.org/wiki/Information_retrieval

GoogleContentWarehouse client publishes ranking features.

GQL: Graph Query Language
https://hal.science/hal-04094449
https://arxiv.org/abs/2112.06217

https://en.wikipedia.org/wiki/Template:Software_development_process
https://en.wikipedia.org/wiki/Scheduling_(computing)#See_also
https://en.wikipedia.org/wiki/Template:C_standard_library
https://en.wikipedia.org/wiki/Template:Memory_management
https://en.wikipedia.org/wiki/Template:Internet_protocol_suite
https://en.wikipedia.org/wiki/Template:Linux_kernel
https://en.wikipedia.org/wiki/Template:Unix_commands
https://en.wikipedia.org/wiki/List_of_Microsoft_Windows_components
https://en.wikipedia.org/wiki/Template:Processor_technologies
https://en.wikipedia.org/wiki/Template:Computer_laws
https://en.wikipedia.org/wiki/Template:Design_patterns
https://en.wikipedia.org/wiki/Bell_Labs