Hacker News new | past | comments | ask | show | jobs | submit login

I've been reading a book called Pre-Suasion by Robert Cialdini. He dropped a writing productivity tip he learned from a colleague which is to always stop in the middle of writing something so that the desire for resolution will pull you in and get you off to a quick start the next time you sit down to work. Humans crave resolution.

I do a similar thing with code. Walking away while my code doesn't compile or a test doesn't pass is the best because when I sit down the next day my attention is already focused where it needs to be. No time wasted trying to figure out where I left off or where I should start.




Interestingly, Hemingway was famous for doing this.

> When I am working on a book or a story I write every morning as soon after first light as possible. There is no one to disturb you and is it is cool and you come to your work and warm as you write. You read what you have writ- ten and, as you always stop when you know what is going to happen next, you go on from there. You write until you come to a place where you still have your juice and know what will happen next and you stop and try to live through until the next day when you hit again. You have started at six in the morning, say, and you may go on until noon or be through before that. When you stop you are as empty, and at the same time never empty but filling, as when you have made love to someone you love. Nothing can hurt you, nothing can hap- pen, nothing means anything until the next day when you do it again. It is the wait until the next day that is hard to get through.

via https://www.mhpbooks.com/excerpt-ernest-hemingways-last-inte...


I recall reading the same of Stephen King. When completing the final page of a book, he writes the first page of his next novel in the same sitting.


If I walk away in the middle of an unsolved problem, it persists in the back of my mind and is mentally exhausting. I won't be able to sleep or let go of the problem; only potential solutions race around my mind.

However, if there is a clear boundary of work accomplished, I break the build with a simple syntax error and avoid thinking about the next task. I can step away from work completely, without any lingering thoughts, and the next time I am back at it, the syntax error helps me jump in right where I left off.


> I break the build with a simple syntax error

I do this by literally writing, in plain (albeit sometimes colourful) text, what I was doing at the point I had to stop. Then when I come back to it later and hit build, the compiler reminds me where I left off.


I like the intentional syntax error approach here. That's way better than times I've done: /* NOTE: you left off here!!! */


I use #error (and on compilers that support it #warning) to leave unignorable messages over my codebase for things that need doing.


Just leave the start/end comment off it and it works just as well. :D


This is a tip in Clean Code also if I remember correctly. I have used it a lot to great success, start the day with the compile error you made the day before or unit test (dont check in)


Well all issues should end up as unit test anyway, so if you're not doing the latter, you're not doing it right no matter what.


> always stop in the middle of writing something

This absolutely works for me when I'm writing technical specs. Leaving some trivial bits for the next day helps to start it off faster.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: