Start a serious project that you'd actually want to build if you were
competent. You can do a Tetris at first or Space Invaders, but that's just
a warm-up, it won't get you anywhere all by itself.
Give it time. A serious project is like writing a book. It may take
years. It can have a lengthy research phase. You need to develop a theme,
a story arc, characters, etc. For an experienced programmer it may be more
like building a house: they did it before so they already know the phases of
construction, available building materials and how to work with them, etc.
You don't know any of that. Give it time. Beginners tend to underestimate
how long anything takes in this field, and then give up when they find out.
Break down the problem into smaller problems, until a problem is small
enough that you know how to solve. If you don't know how to solve a problem,
then it's not broken down enough. This will never fail you.
Only solve one problem at a time. If you feel confused, it means you're
juggling too many things in your head the same time. Offloading them on paper
and picking them up again one by one also helps.
Rewire your brain on the concept of failure. Failure is good. It means
you tried, and you learned something. Once you failed, and tried something
else and that also failed, that's not a repeat failure, because you failed
at a different thing, so you actually did good again, but it's easy to
register that as doing bad. The worst thing you can do is to attach
these failures to your self/ego/identity, i.e. to evaluate whether you're a
good programmer or not based on them. Doing that will only add a
psychological cost to trying again, making you over-cautious and ultimately
dogmatic in your beliefs. Don't make it hard for you to say "I don't know".
Beware of silver bullets. In this field which is fundamentally about
thinking, you will discover things that will blow your mind. You'll fall in
love with big ideas, and fall into the trap of thinking that they can solve all
your problems for you. Your first love will probably be OOP. It will take years
before OOP will disappoint you enough to want to try something else.
Big ideas have power. There is truth in them, but they are not the truth.
Develop radical skepticism. On the Internet, everybody's trying to sell you
something, and it's usually a badproduct. A lot of bad tech is considered
good, both old and new. There's also more badadvice out there than
there is good (and ChatGPT was trained on all of that). The masses will
lead you astray. Think for yourself and follow no one.
Learn how the computer works. That doesn't mean studying cache coherency
protocols or x86 instruction packing. But even in JavaScript adding to a flat
array is orders of magnitude faster than allocating objects all over the place.
Learn the basics of RAM and CPU. You will never use map() and reduce() again,
despite what people say on Stack Overflow.
Don't be afraid to ask for help or to help people back. In my experience, more
people are willing to help than they are being asked for help. Not everybody
is an effective helper, sure, but the cost of triage is low. And if you think you have
nothing you can help back a seasoned programmer with, then you haven't heard
of rubberducking. Many times just explaining their problem to someone is all
a programmer needs to get unstuck. My girlfriend is sick of it. As a programmer
though, you might enjoy the conversation, and might even learn something.
If you don't like it, then you don't like it. Barring variations in temperament,
I actually don't think that people are naturally aligned to specific fields. I think that
people tend to like whatever they are good at. Satisfaction grows along with
competence because it's the exercise of competence that is the source
of satisfaction. That said, if you gave programming an honest good shot and
you found that you still can't get excited about it after a good amount of trying,
then maybe you should stop torturing yourself and try something else.
You can always get back to it later.
Here's 10 random tips for beginner programmers:
Start a serious project that you'd actually want to build if you were competent. You can do a Tetris at first or Space Invaders, but that's just a warm-up, it won't get you anywhere all by itself.
Give it time. A serious project is like writing a book. It may take years. It can have a lengthy research phase. You need to develop a theme, a story arc, characters, etc. For an experienced programmer it may be more like building a house: they did it before so they already know the phases of construction, available building materials and how to work with them, etc. You don't know any of that. Give it time. Beginners tend to underestimate how long anything takes in this field, and then give up when they find out.
Break down the problem into smaller problems, until a problem is small enough that you know how to solve. If you don't know how to solve a problem, then it's not broken down enough. This will never fail you.
Only solve one problem at a time. If you feel confused, it means you're juggling too many things in your head the same time. Offloading them on paper and picking them up again one by one also helps.
Rewire your brain on the concept of failure. Failure is good. It means you tried, and you learned something. Once you failed, and tried something else and that also failed, that's not a repeat failure, because you failed at a different thing, so you actually did good again, but it's easy to register that as doing bad. The worst thing you can do is to attach these failures to your self/ego/identity, i.e. to evaluate whether you're a good programmer or not based on them. Doing that will only add a psychological cost to trying again, making you over-cautious and ultimately dogmatic in your beliefs. Don't make it hard for you to say "I don't know".
Beware of silver bullets. In this field which is fundamentally about thinking, you will discover things that will blow your mind. You'll fall in love with big ideas, and fall into the trap of thinking that they can solve all your problems for you. Your first love will probably be OOP. It will take years before OOP will disappoint you enough to want to try something else. Big ideas have power. There is truth in them, but they are not the truth.
Develop radical skepticism. On the Internet, everybody's trying to sell you something, and it's usually a bad product. A lot of bad tech is considered good, both old and new. There's also more bad advice out there than there is good (and ChatGPT was trained on all of that). The masses will lead you astray. Think for yourself and follow no one.
Learn how the computer works. That doesn't mean studying cache coherency protocols or x86 instruction packing. But even in JavaScript adding to a flat array is orders of magnitude faster than allocating objects all over the place. Learn the basics of RAM and CPU. You will never use map() and reduce() again, despite what people say on Stack Overflow.
Don't be afraid to ask for help or to help people back. In my experience, more people are willing to help than they are being asked for help. Not everybody is an effective helper, sure, but the cost of triage is low. And if you think you have nothing you can help back a seasoned programmer with, then you haven't heard of rubberducking. Many times just explaining their problem to someone is all a programmer needs to get unstuck. My girlfriend is sick of it. As a programmer though, you might enjoy the conversation, and might even learn something.
If you don't like it, then you don't like it. Barring variations in temperament, I actually don't think that people are naturally aligned to specific fields. I think that people tend to like whatever they are good at. Satisfaction grows along with competence because it's the exercise of competence that is the source of satisfaction. That said, if you gave programming an honest good shot and you found that you still can't get excited about it after a good amount of trying, then maybe you should stop torturing yourself and try something else. You can always get back to it later.