General Flashcards
Are mathematicians geniuses, per Michael Nielsen?
“Many top mathematicians have, through hard work, internalized more complex mathematical chunks than ordinary humans. Rather than having an inherently more powerful brain, their prior learning has given them better chunking abilities, and so situations most people would see as complex they see as simple, and they find it much easier to reason about.”
What is the single largest barrier to understanding a complex topic, per Michael Nielsen?
Memory of the basics
What is the central idea of the book “The Magical Number Seven, Plus or Minus Two”?
Each person can keep about 7 chunks of information in working memory. Larger chunks effectively increase working memory. Experts know enough small pieces of information to form larger chunks of information that effectively boost their IQ in specific domains.
What are Mortimer Adler’s Four Levels of Reading?
Elementary reading, Inspectional reading, Analytical reading, Syntopical reading
Francis Bacon on reading
“Some books are to be tasted, others to be swallowed, and some few to be chewed and digested”
What does it mean to have an internal locus of control?
It means that an individual takes responsibility for events in his or her life. Someone with an external locus of control blames outside forces for bad things that happen. Psychological research indicates that people with an internal locus of control tend to have better professional outcomes.
Per Ray Dalio, why do ideas cause us mental pain?
Closemindedness: we become too attached to an idea, so it is painful when a person or event comes along to challenge it.
Socialism vs Communist
Socialism involves a state that controls business and the distribution of wealth.
Communism is stateless and involves the people directly owning the means of production.
Socialism is said to be the precursor to Communism. There have been no successful Communist states.
Why is email free?
It’s not actually free - data is gathered and used to advertise to you.
Hermes Trismegistus
A legendary figure associated with Hermes and Thoth that is regarded by Neoplatonists as the author of Hermetic Corpus, the sacred texts of Hermeticism. These texts systemize cult practices to offer adherents a means of ascension from physical limitations.
Gnosis
Empirical, experienced-based knowledge, as opposed to theoretical knowledge or epistemology.
Impact of Hermeticism
Hermetic texts were rediscovered in the 15th century and served as one of the catalysts for the Renaissance.
CPU
A central processing unit is the electronic circuitry within a computer that carries out computer instructions by performing I/O, logic, arithmetic, and controlling operations.
Multiple CPUs vs. Distributed system
CPUs on a machine share memory, capping the total number of jobs that can be done at once. A distributed system does not rely on a shared memory and can therefore do jobs that would be impossible on a single machine with many CPUs.
Sharding
Splitting a large piece of data into pieces for storage on different nodes. Two strategies for doing this are based on either a record’s key or a hash of that key.
Replication
Data is repeated across nodes for better safety and ease of access. Often happens in conjunction with sharding. A node can contain replicas of several different shards.
Synchronous vs. asynchronous replication
In synchronous replication, the leader replica waits for confirmation from follower replicas before it indicates to the user that the data has been inserted. In asynchronous replication, the leader does not wait.
What is the main reason for sharding?
Scalability.
How many partitions does a piece of data belong to?
One.
How many processes can listen on a port in a machine?
One.
Lock
A lock or mutex is a method that enforces synchronization by limiting access to a resource in a situation where there are multiple threads that might try to do so.
Mutex
A mutual exclusion is an object that prevents threads from simultaneously accessing a shared resource.
Concurrency vs. parallelism
Concurrency is when many tasks are being processed at the same time; parallelism is when a task is split into subtasks for parallel execution.
Load balancing
Traffic/requests are distributed among cells to prevent the overloading of any one cell.
There are three main types of tests. What are they?
Unit tests, integration tests, functional tests. Unit tests identify specific breaking components. Integration tests examine the interactions between components. Functional tests are end-to-end and are the largest test.
What does it mean when a test is fragile?
The test is likely to fail when code is changed, even if the change shouldn’t break the test.
How can decoupling be used to write tests?
Testing a component along with all of its dependencies can result in not knowing where an issue stems from. A solution to this is decoupling the tested class from its dependencies. A mock dependency that returns a specific value can be created so that the test targets only the class that needs to be tested.
Templating language
In the context of UI, a templating language makes it possible to reuse HTML and UI components. Like JS, there are variables that can be dynamically replaced and sometimes control statements (if, or). This helps to reduce replication and increase reuse of code.
Autoescaping
In a template, autoescaping helps to prevent XSS vulnerabilities that result from dynamic text from an untrusted source being embedded into an HTML document. Text is converted - for example, angle brackets are turned into < and >.
Batch processing
When a script runs a program using JCL (Job Control Language) without human interaction. This typically occurs at night, during the batch window.
BLOB data type
Binary large object - a long binary string stored as data in a database. Can represent images, etc.
Interleaved memory
When using dynamic random-access memory, spreading memory addresses evenly across memory banks. Contiguous reads and writes use one memory bank after another, reducing wait times.
Deterministic test
A test that behaves as one would expect. A non-deterministic test might fail in some instances and pass in others, without a noticeable change in the code.
Integration test
A test that combines N components with their interactions, where N is less than the total system.
Pairwise test
A type of integration test where services are tested with exactly one dependency at a time. This helps to ensure that each dependency impacts implementation in the expected way.
Regression test
A test that is written when a bug is found, and that passes once the bug is fixed.
Benchmark testing
A test that measures the latency or throughput of code.
Load testing
A test that shows a system reacts when user traffic increases. This helps developers understand when more resources are needed to scale the system and meet demand.
Canary testing
When a small amount of traffic is diverted to a new version of a system before releasing the new version.
What is the general rule of thumb for ratio of unit / integration / end-to-end tests?
85 unit / 10 integration / 5 end-to-end
MVC
MVC is an architectural design pattern that separates an application into three parts: the model, the view, and the controller. The goal of this is to separate different parts of functionality. The model represents data management and interacts with the database or data file. The view is the UI. The controller sits in between, receiving user input, making calls to model objects, updating the view, and providing dynamic data to the view.
Kernel
The core of a computer’s operating system: has complete control over everything in the system.
Buffer
A temporary store for data, to solve for a difference between input and output speed. A streamed video, for example, has a buffer in order to prevent users for waiting for the video to load.
What is a trap in a user process?
A synchronous interrupt caused by an exceptional condition where control is temporarily passed to the operating system (kernel mode) before being returned to the originating process.
What does REST stand for?
Representational State Transfer
API
An application programming interface is a predefined set of methods used by components to communicate with one another.
Hypermedia
An extension of hypertext, where users can click not only text, but images, movies, graphics, and other media.
Why is REST considered stateless?
Client-server communication is closed once the response comes back. A new request does not have access to client context that sticks around between requests.
What is a RESTful web service?
A service that allows requests to be made via a stateless and standardized set of operations (GET, POST, PUT, DELETE).
What is the main difference between REST and RPC?
REST has predefined functions (GET, POST, PUT, DELETE) on a resource. RPC is a way to remotely execute a specific function by name. So sending an email with REST might involve a POST followed by a GET, while sending an email with RPC might simply involve a sendEmail function that is called “directly” by the consumer without REST abstractions.
TCP
Transmission Control Protocol is a standard that defines how to create and maintain a network connection allowing applications to exchange data.
IP
The Internet Protocol defines how computers send packets of data to one another.
How does RPC result in tight coupling between client and service implementation?
Clients need to know server procedures by name and signature in order to use their functionality. If procedures are changed on the server side, client code must also change or else the application will break.
IDL
An Interactive Data Language is a programming language used for data analysis.