Learning how to implement a HMC algorithm