0%

Book Description

Computer programming is not abstract and programs run on a machine. Knowing how computers work and how programs run on them is essential to becoming a better programmer, and understanding underlying technologies can help you develop a sense of what can go wrong.

The Secret Life of Programs (formerly Foundations of Computer Programming) fills in the gaps in computer education by giving readers a look under the hood of programming, at the machine. Readers learn how software behaves when running on hardware; how programs manipulate data in memory; how computers process languages; and how web browsers work. They'll also learn how to write efficient programs, computer security basics, and real-world considerations to have in mind when writing code.

Table of Contents

  1. Cover Page
  2. Title Page
  3. Copyright Page
  4. Dedication
  5. About the Author
  6. About the Technical Reviewer
  7. BRIEF CONTENTS
  8. CONTENTS IN DETAIL
  9. ACKNOWLEDGMENTS
  10. PREFACE
  11. INTRODUCTION
    1. Why Good Programming is Important
    2. Learning to Code is Only a Starting Place
    3. Importance of Low-Level Knowledge
    4. Who Should Read This Book?
    5. What Are Computers?
    6. What Is Computer Programming?
    7. Coding, Programming, Engineering, and Computer Science
    8. The Landscape
    9. What’s in This Book
  12. 1 THE INTERNAL LANGUAGE OF COMPUTERS
    1. What Is Language?
    2. Written Language
    3. The Bit
    4. Logic Operations
    5. Representing Integers Using Bits
    6. Representing Real Numbers
    7. Binary-Coded Decimal System
    8. Easier Ways to Work with Binary Numbers
    9. Naming Groups of Bits
    10. Representing Text
    11. Using Characters to Represent Numbers
    12. Representing Colors
    13. Summary
  13. 2 COMBINATORIAL LOGIC
    1. The Case for Digital Computers
    2. A Short Primer on Electricity
    3. Building Hardware for Bits
    4. Logic Gates
    5. Building More Complicated Circuits
    6. Summary
  14. 3 SEQUENTIAL LOGIC
    1. Representing Time
    2. Memory Organization and Addressing
    3. Block Devices
    4. Flash Memory and Solid State Disks
    5. Error Detection and Correction
    6. Hardware vs. Software
    7. Summary
  15. 4 COMPUTER ANATOMY
    1. Memory
    2. Input and Output
    3. The Central Processing Unit
    4. Instruction Set
    5. The Final Design
    6. RISC vs. CISC Instruction Sets
    7. Graphics Processing Units
    8. Summary
  16. 5 COMPUTER ARCHITECTURE
    1. Basic Architectural Elements
    2. Procedures, Subroutines, and Functions
    3. Stacks
    4. Interrupts
    5. Relative Addressing
    6. Memory Management Units
    7. Virtual Memory
    8. System and User Space
    9. Memory Hierarchy and Performance
    10. Coprocessors
    11. Arranging Data in Memory
    12. Running Programs
    13. Memory Power
    14. Summary
  17. 6 COMMUNICATIONS BREAKDOWN
    1. Low-Level I/O
    2. Networking
    3. Analog in the Digital World
    4. Human Interface Devices
    5. Summary
  18. 7 ORGANIZING DATA
    1. Primitive Data Types
    2. Arrays
    3. Bitmaps
    4. Strings
    5. Compound Data Types
    6. Singly Linked Lists
    7. Dynamic Memory Allocation
    8. More Efficient Memory Allocation
    9. Garbage Collection
    10. Doubly Linked Lists
    11. Hierarchical Data Structures
    12. Storage for the Masses
    13. Databases
    14. Indices
    15. Moving Data Around
    16. Vectored I/O
    17. Object-Oriented Pitfalls
    18. Sorting
    19. Making a Hash of Things
    20. Efficiency vs. Performance
    21. Summary
  19. 8 LANGUAGE PROCESSING
    1. Assembly Language
    2. High-Level Languages
    3. Structured Programming
    4. Lexical Analysis
    5. From Words to Sentences
    6. The Language-of-the-Day Club
    7. Parse Trees
    8. Interpreters
    9. Compilers
    10. Optimization
    11. Be Careful with Hardware
    12. Summary
  20. 9 THE WEB BROWSER
    1. Markup Languages
    2. Uniform Resource Locators
    3. HTML Documents
    4. The Document Object Model
    5. Cascading Style Sheets
    6. XML and Friends
    7. JavaScript
    8. jQuery
    9. SVG
    10. HTML5
    11. JSON
    12. Summary
  21. 10 APPLICATION AND SYSTEM PROGRAMMING
    1. Guess the Animal Version 1: HTML and JavaScript
    2. Guess the Animal Version 2: C
    3. Summary
  22. 11 SHORTCUTS AND APPROXIMATIONS
    1. Table Lookup
    2. Integer Methods
    3. Recursive Subdivision
    4. More Math Avoidance
    5. Somewhat Random Things
    6. Summary
  23. 12 DEADLOCKS AND RACE CONDITIONS
    1. What Is a Race Condition?
    2. Shared Resources
    3. Processes and Threads
    4. Locks
    5. Browser JavaScript
    6. Asynchronous Functions and Promises
    7. Summary
  24. 13 SECURITY
    1. Overview of Security and Privacy
    2. Cryptography
    3. Software Hygiene
    4. Summary
  25. 14 MACHINE INTELLIGENCE
    1. Overview
    2. Machine Learning
    3. Artificial Intelligence
    4. Big Data
    5. Summary
  26. 15 REAL-WORLD CONSIDERATIONS
    1. The Value Proposition
    2. How We Got Here
    3. The Programming Environment
    4. Development Methodologies
    5. Project Design
    6. Project Development
    7. Be Stylish
    8. Fix, Don’t Re-create
    9. Summary
  27. INDEX
18.116.42.208