An intelligent reading partner designed for students, researchers, and lifelong learners. Read at your own pace and get help from AI if you are stuck.

Based in Canada
A new book!
Psychology (2nd edition) by Rose M. Spielman, William J. Jenkins, and Marilyn D. Lovett (2024) is now in @ChapterPal's collection. The book serves as an introductory college-level survey designed for undergraduate students, including psychology majors, general education students, and those pursuing allied fields such as nursing or pre-medicine. The textbook assumes no prior specialized knowledge of the discipline. It covers the broad scientific study of mind and behavior, organizing its progression from fundamental research principles and biological systems to complex individual, social, and clinical phenomena. The text begins with historical foundations and empirical research methodologies, moves through neurobiology, states of consciousness, sensation, learning, and cognition, and culminates in lifespan development, personality, social psychology, industrial-organizational psychology, psychological disorders, and therapeutic treatment. Read the book with an AI tutor: chapterpal.com/ebook/6b3f55f… All books on ChapterPal are free to read with a free account. Table of contents: Preface - About *Psychology 2e* - Changes to the Second Edition * Content revisions for clarity, accuracy, and currency * Research replication and validity * Diversity, representation, and inclusion * Accessibility improvements * Pedagogical foundation * Art, interactives, and assessments that engage * Art Attribution in *Psychology 2e* - Additional Resources * Student and Instructor Resources - About the authors * Senior contributing authors * Contributing Authors * Reviewers 1. Introduction to Psychology - 1.1 What Is Psychology? * WHY STUDY PSYCHOLOGY? - 1.2 History of Psychology * Wundt and Structuralism * James and Functionalism * Freud and Psychoanalytic Theory * Wertheimer, Koffka, Köhler, and Gestalt Psychology * Pavlov, Watson, Skinner, and Behaviorism * Maslow, Rogers, and Humanism * The Cognitive Revolution * Multicultural And Cross-Cultural Psychology * WOMEN IN PSYCHOLOGY - 1.3 Contemporary Psychology * Biopsychology and Evolutionary Psychology * Sensation and Perception * Cognitive Psychology * Developmental Psychology * Personality Psychology * Social Psychology * Industrial-Organizational Psychology * Health Psychology * Sport and Exercise Psychology * Clinical Psychology * Forensic Psychology - 1.4 Careers in Psychology * Other Careers in Academic Settings * Career Options Outside of Academic Settings - Key Terms - Summary * 1.1 What Is Psychology? * 1.2 History of Psychology * 1.3 Contemporary Psychology * 1.4 Careers in Psychology - Review Questions - Critical Thinking Questions - Personal Application Questions 2. Psychological Research - 2.1 Why Is Research Important? * Use of Research Information * NOTABLE RESEARCHERS * The Process of Scientific Research - 2.2 Approaches to Research * Clinical or Case Studies * Naturalistic Observation * Surveys * Archival Research * Longitudinal and Cross-Sectional Research - 2.3 Analyzing Findings * Correlational Research * Causality: Conducting Experiments and Using the Data * Reliability and Validity * EVERYDAY CONNECTION - 2.4 Ethics * Research Involving Human Participants * Research Involving Animal Subjects - Key Terms - Summary * 2.1 Why Is Research Important? * 2.2 Approaches to Research * 2.3 Analyzing Findings * 2.4 Ethics - Review Questions - Critical Thinking Questions - Personal Application Questions 3. Biopsychology - 3.1 Human Genetics * Gene-Environment Interactions - 3.2 Cells of the Nervous System * Neuron Structure * Neuronal Communication * Neurotransmitters and Drugs - 3.3 Parts of the Nervous System * Peripheral Nervous System - 3.4 The Brain and Spinal Cord * The Spinal Cord * The Two Hemispheres * Forebrain Structures * Midbrain and Hindbrain Structures * Brain Imaging * Techniques Involving Electrical Activity - 3.5 The Endocrine System * Major Glands - Key Terms - Summary * 3.1 Human Genetics * 3.2 Cells of the Nervous System * 3.3 Parts of the Nervous System * 3.4 The Brain and Spinal Cord * 3.5 The Endocrine System - Review Questions - Critical Thinking Questions - Personal Application Questions 4. States of Consciousness - 4.1 What Is Consciousness? * Biological Rhythms * Problems With Circadian Rhythms * Disruptions of Normal Sleep * Insufficient Sleep - 4.2 Sleep and Why We Sleep * What is Sleep? * Why Do We Sleep? - 4.3 Stages of Sleep * NREM Stages of Sleep * REM Sleep * Dreams - 4.4 Sleep Problems and Disorders * Insomnia * Parasomnias * REM Sleep Behavior Disorder (RBD) * Sleep Apnea * Narcolepsy - 4.5 Substance Use and Abuse * Substance Use Disorders * Drug Categories - 4.6 Other States of Consciousness * Hypnosis * Meditation - Key Terms - Summary * 4.1 What Is Consciousness? * 4.2 Sleep and Why We Sleep * 4.3 Stages of Sleep * 4.4 Sleep Problems and Disorders * 4.5 Substance Use and Abuse * 4.6 Other States of Consciousness - Review Questions - Critical Thinking Questions - Personal Application Questions 5. Sensation and Perception - 5.1 Sensation versus Perception * Sensation * Perception - 5.2 Waves and Wavelengths * Amplitude and Wavelength * Light Waves * Sound Waves - 5.3 Vision * Anatomy of the Visual System * Color and Depth Perception * CONNECT THE CONCEPTS - 5.4 Hearing * Anatomy of the Auditory System * Pitch Perception * Sound Localization * Hearing Loss - 5.5 The Other Senses * The Chemical Senses * Touch, Thermoception, and Nociception * The Vestibular Sense, Proprioception, and Kinesthesia - 5.6 Gestalt Principles of Perception - Key Terms - Summary * 5.1 Sensation versus Perception * 5.2 Waves and Wavelengths * 5.3 Vision * 5.4 Hearing * 5.5 The Other Senses * 5.6 Gestalt Principles of Perception - Review Questions - Critical Thinking Questions - Personal Application Questions 6. Learning - 6.1 What Is Learning? - 6.2 Classical Conditioning * Real World Application of Classical Conditioning * General Processes in Classical Conditioning * Behaviorism - 6.3 Operant Conditioning * Reinforcement * Punishment * Primary and Secondary Reinforcers * Reinforcement Schedules * Cognition and Latent Learning - 6.4 Observational Learning (Modeling) * Steps in the Modeling Process - Key Terms - Summary * 6.1 What Is Learning? * 6.2 Classical Conditioning * 6.3 Operant Conditioning * 6.4 Observational Learning (Modeling) - Review Questions - Critical Thinking Questions - Personal Application Questions 7. Thinking and Intelligence - 7.1 What Is Cognition? * Cognition * Concepts and Prototypes * Natural and Artificial Concepts * Schemata - 7.2 Language * Components of Language * Language Development * Language and Thought - 7.3 Problem Solving * Problem-Solving Strategies - 7.4 What Are Intelligence and Creativity? * Classifying Intelligence * Creativity - 7.5 Measures of Intelligence * Measuring Intelligence * The Bell Curve * Why Measure Intelligence? - 7.6 The Source of Intelligence * Learning Objectives * High Intelligence: Nature or Nurture? * What are Learning Disabilities? - Key Terms - Summary * 7.1 What Is Cognition? * 7.2 Language * 7.3 Problem Solving * 7.4 What Are Intelligence and Creativity? * 7.5 Measures of Intelligence * 7.6 The Source of Intelligence - Review Questions - Critical Thinking Questions - Personal Application Questions 8. Memory - 8.1 How Memory Functions * Encoding * Storage * Retrieval - 8.2 Parts of the Brain Involved with Memory * The Amygdala * The Hippocampus * The Cerebellum and Prefrontal Cortex * Neurotransmitters - 8.3 Problems with Memory * Amnesia * Memory Construction and Reconstruction * Forgetting - 8.4 Ways to Enhance Memory * Memory-Enhancing Strategies * How to Study Effectively - Key Terms - Summary * 8.1 How Memory Functions * 8.2 Parts of the Brain Involved with Memory * 8.3 Problems with Memory * 8.4 Ways to Enhance Memory - Review Questions - Critical Thinking Questions - Personal Application Questions 9. Lifespan Development - 9.1 What Is Lifespan Development? * Issues in Developmental Psychology * Is Development Continuous or Discontinuous? * Is There One Course of Development or Many? * How Do Nature and Nurture Influence Development? - 9.2 Lifespan Theories * Psychosexual Theory of Development * Psychosocial Theory of Development * Cognitive Theory of Development * SOCIOCULTURAL THEORY OF DEVELOPMENT * Moral Theory Of Development - 9.3 Stages of Development * Prenatal Development * Prenatal Influences * Infancy Through Childhood * Self-Concept * Adolescence * Cognitive Development * Adulthood * Cognitive Development - 9.4 Death and Dying - Key Terms - Summary * 9.1 What Is Lifespan Development? * 9.2 Lifespan Theories * 9.3 Stages of Development * 9.4 Death and Dying - Review Questions - Critical Thinking Questions - Personal Application Questions 10. Emotion and Motivation - 10.1 Motivation * Theories About Motivation - 10.2 Hunger and Eating * Physiological Mechanisms * Metabolism and Body Weight * Obesity * Eating Disorders - 10.3 Sexual Behavior, Sexuality, and Gender Identity * Physiological Mechanisms of Sexual Behavior and Motivation * Kinsey’s Research * Masters and Johnson’s Research * Sexual Orientation * Gender Identity * Cultural Factors in Sexual Orientation and Gender Identity - 10.4 Emotion * Theories of Emotion * The Biology of Emotions * Facial Expression and Recognition of Emotions - Key Terms - Summary * 10.1 Motivation * 10.2 Hunger and Eating * 10.3 Sexual Behavior * 10.4 Emotion - Review Questions - Critical Thinking Questions - Personal Application Questions 11. Personality - 11.1 What Is Personality? * Historical Perspectives - 11.2 Freud and the Psychodynamic Perspective * Levels of Consciousness * Defense Mechanisms * Stages of Psychosexual Development - 11.3 Neo-Freudians: Adler, Erikson, Jung, and Horney * Alfred Adler * Erik Erikson * Carl Jung * Karen Horney - 11.4 Learning Approaches * The Behavioral Perspective * The Social-Cognitive Perspective * Julian Rotter and Locus of Control * Walter Mischel and the Person-Situation Debate - 11.5 Humanistic Approaches - 11.6 Biological Approaches * Temperament - 11.7 Trait Theorists - 11.8 Cultural Understandings of Personality * Personality in Individualist and Collectivist Cultures * Approaches to Studying Personality in a Cultural Context - 11.9 Personality Assessment * Self-Report Inventories * Projective Tests - Key Terms - Summary * 11.1 What Is Personality? * 11.2 Freud and the Psychodynamic Perspective * 11.3 Neo-Freudians: Adler, Erikson, Jung, and Horney * 11.4 Learning Approaches * 11.5 Humanistic Approaches * 11.6 Biological Approaches * 11.7 Trait Theorists * 11.8 Cultural Understandings of Personality * 11.9 Personality Assessment - Review Questions - Critical Thinking Questions - Personal Application Questions 12. Social Psychology - 12.1 What Is Social Psychology? * Situational and Dispositional Influences on Behavior * Fundamental Attribution Error * Is the Fundamental Attribution Error a Universal Phenomenon? * Actor-Observer Bias * Self-Serving Bias * Just-World Hypothesis - 12.2 Self-presentation * Social Roles * Social Norms * CONNECT THE CONCEPTS * Scripts * Zimbardo’s Stanford Prison Experiment - 12.3 Attitudes and Persuasion * What is Cognitive Dissonance? * Persuasion - 12.4 Conformity, Compliance, and Obedience * Conformity * Stanley Milgram’s Experiment * Groupthink * Group Polarization - 12.5 Prejudice and Discrimination * Understanding Prejudice and Discrimination * Types of Prejudice and Discrimination * Why Do Prejudice and Discrimination Exist? * Stereotypes and Self-Fulfilling Prophecy * In-Groups and Out-Groups - 12.6 Aggression * Aggression * The Bystander Effect - 12.7 Prosocial Behavior * Prosocial Behavior and Altruism * Forming Relationships * Attraction * Sternberg’s Triangular Theory of Love * Social Exchange Theory - Key Terms - Summary * 12.1 What Is Social Psychology? * 12.2 Self-presentation * 12.3 Attitudes and Persuasion * 12.4 Conformity, Compliance, and Obedience * 12.5 Prejudice and Discrimination * 12.6 Aggression * 12.7 Prosocial Behavior - Review Questions - Critical Thinking Questions - Personal Application Questions 13. Industrial-Organizational Psychology - 13.1 What Is Industrial and Organizational Psychology? * The Historical Development of Industrial and Organizational Psychology * From World War II to Today - 13.2 Industrial Psychology: Selecting and Evaluating Employees * Selecting Employees * Candidate Analysis and Testing * Evaluating Employees * Bias and Protections in Hiring * The U.S. Equal Employment Opportunity Commission (EEOC) * Americans with Disabilities Act (ADA) - 13.3 Organizational Psychology: The Social Dimension of Work * Job Satisfaction * Work–Family Balance * Management and Organizational Structure * Goals, Teamwork and Work Teams * Organizational Culture * Violence in the Workplace - 13.4 Human Factors Psychology and Workplace Design - Key Terms - Summary * 13.1 What Is Industrial and Organizational Psychology? * 13.2 Industrial Psychology: Selecting and Evaluating Employees * 13.3 Organizational Psychology: The Social Dimension of Work * 13.4 Human Factors Psychology and Workplace Design - Review Questions - Critical Thinking Questions - Personal Application Questions 14. Stress, Lifestyle, and Health - 14.1 What Is Stress? * Good Stress? * The Prevalence of Stress * Early Contributions to the Study of Stress * The Physiological Basis of Stress - 14.2 Stressors * Traumatic Events * Life Changes * Hassles * OCCUPATION-RELATED Stressors - 14.3 Stress and Illness * Psychophysiological Disorders * Stress and the Immune System * Cardiovascular Disorders * Are You Type A or Type B? * Depression and the Heart * Asthma * Headaches - 14.4 Regulation of Stress * Coping Styles * Control and Stress * Social Support * Stress Reduction Techniques - 14.5 The Pursuit of Happiness * Happiness * Positive Psychology * Flow - Key Terms - Summary * 14.1 What Is Stress? * 14.2 Stressors * 14.3 Stress and Illness * 14.4 Regulation of Stress * 14.5 The Pursuit of Happiness - Review Questions - Critical Thinking Questions - Personal Application Questions 15. Psychological Disorders - 15.1 What Are Psychological Disorders? * Definition of a Psychological Disorder * Cultural Expectations * Harmful Dysfunction * The American Psychiatric Association (APA) Definition - 15.2 Diagnosing and Classifying Psychological Disorders * *The Diagnostic and Statistical Manual of Mental Disorders* (DSM) * The International Classification of Diseases * The Compassionate View of Psychological Disorders - 15.3 Perspectives on Psychological Disorders * Supernatural Perspectives of Psychological Disorders * Biological Perspectives of Psychological Disorders * The Diathesis-Stress Model of Psychological Disorders - 15.4 Anxiety Disorders * Specific Phobia * Acquisition of Phobias Through Learning * Social Anxiety Disorder * Panic Disorder * Generalized Anxiety Disorder - 15.5 Obsessive-Compulsive and Related Disorders * Obsessive-Compulsive Disorder * Body Dysmorphic Disorder * Hoarding Disorder * Causes of OCD - 15.6 Trauma- and Stressor-Related Disorders * A Broader Definition of PTSD * Risk Factors For PTSD * Support For Sufferers of PTSD * Learning and the Development of PTSD - 15.7 Depressive, Bipolar, and Related Disorders * Major Depressive Disorder * Subtypes of Depression * Bipolar Disorder * The Biological Basis of Mood Disorders * Suicide * Risk Factors For Suicide - 15.9 Dissociative Disorders * Dissociative Amnesia * Depersonalization/Derealization Disorder * Dissociative Identity Disorder - 15.10 Disorders in Childhood * Attention Deficit/Hyperactivity Disorder * Autism Spectrum Disorder - 15.11 Personality Disorders * Borderline Personality Disorder * Antisocial Personality Disorder - Key Terms - Summary * 15.1 What Are Psychological Disorders? * 15.2 Diagnosing and Classifying Psychological Disorders * 15.3 Perspectives on Psychological Disorders * 15.4 Anxiety Disorders * 15.5 Obsessive-Compulsive and Related Disorders * 15.6 Posttraumatic Stress Disorder * 15.7 Mood and Related Disorders * 15.8 Schizophrenia * 15.9 Dissociative Disorders * 15.10 Disorders in Childhood * 15.11 Personality Disorders - Review Questions - Critical Thinking Questions - Personal Application Questions 16. Therapy and Treatment - 16.1 Mental Health Treatment: Past and Present * Treatment in the Past * Mental Health Treatment Today - 16.2 Types of Treatment * Psychotherapy Techniques: Psychoanalysis * Psychotherapy: Play Therapy * Psychotherapy: Behavior Therapy * Psychotherapy: Cognitive Therapy * Psychotherapy: Cognitive-Behavioral Therapy * Psychotherapy: Humanistic Therapy * Evaluating Various Forms of Psychotherapy * Biomedical Therapies - 16.3 Treatment Modalities * Individual Therapy * Group Therapy * Couples Therapy * Family Therapy - 16.4 Substance-Related and Addictive Disorders: A Special Case * What Makes Treatment Effective? * Comorbid Disorders - 16.5 The Sociocultural Model and Therapy Utilization * Barriers to Treatment - Key Terms - Summary * 16.1 Mental Health Treatment: Past and Present * 16.2 Types of Treatment * 16.3 Treatment Modalities * 16.4 Substance-Related and Addictive Disorders: A Special Case * 16.5 The Sociocultural Model and Therapy Utilization - Review Questions - Critical Thinking Questions - Personal Application Questions References - Introduction to Psychology - Psychological Research - Biopsychology - States of Consciousness - Sensation and Perception - Learning - Thinking and Intelligence - Memory - Lifespan Development - Emotion and Motivation - Personality - Social Psychology - Industrial-Organizational Psychology - Stress, Lifestyle, and Health - Psychological Disorders - Therapy and Treatment
1
68
A new book!
The Agent-Based Evolutionary Game Dynamics book by Izquierdo, Izquierdo, Sandholm (2024) is now in @ChapterPal's collection. This textbook is designed for students, researchers, and practitioners interested in modeling dynamic social interactions within finite populations. It assumes no prior programming background, providing complete foundational instruction in the NetLogo simulation environment, while offering sufficient analytical depth for experienced modelers. The book focuses on how individual decision-making rules, repeated strategic encounters, and population structures drive collective outcomes over time, establishing a clear connection between microscopic agent behaviors and macroscopic population dynamics. Read the book with an AI tutor: chapterpal.com/ebook/8b02ec7… All books on ChapterPal are free to read with a free account. Table of contents: Dedication Preface - 1. Purpose * Model implementation * Model analysis - 2. Structure of the book and potential courses - 3. Why NetLogo? - 4. One book, many formats - 5. What about the programming and the math? - 6. History of the book and acknowledgments Part I. Introduction I-1. Overview - 1. What is this book about? - 2. How is this book organized? * 2.1. Part I. Introduction * 2.2. Part II. Our first agent-based evolutionary model * 2.3. Part III. Spatial interactions on a grid * 2.4. Part IV. Games on networks * 2.5. Part V. Agent-based models vs ODE (Ordinary Differential Equation) models * 2.6. Appendices I-2. Introduction to evolutionary game theory - 1. What is game theory? - 2. Traditional game theory - 3. Evolutionary game theory * 3.1. The beginnings * 3.2. An interpretation of evolutionary game theory where strategies are *explicitly selected* by individuals * 3.3. Take-home message * 3.4. Relation with other branches - 4. How can I learn game theory? I-3. Introduction to agent-based modeling - 1. What is agent-based modeling? - 2. What is an agent? - 3. A paradigmatic example - 4. Agent-based modeling and evolutionary game theory - 5. How can I learn about agent-based modeling? I-4. Introduction to NetLogo - 1. What is NetLogo? * Easy to learn * Powerful * Excellent documentation * Possibility to interact with the model at runtime * Automatic exploration of parameter space * Open-source and free * Multiplatform and online execution of models * Great support and active user community * Abundance of quality resources * Extensions to fulfill specialised needs * Useful to conduct experiments with real people and for participatory modeling * Happy to link with other software - 2. How to learn NetLogo I-5. The fundamentals of NetLogo - 1. The three tabs - 2. Types of agents - 3. Instructions - 4. Variables * Setting and reading the value of variables - 5. Ask - 6. Lists * Constant lists * Building lists on the fly * Reading and changing list items * Iterating over lists - 7. Agentsets - 8. Synchronization - 9. Consistency within procedures - 10. Breeds - 11. Ticks and Plotting - 12. Skeleton of many NetLogo models - 13. The code for Schelling-Sakoda model Part II. Our first agent-based evolutionary model II-1. Our very first model - 1. Goal - 2. Motivation. Cooperation in social dilemmas - 3. Description of the model - 4. Interface design - 5. Code * 5.1. Initial skeleton of the code * 5.2. Global variables and individually-owned variables * 5.3. Setup procedures * 5.4. Go procedure * 5.5 Other procedures * 5.6. Code in the plots * 5.7. Final fix * 5.8. Complete code in the Code tab - 6. Sample runs - 7. Exercises II-2. Extension to any number of strategies - 1. Goal - 2. Motivation. Rock, paper, scissors - 3. Description of the model - 4. Interface design - 5. Code * 5.1. Skeleton of the code * 5.2. Global variables and individually-owned variables * 5.3. Setup procedures * 5.4. Go procedure * 5.5. Other procedures * 5.6. Complete code in the Code tab * 5.7. Code inside the plots - 6. Sample run - 7. Exercises II-3. Noise and initial conditions - 1. Goal - 2. Motivation. Noise in rock, paper, scissors - 3. Description of the model - 4. Interface design - 5. Code * 5.1. Skeleton of the code * 5.2. Global variables and individually-owned variables * 5.3. Setup procedures * 5.4. Go and other main procedures * 5.5. Complete code in the Code tab - 6. Sample run - 7. Exercises II-4. Interactivity and efficiency - 1. Goal - 2. Motivation. The impact of population size - 3. Description of the model - 4. Interactivity - 5. Efficiency * 5.1. Measuring execution speed of different parts of the code * 5.2. Example of computations that we conduct but do not use * 5.3. Example of computations that we conduct several times when once would do * 5.4. Other tips to improve the efficiency of NetLogo code * 5.5. Take-home message - 6. Complete code in the Code tab - 7. Sample run - 8. Exercises II-5. Analysis of these models - 1. Two complementary approaches - 2. Computer simulation approach - 3. Mathematical analysis approach. Markov chains * 3.1. Markov analysis of 2-strategy evolutionary processes where agents switch strategies sequentially * 3.2. Approximation results - 4. Exercises Part III. Spatial interactions on a grid III-1. Spatial chaos in the Prisoner's Dilemma - 1. Goal - 2. Motivation. Cooperation in spatial settings - 3. Description of the model - 4. Interface design - 5. Code * 5.1. Skeleton of the code * 5.2. Global variables and individually-owned variables * 5.3. Setup procedures * 5.4. Go procedure * 5.5 Other procedures * 5.6. Complete code in the Code tab * 5.7. Code in the plots - 6. Sample runs - 7. Exercises III-2. Robustness and fragility - 1. Goal - 2. Motivation. Robustness of cooperation in spatial settings - 3. Description of the model - 4. Interface design - 5. Code * 5.1. Skeleton of the code * 5.2. Extension I. Adding noise to the decision rule * 5.3. Extension II. Playing the game with yourself or not * 5.4. Extension III. Asynchronous strategy updating * 5.5. Complete code in the Code tab - 6. Sample runs * What happens if we add a bit of noise? * What happens if agents do not play the game with themselves? * What happens if strategy updating is asynchronous, rather than synchronous? * What happens if we use DD-payoff = 0.1? * Discussion - 7. Exercises III-3. Extension to any number of strategies - 1. Goal - 2. Motivation. Spatial Hawk-Dove-Retaliator - 3. Description of the model - 4. Interface design - 5. Code * 5.1. Skeleton of the code * 5.2. Global variables and individually-owned variables * 5.3. Setup procedures * 5.4. Go procedure * 5.5. Other procedures * 5.6. Complete code in the Code tab * 5.7. Code inside the plots - 6. Sample runs - 7. Exercises III-4. Other types of neighborhoods and other decision rules - 1. Goal - 2. Motivation. The impact of decision rules - 3. Description of the model - 4. Interface design - 5. Code * 5.1. Skeleton of the code * 5.2. Extension I. Implementation of different neighborhoods * 5.3. Extension II. Implementation of different decision rules * 5.4. Complete code in the Code tab - 6. Sample runs * 6.1. Decision rules * 6.2. Neighborhoods * 6.3. Discussion - 7. Exercises III-5. Analysis of these models - 1. A much greater state space - 2. Cellular automata - 3. Models more amenable to mathematical analysis. The pair approximation * 3.1. Introduction to the pair approximation * 3.2. Derivation of a pair approximation for regular undirected networks * 3.3. Solving the pair approximation. Examples * 3.4. Discussion - 4. Exercises Part IV. Games on networks IV-1. The nxn game on a random network - 1. Goal - 2. Motivation. A single-optimum coordination game - 3. Description of the model - 4. Interface design - 5. Code * 5.1. Skeleton of the code * 5.2. Extensions, global variables and individually-owned variables * 5.3. Setup procedures * 5.4. Go and other main procedures * 5.5 Other procedures * 5.6. Complete code in the Code tab - 6. Sample runs - 7. Exercises IV-2. Different types of networks - 1. Goal - 2. Motivation. Assessing the significance of network structure - 3. Description of the model - 4. Interface design - 5. Code * 5.1. Skeleton of the code * 5.2. Procedures to create networks * 5.3. Procedure to build-network * 5.4. Procedure to setup-players * 5.5. Other procedures * 5.6. Final fixes * 5.7. Complete code in the Code tab - 6. Sample runs - 7. Exercises IV-3. Implementing network metrics - 1. Goal - 2. Motivation. Reassessing the significance of network structure - 3. Description of the model - 4. Interface design - 5. Code * 5.1. Skeleton of the code * 5.2. Global variables and individually-owned variables * 5.3. Procedure to compute-network-metrics * 5.4. Procedures to compute network metrics * 5.5. Other procedures * 5.6. Complete code in the Code tab - 6. Sample runs - 7. Exercises IV-4. Other ways of computing payoffs and other decision rules - 1. Goal - 2. Motivation. Cooperation on scale-free networks - 3. Description of the model - 4. Interface design - 5. Code * 5.1. Skeleton of the code * 5.2. Extension I. Different ways of computing payoffs * 5.3. Extension II. Different decision rules * 5.4. Complete code in the Code tab - 6. Sample runs * 6.1. Cooperation on preferential-attachment networks * 6.2. Robustness of cooperation on scale-free preferential-attachment networks - 7. Exercises IV-5. Analysis of these models - 1. Introduction - 2. Avoid errors * 2.1. Introduction * 2.2. Floating-point errors - 3. Use informative metrics * 3.1. Metrics * 3.2. Stability of metrics - 4. Report meaningful statistics - 5. Derive sound conclusions - 6. Final thoughts - 7. Exercises Part V. Agent-based models vs ODE models V-1. Introduction V-2. A rather general model for games played in well-mixed populations - 1. Goal - 2. Motivation - 3. Description of the model - 4. Extension I. Implementation of different ways of computing payoffs * 4.1. Skeleton of the code * 4.2. Interface design * 4.3. Code * 4.4. Complete code of Extension I in the Code tab - 5. Extension II. Implementation of different decision rules * 5.1. Skeleton of the code * 5.2. Interface design * 5.3. Code * 5.4. Complete code of Extension II in the Code tab - 6. Exercises V-3. Mean Dynamics - 1. Introduction - 2. The mean dynamic - 3. Derivation of the mean dynamic for different stochastic processes * 3.1. Imitate if better * 3.2. Imitative pairwise-difference * 3.3. Imitative linear attraction * 3.4. Imitative linear dissatisfaction * 3.5. Direct best * 3.6. Direct pairwise-difference * 3.7. Direct positive proportional - 4. Running an agent-based model and solving its mean dynamic at runtime * 4.1. The Euler method to numerically solve ODEs * 4.2. Solving an ODE numerically within NetLogo * 4.3. The influence of population size - 5. Representative simulations together with their mean dynamics - 6. Details matter - 7. Exercises Appendices A-1. Different implementations with the same output - 1. Introduction - 2. Three possible stories behind the same behavior * 2.1. Vose’s alias method * 2.2. Roulette wheel * 2.3. Repeated sampling - 3. Which algorithm should we use? A-2. Legend for code skeletons A-3. Models implemented in this book - In Part I. Introduction * I-3. Introduction to agent-based modeling * I-5. The fundamentals of NetLogo - In Part II. Our first agent-based evolutionary model * II-1. Our very first model * II-2. Extension to any number of strategies * II-3. Noise and initial conditions * II-4. Interactivity and efficiency - In Part III. Spatial interactions on a grid * III-1. Spatial chaos in the Prisoner’s Dilemma * III-2. Robustness and fragility * III-3. Extension to any number of strategies * III-4. Other types of neighborhoods and other decision rules - In Part IV. Games on networks * IV-1. The nxn game on a random network * IV-2. Different types of network * IV-3. Implementing network metrics * IV-4. Other ways of computing payoffs and other decision rules - In Part V. Agent-based models vs ODE models * V-2. A rather general model for games played in well-mixed populations * V-3. Mean Dynamics References
3
294
A new book!
Principles of Mechanics: Fundamental University Physics by Salma Alrasheed (2019) is now in @ChapterPal's collection of free books. This textbook provides an introduction to classical mechanics designed for undergraduate students majoring in physics, engineering, or related scientific disciplines. The scope is centered on non-relativistic, classical mechanics, treating matter from single particles to extended continuous bodies. To engage effectively with the content, readers need a background in elementary calculus and vector algebra, as the text systematically utilizes differential and integral methods to formulate physical laws. Read the book with an AI tutor: chapterpal.com/ebook/c036d32… All books on ChapterPal are free to read with a free account. Table of contents: Preface 1 Units and Vectors - 1.1 Introduction - 1.2 The SI Units - 1.3 Conversion Factors - 1.4 Dimension Analysis - 1.5 Vectors - 1.6 Vector Algebra * 1.6.1 Equality of Two Vectors * 1.6.2 Addition * 1.6.3 Negative of a Vector * 1.6.4 The Zero Vector * 1.6.5 Subtraction of Vectors * 1.6.6 Multiplication of a Vector by a Scalar * 1.6.7 Some Properties * 1.6.8 The Unit Vector * 1.6.9 The Scalar (Dot) Product * 1.6.9.1 Some Properties of the Scalar Product * 1.6.10 The Vector (Cross) Product - 1.7 Coordinate Systems - 1.8 Vectors in Terms of Components * 1.8.1 Rectangular Unit Vectors * 1.8.2 Component Method * 1.8.2.2 Subtraction * 1.8.2.3 Scalar Product * 1.8.2.4 The Angle Between Two Vectors * 1.8.2.5 Perpendicular and Parallel Vectors * 1.8.2.6 Vector Product - 1.8.2.7 Triple Product * Scalar Triple Product * Vector Triple Product - 1.9 Derivatives of Vectors * 1.9.1 Some Rules - 1.9.2 Gradient, Divergence, and Curl * 1.9.2.1 Del * 1.9.2.2 Gradient * 1.9.2.3 Divergence * 1.9.2.4 Curl * 1.9.2.5 Some Identities - 1.10 Integrals of Vectors * 1.10.1 Line Integrals * 1.10.2 Independence of Path - Problems 2 Kinematics - 2.1 Introduction - 2.2 Displacement, Velocity, and Acceleration * 2.2.1 Displacement * 2.2.2 Average Speed * 2.2.3 Velocity * 2.2.4 Speed * 2.2.5 Acceleration - 2.3 Motion in Three Dimensions * 2.3.1 Normal and Tangential Components of Acceleration - 2.4 Some Applications * 2.4.1 One-Dimensional Motion with Constant Acceleration * 2.4.2 Free-Falling Objects * 2.4.3 Motion in Two Dimensions with Constant Acceleration * 2.4.4 Projectile Motion * 2.4.5 Uniform Circular Motion * 2.4.6 Nonuniform Circular Motion - 2.5 Relative Velocity - 2.6 Motion in a Plane Using Polar Coordinates - Problems 3 Newton's Laws - 3.1 Introduction * 3.1.1 The Concept of Force * 3.1.2 The Fundamental Forces in Nature - 3.2 Newton’s Laws * 3.2.1 Newton’s First Law * 3.2.2 The Principle of Invariance * 3.2.3 Mass * 3.2.4 Newton’s Second Law * 3.2.5 Newton’s Third Law - 3.3 Some Particular Forces * 3.3.1 Weight * 3.3.2 The Normal Force * 3.3.3 Tension * 3.3.4 Friction * 3.3.5 The Drag Force - 3.4 Applying Newton’s Laws * 3.4.1 Uniform Circular Motion * 3.4.2 Nonuniform Circular Motion - Problems 4 Work and Energy - 4.1 Introduction - 4.2 Work * 4.2.1 Work Done by a Constant Force * 4.2.2 Work Done by Several Forces * 4.2.3 Work Done by a Varying Force - 4.3 Kinetic Energy (KE) and the Work–Energy Theorem * 4.3.1 Work Done by a Spring Force * 4.3.2 Work Done by the Gravitational Force (Weight) * 4.3.3 Power - 4.4 Conservative and Nonconservative Forces * 4.4.1 Potential Energy - 4.5 Conservation of Mechanical Energy * 4.5.1 Changes of the Mechanical Energy of a System due to External Nonconservative Forces * 4.5.2 Friction * 4.5.3 Changes in Mechanical Energy due to Internal Nonconservative Forces * 4.5.4 Changes in Mechanical Energy due to All Forces * 4.5.5 Power * 4.5.6 Energy Diagrams * 4.5.7 Turning Points * 4.5.8 Equilibrium Points * 4.5.9 Positions of Stable Equilibrium * 4.5.10 Positions of Unstable Equilibrium * 4.5.11 Positions of Neutral Equilibrium - Problems 5 Impulse, Momentum, and Collisions - 5.1 Linear Momentum and Collisions - 5.2 Conservation of Linear Momentum - 5.3 Impulse and Momentum - 5.4 Collisions * 5.4.1 Elastic Collisions * 5.4.2 Inelastic Collisions * 5.4.3 Elastic Collision in One Dimension * 5.4.4 Inelastic Collision in One Dimension * 5.4.5 Coefficient of Restitution * 5.4.6 Collision in Two Dimension - 5.5 Torque - 5.6 Angular Momentum * 5.6.1 Newton's Second Law in Angular Form * 5.6.2 Conservation of Angular Momentum - Problems 6 System of Particles - 6.1 System of Particles - 6.2 Discrete and Continuous System of Particles * 6.2.1 Discrete System of Particles * 6.2.2 Continuous System of Particles - 6.3 The Center of Mass of a System of Particles * 6.3.1 Two Particle System * 6.3.2 Discrete System of Particles * 6.3.3 Continuous System of Particles (Extended Object) * 6.3.4 Elastic and Rigid Bodies * 6.3.5 Velocity of the Center of Mass * 6.3.6 Momentum of a System of Particles * 6.3.7 Motion of a System of Particles * 6.3.8 Conservation of Momentum * 6.3.9 Angular Momentum of a System of Particles * 6.3.10 The Total Torque on a System * 6.3.11 The Angular Momentum and the Total External Torque * 6.3.12 Conservation of Angular Momentum * 6.3.13 Kinetic Energy of a System of Particles * 6.3.14 Work * 6.3.15 Work–Energy Theorem * 6.3.16 Potential Energy and Conservation of Energy of a System of Particles * 6.3.17 Impulse - 6.4 Motion Relative to the Center of Mass * 6.4.1 The Total Linear Momentum of a System of Particles Relative to the Center of Mass * 6.4.2 The Total Angular Momentum About the Center of Mass * 6.4.3 The Total Kinetic Energy of a System of Particles About the Center of Mass * 6.4.4 Total Torque on a System of Particles About the Center of Mass of the System * 6.4.5 Collisions and the Center of Mass Frame of Reference - Problems 7 Rotation of Rigid Bodies - 7.1 Rotational Motion - 7.2 The Plane Motion of a Rigid Body * 7.2.1 The Rotational Variables - 7.3 Rotational Motion with Constant Acceleration - 7.4 Vector Relationship Between Angular and Linear Variables - 7.5 Rotational Energy - 7.6 The Parallel-Axis Theorem - 7.7 Angular Momentum of a Rigid Body Rotating about a Fixed Axis - 7.8 Conservation of Angular Momentum of a Rigid Body Rotating About a Fixed Axis - 7.9 Work and Rotational Energy - 7.10 Power - Problems 8 Rolling and Static Equilibrium - 8.1 Rolling Motion - 8.2 Rolling Without Slipping - 8.3 Static Equilibrium - 8.4 The Center of Gravity - Problems 9 Central Force Motion - 9.1 Motion in a Central Force Field * 9.1.1 Properties of a Central Force * 9.1.2 Equations of Motion in a Central Force Field * 9.1.3 Potential Energy of a Central Force * 9.1.4 The Total Energy - 9.2 The Law of Gravity * 9.2.1 The Gravitational Force Between a Particle and a Uniform Spherical Shell * 9.2.2 The Gravitational Force between a Particle and a Uniform Solid Sphere * 9.2.3 Weight and Gravitational Force * 9.2.4 The Gravitational Field - 9.3 Conic Sections * 9.3.1 The Polar Equation of a Conic Section * 9.3.2 Motion in a Gravitational Force Field * 9.3.3 The Gravitational Potential Energy * 9.3.4 Energy in a Gravitational Force Field - 9.4 Kepler's Laws * 9.4.1 Kepler's First Law * 9.4.2 Kepler's Second Law * 9.4.3 Kepler's Third Law - 9.5 Circular Orbits - 9.6 Elliptical Orbits - 9.7 The Escape Speed - Problems 10 Oscillatory Motion - 10.1 Oscillatory Motion - 10.2 Free Vibrations - 10.3 Free Undamped Vibrations * 10.3.1 Mass Attached to a Spring * 10.3.2 Simple Harmonic Motion and Uniform Circular Motion * 10.3.3 Energy of a Simple Harmonic Oscillator * 10.3.4 The Simple Pendulum * 10.3.5 The Physical Pendulum * 10.3.6 The Torsional Pendulum - 10.4 Damped Free Vibrations * 10.4.1 Light Damping (Under-Damped) $(\gamma < 2\omega_n)$ * 10.4.2 Critically Damped Motion $(\gamma = 2\omega_n)$ * 10.4.3 Over Damped Motion (Heavy Damping) $(\gamma > 2\omega_n)$ * 10.4.4 Energy Decay - 10.5 Forced Vibrations - Problems References
3
166
A new book!
Principles of Mechanics: Fundamental University Physics by Salma Alrasheed (2019) is now in @ChapterPal's collection of free books. This textbook provides an introduction to classical mechanics designed for undergraduate students majoring in physics, engineering, or related scientific disciplines. The scope is centered on non-relativistic, classical mechanics, treating matter from single particles to extended continuous bodies. To engage effectively with the content, readers need a background in elementary calculus and vector algebra, as the text systematically utilizes differential and integral methods to formulate physical laws. Read the book with an AI tutor: chapterpal.com/ebook/c036d32…
1
68
A new book!
"500 Lines or Less: Experienced programmers solve interesting problems" by Michael DiBernardo (2016) is now in @ChapterPal's collection of free books. The book teaches readers how to structure, decompose, and implement fully functioning versions of complex programs under the strict constraint of approximately five hundred lines of code. Read the book with an AI tutor: chapterpal.com/book/2ad46741… All books on ChapterPal are free to read with a free account. Table of contents: Introduction - Contributors - Acknowledgments - Contributing - Colophon Chapter 1: Blockcode: A visual programming toolkit - Goals and Structure * The Nature of Scripts * Web Applications - Stepping Through the Code * `blocks.js` * `drag.js` * `menu.js` * `turtle.js` - Lessons Learned * Why Not Use MVC? * Toy Changes Can Lead to Real Changes Chapter 2: A Continuous Integration System - What is a Continuous Integration System? - Project Limitations and Notes - Introduction * Files in this Project * Initial Setup - The Components * The Repository Observer (`repo_observer.py`) * The Dispatcher (`dispatcher.py`) * The Test Runner (`test_runner.py`) * Control Flow Diagram * Running the Code - Error Handling - Conclusion * Per-Commit Test Runs * Smarter Test Runners * Real Reporting * Test Runner Manager Chapter 3: Clustering by Consensus - Introduction - Motivating Example - Distributed State Machines - Consensus by Paxos * Simple Paxos * Multi-Paxos * Paxos Made Pretty Hard - Introducing Cluster * Types and Constants * Component Model * Application Interface * Role Classes * Summary - Network - Debugging Support - Testing * Unit Testing - Power Struggles - Further Extensions * Catching Up * Consistent Memory Usage - References Chapter 4: Contingent: A Fully Dynamic Build System - Introduction - The Problem: Building Document Systems - Build Systems and Consistency - Linking Tasks to Make a Graph - The Proper Use of Classes - Learning Connections - Chasing Consequences - Conclusion Chapter 5: A Web Crawler With asyncio Coroutines - Introduction - The Task - The Traditional Approach - Async - Programming With Callbacks - Coroutines - How Python Generators Work - Building Coroutines With Generators - Factoring Coroutines With `yield from` - Coordinating Coroutines - Conclusion Chapter 6: Dagoba: an in-memory graph database - Prologue - Take One - Build a Better Graph - Enter the Query - The Problem with Being Eager - Ramifications of Evaluation Strategy on our Mental Model - Pipetypes * Vertex - Helpers * Gremlins - The Interpreter's Nature - Interpreter, Unveiled - Query Transformers - Aliases - Performance - Serialization - Persistence - Updates - Future Directions - Wrapping Up * Acknowledgements Chapter 7: DBDB: Dog Bed Database - Introduction - Memory - Why Is it Interesting? - Characterizing Failure - The Architecture of DBDB - Discovering the Design * Organisational Units * Reading a Value * How NodeRefs Save Memory * Exercises for the Reader * Patterns and Principles * Summary Chapter 8: An Event-Driven Web Framework - The Basics of HTTP Servers * Comet/Long Poll * Server-Sent Events (SSE) * WebSockets * Long-Lived Connections * Traditional HTTP Server Architecture * Architectural Decisions - Building an Event-Driven Web Server * The Event Loop * CLOS and Generic Functions * Processing Sockets * Processing Connections Without Blocking * Interpreting Requests * Rendering Responses * Error Responses - Extending the Server Into a Web Framework * A DSL for Handlers * Expanding a Handler * HTTP "Types" * All Together Now Chapter 9: A Flow Shop Scheduler - A Flow Shop Scheduler - Background * Flow Shop Scheduling * Local Search - General Solver * Parsing Problems * Compiling Solutions * Printing Solutions - Neighbourhoods - Heuristics - Dynamic Strategy Selection - Discussion Chapter 10: An Archaeology-Inspired Database - Introduction * Designing a Database Like an Archaeologist - Laying the Foundation * Entities * Storage * Indexing the Data * Database * Basic Accessors - Data Behavior and Life Cycle * The Bare Necessities * Transactions - Insight Extraction as Libraries * Graph Traversal - Querying the Database * Query Language * Query Engine Design - Summary Chapter 11: Making Your Own Image Filters - A Brilliant Idea (That Wasn’t All That Brilliant) - The App - Background * Photographs, the Old Way * Photographs, the Digital Way - Running the App - Processing Basics * Size and Color * PImage * File Chooser * Responding to Key Presses - Writing Tests - Do-It-Yourself Filters * RGB Filters * Color * Extracting the Dominant Hue from an Image * Combining Filters - Architecture * The App * Model * Color * Wrapper Classes and Tests * ColorHelper and Associated Tests * Image State and Associated Tests * ImageFilterApp - The Value of Prototyping Chapter 12: A Python Interpreter Written in Python - Introduction * A Python Interpreter * A Python Python Interpreter - Building an Interpreter * A Tiny Interpreter - Real Python Bytecode * Conditionals and Loops * Explore Bytecode - Frames - Byterun * The `VirtualMachine` Class * The `Frame` Class * The `Function` Class * The `Block` Class - The Instructions - Dynamic Typing: What the Compiler Doesn't Know - Conclusion - Acknowledgements Chapter 13: A 3D Modeller - Introduction - Rendering as a Guide * Managing Interfaces and the Main Loop * Coordinate Space * Point * Vector * Transformation Matrix * Model, World, View, and Projection Coordinate Spaces * Rendering with the Viewer * What to Render: The Scene * Nodes * User Interaction * Interfacing with the Scene - Summary - Further Exploration Chapter 14: A Simple Object Model - Introduction - Method-Based Model * `isinstance` Checking * Calling Methods - Attribute-Based Model - Meta-Object Protocols * Customizing Reading and Writing and Attribute * Descriptor Protocol - Instance Optimization - Potential Extensions - Conclusions Chapter 15: Optical Character Recognition (OCR) - Introduction - What is Artificial Intelligence? - Artificial Neural Networks * What Are ANNs? * How Do We Use ANNs? - Design Decisions in a Simple OCR System * A Simple Interface (`ocr.html`) * An OCR Client (`ocr.js`) * A Server (`server.py`) * Designing a Feedforward ANN (`neural_network_design.py`) * Core OCR Functionality - Conclusion Chapter 16: A Pedometer in the Real World - A Perfect World - Pedometer Theory * What's an Accelerometer? * Let's Talk About a Walk * Even Perfect Worlds Have Fundamental Forces of Nature * People Are Complicated Creatures * 1. Splitting Total Acceleration Into User Acceleration and Gravitational Acceleration * 2. Isolating User Acceleration in the Direction of Gravity * Solutions in the Real World * Recap - Diving Into Code * Preliminary Work * Input Formats * I Got Multiple Input Formats But a Standard Ain't One * The Pipeline * Parsing * Processing * Pedometer Functionality * Distance Travelled * Elapsed Time * Steps Taken * Tying It All Together With the Pipeline - Adding A Friendly Interface * A User Scenario * 1. Storing and Retrieving Data * 2. Building a Web Application - A Fully Functional App Chapter 17: The Same-Origin Policy - Introduction - Modeling with Alloy * Simplifications - Roadmap - Model of the Web * HTTP * Browser * Script - Example Applications - Security Properties * Dataflow Properties * Threat Model * Checking Properties - Same-Origin Policy - Techniques for Bypassing the SOP * Domain Property * JSON with Padding (JSONP) * PostMessage * Cross-Origin Resource Sharing (CORS) - Conclusion - Appendix: Reusing Modules in Alloy Chapter 18: A Rejection Sampler - Introduction * What is Sampling? * Programming with Samples and Probabilities - Sampling Magical Items - The Multinomial Distribution * The `MultinomialDistribution` Class * Sampling from a Multinomial Distribution * Evaluating the Multinomial PMF - Sampling Magical Items, Revisited - Estimating Attack Damage * Implementing a Distribution Over Damage * Approximating the Distribution - Summary Chapter 19: Web Spreadsheet - Introduction - Overview * Basic Concepts * Progressive Enhancement - Code Walkthrough * HTML * JS: Main Controller * JS: Background Worker * CSS - Conclusion * A Note on JS versions Chapter 20: Static Analysis - Introduction * 1. Deciding what you want to check for. - A Very Brief Introduction to Julia - Checking the Types of Variables in Loops * Why This Is Important * Implementation Details * Making This Usable - Looking For Unused Variables * Left-Hand Side and Right-Hand Side * Looking for Single-Use Variables - Conclusion Chapter 21: A Template Engine - Introduction - Templates - Supported Syntax - Implementation Approaches - Compiling to Python - Writing the Engine * The Templite class * CodeBuilder * The Templite class implementation - Testing - What's Left Out - Summing up Chapter 22: A Simple Web Server - Introduction - Background - Hello, Web - Displaying Values - Serving Static Pages - Listing Directories - The CGI Protocol - Discussion
3
378
A new book!
The Architecture of Open Source Applications (volume II) by Amy Brown, Greg Wilson (2012) is now in @ChapterPal's collection. (See the post about volume 1 here: nitter.net/burkov/status/21024916…) This textbook is designed for practicing software engineers, system architects, and advanced computer science students seeking to understand high-level system design through real-world software implementations. The material assumes a solid foundation in programming concepts, data structures, basic operating system principles, and networking fundamentals. Across a diverse series of case studies written by core maintainers and contributors, the book examines the structural designs, design trade-offs, and historical evolutions of prominent open source software systems. Its scope encompasses full-scale web platforms, distributed systems, compilers, runtime engines, developer utilities, embedded kernels, and domain-specific applications. Read the book with an AI tutor: chapterpal.com/book/424f4c06… All books on ChapterPal are free to read with a free account. The Table of contents: Introduction - Contributors - Acknowledgments - Contributing Chapter 1: Scalable Web Architecture and Distributed Systems - 1.1. Principles of Web Distributed Systems Design - 1.2. The Basics * Example: Image Hosting Application * Services * Redundancy * Partitions - 1.3. The Building Blocks of Fast and Scalable Data Access * Caches * Global Cache * Distributed Cache * Proxies * Indexes * Load Balancers * Queues - 1.4. Conclusion Chapter 2: Firefox Release Engineering - 2.1. Look *N* Ways Before You Start a Release - 2.2. "Go to Build" * Who Can Send the "Go to Build"? * How to Send the "Go to Build"? * What Is In the "Go to Build" Email? - 2.3. Tagging, Building, and Source Tarballs - 2.4. Localization Repacks and Partner Repacks - 2.5. Signing - 2.6. Updates * Major Updates vs. Minor Updates * Complete Updates vs. Partial Updates - 2.7. Pushing to Internal Mirrors and QA - 2.8. Pushing to Public Mirrors and AUS - 2.9. Lessons Learned * The Importance of Buy-in from Other Stakeholders * Involving Other Groups * Establishing Clear Handoffs * Managing Turnover * Managing Change - 2.10. For More Information Chapter 3: FreeRTOS - 3.1. What is "Embedded" and "Real-Time"? - 3.2. Architecture Overview * Hardware Considerations - 3.3. Scheduling Tasks: A Quick Overview * Task Priorities and the Ready List * The System Tick - 3.4. Tasks * Task Control Block (TCB) * Task Setup - 3.5. Lists - 3.6. Queues * Semaphores and Mutexes - 3.7. Conclusion - 3.8. Acknowledgements Chapter 4: GDB - 4.1. The Goal - 4.2. Origins of GDB - 4.3. Block Diagram - 4.4. Examples of Operation - 4.5. Portability - 4.6. Data Structures * Breakpoints * Symbols and Symbol Tables * Stack frames * Expressions * Values - 4.7. The Symbol Side * Partial Symbol Tables * Language Support - 4.8. Target Side * Target Vectors and the Target Stack * Gdbarch * Execution Control * The Remote Protocol * GDBserver - 4.9. Interfaces to GDB * Command-Line Interface * Machine Interface * Other User Interfaces - 4.10. Development Process * Maintainers * Testing Testing - 4.11. Lessons Learned * Open Development Wins * Make a Plan, but Expect It to Change * Things Would Be Great If We Were Infinitely Intelligent * Learn to Live with Incomplete Transitions * Don't Get Too Attached to the Code Chapter 5: The Glasgow Haskell Compiler - 5.1. What is Haskell? - 5.2. High-Level Structure * Code Metrics * The Compiler * Compiling Haskell Code - 5.3. Key Design Choices * The Intermediate Language * Type Checking the Source Language * No Symbol Table * Inter-Module Optimisation - 5.4. Extensibility * User-Defined Rewrite Rules * Compiler Plugins * GHC as a Library: The GHC API * The Package System - 5.5. The Runtime System * Key Design Decisions - 5.6. Developing GHC * Comments and Notes * How to Keep On Refactoring * Crime Doesn't Pay * Developing the RTS * Invariants, and Checking Them - 5.7. Conclusion Chapter 6: Git - 6.1. Git in a Nutshell - 6.2. Git's Origin - 6.3. Version Control System Design * Content Storage * Commit and Merge Histories * Distribution - 6.4. The Toolkit - 6.5. The Repository, Index and Working Areas - 6.6. The Object Database - 6.7. Storage and Compression Techniques - 6.8. Merge Histories - 6.9. What's Next? - 6.10. Lessons Learned Chapter 7: GPSD - 7.1. Why GPSD Exists - 7.2. The External View - 7.3. The Software Layers - 7.4. The Dataflow View - 7.5. Defending the Architecture - 7.6. Zero Configuration, Zero Hassles - 7.7. Embedded Constraints Considered Helpful - 7.8. JSON and the Architecturenauts - 7.9. Designing for Zero Defects - 7.10. Lessons Learned Chapter 8: The Dynamic Language Runtime and the Iron Languages - 8.1. History - 8.2. Dynamic Language Runtime Principles - 8.3. Language Implementation Details - 8.4. Parsing - 8.5. Expression Trees - 8.6. Interpreting and Compilation - 8.7. Dynamic Call Sites - 8.8. Meta-Object Protocol - 8.9. Hosting - 8.10. Assembly Layout - 8.11. Lessons Learned Chapter 9: ITK - 9.1. What Is ITK? - 9.2. Architectural Features * The Nature of the Beast * Modularity * Data Pipeline * Factories * IO Factories * Streaming - 9.3. Lessons Learned * Reusability * Maintainability * The Invisible Hand * Refactoring * Reproducibility Chapter 10: GNU Mailman - 10.1. The Anatomy of a Message - 10.2. The Mailing List - 10.3. Runners - 10.4. The Master Runner - 10.5. Rules, Links, and Chains - 10.6. Handlers and Pipelines - 10.7. VERP - 10.8. REST - 10.9. Internationalization - 10.10. Lessons Learned * A Final Note Chapter 11: matplotlib - 11.1. The Dongle Problem - 11.2. Overview of matplotlib Architecture * Backend Layer * Artist Layer * Scripting Layer (pyplot) - 11.3. Backend Refactoring - 11.4. Transforms - 11.5. The Polyline Pipeline - 11.6. Math Text - 11.7. Regression Testing - 11.8. Lessons Learned Chapter 12: MediaWiki - 12.1. Historical Overview * Phase I: UseModWiki * Phase II: The PHP Script * Phase III: MediaWiki - 12.2. MediaWiki Code Base and Practices * PHP * Security * Configuration - 12.3. Database and Text Storage - 12.4. Requests, Caching and Delivery * Execution Workflow of a Web Request * Caching * ResourceLoader - 12.5. Languages * Context and Rationale * Content Language * Interface Language * Localizing Messages - 12.6. Users - 12.7. Content * Content Structure * Content Processing: MediaWiki Markup Language and Parser * Magic Words and Templates * Media Files - 12.8. Customizing and Extending MediaWiki * Levels * JavaScript and CSS * Extensions and Skins * API - 12.9. Future - 12.10. Further Reading - 12.11. Acknowledgments Chapter 13: Moodle - 13.1. An Overview of How Moodle Works * Request Dispatching * Plugins * An Example Plugin * Line 1: Bootstrapping Moodle * Line 2: Checking the User Is Logged In - 13.2. Moodle's Roles and Permissions System * Line 3: Getting the Context * Line 4: Checking the User Has Permission to Use This Script * Defining Capabilities * Roles * Permissions * Permission Aggregation - 13.3. Back to Our Example Script * Line 5: Get Data From the Request * Line 6: Global Variables * Nothing is Simple * Line 7: Logging - 13.4. Generating Output * Line 8: The `$PAGE` Global * Line 9: Moodle URL * Line 10: Internationalisation * Line 11: Starting Output * Line 12: Outputting the Body of the Page * Line 13: Finishing Output * Should This Script Mix Logic and Output? - 13.5. Database Abstraction * The `moodle_database` Class * Defining the Database Structure - 13.6. What Has Not Been Covered - 13.7. Lessons Learned Chapter 14: nginx - 14.1. Why Is High Concurrency Important? * Isn't Apache Suitable? * Are There More Advantages to Using nginx? - 14.2. Overview of nginx Architecture * Code Structure * Workers Model * nginx Process Roles * Brief Overview of nginx Caching - 14.3. nginx Configuration - 14.4. nginx Internals - 14.5. Lessons Learned Chapter 15: Open MPI - 15.1. Background * The Message Passing Interface (MPI) * Uses of MPI * Open MPI - 15.2. Architecture * Abstraction Layer Architecture * Plugin Architecture * Plugin Frameworks * Plugin Components * Run-Time Parameters - 15.3. Lessons Learned * Performance * Standing on the Shoulders of Giants * Optimize for the Common Case * Miscellaneous * Conclusion Chapter 16: OSCAR - 16.1. System Hierarchy - 16.2. Past Decision Making - 16.3. Version Control - 16.4. Data Models/DAOs * EForms (DBHandler) * Demographic Records (Hibernate) * Integrator Consent (JPA) * Issues with Hibernate and JPA - 16.5. Permissions - 16.6. Integrator * Technical Details * Design * Data Format - 16.7. Lessons Learned Chapter 17: Processing.js - 17.1. How Does It Work? * Unifying Java and JavaScript - 17.2. Significant Differences * Java programs have their own threads; JavaScript can lock up your browser. * Why Pick JavaScript if It Can't Do Java? * The Result - 17.3. The Code Components * The Launcher * Static Library * Instance Code - 17.4. Developing Processing.js * Make It Work * Make It Fast * Make It Small * If All Else Fails, Tell People - 17.5. Lessons Learned Chapter 18: Puppet - 18.1. Introduction - 18.2. Architectural Overview - 18.3. Component Analysis * Agent * Facter * External Node Classifier * Compiler * Transaction * Resource Abstraction Layer * Reporting - 18.4. Infrastructure * Plugins * Indirector * Networking - 18.5. Lessons Learned - 18.6. Conclusion Chapter 19: PyPy - 19.1. A Little History - 19.2. Overview of PyPy - 19.3. The Python Interpreter - 19.4. The RPython Translator - 19.5. The PyPy JIT - 19.6. Design Drawbacks - 19.7. A Note on Process - 19.8. Summary - 19.9. Lessons Learned Chapter 20: SQLAlchemy - 20.1. The Challenge of Database Abstraction * SQLAlchemy's Approach to Database Abstraction - 20.2. The Core/ORM Dichotomy - 20.3. Taming the DBAPI * The Dialect System * Dealing with DBAPI Variability - 20.4. Schema Definition - 20.5. SQL Expressions * Expression Trees * Python Operator Approach * Compilation - 20.6. Class Mapping with the ORM * Classical vs. Declarative * Anatomy of a Mapping - 20.7. Query and Loading Behavior - 20.8. Session/Identity Map * Development History * Session Overview * State Tracking * Transactional Control - 20.9. Unit of Work * History * Topological Sort - 20.10. Conclusion Chapter 21: Twisted - 21.1. Why Twisted? - 21.2. The Architecture of Twisted * Reusing Existing Applications * The Reactor * Managing Callback Chains * Transports * Protocols * Applications - 21.3. Retrospective and Lessons Learned * Twisted Application Persistence * web2: a lesson on rewrites * Keeping Up with the Internet Chapter 22: Yesod - 22.1. Compared to Other Frameworks - 22.2. Web Application Interface * Datatypes * Streaming * Builder * Handlers * Middleware * Wai-test - 22.3. Templates * Types * The Other Languages - 22.4. Persistent * Terminology * Type Safety * Cross-Database Syntax * Migrations * Relations - 22.5. Yesod * Routes * Handlers * Widgets * Subsites - 22.6. Lessons Learned Chapter 23: The Yocto Project - 23.1. Introduction to the Poky Build System * Poky Build System Concepts - 23.2. BitBake Architecture * BitBake IPC * BitBake DataSmart Copy-on-Write Data Storage * BitBake Scheduler - 23.3. Conclusion - 23.4. Acknowledgements Chapter 24: ZeroMQ - 24.1. Application vs. Library - 24.2. Global State - 24.3. Performance - 24.4. Critical Path - 24.5. Allocating Memory - 24.6. Batching - 24.7. Architecture Overview - 24.8. Concurrency Model - 24.9. Lock-Free Algorithms - 24.10. API - 24.11. Messaging Patterns - 24.12. Conclusion Bibliography
4
461
A new book!
The Architecture of Open Source Applications (volume I) by Amy Brown, Greg Wilson (2011) is now in @ChapterPal's collection. This textbook is designed for intermediate to advanced software engineers, systems programmers, and computer science students who want to understand how large-scale production software systems are designed. It assumes familiarity with core computer science fundamentals, including basic data structures, operating systems principles, networking, and proficiency in standard programming languages such as C, C++, Java, or Python. Rather than offering abstract software engineering theory, the book examines real-world architecture through case studies of established open-source systems written directly by their original designers and core maintainers. The scope spans twenty-five open-source projects across varied functional domains, ranging from compilers (LLVM), distributed storage engines (HDFS, Riak, Berkeley DB, and general NoSQL stores), and developer infrastructure (Bash, CMake, Mercurial, and continuous integration frameworks) to graphical applications and media tools (Audacity, Violet, VisTrails, and VTK), communication platforms (Asterisk, Jitsi, and Telepathy), and games (Battle for Wesnoth and Thousand Parsec). Across these systems, the material demonstrates how high-level architectural goals—such as modularity, cross-platform portability, fault tolerance, and extensibility—are translated into concrete data structures, communication protocols, and execution models. Read with an AI tutor: chapterpal.com/book/147d7f3c… All books on ChapterPal are free to read. The table of contents: Introduction - Contributors - Acknowledgments - Dedication Chapter 1: Asterisk - 1.1. Critical Architectural Concepts * 1.1.1. Channels * 1.1.2. Channel Bridging * 1.1.3. Frames - 1.2. Asterisk Component Abstractions * 1.2.1. Channel Drivers * 1.2.2. Dialplan Applications * 1.2.3. Dialplan Functions * 1.2.4. Codec Translators - 1.3. Threads * 1.3.1. Network Monitor Threads * 1.3.2. Channel Threads - 1.4. Call Scenarios * 1.4.1. Checking Voicemail * 1.4.2. Bridged Call - 1.5. Final Comments - Footnotes Chapter 2: Audacity - 2.1. Structure in Audacity - 2.2. wxWidgets GUI Library - 2.3. ShuttleGui Layer - 2.4. The TrackPanel - 2.5. PortAudio Library: Recording and Playback - 2.6. BlockFiles - 2.7. Scripting - 2.8. Real-Time Effects - 2.9. Summary - Footnotes Chapter 3: The Bourne-Again Shell - 3.1. Introduction * 3.1.1. Bash - 3.2. Syntactic Units and Primitives * 3.2.1. Primitives * 3.2.2. Variables and Parameters * 3.2.3. The Shell Programming Language * 3.2.4. A Further Note - 3.3. Input Processing * 3.3.1. Readline and Command Line Editing * 3.3.2. Non-interactive Input Processing * 3.3.3. Multibyte Characters - 3.4. Parsing - 3.5. Word Expansions * 3.5.1. Parameter and Variable Expansions * 3.5.2. And Many More * 3.5.3. Word Splitting * 3.5.4. Globbing * 3.5.5. Implementation - 3.6. Command Execution * 3.6.1. Redirection * 3.6.2. Builtin Commands * 3.6.3. Simple Command Execution * 3.6.4. Job Control * 3.6.5. Compound Commands - 3.7. Lessons Learned * 3.7.1. What I Have Found Is Important * 3.7.2. What I Would Have Done Differently - 3.8. Conclusions - Footnotes Chapter 4: Berkeley DB - 4.1. In the Beginning - 4.2. Architectural Overview - 4.3. The Access Methods: Btree, Hash, Recno, Queue - 4.4. The Library Interface Layer - 4.5. The Underlying Components - 4.6. The Buffer Manager: Mpool * 4.6.1. The Mpool File Abstraction * 4.6.2. Write-ahead Logging - 4.7. The Lock Manager: Lock * 4.7.1. Lock Objects * 4.7.2. The Conflict Matrix * 4.7.3. Supporting Hierarchical Locking - 4.8. The Log Manager: Log * 4.8.1. Log Record Formatting * 4.8.2. Breaking the Abstraction - 4.9. The Transaction Manager: Txn * 4.9.1. Checkpoint Processing * 4.9.2. Recovery - 4.10. Wrapping Up - Footnotes Chapter 5: CMake - 5.1. CMake History and Requirements - 5.2. How CMake Is Implemented * 5.2.1. The CMake Process * 5.2.2. CMake: The Code * 5.2.3. Graphical Interfaces * 5.2.4. Testing CMake - 5.3. Lessons Learned * 5.3.1. Backwards Compatibility * 5.3.2. Language, Language, Language * 5.3.3. Plugins Did Not Work * 5.3.4. Reduce Exposed APIs - Footnotes Chapter 6: Eclipse - 6.1. Early Eclipse * 6.1.1. Platform * 6.1.2. Java Development Tools (JDT) * 6.1.3. Plug-in Development Environment (PDE) - 6.2. Eclipse 3.0: Runtime, RCP and Robots * 6.2.1. Runtime * 6.2.2. Rich Client Platform (RCP) - 6.3. Eclipse 3.4 * 6.3.1. p2 Concepts - 6.4. Eclipse 4.0 * 6.4.1. Model Workbench * 6.4.2. Cascading Style Sheets Styling * 6.4.3. Dependency Injection * 6.4.4. Application Services - 6.5. Conclusion - Footnotes Chapter 7: Graphite - 7.1. The Database Library: Storing Time-Series Data - 7.2. The Back End: A Simple Storage Service - 7.3. The Front End: Graphs On-Demand - 7.4. Dashboards - 7.5. An Obvious Bottleneck - 7.6. Optimizing I/O - 7.7. Keeping It Real-Time - 7.8. Kernels, Caches, and Catastrophic Failures - 7.9. Clustering * 7.9.1. A Brief Analysis of Clustering Efficiency * 7.9.2. Distributing Metrics in a Cluster - 7.10. Design Reflections - 7.11. Becoming Open Source - Footnotes Chapter 8: The Hadoop Distributed File System - 8.1. Introduction - 8.2. Architecture * 8.2.1. NameNode * 8.2.2. Image and Journal * 8.2.3. DataNodes * 8.2.4. HDFS Client * 8.2.5. CheckpointNode * 8.2.6. BackupNode * 8.2.7. Upgrades and Filesystem Snapshots - 8.3. File I/O Operations and Replica Management * 8.3.1. File Read and Write * 8.3.2. Block Placement * 8.3.3. Replication Management * 8.3.4. Balancer * 8.3.5. Block Scanner * 8.3.6. Decommissioning * 8.3.7. Inter-Cluster Data Copy - 8.4. Practice at Yahoo! * 8.4.1. Durability of Data * 8.4.2. Features for Sharing HDFS * 8.4.3. Scaling and HDFS Federation - 8.5. Lessons Learned - 8.6. Acknowledgment - Footnotes Chapter 9: Continuous Integration - 9.1. The Landscape * 9.1.1. What Does Continuous Integration Software Do? * 9.1.2. External Interactions - 9.2. Architectures * 9.2.1. Implementation Model: Buildbot * 9.2.2. Implementation Model: CDash * 9.2.3. Implementation Model: Jenkins * 9.2.4. Implementation Model: Pony-Build * 9.2.5. Build Recipes * 9.2.6. Trust * 9.2.7. Choosing a Model - 9.3. The Future * 9.3.1. Concluding Thoughts * 9.3.2. Acknowledgments Chapter 10: Jitsi - 10.1. Designing Jitsi - 10.2. Jitsi and the OSGi Framework - 10.3. Building and Running a Bundle - 10.4. Protocol Provider Service * 10.4.1. Operation Sets * 10.4.2. Accounts, Factories and Provider Instances - 10.5. Media Service * 10.5.1. Capture, Streaming, and Playback * 10.5.2. Codecs * 10.5.3. Connecting with the Protocol Providers - 10.6. UI Service - 10.7. Lessons Learned * 10.7.1. Java Sound vs. PortAudio * 10.7.2. Video Capture and Rendering * 10.7.3. Video Encoding and Decoding * 10.7.4. Others - 10.8. Acknowledgments - Footnotes Chapter 11: LLVM - 11.1. A Quick Introduction to Classical Compiler Design * 11.1.1. Implications of this Design - 11.2. Existing Language Implementations - 11.3. LLVM's Code Representation: LLVM IR * 11.3.1. Writing an LLVM IR Optimization - 11.4. LLVM's Implementation of Three-Phase Design * 11.4.1. LLVM IR is a Complete Code Representation * 11.4.2. LLVM is a Collection of Libraries - 11.5. Design of the Retargetable LLVM Code Generator * 11.5.1. LLVM Target Description Files - 11.6. Interesting Capabilities Provided by a Modular Design * 11.6.1. Choosing When and Where Each Phase Runs * 11.6.2. Unit Testing the Optimizer * 11.6.3. Automatic Test Case Reduction with BugPoint - 11.7. Retrospective and Future Directions - Footnotes Chapter 12: Mercurial - 12.1. A Short History of Version Control * 12.1.1. Centralized Version Control * 12.1.2. Distributed Version Control - 12.2. Data Structures * 12.2.1. Challenges * 12.2.2. Fast Revision Storage: Revlogs * 12.2.3. The Three Revlogs * 12.2.4. The Working Directory - 12.3. Versioning Mechanics * 12.3.1. Branches * 12.3.2. Tags - 12.4. General Structure - 12.5. Extensibility * 12.5.1. Writing Extensions * 12.5.2. Hooks - 12.6. Lessons Learned Chapter 13: The NoSQL Ecosystem - 13.1. What's in a Name? * 13.1.1. SQL and the Relational Model * 13.1.2. NoSQL Inspirations * 13.1.3. Characteristics and Considerations - 13.2. NoSQL Data and Query Models * 13.2.1. Key-based NoSQL Data Models * 13.2.2. Graph Storage * 13.2.3. Complex Queries * 13.2.4. Transactions * 13.2.5. Schema-free Storage - 13.3. Data Durability * 13.3.1. Single-server Durability * 13.3.2. Multi-server Durability - 13.4. Scaling for Performance * 13.4.1. Do Not Shard Until You Have To * 13.4.2. Sharding Through Coordinators * 13.4.3. Consistent Hash Rings * 13.4.4. Range Partitioning * 13.4.5. Which Partitioning Scheme to Use - 13.5. Consistency * 13.5.1. A Little Bit About CAP * 13.5.2. Strong Consistency * 13.5.3. Eventual Consistency - 13.6. A Final Word - 13.7. Acknowledgments - Footnotes Chapter 14: Python Packaging - 14.1. Introduction - 14.2. The Burden of the Python Developer - 14.3. The Current Architecture of Packaging * 14.3.1. Distutils Basics and Design Flaws * 14.3.2. Metadata and PyPI * 14.3.3. Architecture of PyPI * 14.3.4. Architecture of a Python Installation * 14.3.5. Setuptools, Pip and the Like * 14.3.6. What About Data Files? - 14.4. Improved Standards * 14.4.1. Metadata * 14.4.2. What's Installed? * 14.4.3. Architecture of Data Files * 14.4.4. PyPI Improvements - 14.5. Implementation Details - 14.6. Lessons learned * 14.6.1. It's All About PEPs * 14.6.2. A Package that Enters the Standard Library Has One Foot in the Grave * 14.6.3. Backward Compatibility - 14.7. References and Contributions - Footnotes Chapter 15: Riak and Erlang/OTP - 15.1. An Abridged Introduction to Erlang - 15.2. Process Skeletons - 15.3. OTP Behaviors * 15.3.1. Introduction * 15.3.2. Generic Servers * 15.3.3. Starting Your Server * 15.3.4. Passing Messages * 15.3.5. Stopping the Server - 15.4. Other Worker Behaviors * 15.4.1. Finite State Machines * 15.4.2. Event Handlers - 15.5. Supervisors * 15.5.1. Supervisor Callback Functions * 15.5.2. Applications - 15.6. Replication and Communication in Riak - 15.7. Conclusions and Lessons Learned * 15.7.1. Acknowledgments Chapter 16: Selenium WebDriver - 16.1. History - 16.2. A Digression About Jargon - 16.3. Architectural Themes * 16.3.1. Keep the Costs Down * 16.3.2. Emulate the User * 16.3.3. Prove the Drivers Work * 16.3.4. You Shouldn't Need to Understand How Everything Works * 16.3.5. Lower the Bus Factor * 16.3.6. Have Sympathy for a Javascript Implementation * 16.3.7. Every Call Is an RPC Call * 16.3.8. Final Thought: This Is Open Source - 16.4. Coping with Complexity * 16.4.1. The WebDriver Design * 16.4.2. Dealing with the Combinatorial Explosion * 16.4.3. Flaws in the WebDriver Design - 16.5. Layers and Javascript - 16.6. The Remote Driver, and the Firefox Driver in Particular - 16.7. The IE Driver - 16.8. Selenium RC - 16.9. Looking Back - 16.10. Looking to the Future - Footnotes Chapter 17: Sendmail - 17.1. Once Upon a Time… - 17.2. Design Principles * 17.2.1. Accept that One Programmer Is Finite * 17.2.2. Don't Redesign User Agents * 17.2.3. Don't Redesign the Local Mail Store * 17.2.4. Make Sendmail Adapt to the World, Not the Other Way Around * 17.2.5. Change as Little as Possible * 17.2.6. Think About Reliability Early * 17.2.7. What Was Left Out - 17.3. Development Phases * 17.3.1. Wave 1: delivermail * 17.3.2. Wave 2: sendmail 3, 4, and 5 * 17.3.3. Wave 3: The Chaos Years * 17.3.4. Wave 4: sendmail 8 * 17.3.5. Wave 5: The Commercial Years * 17.3.6. Whatever Happened to sendmail 6 and 7? - 17.4. Design Decisions * 17.4.1. The Syntax of the Configuration File * 17.4.2. Rewriting Rules * 17.4.3. Using Rewriting for Parsing * 17.4.4. Embedding SMTP and Queueing in sendmail * 17.4.5. The Implementation of the Queue * 17.4.6. Accepting and Fixing Bogus Input * 17.4.7. Configuration and the Use of M4 - 17.5. Other Considerations * 17.5.1. A Word About Optimizing Internet Scale Systems * 17.5.2. Milter * 17.5.3. Release Schedules - 17.6. Security - 17.7. Evolution of Sendmail * 17.7.1. Configuration Became More Verbose * 17.7.2. More Connections with Other Subsystems: Greater Integration * 17.7.3. Adaptation to a Hostile World * 17.7.4. Incorporation of New Technologies - 17.8. What If I Did It Today? * 17.8.1. Things I Would Do Differently * 17.8.2. Things I Would Do The Same - 17.9. Conclusions - Footnotes Chapter 18: SnowFlock - 18.1. Introducing SnowFlock - 18.2. VM Cloning - 18.3. SnowFlock's Approach - 18.4. Architectural VM Descriptor - 18.5. Parent-Side Components * 18.5.1. Memserver Process * 18.5.2. Multicasting with Mcdist * 18.5.3. Virtual Disk - 18.6. Clone-Side Components * 18.6.1. Memtap Process * 18.6.2. Clever Clones Avoid Unnecessary Fetches - 18.7. VM Cloning Application Interface * 18.7.1. API Implementation * 18.7.2. Necessary Mutations - 18.8. Conclusion - Footnotes Chapter 19: SocialCalc - 19.1. WikiCalc - 19.2. SocialCalc - 19.3. Command Run-loop - 19.4. Table Editor - 19.5. Save Format - 19.6. Rich-text Editing * 19.6.1. Types and Formats * 19.6.2. Rendering Wikitext - 19.7. Real-time Collaboration * 19.7.1. Cross-browser Transport * 19.7.2. Conflict Resolution * 19.7.3. Remote Cursors - 19.8. Lessons Learned * 19.8.1. Chief Designer with a Clear Vision * 19.8.2. Wikis for Project Continuity * 19.8.3. Embrace Time Zone Differences * 19.8.4. Optimize for Fun * 19.8.5. Drive Development with Story Tests * 19.8.6. Open Source With CPAL - Footnotes Chapter 20: Telepathy - 20.1. Components of the Telepathy Framework - 20.2. How Telepathy uses D-Bus * 20.2.1. Handles * 20.2.2. Discovering Telepathy Services * 20.2.3. Reducing D-Bus Traffic - 20.3. Connections, Channels and Clients * 20.3.1. Connections * 20.3.2. Channels * 20.3.3. Requesting Channels, Channel Properties and Dispatching * 20.3.4. Clients - 20.4. The Role of Language Bindings * 20.4.1. Asynchronous Programming * 20.4.2. Object Readiness - 20.5. Robustness - 20.6. Extending Telepathy: Sidecars - 20.7. A Brief Look Inside a Connection Manager - 20.8. Lessons Learned - Footnotes Chapter 21: Thousand Parsec - 21.1. Anatomy of a Star Empire * 21.1.1. Objects * 21.1.2. Orders * 21.1.3. Resources * 21.1.4. Designs - 21.2. The Thousand Parsec Protocol * 21.2.1. Basics * 21.2.2. Players and Games * 21.2.3. Objects, Orders, and Resources * 21.2.4. Design Manipulation * 21.2.5. Server Administration - 21.3. Supporting Functionality * 21.3.1. Server Persistence * 21.3.2. Thousand Parsec Component Language * 21.3.3. BattleXML * 21.3.4. Metaserver * 21.3.5. Single-Player Mode - 21.4. Lessons Learned * 21.4.1. What Worked * 21.4.2. What Didn't Work * 21.4.3. Conclusion - Footnotes Chapter 22: Violet - 22.1. Introducing Violet - 22.2. The Graph Framework - 22.3. Use of JavaBeans Properties - 22.4. Long-Term Persistence - 22.5. Java WebStart - 22.6. Java 2D - 22.7. No Swing Application Framework - 22.8. Undo/Redo - 22.9. Plugin Architecture - 22.10. Conclusion - Footnotes Chapter 23: VisTrails - 23.1. System Overview * 23.1.1. Workflows and Workflow-Based Systems * 23.1.2. Data and Workflow Provenance * 23.1.3. User Interface and Basic Functionality - 23.2. Project History - 23.3. Inside VisTrails * 23.3.1. The Version Tree: Change-Based Provenance * 23.3.2. Workflow Execution and Caching * 23.3.3. Data Serialization and Storage * 23.3.4. Extensibility Through Packages and Python * 23.3.5. VisTrails Packages and Bundles * 23.3.6. Passing Data as Modules - 23.4. Components and Features * 23.4.1. Visual Spreadsheet * 23.4.2. Visual Differences and Analogies * 23.4.3. Querying Provenance * 23.4.4. Persistent Data * 23.4.5. Upgrades * 23.4.6. Sharing and Publishing Provenance-Rich Results - 23.5. Lessons Learned * 23.5.1. Acknowledgments - Footnotes Chapter 24: VTK - 24.1. What Is VTK? - 24.2. Architectural Features * 24.2.1. Core Features * 24.2.2. Representing Data * 24.2.3. Pipeline Architecture * 24.2.4. Rendering Subsystem * 24.2.5. Events and Interaction * 24.2.6. Summary of Libraries - 24.3. Looking Back/Looking Forward * 24.3.1. Managing Growth * 24.3.2. Technology Additions * 24.3.3. Open Science * 24.3.4. Lessons Learned - Footnotes Chapter 25: Battle For Wesnoth - 25.1. Project Overview - 25.2. Wesnoth Markup Language - 25.3. Units in Wesnoth - 25.4. Wesnoth's Multiplayer Implementation - 25.5. Conclusion Bibliography
2
318
A new book!
The absolutely beautiful free hands-on book "Physics-Based Deep Learning Book" by Thuerey et al. (2026) is now in @ChapterPal's collection. The textbook is an applied guide to physics-based deep learning, also known as scientific machine learning, which blends numerical physical simulations with modern artificial intelligence architectures. Designed for researchers, engineers, and students with a working knowledge of deep learning fundamentals and basic partial differential equations, the book focuses on practical implementations using deep learning frameworks such as PyTorch, JAX, and the differentiable simulation library ΦFlow. The textbook, at 350 pages, has 163 illustrations and 39 hands-on coding exercises. Read the book with an AI tutor: chapterpal.com/book/4d08ce3b… All books on ChapterPal are free to read with a free account. Table of contents: Chapter 1: Introduction - Welcome ... * Coming up * Comments and suggestions * Thanks! * Citation * Time to get started - A Teaser Example * Differentiable physics * Finding the inverse function of a parabola * A differentiable physics approach - A Probabilistic Generative AI Approach * Discussion * Next steps - Overview * Motivation * Categorization * Looking ahead * Implementations - Models and Equations * Deep learning and neural networks * Partial differential equations as physical models * Some example PDEs * Preliminaries * Newton's method * Approximating the Hessian * Broyden's method * BFGS * Gauss-Newton * Gradient Descent Chapter 2: Neural Surrogates and Operators - Supervised Training * Problem setting Chapter 3: Physical Losses - Physical Loss Terms * Using physical models Chapter 4: Differentiable Physics - Introduction to Differentiable Physics * Differentiable operators * Jacobians * Learning via DP operators * A practical example * Backpropagation through solver steps * Alternatives: noise * Complex examples - Reducing Numerical Errors with Neural Operators * Problem formulation * Getting started with the implementation * Simulation setup * Network and transfer functions * Training setup * Interleaving simulation and NN * Test evaluation * Next steps - Solving Inverse Problems with NNs * Formulation * Control of incompressible fluids * Data generation * Supervised initialization * CFE pretraining with differentiable physics * End-to-end training with differentiable physics * Next steps - Discussion of Differentiable Physics * Integration * Reducing data shift via interaction * Generalization Chapter 5: Probabilistic Learning - Introduction to Probabilistic Learning * Uncertainty * Forward or Backward? * Simulation-based Inference - Learning a Probability Distribution * Fundamentals: A Training Objective * From Unconditional to Conditional * Learning Distributions with Normalizing Flows * Practical Example: Learning Gaussians * A Simple Normalizing Flow based on Affine Couplings * Neural ODEs: Making Normalizing Flows Continuous * Summary of Normalizing Flows - Score Matching * Gaussian Toy Dataset with Analytic Scores * Learning the Score * Langevin Dynamics * Full Denoising Algorithm * Training with DDPM - Flow Matching * Learning Flows with Velocities * Mappings and Conditioning * Score Matching with Differentiable Physics * Summary of Physics-based Diffusion Models - Probabilistic Inverse Problem with Differentiable Simulations * Toy Problem setup * Conditioning * Implementation * Backbone Network Definition * Variance Schedule * Diffusion Model Definition * Training * Test Dataset * Test Inference * Accuracy of the Prediction * Summarizing Time Predictions with Diffusion Models - Unconditional Stability * Main Considerations for an Evaluation * Comparing Architectures * Stability Criteria * Batch Size vs Rollout * Summary - Graph-based Diffusion Models * Diffusion Graph Net (DGN) * Diffusion on Graphs * Diffusion in Latent Space * Turbulent Flows around Wings in 3D * Distributional accuracy * Computational Performance - Distributional Accuracy of Diffusion Graph Nets * Implementation * Sample-wise Accuracy * Evaluating Distributional Accuracy - Discussion of Probabilistic Learning Chapter 6: Reinforcement Learning - Introduction to Reinforcement Learning Chapter 7: Improved Gradients - Scale-Invariance and Inversion * The crux of the matter * Traditional optimization methods * Quasi-Newton methods * Inverse simulators * NN training * Loss functions * Iterations and time dependence * SIP training in action * Discussion of SIP Training - Learning to Invert Heat Conduction with Scale-invariant Updates * Problem Statement * Implementation * Data generation * Differentiable physics and gradient descent * Stable SIP gradients * Neural network and loss function * Training * Evaluation * Next steps - Half-Inverse Gradients * Derivation Chapter 8: Fast Forward Topics - Additional Topics - Model Reduction and Time Series * Reduced order models * Time series * End-to-end training * Source code - Unstructured Meshes and Meshless Methods * Types of computational meshes * Unstructured meshes and graph neural networks * Meshless and particle-based methods * Continuous convolutions * Learning the dynamics of liquids * Source code - Generative Adversarial Networks * Maximum likelihood estimation Chapter 9: Outlook - Outlook * Some specific directions * Closing remarks References Notation and Abbreviations - Math notation: - Summary of the most important abbreviations:
5
1,038
New book!
The Practical Cryptography for Developers book by Svetlin Nakov (2023) is now in @ChapterPal's collection of free books. This textbook is designed for working software engineers, DevOps practitioners, systems administrators, and quality assurance professionals who need to apply cryptographic techniques in real-world applications. Assuming a general background in programming and basic software development concepts, the book intentionally avoids heavy mathematical theory and academic proofs. Instead, it adopts an engineering-first perspective that uses readable Python code samples and exercises to demonstrate how modern cryptographic primitives function and how they fit together in secure software architectures. Read with an AI tutor: chapterpal.com/book/a63bbbf8… All books on ChapterPal are free to read with a free account. Table of contents: Welcome Preface - This Book is for Developers! - This Book is Free! - About the Author: Dr. Svetlin Nakov - The History behind This Book - The Software University (SoftUni) - Why Yet Another Book on Cryptography? * Academic Cryptography Books * Crypto Libraries and Their Documentation * Practical Cryptography - Existing Books - What Does this Book Cover? - Why Python is Used for the Examples? - How to Read This Book? Cryptography - Overview - Overview of Modern Cryptography * Encrypt / Decrypt Message - Live Demo - What is Cryptography? * Encryption and Keys * Digital Signatures and Message Authentication * Secure Random Numbers * Key Exchange * Cryptographic Hashes and Password Hashing * Confusion and Diffusion in Cryptography * Cryptographic Libraries Hash Functions - Hashing (in Software Engineering) - Cryptographic Hash Functions * Cryptographic Hash Functions - Examples * Cryptographic Hash Functions - Live Demo - Crypto Hashes and Collisions * Hash Collisions * Cryptographic Hash Functions: No Collisions - Hash Functions: Applications * Document Integrity * Storing Passwords * Generate Unique ID * Pseudorandom Number Generation * Proof-of-Work Algorithms * Cryptographic Hashes are Part of Modern Programming - Secure Hash Algorithms * Secure Hash Functions * Insecure Hash Functions - Hash Functions - Examples * Calculating Cryptographic Hash Functions in Python - Exercises: Calculate Hashes * Calculate **SHA-224 Hash** * Calculate **SHA-256 Hash** * Calculate **SHA3-224 Hash** * Calculate **SHA3-384 Hash** * Calculate **Keccak-384 Hash** * Calculate **Whirlpool (512 Bit) Hash** - Proof-of-Work Hash Functions * ETHash * Equihash * More about ASIC-Resistant Hash Functions MAC and Key Derivation - Message Authentication Code (MAC) - MAC Algorithms - When We Need MAC Codes? - Authenticated Encryption: Encrypt / Decrypt Messages using MAC - MAC-Based Pseudo-Random Generator - HMAC and Key Derivation * What is HMAC? * Key Derivation Functions (KDF) * HMAC Calculation - Example - HMAC Calculation - Examples - Exercises: Calculate HMAC - KDF: Deriving Key from Password * Key Derivation Functions - Concepts * Cryptographic Key Derivation Functions - PBKDF2 * PBKDF2 and Number of Iterations * PBKDF2 - Example * PBKDF2 Calculation in Python - Example * When to Use PBKDF2? - Modern Key Derivation Functions - Scrypt * Scrypt Parameters * Scrypt - Example * Scrypt Calculation in Python - Example * Storing Algorithm Settings + Salt + Hash Together * When to Use Scrypt? - Bcrypt * Bcrypt - Example * Storing Algorithm Settings + Salt + Hash Together * When to Use Bcrypt? - Linux crypt() - Argon2 * Variants of Argon2 * Config Parameters of Argon2 * Argon2 - Example * Argon2 Calculation in Python - Example * Storing Algorithm Settings + Salt + Hash Together * When to Use Argon2? - Secure Password Storage * Clear-Text Passwords - Never Do Anti-Pattern * Simple Password Hash - Highly Insecure * Salted Hashed Passwords - Secure, but Not Enough * Secure KDF-Based Password Hashing - Recommended * Password-Based Authentication - Exercises: Password Encryption * Implement "Register User" * Implement "User Login" * Implement "Change Password" * Implement "Reset Password" - Exercises: Scrypt Key Derivation and Password Hashing * Derive a Key by Password using Scrypt * Scrypt: Encrypt a Password * Scrypt: Verify a Password Secure Random Generators - Secure Random Number Generators, PRNG and CSPRNG - Random Generators * Pseudo-Random Number Generators (PRNG) * Initial Entropy (Seed) * Entropy * Collecting Entropy * Insecure Randomness * Insecure Randomness - Examples - Randomness and Cryptography * CSPRNG (Cryptography Secure Random Number Generators) * Conclusion: Use Secure Random Generator - Pseudo-Random Numbers - Examples * Creating a Secure Random Generator - Secure Random Generators (CSPRNG) * Hardware Random Generators (TRNG) * How as a Developer to Access the CSPRNG? - Exercises: Pseudo-Random Generator Key Exchange and DHKE - Key Exchange / Key Agreement Algorithms - Diffie–Hellman Key Exchange * Diffie–Hellman Key Exchange (DHKE) * The Diffie-Hellman Key Exchange (DHKE) Protocol - DHKE - Examples - Exercises: DHKE Key Exchange Encryption: Symmetric and Asymmetric - Symmetric Encryption - Concepts and Algorithms * Secret Keys * Modern Symmetric Encryption Algorithms * Symmetric Encryption - Online Demo - Public Key Cryptography - Concepts * Public Key Encryption / Decryption * Signatures: Asymmetric Signing / Verification * Key Pairs * Private Keys * Public Keys - Popular Public Key Cryptosystems * The RSA Cryptosystem * The ECC Cryptosystem * ECC is Recommended in the General Case - Asymmetric Encryption in Practice * Asymmetric Encryption - Online Demo Symmetric Key Ciphers - Symmetric Encryption / Decryption - Symmetric Encryption Uses a Set of Algorithms - Cipher Block Modes * Block Cipher Modes (CBC, CTR, GCM, ...) - Popular Symmetric Algorithms * AES (**Rijndael)** * **Salsa20 / ChaCha20** * Other Popular Symmetric Ciphers * Insecure Symmetric Algorithms * Symmetric Encryption Schemes / Constructions - The AES Cipher - Concepts * AES is Secure and Very Popular Symmetric Encryption Algorithm * AES Algorithm Parameters * Integrated Message Authentication Code (MAC) * The AES Encryption Process * The AES Decryption Process - AES Encrypt / Decrypt - Examples * Simple AES-CTR Example * AES-256-GCM Example * AES-256-GCM + Scrypt Example - Ethereum Wallet Encryption * Ethereum UTC / JSON Wallets * UTC / JSON Keystore - Example * What Is Inside the UTC / JSON File? * MyEtherWallet: Play with UTC / JSON Keystore Files - Exercises: AES Encrypt / Decrypt * Symmetric Encryption (AES + Scrypt + HMAC) * Symmetric Decryption (AES + Scrypt + HMAC) - ChaCha20-Poly1305 * ChaCha20-Poly1305 * Chacha20-Poly1305 - Example in Python - Exercises: ChaCha20-Poly1305 Asymmetric Key Ciphers - Public-Key Cryptosystems - Asymmetric Encryption Schemes * Integrated Encryption Schemes * Key Encapsulation Mechanisms (KEMs) - Digital Signatures - Key Exchange Algorithms - The RSA Cryptosystem - Concepts * RSA Key Generation * RSA Public Key - Example * RSA Private Key - Example * RSA Cryptography: Encrypt a Message * RSA Cryptography: Decrypt a Message * RSA Encrypt and Decrypt - Example - RSA Encrypt / Decrypt - Examples * RSA Key Generation * RSA Encryption * RSA Decryption * Finally, **decrypt the message** using using **RSA-OAEP** with the RSA **private key**: * Sample Output - Exercises: RSA Encrypt / Decrypt * Encrypt Message with RSA-OAEP * Decrypt a Message with RSA-OAEP * * Implement Hybrid Encryption / Decryption with RSA-KEM - Elliptic Curve Cryptography (ECC) * ECC Keys * Curves and Key Length * ECC Algorithms * Elliptic Curves * Edwards Curves - ECDH Key Exchange - ECDH Key Exchange - Examples - Exercises: ECDH Key Exchange - ECC Encryption / Decryption * ECC-Based Secret Key Derivation (using ECDH) * ECC-Based Secret Key Derivation - Example in Python * ECC-Based Hybrid Encryption / Decryption - Example in Python - ECIES Hybrid Encryption Scheme - ECIES Encryption - Example - Exercises: ECIES Encrypt / Decrypt * ECIES Encryption * ECIES Decryption Digital Signatures - Sign Messages and Verify Signatures: How It Works? - Digital Signature Schemes and Algorithms * RSA Signatures * DSA (Digital Signature Algorithm) * ECDSA (Elliptic Curve Digital Signature Algorithm) * EdDSA (Edwards-curve Digital Signature Algorithm) * Other Signature Schemes and Algorithms - RSA Signatures * Key Generation * RSA Sign * RSA Verify Signature - RSA: Sign / Verify - Examples * The RSA Signature Standard PKCS#1 - Exercises: RSA Sign and Verify * Exercises: RSA Sign / Verify * Sign a Message with RSA * Verify Message Signature with RSA - ECDSA: Elliptic Curve Signatures * Key Generation * ECDSA Sign * ECDSA Verify Signature * How Does it Work? * The Math behind the ECDSA Sign / Verify * ECDSA: Public Key Recovery from Signature - ECDSA: Sign / Verify - Examples * ECDSA Sign / Verify using the secp256k1 Curve and SHA3-256 * Public Key Recovery from the ECDSA Signature * Public Key Recovery from Extended ECDSA Signature - Exercises: ECDSA Sign and Verify * Sign a Message with ECDSA / P-521 * Verify Message Signature with ECDSA / P-521 - EdDSA and Ed25519 * EdDSA Key Generation * EdDSA Sign * EdDSA Verify Signature * How Does it Work? * ECDSA vs EdDSA - EdDSA: Sign / Verify - Examples * Ed25519 Signatures - Example * Ed448 Signatures - Example - Exercises: EdDSA Sign and Verify * EdDSA-Ed25519: Sign Message * EdDSA-Ed25519: Verify Signature Quantum-Safe Cryptography - Quantum-Safe and Quantum-Broken Crypto Algorithms * ECC Cryptography and Most Digital Signatures are Quantum-Broken! * Hashes are Quantum Safe * Symmetric Ciphers are Quantum Safe - Post-Quantum Cryptography * Hash-Based Public-Key Cryptography * Code-Based Public-Key Cryptography * Lattice-Based Public-Key Cryptography * Zero-Knowledge Proof-Based * Multivariate-Quadratic-Equations Public-Key Cryptography - Quantum-Resistant Cryptography - Libraries - SPHINCS+ Signatures in Python * NewHope Key Exchange in Python - Quantum-Safe Signatures - Example - Quantum-Safe Key Exchange - Example - Quantum-Safe Asymmetric Encryption - Example More Cryptographic Concepts - Digital Certificates, the X.509 Standard and PKI - Transport Layer Security (TLS) and SSL - External Authentication and OAuth - Two-Factor Authentication and One-Time Passwords * HMAC-based One-time Password (HOTP) * Counter-based One-Time Password algorithm (COTP) * Time-based One-Time Password Algorithm (TOTP) * Time-based One-Time Password in Practice - Infected Cryptosystems and Crypto Backdoors - Other Cryptographic Concepts and Standards - Digital Certificates - Example - TLS - Example - One-Time Passwords (OTP) - Example * Server-Side Setup * Client-Side Setup * Working Example Crypto Libraries for Developers - Cryptographic Libraries for JavaScript, Python, C# and Java - Summary - JavaScript Crypto Libraries * JavaScript Crypto Libraries * Cryptography in JavaScript - Python Crypto Libraries * Python Crypto Libraries * Cryptography in Python * ECDSA in Python: Generate / Load Keys * ECDSA in Python: Sign Message * ECDSA in Python: Verify Signature - C# Crypto Libraries * C# Crypto Libraries * Cryptography in C# and .NET * .NET Cryptography and Bouncy Castle .NET * ECDSA in C#: Initialize the Application - Java Crypto Libraries * Java Crypto Libraries * Cryptography in Java * JCA, Bouncy Castle and Web3j * ECDSA in Java: Install the Crypto Libraries * ECDSA in Java: Initialize the Application * ECDSA in Java: Generate / Load Keys * ECDSA in Java: Sign Message * ECDSA in Java: Verify Signature Conclusion
1
2
832
New book!
The "High-Level System Design Handbook" by Aayush Soni (2026) is now in @ChapterPal's collection of free books. The book is a comprehensive guide intended for software engineers, system architects, and technical leaders who design, scale, and maintain large-scale distributed platforms or prepare for technical design interviews. The text assumes a baseline familiarity with programming, basic operating system mechanics such as processes and threads, fundamental data structures, relational database concepts, and networking protocols such as TCP and HTTP. From this foundation, the book covers the full architectural lifecycle of distributed software, ranging from single-machine performance limits to planet-scale multi-region topologies and modern artificial intelligence platforms. Read the book with an AI tutor: chapterpal.com/book/9bc8434f… All book on ChapterPal are free to read with a free account. The table of contents: Here’s the ToC with all level-three headings removed. Chapter 0: Prerequisites * 0.0 Networking Fundamentals for System Design * 0.1 Operating System Essentials for System Design * 0.2 Data Structures for Distributed Systems * 0.3 Database Fundamentals for System Design * 0.4 API Design Basics: REST, GraphQL, gRPC, and the Hard Parts * References Chapter 1: Core Fundamentals * 1.0 Scalability: Growing a System Without Breaking It * 1.1 Latency and Throughput: The Two Numbers That Matter * 1.2 Availability and Reliability: Nines, SLOs, and Staying Up * 1.3 Consistency Models: What Readers Actually See * 1.4 Back-of-the-Envelope Estimation * 1.5 How to Approach a System Design Question * 1.6 Trade-off Thinking * References Chapter 2: Building Blocks * 2.0 Load Balancers: Spreading Traffic, Absorbing Failure * 2.1 Reverse Proxies and API Gateways: The Smart Edge * 2.2 Content Delivery Networks: Moving Bytes Closer to Users * 2.3 Caching: From Browser to Database * 2.4 SQL Databases: The Boring Technology That Wins * 2.5 NoSQL Databases: Picking the Right Non-Relational Tool * 2.6 Database Partitioning and Sharding: When One Node Is Not Enough * 2.7 Database Replication: Keeping Copies in Sync * 2.8 Message Queues and Streaming: Decoupling at Scale * 2.9 Pub/Sub: Fan-Out and Event-Driven Systems * 2.10 Real-Time Communication: WebSockets, SSE, and Long Polling * 2.11 Rate Limiting: Protecting Systems from Themselves * 2.12 Service Discovery and Service Mesh: Finding and Talking to Services * 2.13 Blob and Object Storage: Storing the Big Stuff * 2.14 Geospatial Indexing: Geohash, Quadtree, R-tree, S2, and H3 * 2.15 Edge Computing (Cloudflare Workers, Lambda@Edge, Deno Deploy) * References Chapter 3: Distributed Systems Theory * 3.0 Consensus Protocols: How Distributed Systems Agree * 3.1 Consistency Deep Dive: Linearizability, Serializability, and the Spectrum Between * 3.2 Quorums and Replication: The Math of R + W > N * 3.3 CAP and PACELC: The Tradeoff That Keeps Confusing People * 3.4 Clocks and Ordering: Lamport, Vector, and Hybrid Logical Clocks * 3.5 CRDTs: Conflict-Free Replicated Data Types * 3.6 Distributed Transactions: 2PC, Saga, and When to Avoid Both * 3.7 Idempotency and Exactly-Once: The Honest Truth About Delivery Guarantees * 3.8 Failure Detection: Deciding a Node Is Dead * 3.9 Consistent Hashing: Keys to Nodes Without Global Reshuffles * 3.10 Merkle Trees and Anti-Entropy: Keeping Replicas in Sync Cheaply * References Chapter 4: Data Systems * 4.0 Storage Engines: B-Trees, LSM-Trees, and Why Your Database Feels the Way It Does * 4.1 OLTP vs OLAP: Row Stores, Column Stores, and Matching Shape to Workload * 4.2 Data Warehouses and Data Lakes: Structure, Schema, and the Lakehouse * 4.3 Stream vs Batch Processing: Lambda, Kappa, and the End of That Debate * 4.4 Change Data Capture: Streaming the Database's Inner Monologue * 4.5 Search Systems: Inverted Indexes, BM25, and Running Elasticsearch in Production * 4.6 Time-Series Databases: Metrics, Events, and Retention at Scale * 4.7 Graph Databases: Property Graphs, Cypher, and When Joins Are the Problem * 4.8 Vector Databases: Embeddings, ANN Indexes, and the Retrieval Layer for AI * 4.9 Key-Value Stores: Redis, Memcached, DynamoDB, and Picking the Right Hash Table * References Chapter 5: Architecture Patterns * 5.0 Monolith vs Microservices: Team Topology, Conway's Law, and the Distributed System Tax * 5.1 Event-Driven Architecture: Notifications, State Transfer, and Choreography * 5.2 CQRS: Separating Reads from Writes Without Losing Your Mind * 5.3 Event Sourcing: Events as the Source of Truth * 5.4 Serverless: Functions, Cold Starts, and When FaaS Actually Saves Money * 5.5 Backend for Frontend: Per-Client API Aggregation Done Right * 5.6 Strangler Fig: Incremental Migration Without a Big Bang * 5.7 Hexagonal and Clean Architecture: Keeping Business Logic Independent * 5.8 Multi-Region Architecture: Active-Passive, Active-Active, and CRDTs * 5.9 Multi-Tenancy: Silo, Pool, and the SaaS Isolation Spectrum * 5.10 CRDT Applications (Yjs, Automerge, Local-First Software) * References Chapter 6: Reliability & Operations * 6.0 Observability: Metrics, Logs, Traces, and the OpenTelemetry Standard * 6.1 SLI, SLO, SLA, and Error Budgets: Making Reliability Quantitative * 6.2 Resilience Patterns: Timeouts, Retries, Circuit Breakers, and Bulkheads * 6.3 Graceful Degradation: When Partial Service Beats No Service * 6.4 Auto-Scaling and Capacity Planning: From HPA to Predictive Scaling * 6.5 Deployment Strategies: Blue-Green, Canary, Rolling, and Feature Flags * 6.6 Chaos Engineering: Breaking Things on Purpose * 6.7 Incident Management: From Detection to Blameless Postmortem * 6.8 Health Checks and Readiness: Telling the Truth About Whether You're Up * 6.9 Cost Optimization and FinOps * 6.10 Platform Engineering: IDPs, Golden Paths, and DX * References Chapter 7: Security at Scale * 7.0 Authentication vs Authorization: Identity, Permissions, and Access Models * 7.1 OAuth 2.0 and OpenID Connect: Delegated Authorization and Identity Done Right * 7.2 JWT Deep Dive: Signed Tokens, Claims, and the Revocation Problem * 7.3 mTLS and Service-to-Service Authentication: SPIFFE, Service Mesh, and Zero Trust * 7.4 Secrets Management: Vault, KMS, and the End of Secrets in Config Files * 7.5 DDoS Protection and WAFs: Mitigating Volumetric and Application Attacks * 7.6 Data Residency and Compliance Architecture (GDPR, DPDP, CCPA, Right-to-Erasure) * 7.7 Supply Chain Security: SBOM, SLSA, Sigstore, and Defending Against xz-utils * 7.8 Privacy-Preserving Systems (Differential Privacy, Federated Learning) * 7.9 Post-Quantum Cryptography: Migrating to ML-KEM, ML-DSA, and a Crypto-Agile Future * References Chapter 8: Case Studies * 8.0 Design a URL Shortener (TinyURL / bit.ly) * 8.1 Design a Pastebin (Paste Sharing Service) * 8.2 Design a Distributed Rate Limiter * 8.3 Design a Distributed Key-Value Store (Dynamo / Cassandra / Riak) * 8.4 Design a Notification System (Push, SMS, Email at Scale) * 8.5 Design a Chat System (WhatsApp / Messenger / Signal) * 8.6 Design a Social Media Feed (Twitter / Instagram / LinkedIn) * 8.7 Design a Photo Sharing Service (Instagram) * 8.8 Design a Web Crawler (Googlebot-style) * 8.9 Design Search Autocomplete (Typeahead Suggestions) * 8.10 Design a Video Streaming Service (YouTube / Twitch / TikTok) * 8.11 Design Netflix (End-to-End) * 8.12 Design a Ride-Hailing Service (Uber / Lyft) * 8.13 Design Google Maps (Routing and Tile Rendering) * 8.14 Design a File Sync Service (Dropbox / Google Drive) * 8.15 Design Collaborative Editing (Google Docs / Figma / Notion) * 8.16 Design a Distributed Cache (Memcached / Redis Cluster) * 8.17 Design a Recommendation System (Netflix / YouTube / TikTok) * 8.18 Design a Ticketing System (BookMyShow / Ticketmaster) * 8.19 Design a Payment System (Stripe / PayPal) * 8.20 Design a Stock Exchange (Matching Engine) * 8.21 Design a Food Delivery Service (DoorDash / Swiggy) * 8.22 Design a Metrics Pipeline (Prometheus / InfluxDB / Thanos) * 8.23 Design Ad-Click Aggregation (Real-Time Stream Processing) * 8.24 Design a Logging Platform (ELK / Loki / Splunk) * 8.25 Design a Proximity Service (Nearby Friends / Yelp) * 8.26 Design a Real-Time Leaderboard * 8.27 Design a Unique ID Generator (Snowflake, ULID, TSID, UUIDv7) * 8.28 Design a Hotel Reservation System (Booking.com / Airbnb) * 8.29 Design a Distributed Job Scheduler (Airflow / Temporal / Distributed Cron) * 8.30 Design ChatGPT (Conversational AI at Scale) * 8.31 Design an Enterprise RAG System * 8.32 Design a Coding Agent (Claude Code / GitHub Copilot / Cursor) * 8.33 Design Perplexity (AI Search with Citations) * 8.34 Design a Voice Agent (Alexa / Siri-Class Realtime) * 8.35 Design a Content Moderation System at Scale * 8.36 Design a Semantic Cache for LLM Applications * 8.37 Design a Model Router and Gateway (OpenRouter / LiteLLM) * 8.38 Design a Feature Flag Service (LaunchDarkly / Harness FME / Unleash) * 8.39 Design a DNS Service (Cloudflare 1.1.1.1 / Google 8.8.8.8) * 8.40 Design a Dating App (Tinder / Hinge / Bumble) * 8.41 Design an Online Auction (eBay / Catawiki) * 8.42 Design a Multi-Tenant SaaS Platform * 8.43 Design a Video Conferencing System (Zoom / Google Meet) * 8.44 Design an Email Service at Gmail Scale (1.8B Users, 300B Messages/Day) * 8.45 Design Live Comments at Scale (FB Live / YouTube Live / Twitch Chat) * 8.46 Design a Fraud Detection System (Stripe Radar / PayPal / Feedzai) * 8.47 Design a Fitness Tracking Service (Strava / MapMyRun) * 8.48 Design an Online Judge (LeetCode / Codeforces / HackerEarth) * 8.49 Design a Price Tracking Service (CamelCamelCamel / Honey / Keepa) * 8.50 Design an API Gateway at Scale (Kong / AWS API Gateway / Apigee / Envoy) * 8.51 Design a CI/CD Platform (GitHub Actions / GitLab CI / CircleCI) * 8.52 Design an Observability Platform (Datadog / New Relic / Honeycomb) * 8.53 Design a Search Engine (Google-Scale / Brave Search) * 8.54 Design a Brokerage Platform (Robinhood / E*TRADE / Interactive Brokers) * 8.55 Design Channel-Scale Chat (Discord / Slack) * References Chapter 9: AI & ML System Design * 9.0 LLM Serving Architecture (vLLM, TGI, TensorRT-LLM) * 9.1 RAG Pipelines (Retrieval-Augmented Generation) * 9.2 Vector Search at Scale (HNSW, IVF-PQ, DiskANN) * 9.3 AI Agent Architectures (ReAct, Reflection, Planning, Tool Use, Memory) * 9.4 Multi-Agent Orchestration (LangGraph, OpenAI Agents SDK, AutoGen, Swarm) * 9.5 LLM Evaluation and Observability (Ragas, LangSmith, TruLens, LLM-as-Judge) * 9.6 LLMOps and Prompt Engineering (Versioning, Guardrails, Red-Teaming) * 9.7 LLM Cost Optimisation (Semantic Cache, Model Routing, Cascading, Prompt Caching) * 9.8 LLM Safety and Guardrails (OWASP LLM Top 10, Prompt Injection, PII, Jailbreaks) * 9.9 ML System Design Fundamentals * 9.10 Feature Stores and Model Serving (Feast, Tecton, KServe, BentoML, MLflow) * 9.11 Recommendation Systems Deep Dive (DLRM, Two-Tower, Embedding Retrieval, Cold Start) * 9.12 Realtime AI and Voice Agents (Streaming Inference, WebRTC, LiveKit, Deepgram) * 9.13 Multimodal AI Systems (CLIP, Whisper, LayoutLM, Document AI) * 9.14 Data Infrastructure for AI (Embedding Pipelines, Chunking, Unstructured ETL, MCP) * References Chapter 10: Emerging Patterns * 10.0 Green Computing (Carbon-Aware Scheduling, PUE, Sustainable Systems) * References Chapter 11: Interview Framework * 11.0 Interview Frameworks Compared (RESHADED, PEDALS, ADEPT) * 11.1 Requirements Scoping: Functional, Non-Functional, and MoSCoW * 11.2 Diagramming Skills for System Design Interviews * 11.3 Trade-off Articulation: Saying 'It Depends' Well * 11.4 Company-Specific Interview Flavors (Amazon, Google, Meta, Netflix) * 11.5 Design Doc Authoring: RFCs, ADRs, and the Staff Engineer's Written Output * References Trade-offs Library * 1. Strong vs Eventual Consistency * 2. ACID vs BASE * 3. SQL vs NoSQL * 4. Latency vs Throughput * 5. CAP and PACELC Applied * 6. Cache Strategies: Cache-Aside vs Write-Through vs Write-Behind * 7. Batch vs Stream Processing * 8. Load Balancer vs Reverse Proxy vs API Gateway * 9. REST vs gRPC vs GraphQL * 10. Polling vs Long-Polling vs SSE vs WebSockets vs Webhooks * 11. Rate Limiting Algorithms: Token Bucket vs Sliding Window * 12. Optimistic vs Pessimistic Concurrency Control * 13. Partitioning Schemes: Range, Hash, Consistent Hash, Directory * 14. B-tree vs LSM-tree Storage * 15. Monolith vs Microservices * 16. Replication Topologies: Leader-Follower, Multi-Leader, Leaderless * 17. Distributed Transactions: 2PC vs Saga vs TCC * 18. Push vs Pull (Fan-out, Messaging, Feed) * 19. Lambda vs Kappa Architecture * 20. Vertical vs Horizontal Scaling * 21. Normalization vs Denormalization * 22. Single-Region vs Multi-Region Deployment * References
1
2
618
A new book!
The Practical Cryptography for Developers book by Svetlin Nakov (2023) is now in @ChapterPal's collection of free books. This textbook is designed for working software engineers, DevOps practitioners, systems administrators, and quality assurance professionals who need to apply cryptographic techniques in real-world applications. Assuming a general background in programming and basic software development concepts, the book intentionally avoids heavy mathematical theory and academic proofs. Instead, it adopts an engineering-first perspective that uses readable Python code samples and exercises to demonstrate how modern cryptographic primitives function and how they fit together in secure software architectures. Read with an AI tutor: chapterpal.com/book/a63bbbf8… All books on ChapterPal are free to read with a free account. Table of contents: Welcome Preface - This Book is for Developers! - This Book is Free! - About the Author: Dr. Svetlin Nakov - The History behind This Book - The Software University (SoftUni) - Why Yet Another Book on Cryptography? * Academic Cryptography Books * Crypto Libraries and Their Documentation * Practical Cryptography - Existing Books - What Does this Book Cover? - Why Python is Used for the Examples? - How to Read This Book? Cryptography - Overview - Overview of Modern Cryptography * Encrypt / Decrypt Message - Live Demo - What is Cryptography? * Encryption and Keys * Digital Signatures and Message Authentication * Secure Random Numbers * Key Exchange * Cryptographic Hashes and Password Hashing * Confusion and Diffusion in Cryptography * Cryptographic Libraries Hash Functions - Hashing (in Software Engineering) - Cryptographic Hash Functions * Cryptographic Hash Functions - Examples * Cryptographic Hash Functions - Live Demo - Crypto Hashes and Collisions * Hash Collisions * Cryptographic Hash Functions: No Collisions - Hash Functions: Applications * Document Integrity * Storing Passwords * Generate Unique ID * Pseudorandom Number Generation * Proof-of-Work Algorithms * Cryptographic Hashes are Part of Modern Programming - Secure Hash Algorithms * Secure Hash Functions * Insecure Hash Functions - Hash Functions - Examples * Calculating Cryptographic Hash Functions in Python - Exercises: Calculate Hashes * Calculate **SHA-224 Hash** * Calculate **SHA-256 Hash** * Calculate **SHA3-224 Hash** * Calculate **SHA3-384 Hash** * Calculate **Keccak-384 Hash** * Calculate **Whirlpool (512 Bit) Hash** - Proof-of-Work Hash Functions * ETHash * Equihash * More about ASIC-Resistant Hash Functions MAC and Key Derivation - Message Authentication Code (MAC) - MAC Algorithms - When We Need MAC Codes? - Authenticated Encryption: Encrypt / Decrypt Messages using MAC - MAC-Based Pseudo-Random Generator - HMAC and Key Derivation * What is HMAC? * Key Derivation Functions (KDF) * HMAC Calculation - Example - HMAC Calculation - Examples - Exercises: Calculate HMAC - KDF: Deriving Key from Password * Key Derivation Functions - Concepts * Cryptographic Key Derivation Functions - PBKDF2 * PBKDF2 and Number of Iterations * PBKDF2 - Example * PBKDF2 Calculation in Python - Example * When to Use PBKDF2? - Modern Key Derivation Functions - Scrypt * Scrypt Parameters * Scrypt - Example * Scrypt Calculation in Python - Example * Storing Algorithm Settings + Salt + Hash Together * When to Use Scrypt? - Bcrypt * Bcrypt - Example * Storing Algorithm Settings + Salt + Hash Together * When to Use Bcrypt? - Linux crypt() - Argon2 * Variants of Argon2 * Config Parameters of Argon2 * Argon2 - Example * Argon2 Calculation in Python - Example * Storing Algorithm Settings + Salt + Hash Together * When to Use Argon2? - Secure Password Storage * Clear-Text Passwords - Never Do Anti-Pattern * Simple Password Hash - Highly Insecure * Salted Hashed Passwords - Secure, but Not Enough * Secure KDF-Based Password Hashing - Recommended * Password-Based Authentication - Exercises: Password Encryption * Implement "Register User" * Implement "User Login" * Implement "Change Password" * Implement "Reset Password" - Exercises: Scrypt Key Derivation and Password Hashing * Derive a Key by Password using Scrypt * Scrypt: Encrypt a Password * Scrypt: Verify a Password Secure Random Generators - Secure Random Number Generators, PRNG and CSPRNG - Random Generators * Pseudo-Random Number Generators (PRNG) * Initial Entropy (Seed) * Entropy * Collecting Entropy * Insecure Randomness * Insecure Randomness - Examples - Randomness and Cryptography * CSPRNG (Cryptography Secure Random Number Generators) * Conclusion: Use Secure Random Generator - Pseudo-Random Numbers - Examples * Creating a Secure Random Generator - Secure Random Generators (CSPRNG) * Hardware Random Generators (TRNG) * How as a Developer to Access the CSPRNG? - Exercises: Pseudo-Random Generator Key Exchange and DHKE - Key Exchange / Key Agreement Algorithms - Diffie–Hellman Key Exchange * Diffie–Hellman Key Exchange (DHKE) * The Diffie-Hellman Key Exchange (DHKE) Protocol - DHKE - Examples - Exercises: DHKE Key Exchange Encryption: Symmetric and Asymmetric - Symmetric Encryption - Concepts and Algorithms * Secret Keys * Modern Symmetric Encryption Algorithms * Symmetric Encryption - Online Demo - Public Key Cryptography - Concepts * Public Key Encryption / Decryption * Signatures: Asymmetric Signing / Verification * Key Pairs * Private Keys * Public Keys - Popular Public Key Cryptosystems * The RSA Cryptosystem * The ECC Cryptosystem * ECC is Recommended in the General Case - Asymmetric Encryption in Practice * Asymmetric Encryption - Online Demo Symmetric Key Ciphers - Symmetric Encryption / Decryption - Symmetric Encryption Uses a Set of Algorithms - Cipher Block Modes * Block Cipher Modes (CBC, CTR, GCM, ...) - Popular Symmetric Algorithms * AES (**Rijndael)** * **Salsa20 / ChaCha20** * Other Popular Symmetric Ciphers * Insecure Symmetric Algorithms * Symmetric Encryption Schemes / Constructions - The AES Cipher - Concepts * AES is Secure and Very Popular Symmetric Encryption Algorithm * AES Algorithm Parameters * Integrated Message Authentication Code (MAC) * The AES Encryption Process * The AES Decryption Process - AES Encrypt / Decrypt - Examples * Simple AES-CTR Example * AES-256-GCM Example * AES-256-GCM + Scrypt Example - Ethereum Wallet Encryption * Ethereum UTC / JSON Wallets * UTC / JSON Keystore - Example * What Is Inside the UTC / JSON File? * MyEtherWallet: Play with UTC / JSON Keystore Files - Exercises: AES Encrypt / Decrypt * Symmetric Encryption (AES + Scrypt + HMAC) * Symmetric Decryption (AES + Scrypt + HMAC) - ChaCha20-Poly1305 * ChaCha20-Poly1305 * Chacha20-Poly1305 - Example in Python - Exercises: ChaCha20-Poly1305 Asymmetric Key Ciphers - Public-Key Cryptosystems - Asymmetric Encryption Schemes * Integrated Encryption Schemes * Key Encapsulation Mechanisms (KEMs) - Digital Signatures - Key Exchange Algorithms - The RSA Cryptosystem - Concepts * RSA Key Generation * RSA Public Key - Example * RSA Private Key - Example * RSA Cryptography: Encrypt a Message * RSA Cryptography: Decrypt a Message * RSA Encrypt and Decrypt - Example - RSA Encrypt / Decrypt - Examples * RSA Key Generation * RSA Encryption * RSA Decryption * Finally, **decrypt the message** using using **RSA-OAEP** with the RSA **private key**: * Sample Output - Exercises: RSA Encrypt / Decrypt * Encrypt Message with RSA-OAEP * Decrypt a Message with RSA-OAEP * * Implement Hybrid Encryption / Decryption with RSA-KEM - Elliptic Curve Cryptography (ECC) * ECC Keys * Curves and Key Length * ECC Algorithms * Elliptic Curves * Edwards Curves - ECDH Key Exchange - ECDH Key Exchange - Examples - Exercises: ECDH Key Exchange - ECC Encryption / Decryption * ECC-Based Secret Key Derivation (using ECDH) * ECC-Based Secret Key Derivation - Example in Python * ECC-Based Hybrid Encryption / Decryption - Example in Python - ECIES Hybrid Encryption Scheme - ECIES Encryption - Example - Exercises: ECIES Encrypt / Decrypt * ECIES Encryption * ECIES Decryption Digital Signatures - Sign Messages and Verify Signatures: How It Works? - Digital Signature Schemes and Algorithms * RSA Signatures * DSA (Digital Signature Algorithm) * ECDSA (Elliptic Curve Digital Signature Algorithm) * EdDSA (Edwards-curve Digital Signature Algorithm) * Other Signature Schemes and Algorithms - RSA Signatures * Key Generation * RSA Sign * RSA Verify Signature - RSA: Sign / Verify - Examples * The RSA Signature Standard PKCS#1 - Exercises: RSA Sign and Verify * Exercises: RSA Sign / Verify * Sign a Message with RSA * Verify Message Signature with RSA - ECDSA: Elliptic Curve Signatures * Key Generation * ECDSA Sign * ECDSA Verify Signature * How Does it Work? * The Math behind the ECDSA Sign / Verify * ECDSA: Public Key Recovery from Signature - ECDSA: Sign / Verify - Examples * ECDSA Sign / Verify using the secp256k1 Curve and SHA3-256 * Public Key Recovery from the ECDSA Signature * Public Key Recovery from Extended ECDSA Signature - Exercises: ECDSA Sign and Verify * Sign a Message with ECDSA / P-521 * Verify Message Signature with ECDSA / P-521 - EdDSA and Ed25519 * EdDSA Key Generation * EdDSA Sign * EdDSA Verify Signature * How Does it Work? * ECDSA vs EdDSA - EdDSA: Sign / Verify - Examples * Ed25519 Signatures - Example * Ed448 Signatures - Example - Exercises: EdDSA Sign and Verify * EdDSA-Ed25519: Sign Message * EdDSA-Ed25519: Verify Signature Quantum-Safe Cryptography - Quantum-Safe and Quantum-Broken Crypto Algorithms * ECC Cryptography and Most Digital Signatures are Quantum-Broken! * Hashes are Quantum Safe * Symmetric Ciphers are Quantum Safe - Post-Quantum Cryptography * Hash-Based Public-Key Cryptography * Code-Based Public-Key Cryptography * Lattice-Based Public-Key Cryptography * Zero-Knowledge Proof-Based * Multivariate-Quadratic-Equations Public-Key Cryptography - Quantum-Resistant Cryptography - Libraries - SPHINCS+ Signatures in Python * NewHope Key Exchange in Python - Quantum-Safe Signatures - Example - Quantum-Safe Key Exchange - Example - Quantum-Safe Asymmetric Encryption - Example More Cryptographic Concepts - Digital Certificates, the X.509 Standard and PKI - Transport Layer Security (TLS) and SSL - External Authentication and OAuth - Two-Factor Authentication and One-Time Passwords * HMAC-based One-time Password (HOTP) * Counter-based One-Time Password algorithm (COTP) * Time-based One-Time Password Algorithm (TOTP) * Time-based One-Time Password in Practice - Infected Cryptosystems and Crypto Backdoors - Other Cryptographic Concepts and Standards - Digital Certificates - Example - TLS - Example - One-Time Passwords (OTP) - Example * Server-Side Setup * Client-Side Setup * Working Example Crypto Libraries for Developers - Cryptographic Libraries for JavaScript, Python, C# and Java - Summary - JavaScript Crypto Libraries * JavaScript Crypto Libraries * Cryptography in JavaScript - Python Crypto Libraries * Python Crypto Libraries * Cryptography in Python * ECDSA in Python: Generate / Load Keys * ECDSA in Python: Sign Message * ECDSA in Python: Verify Signature - C# Crypto Libraries * C# Crypto Libraries * Cryptography in C# and .NET * .NET Cryptography and Bouncy Castle .NET * ECDSA in C#: Initialize the Application - Java Crypto Libraries * Java Crypto Libraries * Cryptography in Java * JCA, Bouncy Castle and Web3j * ECDSA in Java: Install the Crypto Libraries * ECDSA in Java: Initialize the Application * ECDSA in Java: Generate / Load Keys * ECDSA in Java: Sign Message * ECDSA in Java: Verify Signature Conclusion
2
433
A new book!
The "Vector Calculus" textbook by Michael Corral (2008) is now in @ChapterPal's collection. This textbook is an introductory, one-semester instructional guide to multivariable and vector calculus, commonly designated as Calculus III. Targeted at undergraduate students in mathematics, physics, engineering, and related technical disciplines, the text assumes a working foundation in single-variable differential and integral calculus. It adopts a balanced pedagogical methodology with moderate formal rigor, presenting direct proofs and geometric intuitions while avoiding overly abstract analysis. The scope focuses on Euclidean space in two and three dimensions, intentionally setting aside general n-dimensional vector spaces and advanced linear algebra techniques in favor of concrete, low-dimensional mechanics. Read the book with an AI tutor: chapterpal.com/book/e6afcbb6… All texts on ChapterPal are free to read with a free account.
445
A new book!
Linear Algebra (4th edition) by Jim Hefferon (2020) is now in @ChapterPal's collection of free books. It's an introductory textbook for a standard first undergraduate course in linear algebra. Designed for students transitioning from purely computational mathematics to rigorous conceptual reasoning, the text balances mechanical problem-solving with mathematical proofs. It assumes basic familiarity with elementary algebra, while providing a thorough appendix on formal logic, proof techniques such as induction and contradiction, set theory, and equivalence relations to assist students in developing mathematical maturity. Read the book with an AI tutor: chapterpal.com/book/d4276209…
1
3
360
A new book!
The Introduction to Machine Learning textbook by Laurent Younes (2024) is now in @ChapterPal's collection. It's a great next book after my The Hundred-Page Machine Learning Book if you're looking to go deeper into the math of machine learning. The book is denser than my book, so read it with an AI tutor: chapterpal.com/ebook/fc1ebc2… (All books on ChapterPal are free to read with a free account.)
1
1
651
A new book!
An absolutely brilliant interactive textbook Linear Algebra: An Interactive Introduction (3rd edition) by by Anna Davis and Paul Zachlin (2024) is now in @ChapterPal's collection. The book is truly interactive with most exercises validate the reader's input and evaluate it. It has several dozens illustrations where the reader can rotate graphs in 3D and interact with them. It has Octave execution runtime that allows the reader to code right inside the textbook chapter and see how changing the code changes the output it generates. A gem of a book! Read it with an AI tutor: chapterpal.com/book/a1787e24… (All books, curricula, and articles on ChapterPal are free to read with a free account. See the entire book library here: chapterpal.com/bookstore).
4
603
A new book!
The Contemporary Calculus textbook by Dale Hoffman (2016) is now in @ChapterPal's collection. It's an introductory single-variable calculus textbook designed for students in science, engineering, mathematics, and social sciences who have a foundation in algebra, geometry, and trigonometry. The book focuses on real-valued functions of a single independent variable, developing the mathematical machinery of continuous change and accumulation. Its scope is centered on differential and integral calculus in one dimension, leaving multivariable calculus, vector calculus, and advanced differential equations outside its boundaries. Read it with an AI tutor: chapterpal.com/ebook/d80a740…
7
688
ChapterPal retweeted
DISCRETE MATHEMATICS (414 pages) Download it (3rd Edition): discrete.openmathbooks.org/p… -or- Buy it (updated 4th Edition): amzn.to/46dwXR7 -or- Read it online…⤵️(quoted post below)
A fantastic textbook "Discrete Mathematics: An Open Introduction" (3rd edition) by Oscar Levin (2025) is now in @ChapterPal's collection. The book Introduces fundamental concepts in discrete mathematics through interactive problems in counting, sequences, symbolic logic, and graph theory. The book has 120 figures and 510 exercises, most of which are interactive with feedback. Read the book with an AI tutor: chapterpal.com/book/1cd4b139… Chapter 0: Introduction and Preliminaries ## 0.1 What is Discrete Mathematics? ## 0.2 Mathematical Statements ### Atomic and Molecular Statements ### Implications ### Exercises ## 0.3 Sets ### Notation ### Relationships Between Sets ## 0.4 Functions ### Describing Functions ### Image and Inverse Image Chapter 1: Counting ## 1.1 Additive and Multiplicative Principles ### Principle of Inclusion/Exclusion ### Exercises ### Subsets ### Bit Strings ### Lattice Paths ### Binomial Coefficients ### Pascal’s Triangle ### Exercises ## 1.3 Combinations and Permutations ## 1.4 Combinatorial Proofs ### Patterns in Pascal’s Triangle ### Exercises ## 1.6 Advanced Counting Using PIE ## 1.7 Chapter Summary ### Chapter Review Chapter 2: Sequences ## 2.1 Describing Sequences ### Sums of Arithmetic and Geometric Sequences ## 2.3 Polynomial Fitting ## 2.4 Solving Recurrence Relations ## 2.5 Induction ### Stamps ### Formalizing Proofs ### Examples ### Strong Induction ### Exercises ### Chapter Review Chapter 3: Symbolic Logic and Proofs ## 3.1 Propositional Logic ### Truth Tables ## 3.2 Proofs ### Direct Proof ### Proof by Contrapositive ### Proof by Contradiction ### Proof by (counter) Example ### Exercises ## 3.3 Chapter Summary ### Chapter Review Chapter 4: Graph Theory ### Named Graphs. ### Graph Theory Definitions. ### Exercises ### Properties of Trees ### Rooted Trees ### Non-planar Graphs ### Polyhedra ### Exercises ### Coloring in General ### Coloring Edges ### Exercises ### Hamilton Paths ## 4.6 Matching in Bipartite Graphs ## 4.7 Chapter Summary ### Chapter Review Chapter 5: Additional Topics ## 5.1 Generating Functions ### Differencing ## 5.2 Introduction to Number Theory ### Divisibility ### Remainder Classes ### Properties of Congruence ### Solving Linear Diophantine Equations
4
70
430
18,642
A new book!
The Principles of Programming Languages book by Mike Grant, Zachary Palmer, Scott Smith (2002) is now in @ChapterPal's collection. This textbook provides an introduction to the foundational principles and formal semantic structures of programming languages, aimed at advanced undergraduate and graduate computer science students. Designed for readers with basic proficiency in OCaml, elementary knowledge of C, and general familiarity with object-oriented languages such as Java or C++, the text assumes mathematical maturity in discrete mathematics, formal logic, grammars, and algorithms. Rather than surveying existing production languages, the book concentrates on language definitions, formal models, and implementation techniques, analyzing features by building and extending miniature core languages within the call-by-value functional family known as F-flat. Read this textbook with an AI tutor: chapterpal.com/ebook/36e7ae5… (All books on ChapterPal are free to read with a free account.) Table of contents: Chapter 1. Introduction - The OCaml Language - The FbDK - Background Needed Chapter 2. Operational Semantics - 2.1 A First Look at Operational Semantics - 2.2 BNF grammars and Syntax * 2.2.1 Operational Semantics for Logic Expressions * 2.2.2 Abstract Syntax * 2.2.3 Operational Semantics and Interpreters - 2.3 The $\text{F}^\flat$ Programming Language * 2.3.1 $\text{F}^\flat$ Syntax * 2.3.2 Variable Substitution * 2.3.3 Operational Semantics for $\text{F}^\flat$ * 2.3.4 The Expressiveness of $\text{F}^\flat$ * 2.3.5 Russell's Paradox and Encoding Recursion * 2.3.6 Call-By-Name Parameter Passing * 2.3.7 $\text{F}^\flat$ Abstract Syntax - 2.4 Operational Equivalence * 2.4.1 Defining Operational Equivalence * 2.4.2 Properties of Operational Equivalence * 2.4.3 Examples of Operational Equivalence * 2.4.4 The $\lambda$-Calculus - Exercises Chapter 3. Tuples, Records, and Variants - 3.1 Tuples * 3.1.1 Grammar and Operational Semantics for Pairs * 3.1.2 An Interpreter for Pairs - 3.2 Records * 3.2.1 Record Polymorphism * 3.2.2 The $\text{F}\flat\text{R}$ Operational Semantics * 3.2.3 The $\text{F}\flat\text{R}$ Interpreter - 3.3 Variants * 3.3.1 Variant Polymorphism * 3.3.2 The $\text{F}\flat\text{V}$ Language Chapter 4. Side Effects: State and Exceptions - 4.1 State * 4.1.1 The $\text{F}_\flat\text{S}$ Language * 4.1.2 Cyclical Stores * 4.1.3 The "Normal" Kind of State * 4.1.4 Automatic Garbage Collection - 4.2 Environment-Based Interpreters - 4.3 The $\text{F}_\flat\text{SR}$ Language * 4.3.1 Multiplication and Factorial * 4.3.2 Merge Sort - 4.4 Exceptions and Other Control Operations * 4.4.1 Interpreting Return * 4.4.2 The $\text{F}_\flat\text{X}$ Language * 4.4.3 The $\text{F}_\flat\text{X}$ Operational Semantics Chapter 5. Object-Oriented Language Features - 5.1 Encoding Objects in $\text{F}_{\!\flat}\text{SR}$ * 5.1.1 Simple Objects * 5.1.2 Object Polymorphism * 5.1.3 Information Hiding * 5.1.4 Classes * 5.1.5 Inheritance * 5.1.6 Dynamic Dispatch * 5.1.7 Static Fields and Methods - 5.2 The $\text{F}_{\!\flat}\text{OB}$ Language * 5.2.1 Concrete Syntax * 5.2.2 A Direct Interpreter * 5.2.3 Translating $\text{F}_{\!\flat}\text{OB}$ to $\text{F}_{\!\flat}\text{SR}$ Chapter 6. Type Systems - 6.1 An Overview of Types - 6.2 $\text{TF}_\flat$: A Typed $\text{F}_\flat$ Variation * 6.2.1 Design Issues * 6.2.2 The $\text{TF}_\flat$ Language - 6.3 Type Checking - 6.4 Types for an Advanced Language: $\text{TF}_\flat\text{SRX}$ - 6.5 Subtyping * 6.5.1 Motivation * 6.5.2 The $\text{STF}_\flat\text{R}$ Type System: $\text{TF}_\flat$ with Records and Subtyping * 6.5.3 Implementing an $\text{STF}_\flat\text{R}$ Type Checker * 6.5.4 Subtyping in Other Languages - 6.6 Type Inference and Polymorphism * 6.6.1 Type Inference and Polymorphism * 6.6.2 An Equational Type System: $\text{EF}_\flat$ * 6.6.3 $\text{PEF}_\flat$: $\text{EF}_\flat$ with Let Polymorphism - 6.7 Constrained Type Inference Chapter 7. Concurrency - 7.1 Overview * 7.1.1 The Java Concurrency Model - 7.2 The Actor Model and AF$_\flat$V * 7.2.1 The Syntax of AF$_\flat$V * 7.2.2 An Example * 7.2.3 Operational Semantics of Actors * 7.2.4 The Local Rules * 7.2.5 The Global Rule * 7.2.6 The Atomicity of Actors Chapter 8. Compilation by Program Transformation - 8.1 Closure Conversion * 8.1.1 The Official Closure Conversion - 8.2 A-Translation * 8.2.1 The Official A-Translation - 8.3 Function Hoisting - 8.4 Translation to C * 8.4.1 Memory Layout * 8.4.2 The toC translation * 8.4.3 Compilation to Assembly code - 8.5 Summary - 8.6 Optimization - 8.7 Garbage Collection Bibliography
3
486
A new book!
Mathematics for Computer Science by Lehman, Leighton, and Meyer (2015) is a textbook designed for undergraduate students in computer science and related disciplines who require a rigorous foundation in discrete mathematics and formal reasoning. The text assumes modest initial prerequisites, requiring only an informal familiarity with basic sets, functions, and standard high school mathematics, before developing the theoretical machinery needed to model and analyze computing systems. The textbook centers on mathematical methods and discrete structures, defining clear boundaries around discrete rather than continuous mathematics, and treats formal proofs as an indispensable mechanism for verifying software and hardware correctness. Read this book with an AI tutor on @ChapterPal: chapterpal.com/ebook/0b9aa52… (All books on ChapterPal are free to read with a free account.) Table of contents: Part I. Proofs Introduction - 0.1 References 1 What is a Proof? - 1.1 Propositions - 1.2 Predicates - 1.3 The Axiomatic Method - 1.4 Our Axioms * 1.4.1 Logical Deductions * 1.4.2 Patterns of Proof - 1.5 Proving an Implication * 1.5.1 Method #1 * 1.5.2 Method #2 - Prove the Contrapositive - 1.6 Proving an "If and Only If" * 1.6.1 Method #1: Prove Each Statement Implies the Other * 1.6.2 Method #2: Construct a Chain of Iffs - 1.7 Proof by Cases - 1.8 Proof by Contradiction * Example - 1.9 Good Proofs in Practice - 1.10 References 2 The Well Ordering Principle - 2.1 Well Ordering Proofs - 2.2 Template for Well Ordering Proofs * 2.2.1 Summing the Integers - 2.3 Factoring into Primes - 2.4 Well Ordered Sets * 2.4.1 A Different Well Ordered Set (Optional) 3 Logical Formulas - 3.1 Propositions from Propositions * 3.1.1 NOT, AND, and OR * 3.1.2 IMPLIES * 3.1.3 If and Only If - 3.2 Propositional Logic in Computer Programs * 3.2.1 Truth Table Calculation * 3.2.2 Cryptic Notation - 3.3 Equivalence and Validity * 3.3.1 Implications and Contrapositives * 3.3.2 Validity and Satisfiability - 3.4 The Algebra of Propositions * 3.4.1 Propositions in Normal Form * 3.4.2 Proving Equivalences - 3.5 The SAT Problem - 3.6 Predicate Formulas * 3.6.1 Quantifiers * 3.6.2 Mixing Quantifiers * 3.6.3 Order of Quantifiers * 3.6.4 Variables Over One Domain * 3.6.5 Negating Quantifiers * 3.6.6 Validity for Predicate Formulas - 3.7 References 4 Mathematical Data Types - 4.1 Sets * 4.1.1 Some Popular Sets * 4.1.2 Comparing and Combining Sets * 4.1.3 Power Set * 4.1.4 Set Builder Notation * 4.1.5 Proving Set Equalities - 4.2 Sequences - 4.3 Functions * 4.3.1 Domains and Images * 4.3.2 Function Composition - 4.4 Binary Relations * 4.4.1 Relation Diagrams * 4.4.2 Relational Images - 4.5 Finite Cardinality * 4.5.1 How Many Subsets of a Finite Set? 5 Induction - 5.1 Ordinary Induction * 5.1.1 A Rule for Ordinary Induction * 5.1.2 A Familiar Example * 5.1.3 A Template for Induction Proofs * 5.1.4 A Clean Writeup * 5.1.5 A More Challenging Example * 5.1.6 A Faulty Induction Proof - 5.2 Strong Induction * 5.2.1 A Rule for Strong Induction * 5.2.2 Products of Primes * 5.2.3 Making Change * 5.2.4 The Stacking Game - 5.3 Strong Induction vs. Induction vs. Well Ordering - 5.4 State Machines * 5.4.1 States and Transitions * 5.4.2 Invariant for a Diagonally-Moving Robot * 5.4.3 The Invariant Principle * 5.4.4 The Die Hard Example * 5.4.5 Fast Exponentiation * 5.4.6 Derived Variables 6 Recursive Data Types - 6.1 Recursive Definitions and Structural Induction * 6.1.1 Structural Induction * 6.1.2 One More Thing - 6.2 Strings of Matched Brackets - 6.3 Recursive Functions on Nonnegative Integers * 6.3.1 Some Standard Recursive Functions on $\mathbb{N}$ * 6.3.2 Ill-formed Function Definitions - 6.4 Arithmetic Expressions * 6.4.1 Evaluation and Substitution with Aexp’s - 6.5 Induction in Computer Science 7 Infinite Sets - 7.1 Infinite Cardinality * 7.1.1 Infinity is different * 7.1.2 Countable Sets * 7.1.3 Power sets are strictly bigger * 7.1.4 Diagonal Argument - 7.2 The Halting Problem - 7.3 The Logic of Sets * 7.3.1 Russell's Paradox * 7.3.2 The ZFC Axioms for Sets * 7.3.3 Avoiding Russell's Paradox - 7.4 Does All This Really Work? * 7.4.1 Large Infinities in Computer Science Part II. Structures Introduction 8 Number Theory - 8.1 Divisibility * 8.1.1 Facts about Divisibility * 8.1.2 When Divisibility Goes Bad * 8.1.3 Die Hard - 8.2 The Greatest Common Divisor * 8.2.1 Euclid’s Algorithm * 8.2.2 The Pulverizer * 8.2.3 One Solution for All Water Jug Problems - 8.3 Prime Mysteries - 8.4 The Fundamental Theorem of Arithmetic * 8.4.1 Proving Unique Factorization - 8.5 Alan Turing * 8.5.1 Turing's Code (Version 1.0) * 8.5.2 Breaking Turing's Code (Version 1.0) - 8.6 Modular Arithmetic - 8.7 Remainder Arithmetic * 8.7.1 The ring $\mathbb{Z}_n$ - 8.8 Turing's Code (Version 2.0) - 8.9 Multiplicative Inverses and Cancelling * 8.9.1 Relative Primality * 8.9.2 Cancellation * 8.9.3 Decrypting (Version 2.0) * 8.9.4 Breaking Turing's Code (Version 2.0) * 8.9.5 Turing Postscript - 8.10 Euler's Theorem * 8.10.1 Computing Euler's $\phi$ Function - 8.11 RSA Public Key Encryption - 8.12 What has SAT got to do with it? - 8.13 References 9 Directed graphs & Partial Orders - 9.1 Vertex Degrees - 9.2 Walks and Paths * 9.2.1 Finding a Path - 9.3 Adjacency Matrices * 9.3.1 Shortest Paths - 9.4 Walk Relations * 9.4.1 Composition of Relations - 9.5 Directed Acyclic Graphs & Scheduling * 9.5.1 Scheduling * 9.5.2 Parallel Task Scheduling * 9.5.3 Dilworth's Lemma - 9.6 Partial Orders * 9.6.1 The Properties of the Walk Relation in DAGs * 9.6.2 Strict Partial Orders * 9.6.3 Weak Partial Orders - 9.7 Representing Partial Orders by Set Containment - 9.8 Linear Orders - 9.9 Product Orders - 9.10 Equivalence Relations * 9.10.1 Equivalence Classes - 9.11 Summary of Relational Properties 10 Communication Networks - 10.1 Complete Binary Tree - 10.2 Routing Problems - 10.3 Network Diameter * 10.3.1 Switch Size - 10.4 Switch Count - 10.5 Network Latency - 10.6 Congestion - 10.7 2-D Array - 10.8 Butterfly - 10.9 Beneš Network 11 Simple Graphs - 11.1 Vertex Adjacency and Degrees - 11.2 Sexual Demographics in America * 11.2.1 Handshaking Lemma - 11.3 Some Common Graphs - 11.4 Isomorphism - 11.5 Bipartite Graphs & Matchings * 11.5.1 The Bipartite Matching Problem - 11.6 The Stable Marriage Problem * 11.6.1 The Mating Ritual * Mating Ritual at Akamai * 11.6.2 There is a Marriage Day * 11.6.3 They All Live Happily Ever After. . . * 11.6.4 . . . Especially the Men * 11.6.5 Applications - 11.7 Coloring * 11.7.1 An Exam Scheduling Problem * 11.7.2 Some Coloring Bounds * 11.7.3 Why coloring? - 11.8 Simple Walks * 11.8.1 Walks, Paths, Cycles in Simple Graphs * 11.8.2 Cycles as Subgraphs - 11.9 Connectivity * 11.9.1 Connected Components * 11.9.2 Odd Cycles and 2-Colorability * 11.9.3 $k$-connected Graphs * 11.9.4 The Minimum Number of Edges in a Connected Graph - 11.10 Forests & Trees * 11.10.1 Leaves, Parents & Children * 11.10.2 Properties * 11.10.3 Spanning Trees * 11.10.4 Minimum Weight Spanning Trees - 11.11 References 12 Planar Graphs - 12.1 Drawing Graphs in the Plane - 12.2 Definitions of Planar Graphs * 12.2.1 Faces * 12.2.2 A Recursive Definition for Planar Embeddings * 12.2.3 Does It Work? * 12.2.4 Where Did the Outer Face Go? - 12.3 Euler's Formula - 12.4 Bounding the Number of Edges in a Planar Graph - 12.5 Returning to $K_5$ and $K_{3,3}$ - 12.6 Coloring Planar Graphs - 12.7 Classifying Polyhedra - 12.8 Another Characterization for Planar Graphs Part III. Counting Introduction - 12.9 References 13 Sums and Asymptotics - 13.1 The Value of an Annuity * 13.1.1 The Future Value of Money * 13.1.2 The Perturbation Method * 13.1.3 A Closed Form for the Annuity Value * 13.1.4 Infinite Geometric Series * 13.1.5 Examples * 13.1.6 Variations of Geometric Sums - 13.2 Sums of Powers - 13.3 Approximating Sums - 13.4 Hanging Out Over the Edge * 13.4.1 Formalizing the Problem * 13.4.2 Harmonic Numbers * 13.4.3 Asymptotic Equality - 13.5 Products * 13.5.1 Stirling's Formula - 13.6 Double Trouble - 13.7 Asymptotic Notation * 13.7.1 Little O * 13.7.2 Big O * 13.7.3 Theta * 13.7.4 Pitfalls with Asymptotic Notation * 13.7.5 Omega (Optional) 14 Cardinality Rules - 14.1 Counting One Thing by Counting Another * 14.1.1 The Bijection Rule - 14.2 Counting Sequences * 14.2.1 The Product Rule * 14.2.2 Subsets of an $n$-element Set * 14.2.3 The Sum Rule * 14.2.4 Counting Passwords - 14.3 The Generalized Product Rule * 14.3.1 Defective Dollar Bills * 14.3.2 A Chess Problem * 14.3.3 Permutations - 14.4 The Division Rule * 14.4.1 Another Chess Problem * 14.4.2 Knights of the Round Table - 14.5 Counting Subsets * 14.5.1 The Subset Rule * 14.5.2 Bit Sequences - 14.6 Sequences with Repetitions * 14.6.1 Sequences of Subsets * 14.6.2 The Bookkeeper Rule * A Word about Words * 14.6.3 The Binomial Theorem - 14.7 Counting Practice: Poker Hands * 14.7.1 Hands with a Four-of-a-Kind * 14.7.2 Hands with a Full House * 14.7.3 Hands with Two Pairs * 14.7.4 Hands with Every Suit - 14.8 The Pigeonhole Principle * 14.8.1 Hairs on Heads * 14.8.2 Subsets with the Same Sum * 14.8.3 A Magic Trick * 14.8.4 The Secret * 14.8.5 The Real Secret * 14.8.6 The Same Trick with Four Cards? - 14.9 Inclusion-Exclusion * 14.9.1 Union of Two Sets * 14.9.2 Union of Three Sets * 14.9.3 Sequences with 42, 04, or 60 * 14.9.4 Union of $n$ Sets * 14.9.5 Computing Euler's Function - 14.10 Combinatorial Proofs * 14.10.1 Pascal's Triangle Identity * 14.10.2 Giving a Combinatorial Proof * 14.10.3 A Colorful Combinatorial Proof - 14.11 References 15 Generating Functions - 15.1 Infinite Series * 15.1.1 Never Mind Convergence - 15.2 Counting with Generating Functions * 15.2.1 Apples and Bananas too * 15.2.2 Products of Generating Functions * 15.2.3 The Convolution Rule * 15.2.4 Counting Donuts with the Convolution Rule * 15.2.5 The Binomial Theorem from the Convolution Rule * 15.2.6 An Absurd Counting Problem - 15.3 Partial Fractions * 15.3.1 Partial Fractions with Repeated Roots - 15.4 Solving Linear Recurrences * 15.4.1 A Generating Function for the Fibonacci Numbers * 15.4.2 The Towers of Hanoi * 15.4.3 Solving General Linear Recurrences - 15.5 Formal Power Series * 15.5.1 Divergent Generating Functions * 15.5.2 The Ring of Power Series - 15.6 References Part IV. Probability Introduction 16 Events and Probability Spaces - 16.1 Let's Make a Deal - 16.2 The Four Step Method - 16.3 Strange Dice - 16.4 The Birthday Principle - 16.5 Set Theory and Probability - 16.6 References 17 Conditional Probability - 17.1 Monty Hall Confusion * 17.1.1 Behind the Curtain - 17.2 Definition and Notation * 17.2.1 What went wrong - 17.3 The Four-Step Method for Conditional Probability - 17.4 Why Tree Diagrams Work * 17.4.1 Probability of Size-$k$ Subsets * 17.4.2 Medical Testing * 17.4.3 Four Steps Again * 17.4.4 Natural Frequencies * 17.4.5 A Posteriori Probabilities * The Hockey Team in Reverse * 17.4.6 Philosphy of Probability - 17.5 The Law of Total Probability * 17.5.1 Conditioning on a Single Event - 17.6 Simpson's Paradox - 17.7 Independence * Potential Pitfall * 17.7.1 Alternative Formulation * 17.7.2 Independence Is an Assumption - 17.8 Mutual Independence * 17.8.1 DNA Testing * 17.8.2 Pairwise Independence 18 Random Variables - 18.1 Random Variable Examples * 18.1.1 Indicator Random Variables * 18.1.2 Random Variables and Events - 18.2 Independence - 18.3 Distribution Functions * 18.3.1 Bernoulli Distributions * 18.3.2 Uniform Distributions * 18.3.3 The Numbers Game * 18.3.4 Binomial Distributions - 18.4 Great Expectations * 18.4.1 The Expected Value of a Uniform Random Variable * 18.4.2 The Expected Value of a Reciprocal Random Variable * 18.4.3 The Expected Value of an Indicator Random Variable * 18.4.4 Alternate Definition of Expectation * 18.4.5 Conditional Expectation * 18.4.6 Mean Time to Failure * 18.4.7 Expected Returns in Gambling Games - 18.5 Linearity of Expectation * 18.5.1 Expected Value of Two Dice * 18.5.2 Sums of Indicator Random Variables * 18.5.3 Expectation of a Binomial Distribution * 18.5.4 The Coupon Collector Problem * 18.5.5 Infinite Sums * 18.5.6 A Gambling Paradox * 18.5.7 Solution to the Paradox * 18.5.8 Expectations of Products 19 Deviation from the Mean - 19.1 Markov's Theorem * 19.1.1 Applying Markov's Theorem * 19.1.2 Markov's Theorem for Bounded Variables - 19.2 Chebyshev's Theorem * 19.2.1 Variance in Two Gambling Games * 19.2.2 Standard Deviation - 19.3 Properties of Variance * 19.3.1 A Formula for Variance * 19.3.2 Variance of Time to Failure * 19.3.3 Dealing with Constants * 19.3.4 Variance of a Sum - 19.4 Estimation by Random Sampling * 19.4.1 A Voter Poll * 19.4.2 Matching Birthdays * 19.4.3 Pairwise Independent Sampling - 19.5 Confidence versus Probability - 19.6 Sums of Random Variables * 19.6.1 A Motivating Example * 19.6.2 The Chernoff Bound * 19.6.3 Chernoff Bound for Binomial Tails * 19.6.4 Chernoff Bound for a Lottery Game * 19.6.5 Randomized Load Balancing * 19.6.6 Proof of the Chernoff Bound * 19.6.7 Comparing the Bounds * 19.6.8 Murphy's Law - 19.7 Really Great Expectations * 19.7.1 Repeating Yourself 20 Random Walks - 20.1 Gambler's Ruin * 20.1.1 The Probability of Avoiding Ruin * 20.1.2 A Recurrence for the Probability of Winning * 20.1.3 A simpler expression for the biased case * 20.1.4 How Long a Walk? * 20.1.5 Quit While You Are Ahead - 20.2 Random Walks on Graphs * 20.2.1 A First Crack at Page Rank * 20.2.2 Random Walk on the Web Graph * 20.2.3 Stationary Distribution & Page Rank Part V. Recurrences Introduction 21 Recurrences - 21.1 The Towers of Hanoi * 21.1.1 The Upper Bound Trap * 21.1.2 Plug and Chug - 21.2 Merge Sort * 21.2.1 Finding a Recurrence * 21.2.2 Solving the Recurrence - 21.3 Linear Recurrences * 21.3.1 Climbing Stairs * 21.3.2 Solving Homogeneous Linear Recurrences * 21.3.3 Solving General Linear Recurrences * 21.3.4 How to Guess a Particular Solution - 21.4 Divide-and-Conquer Recurrences * Short Guide to Solving Linear Recurrences * 21.4.1 The Akra-Bazzi Formula * 21.4.2 Two Technical Issues * 21.4.3 The Akra-Bazzi Theorem * 21.4.4 The Master Theorem - 21.5 A Feel for Recurrences Bibliography Glossary of Symbols
2
316
A new book!
The Advanced Calculus (2nd edition) textbook by Gerald B. Folland (2023) is now in @ChapterPal's collection. The textbook provides a rigorous, analysis-based treatment of multivariable calculus and classical analysis for advanced undergraduate students in mathematics, physical sciences, and engineering. It assumes that readers are already familiar with basic single-variable calculus, standard computational techniques, and elementary linear algebra. The text bridges introductory calculus and higher-level mathematical analysis by establishing a firm theoretical groundwork while maintaining a strong connection to geometric intuition and physical applications. The material opens with the topology and geometry of Euclidean spaces, introducing limits, continuity, completeness, compactness, and connectedness. From these foundations, the text develops multivariable differential calculus, using linear approximations and the Fréchet derivative as the unifying framework for directional derivatives, the chain rule, Taylor expansions, and extrema classification. A central focus is the local solvability of nonlinear systems through the implicit and inverse mapping theorems, which are applied to analyze coordinate transformations, functional dependence, and the representation of smooth curves and higher-dimensional surfaces embedded in Euclidean space. Read the book with an AI tutor: chapterpal.com/ebook/22cb5ea… This is a great continuation to "Active Prelude to Calculus" chapterpal.com/book/f732cfe2… and Active Calculus chapterpal.com/book/9f5af026… (All books on ChapterPal are free for anyone to read with a free account.)
3
642