r/learnjava • • Jul 06 '20

Think more, write less

Getting away from the computer and going for a walk or a drive has really helped me when I get stuck. I'll go through what I need to do and the ways I've learned to do it. Then bam, I'm ready to charge into the problem when I'm back at the computer.

93 Upvotes

14 comments sorted by

View all comments

17

u/foofaw Jul 06 '20

The other side of this is that it's possible to think too much and not make progress in getting some kind of code up and running to be able to test. I would argue that it's common for intermediate level programmers to think too much.

Think, then write, then test, then think again. This is the eternal cycle of programing.

5

u/MyNameIsRichardCS54 Jul 06 '20

I've been known to get stuck and unable to choose between multiple possible implementations so I walk away and argue it through (out loud) with the one who isn't there which doesn't take too long. I mostly work at home these days so it doesn't weird people out like it used to!

4

u/Nephyst Jul 07 '20

This is actually a widely used strategy.

https://en.wikipedia.org/wiki/Rubber_duck_debugging

The idea is that you talk out your thoughts with a rubber ducky, and in many cases it actually does help.

4

u/maxpro4u Jul 07 '20

I don't always talk to myself, but when I do it is because I need an expert opinion.