
Ask HN: Working Memory And Understanding - mpg33
I think i have the same problem with programming as i did with math.  I have a hard time understanding what each variable/piece of logic represents/is used for and then when i finally do understand it, i forget not long after finishing with it.<p>It's almost as if my short term(working memory) does not move over to long term memory.
======
pasbesoin
Don't neglect / fail to pay attention to:

\- Your physical health

\- Your environment

When I'm feeling off, I have great difficulty tracking items and getting a
"holistic" picture. And things like allergy or another chronic illness can
leave a person feeling "perpetually" off, to the point where you think it's
"you" rather than the result of these symptoms.

If you are in an environment that is constantly calling your attention, it's
difficult or impossible to build such a mental model. Even when you are not
being specifically called upon, loud noises, people in your peripheral vision,
etc. can tax you to the point of disfunction. We've evolved to pay attention
to such things; some people more than others seem to find this very difficult
to "overcome".

An anecdote: I had a friend who was getting crappy scores in chemistry. A
large problem for him, as he wanted to go pre-med. He always studied with
music on. I suggested he turn the music off. After the next test, he thanked
me profusely -- his score had jumped a grade level or more.

He hadn't consciously experienced any problem with the music and his studying.
But, anecdotally -- and with a strong supporting opinion on his part -- there
was one.

P.S. I'll add that fMRI and the like are beginning to show that stressors
literally descrease or "shut down" areas of brain function. When you feel
threatened, you brain restricts "higher" function and strengthens more "basic"
function. Researchers interpret this as a survival mechanism; in dangerous
situations, immediate action is paramount and intensive analysis (and delay)
can be deadly.

Get stressed, and you will _never_ remember "those function parameters". Your
brain simply isn't in a place to do so.

~~~
dholowiski
+1 Physical exercise. Getting more oxegynated blood to your brain will do
wonders for your memory, IQ, understanding etc.

------
hvass
I recommend using Anki. Active recall (meaning you are asked something) is
much better than passively reading and spaced repetition have been shown to
help learning. If you dig into memory you will surely read about the
'forgetting curve' so usually a program such as Anki has an algorithm to ask
you at the point you are about to forget something.

And by now you should wonder what is Anki. Well, it's basically a software
flashcard. The neat thing about it is if you find something easy to remember
you just click that you find it easy, so it wouldn't ask you as often, but if
it's hard, it will be repeated often until it's drilled in your memory.

Here's the link: <http://ankisrs.net/>

P.S. For learning languages the same way I would recommend
<http://www.memrise.com> which also incorporates in a lot of their lists
visual/auditory cues, which I cannot stress how helpful they are in
remembering words. Try the SAT vocabulary list, it's fascinating how easy is
to remember words when you associate them with a visual cue.

~~~
mpg33
visual memorization/associative memorization i do not have a problem with..

when i am trying to understand code visual memorization does not seem work..

~~~
gahahaha
I am reminded of this article on learning math:
<http://www.ams.org/notices/201010/rtx101001303p.pdf>

"""The alternative route to acquiring problem- solving skill in mathematics
derives from the work of a Dutch psychologist, De Groot (1946–1965),
investigating the source of skill in chess. Research- ing why chess masters
always defeated weekend players, De Groot managed to find only one difference.
He showed masters and weekend players a board configuration from a real game,
removed it after five seconds, and asked them to reproduce the board. Masters
could do so with an accuracy rate of about 70% compared with 30% for weekend
players. Chase and Simon (1973) replicated these results and additionally
demon- strated that when the experiment was repeated with random
configurations rather than real-game configurations, masters and weekend
players had equal accuracy (±30%). Masters were superior only for
configurations taken from real games."""

And what I'm thinking is that maybe (just maybe) you just haven't programmed
enough to become a "master programmer" with the ability to remember your
program like master chess players remember their games.

~~~
gwern
There are other results on chess, you know, like grandmasters spending more
effort on falsifying their suggested moves:
[http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.117...](http://citeseerx.ist.psu.edu/viewdoc/download?doi=10.1.1.117.8670&rep=rep1&type=pdf)

Correlation is not causation, and of the two correlations, I think
falsificationism is more useful than quick board-encoding - you don't play
chess from memory, you play the position the game is currently at.

------
Gormo
I've read a lot of articles that suggest that multiple n-back exercises[1]
work well to extend the working set of short-term memory. I've been using
Brain Workshop [2] for a few weeks to test it out, and I've certainly noticed
an improvement in my performance scores from doing the exercises - I suppose
I'll see in the near future whether there's a noticeable impact in my ability
to "cache" information in practical contexts.

[1] <http://en.wikipedia.org/wiki/N-back>

[2] <http://brainworkshop.sourceforge.net/>

------
rumfa
More about N-Back you can read here <http://www.gwern.net/DNB%20FAQ> also
check out nootropics.

------
xxjaba
I struggle with this problem as well. I often feel like the people around e
learn more with less effort - perhaps because their brain's RAM has more
space. Oh well, I supplement my lack of a large memory with stubbornness.

I find going back and re-reading (often manny times) helps tremendously. The
first time through you may only commit 30% of the concepts to long-term
memory. The second time through you will pick up a bit more, and the next time
even more. As the % of concepts in your long term memory grows, the easier it
will be to pick up the ones that are giving you trouble, since your brain has
a larger number of memories from the prior readings to make concrete
relationships.

------
tokipin
I have a similar problem but it doesn't stop me from being a good programmer.
What it means for me is that when I sit down to work on a large project, it
can take me a while to get up to speed with it as I reload/reaquire the
knowledge. And I think that's totally normal.

In your case it might mean that your memory isn't "flaky," but rather that the
way you perceive the content of a program is _high-bandwidth_ , which would
imply deeper understanding of the content even though such perception has the
side effect of making your memory seem worse.

Still, you should check with a doctor on whether you might have some weird
anemia or something.

------
brador
The time spent comprehending could be better spent building your own.

I found this early on after suffering similar problems to yourself with lack
of recall.

For example, Early this year I used 3 days trying to find a good multiplayer
server side system for my hobby flash games, Didn't understand the
ports/sockets jargon and eventually said fuck it and built the thing from
scratch in PHP with GETs in under 2 hours. It just works and I know how to fix
it if it breaks.

So my verdict - build it yourself, your way. It's faster and you'll learn
more. Don't be afraid to try.

~~~
mpg33
this sounds great...except my day job is bug fixing of an existing software

~~~
mattmanser
Yeah, don't do this. Your co-workers will rapidly come to fear you touching
their code if you keep rewriting it all the time.

Try and pick up their 'style' if there's a consistent one and code like them.
The way they name their variables, etc. If not it'll just take time. The more
you touch particular parts of the code base, the more familiar you'll get with
it. The more you work with someone else's style, the more you'll be able to
parse it.

------
danielharan
Not sure what the ask is.

Check your diet, sleep, exercise.

There's lots of stuff about n-back in the comments, which is definitely worth
investigating.

If your memory has markedly deteriorated, go see a doctor and get a full
check-up.

~~~
SkyMarshal
_> If your memory has markedly deteriorated, go see a doctor and get a full
check-up._

And make sure to ask him to check for pernicious anemia, among other things.

<http://news.ycombinator.com/item?id=3294598>

------
SkyMarshal
There's no easy answer to this. You have to rewire your neural pathways till
they're more effecient at working memory, and the only way to do this is with
lots of hard work doing things like math and programming that require high
working memory. It will be painful for a few years, but keep at it and it you
will get better at it. But there's definitely no silver bullet here, at least
not at this point in history.

------
lukifer
Make copious notes, add lots of comments, and don't be afraid to refactor for
readability/understandability. Write both comments and code like you're
explaining it to a third-grader. When each chunk is easy to understand, it'll
be easier (or possible) to see how it all fits together.

It's not YOUR brain that is deficient; it's the human brain in general. Code
should be written around that fundamental constraint.

