In this chapter, we take the unifying view of systems interacting over communication networks as distributed computing systems and propose to study them as networked control systems. Since averaging is central operation to much science and engineering, we first consider the problem of distributed averaging over unreliable networks. We point out that a popular and well-behaved algorithm can instead generate a collective global complex behavior when the inter-agent communication happens over unreliable links. To mitigate the effects of the unreliable information exchange, we propose a new distributed averaging algorithm robust to noise and intermittent communication. The algorithm and the control perspective are the basis for the development of new distributed optimization systems that we can analyze and design as networked control systems. In particular, we apply a newly developed networked controller design method to design an improved ad-hoc networked distributed least square algorithm. The approach applies to multi-agent cooperative applications and opens up several directions of research.