Now you can avoid a headache thanks to programs like Shock Desktop, which memorizes the position of your icons so that you can immediately restore them if they're shuffled around.
This is made possible by profile creation. One profile is equivalent to a determined arrangement of the icons on your desktop. You can create, edit, and eliminate your profiles whenever you want.
Shock Desktop also includes an option for hiding and/or showing desktop icons, all of which makes it an excellent application.