
Ask HN: How do I commit code to muscle memory? - spsphulse
I have noticed that the ease of getting answers from StackOverflow is vastly hampering my ability to come up with solutions. People say &quot;You don&#x27;t need to memorize code. Just Google it&quot;.<p>I think this mentality is taking toll &amp; I see myself going back to SO repeatedly. Even for the code I had copied previously. I&#x27;m sure many face this issue. Would like to know how you overcame this?
======
duiker101
I think SO is actually not a good place where to get your resources. My
suggestion is to refer to official docs. You want to know what you need to
achieve and then what you want to find is the syntax of what to do, which you
will most likely find on the docs.

~~~
PaulHoule
SO is bad.

Sometimes you get good answers on SO. Sometimes you get no answers, or you get
wrong answers, or answer #5 is good but the ones above are all brain damaged.

Somebody ought to curate SO so there is at most one answer because you don't
need more than one answer.

------
perfunctory
This is a great question.

> "You don't need to memorize code. Just Google it".

This is the same as saying "you don't need to memorise english words, just
look them up." Just imagine what the flow of the conversation would look like.
Or how one would engage in commenting on HN.

> Would like to know how you overcame this?

I guess the answer is the same as with learning any other skill. Practice. In
a dedicated learning setting, not at work.

And as a side note, I still believe a formal education, as oppose to self-
taught, has some merits.

------
greenyoda
Try writing code from scratch without using StackOverflow. If you need to know
how to do something, use only language and API references (e.g.,
[https://docs.python.org](https://docs.python.org) or
[https://developer.mozilla.org](https://developer.mozilla.org)). This will
force you to understand how the code works, which is something that doesn't
happen if you just copy/paste it.

~~~
PaulHoule
I do this.

I got pulled kicking and screaming back into Python two years ago and I have
learned how to look everything up in the official docs.

Other sources really aren't much easier to understand and they are often out-
of-date or wrong.

Back when I was doing mainly Java I would read the Spring and Maven docs on my
tablet while spinning at the gym. Spring and Maven are both fundamentally
simple if you start with the fundamentals, but if you are working on a system
that was written by people who didn't know the fundamentals and just cut-and-
pasted from SO you will go insane.

------
benologist
Commit to the same language, framework and tools for a few years, build deep
experience.

