On the one hand, swarm intelligence (SI) is an emerging field of artificial intelligence that takes inspiration in the collective and social behavior of different groups of simple agents. On the other hand, the automatic evolution of programs is an active research area that has attracted a lot of interest and has been mostly promoted by the genetic programming paradigm. The main objective is to find computer programs from a high-level problem statement of what needs to be done, without needing to know the structure of the solution beforehand. This paper looks at the intersection between SI and automatic programming, providing a survey on the state-of-the-art of the automatic programming algorithms that use an SI metaheuristic as the search technique. The expression of swarm programming (SP) has been coined to cover swarm-based automatic programming proposals, since they have been published to date in a disorganized manner. Open issues for future research are listed. Although it is a very recent area, we hope that this work will stimulate the interest of the research community in the development of new SP metaheuristics, algorithms, and applications. (C) 2014 John Wiley & Sons, Ltd.