Some Things Are Hard
Before the iPhone was introduced in 2007, "Cocoa Programming for Mac OS X" by Aaron Hillegass was the book if you were interested in Cocoa development. It was Aaron's book that introduced me to Cocoa programming.
One of the most important lessons Aaron taught me had nothing to do with programming. In the first chapter of his book, Aaron writes about Rock, a former boss he had worked with.
I used to have a boss named Rock. Rock had earned a degree in astrophysics from Call Tech and had never had a job in which he used his knowledge of the heavens. Once I asked him whether he regretted getting the degree. "Actually, my degree in astrophysics has proved to be very valuable," he said. "Some things in this world are just hard. When I am struggling with something, I sometimes think 'Damn, this is hard for me. I wonder if I am stupid,' and then I remember that I have a degree in astrophysics from Cal Tech; I must not be stupid." - Aaron Hillegass
Some things are hard. Unfortunately, admitting that some things are hard is some sort of taboo among programmers. You lose credibility as a programmer if you admit that you are struggling understanding something.
Cut Yourself Some Slack
If you are just starting out as a programmer or you have been developing for years and are now testing the waters with a new language or technology, then cut yourself some slack if you are not making as much progress as you'd hoped. Some things are hard and that is fine.
Generics, for example, are mischievous creatures if you are coming from C or Objective-C. It is fine if you need a bit more time to let this paradigm sink in. Currying is a concept even some experienced developers avoid because it isn't easy to grasp if you aren't used to functional programming concepts.
That is fine. Unless you are a genius, you will struggle at times. That's what makes programming fun. Right? What would the challenge be if every day was a walk in the park. Why would you invest time and energy in learning something if it was easy.
It's not that I'm so smart, it's just that I stay with problems longer. - Albert Einstein
Programming is about solving problems and that includes learning a new language, framework, or technology. Challenging yourself is important, but it's equally important to give yourself a break from time to time.
Some things are hard and that is fine.