In 1733 Count de Buffon asked the question about the probability of intersecting a line of a grid by a needle dropped randomly onto the grid. In 1898 Painlevé asked for the geometric description of the sets that are removable singularities of bounded holomorphic functions. In the 1930s Besicovitch built a theory of 1-rectifiable sets. At the end of the 20th century all three topics turned out to be intimately related and by the beginning of the 21st century a certain unified theory emerged; it is still not completely finished, but I will present the current state of knowledge.