On the Toptal.com site they've posted an article from Fernando Martinez with some suggestions about how to attract and retain software developers. The ideas cover the full range - all the way from the job posting/interview process out to how to keep them with the company and help them thrive in their role.
Management is all about people. Whether managers or employees, both are thinking about how to achieve their personal and professional goals. The combination of these goals and the personal traits of the people involved give shape to relationships that, in time, can be positive, productive, and fulfilling, or sometimes just plain stressful, demanding, and conflict-prone.[...] This is especially true in managing software developers, because of their job’s technical complexity and creative nature, compressed into often narrow timelines for producing results. [...] In this article, we will focus on the main management aspects, rather than on the technical ones, that we think should be considered by anyone who wants to be successful in managing to retain software developers.
He starts with a look at how to attract and hire the right people for the roles you're trying to fill with suggestions about the interview process and the job offer. Next he gets into recommendations about managing the team itself and the importance of training, organization and communication. The article then goes on to cover other topics like conflict management, keeping up motivation and assigning objectives/follow up.