1

I am teaching myself to program in C and have been for a few months. I recently took a one month break and came back a week ago, and it's all gone. I had to look up some things that I really put effort into understanding (see: pointers) and some others just stuck with me. Now learning about malloc and dynamically allocated memory is also getting a bit tough.

What do you suggest for keeping it all retained? Will it just come with time and experience?

closed as too broad by Telastyn, user40980, 9000, jwenting, gnat Aug 6 '14 at 7:07

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

  • 4
    If you're not retaining it then you didn't really learn it - you just memorized it. Practice. There are many good resources these days on learning how to learn. – Telastyn Aug 6 '14 at 2:54
  • 1
    Keywords to google: "spaced repetition", "Anki". Make you a deck of C-related questions, or find a shared one; practice. – 9000 Aug 6 '14 at 3:04
  • @Telastyn But I did understand it, at least well enough for my first time going through the material and being new to the topic. It just seems to have rapidly leaked out of my brain. – floopdagoop Aug 6 '14 at 3:18
  • 1
    Also, study the source code of some existing free software written in C. Look at sourceforge.net or elsewhere to find some. – Basile Starynkevitch Aug 6 '14 at 3:52
7

Practice, practice, practice. You'll still forget things that you haven't used for a while, but the more you practice, the faster they'll come back to you. Also, (in line with @Telastyn's comment), emphasize understanding things, not memorizing them.

  • This. It's normally not enough to learn a language feature and use it once and then leave it for a year. If it's something (language feature, design pattern, etc) that you use rarely but it's necessary for you to know, try to come up with a problem where you could use it. Then code it, learn it and save it for future reference. Sometimes it's just too hard and unnecessary to put everything into your head. – IgnasK Aug 6 '14 at 7:00
1

Typically, the ways in which people learn are:

  1. Read about the concepts
  2. Read the available source code
  3. Implement the given source code and exercises

This works very well for short-term memorization and learning. However, there are a few factors which help the transition from "memorization" to "gut-feel".

First, have a simple but clear-cut objective, for example, "I want to develop a replacement for Notepad". Everything you learn should be driven by the needs of this app. When you say, "Now how do I show this white area on the screen", look it up, learn it, implement it.

The next time you reach for the same concept, you will remember that context and trigger your memory. You'll think: "I remember that place where I had to use those pesky pointers because of {xyz}." That's how the brain learns and remembers!

Don't stop at one program, try a variety of different ones. You will eventually touch most of the common concepts of your selected language.

You'll slowly gain confidence and try more advanced programs as you go along. Keep it practical and driven by real goals. Keep it simple, and keep it fun.


This sermon brought to you by the SE network. Thank you for listening! :)

1

Another Great way is to TEACH, I know it may seem strange,But As soon as you learn teach that stuff to some one, Because while teaching the brain works different, you have to think how the person in front of you is thinking, he will ask you many doubts and you always have to Say the same thing again and again but with different angles.This will make you understand and remember concepts permanently.

Not the answer you're looking for? Browse other questions tagged or ask your own question.