Be Software Architecture Wise
Be Wise Apps

Leer en español · Lire en français · Auf Deutsch lesen

Chapter 0 of 12 · Beginner

Start Here: How Software Works

This chapter is the on-ramp to the course. It assumes you have used apps and websites but never programmed, and it explains, from the ground up, what software is, how it represents and processes data, how code is organised, how computers talk across networks, where data is stored, how separate systems work together through APIs, what servers and the cloud are, and how teams build and release software. Experienced engineers can skim it as a shared vocabulary; everyone else should read it before Chapter 1, because every later chapter builds on these ideas.

Video introduction to Chapter 0

6 min · narrated, with captions
Listen only (audio)
Read the transcript

Welcome to Be Software Architecture Wise, and to Chapter zero: Start Here, How Software Works. This chapter is the on-ramp to the whole course. It assumes you have used apps and websites, but have never written a program. By the end of it, you will have the vocabulary that every later chapter builds on.

Software architecture is about the big decisions in a software system: what its main parts are, how they talk to each other, where data lives, and which qualities, such as speed, reliability and security, the design must achieve. Those decisions are made in a vocabulary: processes and threads, indexes and caches, interfaces and dependencies, transactions, APIs and containers. Architects use these words precisely, so you need to know what each one really means, and what it costs. This chapter is written for someone who has never programmed. Every section opens with an everyday analogy before explaining the real mechanism. If you are already an engineer, you can skim it as a shared vocabulary.

This chapter builds on nothing at all. It assumes no technical background, which makes it the right place to begin. It leads straight into Chapter 1, which uses these building blocks to explain what software architecture is, and why the big decisions matter so much. Where a topic here deserves more depth, the chapter links forward to the later section that treats it properly.

The chapter has eight sections, in three groups. The first three stay inside a single machine. Section zero point one explains how code written by people becomes instructions a processor can run, and why data in memory disappears on a restart. Section zero point two introduces the everyday data structures, such as lists, dictionaries and queues. Using Big O notation, it explains why one way of finding a customer stays fast at a million customers, while another collapses. Section zero point three climbs from functions to modules, objects and interfaces. It explains the difference between a library and a framework, warns about the hidden cost of dependencies, and gives a first look at coupling and cohesion.

The next three sections leave the single machine. Section zero point four explains how DNS turns names into addresses, and how HTTP requests and responses work. It also shows that network delay has a floor set by the speed of light. Section zero point five covers files and databases: tables, SQL queries, indexes, and transactions, illustrated with a bank transfer that must never half happen. It also introduces the main non-relational databases, and when each one fits. Section zero point six explains how separate systems cooperate through APIs. An API is a contract. You will see the difference between waiting for an answer and sending a message through a queue, and why breaking an API hurts everyone who depends on it.

The last two sections cover where software runs and how it is built. Section zero point seven shows what a server really is, how virtual machines and containers let many workloads share one physical machine, and what cloud providers sell. Section zero point eight turns from technology to practice: requirements, version control, testing, continuous integration and delivery, and ways of working. It closes by following one tap on Place order in a food-delivery app through every part of the chapter.

That journey is worth a first look now, because it shows where the whole chapter is heading. A customer has filled a basket and taps Place order. Follow the numbers. First, the phone asks DNS for the company's address. Then it sends the order over HTTPS to a load balancer inside the company's cloud region, where the secure connection ends. The load balancer passes the request to the order service. That service calls an outside payment provider through its API, then writes the order to its database in a transaction. Next, it puts an Order Placed message on a queue. A notification service picks it up and asks the push service run by Apple or Google to send a notification to the customer's phone. Notice the dashed arrows: that last part is asynchronous. If the notification service is down, orders are still taken, and the messages simply wait in the queue. Someone had to decide that, and making decisions like that is architecture.

Here is the idea to take away from the whole chapter. Every system in it is built from parts that hide their details behind an agreed boundary: a module behind its interface, a database behind SQL, a payment provider behind its API. Boundaries are where the important trade-offs sit. A function call is fast and reliable, while a call across a network is slower and can fail. A dependency saves effort but brings risk. A cache saves time but can serve stale data. Deciding where those boundaries go, what crosses them, and which trade-offs to accept, is software architecture. Each section ends with a short note on why its subject matters for architecture, so look out for those.

How should you study it? If you are new to the subject, read the sections in order, because each one builds on the last. If you already know some of it, dip into the sections you need. The whole chapter takes about three hours to read. Each section ends with a few self-check questions. Answer them in your head before you look at the answers. They show you quickly what has stuck, and what is worth reading again. When you are ready, you can take the optional chapter test: twenty multiple-choice questions and two written answers. Allow about forty five minutes. The pass mark is eighty per cent. Before you start the test, check that you can answer the self-check questions for every section, and reread the summary of any section that still feels unclear.

That is the map of Chapter zero. Start with Section zero point one, where we look at what software is, and what really happens when a computer runs a program. See you there.

Download chapter (PDF)Read in the app

At a glance

You will learn to

  • Explain what happens, step by step, when a program runs, from source code through the operating system to the processor.
  • Distinguish the common data structures and use Big-O notation to predict how an operation slows down as data grows.
  • Describe how functions, modules, objects and interfaces divide code, and the difference between a library and a framework.
  • Trace what happens when someone types a web address, naming DNS, TCP, TLS and HTTP and what each contributes.
  • Compare files, relational databases and the main NoSQL families, and explain what a transaction guarantees.
  • Explain what an API is, how a REST call over HTTP works and when an asynchronous message is a better fit than a synchronous call.
  • Distinguish physical servers, virtual machines, containers and the main cloud service models.
  • Follow a single user action through every layer of a real system, and recognise the decisions that make up its architecture.

Before you start

None. Familiarity with using apps and websites is enough.

Time

About 3 hours to read; 45 minutes for the test.

Key terms

Process · Compiler and interpreter · Data structure · Big-O notation · Interface · Framework · Dependency · IP address and port · DNS · HTTP and HTTPS · Latency · Database and transaction · API · Container and cloud

Why start here

Software architecture is about the big decisions in a software system: what its main parts are, how they talk to each other, where data lives and which qualities, such as speed, reliability and security, the design must achieve. Those decisions are made in a vocabulary: processes and threads, indexes and caches, interfaces and dependencies, HTTP and DNS, transactions, APIs, containers and pipelines. Architects use these words precisely, and much of the course depends on knowing what each one really means and what it costs.

This chapter supplies that vocabulary. It is written for someone who has never programmed, and every section opens with a short everyday analogy before explaining the real mechanism. It is also meant to be accurate enough that an experienced engineer reading it would agree with every statement. Where a topic deserves much more depth, the chapter introduces it and links forward to the later section that treats it properly.

One program on one computer

The first three sections stay inside a single machine. What software is explains the difference between hardware and software, how source code written by people becomes instructions a processor can run (through compilers, interpreters and virtual machines), what the operating system does, and why data in memory disappears on a restart while data on disk survives. It ends by following a nine-line Python program through every step of its life.

Data and algorithms shows how computers represent numbers and text, and introduces the everyday data structures: lists, dictionaries, sets, queues, stacks, trees and graphs. Using Big-O notation, it explains why one design for finding a customer stays fast at a million customers while another collapses, and why indexes and caches exist. Organising code then climbs from functions to modules, objects and interfaces, explains the difference between a library and a framework, warns about the hidden cost of dependencies, and gives a first look at coupling and cohesion, the two ideas that run through the whole of software design.

Many computers working together

The next three sections leave the single machine. How computers talk explains packets, IP addresses and ports, TCP and UDP, how DNS turns names into addresses, and how HTTP requests and responses work, secured by TLS. It also makes a point that surprises many people: latency has a floor set by the speed of light, so a round trip between London and Sydney can never be fast, however much bandwidth you buy.

Storing data covers files and databases: tables, keys and SQL queries, indexes, transactions and the ACID guarantees (illustrated with a bank transfer that must never half-happen), and the main NoSQL families and when each fits. APIs and integration explains how separate systems cooperate: an API as a contract, REST and JSON over HTTP, keys and tokens, webhooks, the difference between waiting for an answer and sending a message through a queue, and why breaking changes to an API hurt everyone who depends on it.

Where software runs and how it is built

Servers and the cloud shows what a server really is, how virtual machines and containers let many workloads share one physical machine, and what cloud providers sell: from renting raw machines to running your code only when an event arrives. It introduces regions, availability zones, content delivery networks and the two ways to handle growth, a bigger machine or more machines. How software gets built turns from technology to practice: requirements, version control with Git, the testing pyramid, environments, continuous integration and delivery, agile ways of working and DevOps. It closes by following one tap on "Place order" in a food-delivery app through every part of the chapter, from the phone to DNS, HTTPS, a load balancer, services, a database transaction, a payment provider, a queue and a push notification.

The idea to take away

Every system in this chapter is built from parts that hide their details behind an agreed boundary: the operating system behind system calls, a module behind its interface, a web server behind HTTP, a database behind SQL, a payment provider behind its API, a cloud platform behind its services. Boundaries are what let people build large systems without understanding every detail, and they are where the important trade-offs sit: a function call is fast and reliable, while a call across a network is slower and can fail; a dependency saves effort but brings risk; a cache saves time but can serve stale data.

Deciding where those boundaries go, what crosses them and which trade-offs to accept is software architecture. Each section ends with a short note on why its subject matters for architecture, and Chapter 1 begins exactly where this chapter ends.

The 8 sections

0.1 · Beginner · 15 minWhat software isWhat hardware and software are, how source code becomes instructions a processor can run, what the operating system does, and what really happens, step by step, when a small Python program runs.Read →0.2 · Beginner · 16 minData and algorithmsHow computers represent numbers and text, the everyday data structures (lists, dictionaries, queues, trees, graphs), what an algorithm is, and how Big-O explains why some systems slow down as data grows.Read →0.3 · Beginner · 16 minOrganising codeHow programmers divide code into functions, modules, objects and interfaces; the difference between a library and a framework; the benefits and risks of dependencies; and a first look at coupling and cohesion.Read →0.4 · Beginner · 18 minHow computers talkHow data crosses the internet in packets, what IP addresses, ports, TCP, UDP and DNS do, how HTTP requests and HTTPS work, why latency has a floor set by physics, and what happens when you type a web address.Read →0.5 · Beginner · 18 minStoring dataWhy systems need databases rather than plain files, how relational tables, keys, SQL, indexes and ACID transactions work, the main NoSQL families, and why backups must be tested.Read →0.6 · Beginner · 17 minAPIs and integrationWhat an API is and why it is a contract, how REST APIs use URLs, HTTP verbs, status codes and JSON, and how keys, webhooks, queues, versions and rate limits shape integration.Read →0.7 · Beginner · 18 minServers and the cloudWhat servers and data centres are, how virtual machines and containers share hardware, what IaaS, PaaS, SaaS and serverless hand to the provider, and how regions, zones, CDNs and scaling fit together.Read →0.8 · Beginner · 20 minHow software gets builtHow teams turn needs into user stories, collaborate with Git and pull requests, test at several levels, deliver through CI/CD and environments, and how one tap in a food-delivery app crosses every part of a system.Read →

Chapter test

Test your understanding of Chapter 0

Optional: 20 multiple-choice questions and 2 short written answers, drawn afresh from a bank of 72 questions. Pass mark 80%. Passing every chapter test, then the final assessment, earns the Be Wise Certificate of Completion.

Take the Chapter 0 test in the app

Further reading