The human adaptive immune system makes robust decisions which regulate quantitative and qualitative parameters of a complex physiological system, to prevent invasion and destruction of tissues by the enormous array of microorganisms which share our environment. Remarkably, these decisions are made by a distributed system made up of moving parts (e.g. T lymphocytes) and whose key recognition components (T cell antigen receptors) are assembled by a stochastic process. In this seminar, I will review some basic properties of the repertoire of T cell antigen receptors, and then outline the basic features of an open-source quantitative, robust and economical experimental and computational pipeline which allows us to capture the repertoire of T cell receptors in samples of tissues or blood. We have used this method to describe basic features of the T cell repertoire of naïve and memory T cells in a group of healthy human volunteers, and to compare this with the T cell repertoire within tumors from a cohort of patients with primary non-small cell lung cancer. We observe that the T cell compartment maintains significant levels of diversity even in the face of long-term chronic clonal expansion. We hypothesise that the enormous diversity of the T cell receptor repertoire is a key feature ensuring that the adaptive immune response is made up of many co-operating T cell clones, which may confer both robustness and flexibility.