Distributed algorithms are an established tool for designing protocols for sensor networks. In this paper, we discuss the relation between distributed computing theory and sensor network applications. We also present a few basic and illustrative distributed algorithms.