Although it isn't easy, anyone can learn how to code. It's merely a matter of pushing through. As a self-taught developer I attest to this and share my experience.
To provide context, my journey as a developer began after I left school in year eleven to pursue my own path. After leaving, I worked with a friend on my first business: an online video game store.
Alongside collaborating with two other developers, web development was something I needed to learn to build my idea.
The long, arduous learning process
As someone with no prior experience with software development, I was a complete novice. I had no clue how software works, how to write code, or any of the rudiments. So I learned everything as I went along.
I'd literally sit there for hours tinkering and trying to get things to work. Things would break and I wouldn't know why. It'd take me hours to progress in building even a tiny fraction of the functionality. There were tedious bugs that would take me the entire day to solve.
When I was learning Linux, I reinstalled Ubuntu on my PC four times in a single day because I kept breaking it. And that excludes the amount of servers I spun-up and broke.
When I sought help, I asked really dumb questions. My frame of reference was so small I didn't even know how to ask good questions. This resulted in being down-voted enough on StackOverflow to get myself banned, and being made fun of on IRC.
Whilst learning, unfamiliar concepts frequently flew over my head. It'd usually take many hours of me sitting there studying and practising them until they finally clicked.
My code was a complete mess. It had all the code smells. You could probably have made some decent spaghetti out of it, though:
In total, building the store required about 6 months of coding for many hours most weeks. A ton of time and effort was involved and I found it extremely difficult.
If you're struggling, you're doing great
Seriously. If you find software development challenging, it's not because you're an idiot—it's because learning how to code is hard.
And just because it's difficult doesn't mean you can't do it. It just means you need to persist until it clicks for you.
However long it takes you is irrelevant; being challenged is a normal, healthy part of the process. With persistence you'll get there eventually.
With time it'll slowly click for you. Concepts that seemed incredibly difficult to grasp in the beginning will become easy, and learning new things becomes easier.
Even today with over three years of experience as a developer I still find myself challenged whilst learning unfamiliar, difficult concepts. It's normal, so embrace it.
Don't give up
The process I just explained is something so many people don't understand. When things get difficult, they give up. Instead of persevering, they devise false beliefs as to why they can't do it.
They think they're not intelligent enough, don't have x, weren't born with y, and unfortunately suffer from z. Unless you genuinely have a mental disability, all of these are excuses. And even then you're probably far more capable than you believe.
Or they're just not willing to do anything that requires effort. Laziness is a sure-fire way to ruin your ambitions.
Don't do this. You can guarantee this attitude will hold you back in life. Your level of self-belief, determination, and self-discipline is the greatest control you have over your destiny.
If you believe you're limited by predetermined aptitudes, go and read Talent Is Overrated by Geoffrey Colvin. Talent is unsubstantiated bullshit society holds dearly.
As a consequence, many people don't even try to achieve their ambitions, or they give up as soon as they're faced with a challenge. Don't be one of those people. Everything you want in life requires action.
Learning the hard way is the right way
Although it may be difficult, the arduous learning process is incredibly effective and rewarding.
When you sit there for hours struggling to accomplish even the most basic task, you're developing patience. And when you push through until you succeed, you're developing persistence. Both are qualities of any decent software developer.
Alongside this, the act of tinkering develops deep knowledge, understanding, and resourcefulness. It involves a ton of trial and error, breaking things, experimenting, and doing everything the wrong way.
Not only does this develop a deep understanding of the tools you're using and how they work, through your mistakes you understand exactly why best practices are important. This is something you're unlikely to intuitively grasp without the required experience.
When you encounter problems you're also frequently forced to seek external assistance, which develops resourcefulness. Alongside using other useful resources, knowing how to Google is an essential skill for software developers. You'll only develop this ability through practice.
Learning through experience is mandatory. Even if you learn elsewhere, such as through reading books, taking a course, or going to university, you still need to practice what you're learning. There's a world of a difference between learning how to do something and actually doing it.
The light at the end of the tunnel
By the time I'd finished building the store I'd learned a ton. Although the business failed, my skill-set was decent enough to land myself a full-time job at the age of seventeen.
You don't need to be a genius. I certainly wasn't. Anyone can do the same, and there's many other self-taught developers who can attest to that.
One last thing I should note is that even though the process may be difficult, you should enjoy it. Having fun is important and the journey itself is the most fulfilling part.
So long as you put in the effort and persist, there's no reason why you can't learn how to code 😁