This is the preface for the special section entitled "Software Engineering Aspects of Ubiquitous Computing and Ambient Intelligence" which gathers a selection of papers from the 5th International Symposium on Ubiquitous Computing and Ambient Intelligence (UCAmI 2011), held in Riviera Maya, Mexico, 5-9 December 2011.