The coding practice for recursive and dynamic programming