Constrains appear quite naturally in many interesting physical systems such as EM, gravity or parametrized systems. If we are interested in quantizing such systems, it seems necessary to have a precise Hamiltonian formulation. The Dirac's algorithm addresses this problem quite nicely when no boundaries are present, but… boundaries are also very natural! Through some examples I will show the limits of the Dirac's algorithm in the presence of boundaries and introduce an alternative algorithm, called GNH, that can tackle these systems.