CONTENTS IN DETAIL

ACKNOWLEDGMENTS

PREFACE

INTRODUCTION

Why Good Programming is Important

Learning to Code is Only a Starting Place

Importance of Low-Level Knowledge

Who Should Read This Book?

What Are Computers?

What Is Computer Programming?

Coding, Programming, Engineering, and Computer Science

The Landscape

What’s in This Book

1
THE INTERNAL LANGUAGE OF COMPUTERS

What Is Language?

Written Language

The Bit

Logic Operations

Boolean Algebra

De Morgan’s Law

Representing Integers Using Bits

Representing Positive Numbers

Binary Addition

Representing Negative Numbers

Representing Real Numbers

Fixed-Point Representation

Floating-Point Representation

The IEEE Floating-Point Standard

Binary-Coded Decimal System

Easier Ways to Work with Binary Numbers

Octal Representation

Hexadecimal Representation

Representing the Context

Naming Groups of Bits

Representing Text

The American Standard Code for Information Interchange

The Evolution of Other Standards

Unicode Transformation Format 8-bit

Using Characters to Represent Numbers

Quoted-Printable Encoding

Base64 Encoding

URL Encoding

Representing Colors

Adding Transparency

Encoding Colors

Summary

2
COMBINATORIAL LOGIC

The Case for Digital Computers

The Difference Between Analog and Digital

Why Size Matters in Hardware

Digital Makes for More Stable Devices

Digital in an Analog World

Why Bits Are Used Instead of Digits

A Short Primer on Electricity

Using Plumbing to Understand Electricity

Electrical Switches

Building Hardware for Bits

Relays

Vacuum Tubes

Transistors

Integrated Circuits

Logic Gates

Improving Noise Immunity with Hysteresis

Differential Signaling

Propagation Delay

Output Variations

Building More Complicated Circuits

Building an Adder

Building Decoders

Building Demultiplexers

Building Selectors

Summary

3
SEQUENTIAL LOGIC

Representing Time

Oscillators

Clocks

Latches

Gated Latches

Flip-Flops

Counters

Registers

Memory Organization and Addressing

Random-Access Memory

Read-Only Memory

Block Devices

Flash Memory and Solid State Disks

Error Detection and Correction

Hardware vs. Software

Summary

4
COMPUTER ANATOMY

Memory

Input and Output

The Central Processing Unit

Arithmetic and Logic Unit

Shiftiness

Execution Unit

Instruction Set

Instructions

Addressing Modes

Condition Code Instructions

Branching

Final Instruction Set

The Final Design

The Instruction Register

Data Paths and Control Signals

Traffic Control

RISC vs. CISC Instruction Sets

Graphics Processing Units

Summary

5
COMPUTER ARCHITECTURE

Basic Architectural Elements

Processor Cores

Microprocessors and Microcomputers

Procedures, Subroutines, and Functions

Stacks

Interrupts

Relative Addressing

Memory Management Units

Virtual Memory

System and User Space

Memory Hierarchy and Performance

Coprocessors

Arranging Data in Memory

Running Programs

Memory Power

Summary

6
COMMUNICATIONS BREAKDOWN

Low-Level I/O

I/O Ports

Push My Buttons

Let There Be Lights

Lights, Action, . . .

Bright Ideas

2n Shades of Gray

Quadrature

Parallel Communication

Serial Communication

Catch a Wave

Universal Serial Bus

Networking

Modern LANs

The Internet

Analog in the Digital World

Digital-to-Analog Conversion

Analog-to-Digital Conversion

Digital Audio

Digital Images

Video

Human Interface Devices

Terminals

Graphics Terminals

Vector Graphics

Raster Graphics

Keyboard and Mouse

Summary

7
ORGANIZING DATA

Primitive Data Types

Arrays

Bitmaps

Strings

Compound Data Types

Singly Linked Lists

Dynamic Memory Allocation

More Efficient Memory Allocation

Garbage Collection

Doubly Linked Lists

Hierarchical Data Structures

Storage for the Masses

Databases

Indices

Moving Data Around

Vectored I/O

Object-Oriented Pitfalls

Sorting

Making a Hash of Things

Efficiency vs. Performance

Summary

8
LANGUAGE PROCESSING

Assembly Language

High-Level Languages

Structured Programming

Lexical Analysis

State Machines

Regular Expressions

From Words to Sentences

The Language-of-the-Day Club

Parse Trees

Interpreters

Compilers

Optimization

Be Careful with Hardware

Summary

9
THE WEB BROWSER

Markup Languages

Uniform Resource Locators

HTML Documents

The Document Object Model

Tree Lexicon

Interpreting the DOM

Cascading Style Sheets

XML and Friends

JavaScript

jQuery

SVG

HTML5

JSON

Summary

10
APPLICATION AND SYSTEM PROGRAMMING

Guess the Animal Version 1: HTML and JavaScript

Application-Level Skeleton

Web Page Body

The JavaScript

The CSS

Guess the Animal Version 2: C

Terminals and the Command Line

Building the Program

Terminals and Device Drivers

Context Switching

Standard I/O

Circular Buffers

Better Code Through Good Abstractions

Some Mechanics

Buffer Overflow

The C Program

Training

Summary

11
SHORTCUTS AND APPROXIMATIONS

Table Lookup

Conversion

Texture Mapping

Character Classification

Integer Methods

Straight Lines

Curves Ahead

Polynomials

Recursive Subdivision

Spirals

Constructive Geometry

Shifting and Masking

More Math Avoidance

Power Series Approximations

The CORDIC Algorithm

Somewhat Random Things

Space-Filling Curves

L-Systems

Going Stochastic

Quantization

Summary

12
DEADLOCKS AND RACE CONDITIONS

What Is a Race Condition?

Shared Resources

Processes and Threads

Locks

Transactions and Granularity

Waiting for a Lock

Deadlocks

Short-Term Lock Implementation

Long-Term Lock Implementation

Browser JavaScript

Asynchronous Functions and Promises

Summary

13
SECURITY

Overview of Security and Privacy

Threat Model

Trust

Physical Security

Communications Security

Modern Times

Metadata and Surveillance

The Social Context

Authentication and Authorization

Cryptography

Steganography

Substitution Ciphers

Transposition Ciphers

More Complex Ciphers

One-Time Pads

The Key Exchange Problem

Public Key Cryptography

Forward Secrecy

Cryptographic Hash Functions

Digital Signatures

Public Key Infrastructure

Blockchain

Password Management

Software Hygiene

Protect the Right Stuff

Triple-Check Your Logic

Check for Errors

Minimize Attack Surfaces

Stay in Bounds

Generating Good Random Numbers Is Hard

Know Thy Code

Extreme Cleverness Is Your Enemy

Understand What’s Visible

Don’t Overcollect

Don’t Hoard

Dynamic Memory Allocation Isn’t Your Friend

Garbage Collection Is Not Your Friend Either

Data as Code

Summary

14
MACHINE INTELLIGENCE

Overview

Machine Learning

Bayes

Gauss

Sobel

Canny

Feature Extraction

Neural Networks

Using Machine Learning Data

Artificial Intelligence

Big Data

Summary

15
REAL-WORLD CONSIDERATIONS

The Value Proposition

How We Got Here

A Short History

Open Source Software

Creative Commons

The Rise of Portability

Package Management

Containers

Java

Node.js

Cloud Computing

Virtual Machines

Portable Devices

The Programming Environment

Are You Experienced?

Learning to Estimate

Scheduling Projects

Decision Making

Working with Different Personalities

Navigating Workplace Culture

Making Informed Choices

Development Methodologies

Project Design

Writing It Down

Fast Prototyping

Interface Design

Reusing Code or Writing Your Own

Project Development

The Talk

Portable Code

Source Control

Testing

Bug Reporting and Tracking

Refactoring

Maintenance

Be Stylish

Fix, Don’t Re-create

Summary

INDEX

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.140.185.170