Try not to feel bad about it. It's just about the way your brain is wired.
No. I spent an entire summer staring at C and getting blocked on ridiculous basic stuff because I had dumb learning techniques and kept being too ambitious. I know a solid guy who did first-year C three times before he passed.What got me through was learning to break problems up into tiny pieces, practicing and learning patterns, and ignoring advice like "if you don't get pointers straight away you'll never be a programmer".
For example, a pattern you use all the time is open a file, read some data, close the file. More than half the people I've interviewed as programmers can't do an adequate job of this from memory in their language of choice. Practice just that until you have it memorised and can type it out at speed.
Look at programs as collections of patterns, and look for excuses to practice dumb simple stuff (like scales in music). Something I knocked out over breakfast on Sunday morning to price a collection of stocks: I have a file containing a list of symbols. The program reads this data. It splits it into tokens. It uses a yahoo web service to look up prices for them. It collects the data in an object. I pass that to a formatter. Then I print it. I built each pattern independently, and then stiched them together. Some people do test-driven development to force themselves to construct software in this way, and you might find that useful (I just do it that way without formalising the tests).
amorphid wrote,
Maybe I'm the opposite of a natural.
I felt the same for five years after I'd finished my degree. Work towards mastering two things: (1) learn to reduce all problems to triviality. You can use code to feel out a problem but do not ever try to cruise through complexity - that's a path to certain failure. (2) Hone your tools (including your memory for patterns) so that your cognitive load can be dedicated to problems at hand rather than typing or looking up patterns for bread-and-butter stuff like reading the contents of a file.amorphid - I don't know what your problems are specifically but maybe some of that will be useful.
Edit: I made a claim at the top that I couldn't reference. Removed.
Sounds like we're just using different definitions for "good". You seem to define it as meaning competent, so yes, you and your friend fall into the category of people who have successfully taught yourself to program computers despite not being wired to do it.
I was talking about the Fred Brooks 10X types when I said "good". Those guys didn't drop Comp Sci 101.
Again, please try not to take it personally. They're not better people than you. They just took to computer programming like everybody else takes to breathing.
It's like any other thing really. Football, Soccer, Jiujitsu, Ping-Pong, etc.
Immediately.
Like in the first 5 minutes. When I was seven years old.
And frankly, if it didn't happen like that for you, you're pretty much screwed.
Every good programmer I've ever known started doing it young and immediately just "got it". Most mediocre programmers I know followed the path you're on, learning it in a class in school, fighting to get things done, eventually coming up with ways to solve particular problems, but never attaining fluency.
Try not to feel bad about it. It's just about the way your brain is wired. Good programmers have a specific something wrong with their brain that makes them ridiculously good at logic, and, sadly, not very good at much else. We can overcome the "everything else" part through hard work, though we'll never be as good at it as you. Similarly, you can overcome the programming part through hard work, but you'll never be as good at it as us.
Sorry to be the one to break the news.