Programmer magnetically attachable to machine