
I can write programs but can't solve problems. What is going on? - ExtremisAndy
Here&#x27;s the deal: I&#x27;ve been programming off and on for most of my life (currently in my 40s). While I&#x27;ve created a few basic web sites for money, it has mainly been a hobby for me, and one I greatly enjoy. I&#x27;ve written simple 2D video games (C++), simple chatbots (Python), quiz-generating systems(JS-PHP-MySQL), etc., so I&#x27;m not totally clueless about this stuff. However, there seems to be a very real, and quite frankly disappointing <i>limit</i> to what my brain is able to do. For example, I have recently joined HackerRank, and have been working on several of the problems. I don&#x27;t know what it is, but for some reason even some of the problems marked <i>easy</i> are incredibly hard for me to figure out. While I&#x27;ve successfully answered the majority of the problems I&#x27;ve attempted there, there are some that, based on the number of successful submissions and the rank of <i>easy</i> MUST be simple and yet I&#x27;ve spent sometimes 2 hours on those and cannot produce a program that passes all the tests. That&#x27;s very discouraging because I want to become a better programmer but I feel I may have reached the limit of what my brain can do. Has anyone experienced anything like this? If so, were you able to figure it out and improve your problem-solving skill set? Thanks for any advice you could offer!
======
petee
Perhaps try to categorize the types of problems that are giving you trouble
and really narrow down the core concepts that are the issue; you either might
have never learned the appropriate prerequisites, or simply just learned it
from a different angle, if you will.

That said, some peoples brains are just wired differently. You might find
other difficult things easy, that others who completed the easy ones struggle
on.

------
iron0013
Read either CTCI or Elements of Programming Interviews. The key is knowing
that the problems you’ll be presented with aren’t as novel or random as they
might seem. The same general topics and problem classes come up over and over,
and once you can recognize them you can learn to solve them. It’s really hard,
but it’s a matter of effort, not intellect (or at least not solely intellect).

------
dossy
Many programming puzzles are simply formulations of classic problems that have
well-understood solutions, which students in any Computer Science degree
program are taught.

I'm guessing you do not have a CS degree?

I don't think you need to get a CS degree, but you should get a bunch of
syllabi from various CS programs, and get all of the material and study it.

~~~
ExtremisAndy
I think this is basically the whole story. I think the fact that I have
learned several programming languages (not expert level, but certainly to the
point I can use them to make projects that benefit my life and the lives of
others) has fooled me into thinking I should know a lot more about programming
than I do. But if I'm honest, what I have essentially done is taken a bunch of
100 level programming courses, just in a variety of languages. I need to spend
time studying the more difficult concepts that can be applied to all
languages. Thanks for the advice! :)

~~~
dossy
Language mastery is only a small part of the overall process.

You can be fluent in Spanish, but until you've read a lot of Spanish
literature and written a lot of questionable quality Spanish prose yourself,
you won't be writing any great literary works. Studying the writing of others
--particularly the great masters--is one short path to developing that.

How much code do you read on a daily basis? A lot of programmers spend time
writing a lot of code, but not many spend time reading code: especially really
well-written code, or code that solves a problem really elegantly.

But, yeah, I think you get the idea...

