I usually go over the routine/ sleight in the book (dvd, Booklet, what ever floats your boat) I go over it until I can do the routine in my mind, just to make sure I didn't read anything wrong or learn a sleight wrong. After that I break down the routine into sections. Than I practice each sleight untill perfect. After I add the patter. I take into considering the books patter and sort of mold my own out of it. Than perform to friends. Than perfect it until I could be able to perform to a celeb without messing up. Usualy takes about a week, or month depending on how long the routine, or trick is.