That’s why “I will learn how to code” is a flawed pact, but “I will code every day for a hundred days” is a great one. Instead of “I will write a book,” try “I will write every weekday for the next six months.” Replace “I will run a marathon” with “I will run every Sunday for six weeks.”