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

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.

2

u/GonnaNeedThat130 Jul 06 '20

For me I definitely think too much. As soon as I try to program what I've been thinking about, I realize most of my thinking was useless and wrong.

0

u/[deleted] Jul 08 '20

[deleted]

2

u/vqrs Jul 08 '20

A poignant phrase that's often used to point this out is: there's a difference between 10 years of experience and one year of experience ten times over.

14

u/awkreddit Jul 06 '20

Someone watched Hamilton this weekend...

4

u/[deleted] Jul 06 '20

Pardon me, are you /u/awkreddit -or, sir?

6

u/bfd71 Jul 06 '20

Think that should be:

Write less, Think more, Don't worry about your code or what it's good for...

3

u/[deleted] Jul 06 '20

Haha i do the same! I usually like to take my dog for a walk and it really makes me super productive when I come back! Especially when I have a huge problem to tackle

2

u/techbumLabs Jul 06 '20

This a typical example of Focused vs Diffused learning. When you have are Focused staring at your computer and trying to think it doesnt let your mind wander much. When you walk away from the computer just opening up your thoughts a bit more your creative juices start flowing and helps you think in more different ways.

1

u/DatabaseGangsta Jul 06 '20

Often the more I think before coding, the more stuck I get

1

u/kinghammer1 Jul 07 '20

This is true of almost every conplex problem not just coding. This past semester had a calculus 2 test in the evening and I spent hours studying and doing homework problems so I could prepare right up until the test started. I bombed the test, i mean not terribly i passed it because of the curve and extra points i think because of covid but by the time the test came around I was so burned out and i was drawing blanks panicking looking through all the problems to find the ones i defitinely knew. Next day I woke up made some coffee and looked over the test and some of those questions that I was so lost on suddenly came so clearly.