| Sensor networks promise to allow the world around us to be observed, measured, and even controlled at a fine granularity. However, in order to realize the full potential of sensor networks, it is increasingly apparent that they should be easily, reliably, and efficiently programmable. Surprisingly, the state-of-the-art programming languages and systems focus mostly on programmability and efficiency, and only poorly support reliability, if at all. In this thesis, we take the first step toward achieving all three goals by building three related languages and systems, each of which supports reliability.; First, we show how one can easily modify existing code, which is primarily designed for efficiency, in order to provide reliability. Since today's programming systems are not easily accessible to non-experts, we design and implement two languages that are easy to program, and also offer trade-offs in terms of reliability and efficiency. Our experimental results from these three systems indicate that it is possible to build reliable and efficiency systems that are also simple to program. |