This has always seemed like a paradox to me. Once I got past the initial learning curve, coding seemed easy and fun. But most people can't or won't get past that learning curve, for reasons that I don't think we understand.
But if coding were hard, then writing small pieces of code would be as hard as writing big pieces. To make an analogy, playing the violin in tune doesn't get any easier, the shorter the piece that you have to play.
Developing software is hard. Some sort of "phase transition" occurs when a project gets big and complex, where coding is no longer what makes it hard. And writing software in a way that is not a net burden to a project or organization is hard, involving not just complexity but humanity. Most smart people in an organization have subtly arranged their affairs so that their career progress doesn't hinge on the success of a software project.
I admit that I only say these things as an observer, since I can code all day, but didn't pursue a software development career.
I also admit that I'm waiting for AI to handle the second two levels of software development. I'll concede that AI can develop software when The Mythical Man Month no longer reads like it was written yesterday.
Honestly, it's not even the learning curve. It's easy. Most people can think precisely enough to program.
The difference is that we enjoy sitting in a chair for ~8 hours a day laying dominoes. A lot of folks do not like that.
> Some sort of "phase transition" occurs when a project gets big and complex, where coding is no longer what makes it hard.
It's in the name. Coding is taking an algorithm specified in some manner (pseudocode, diagrams, natural languages, thoughts,...) and transforming it into a sequence of instructions, statements, and expressions, that can be executed by a machine (either directly or through an automated process).
We have solved the coding difficulties on several front with things like programming languages (no need to type opcodes), syntax highlighting, linters, snippets, editors, IDEs,...
But someone still have to come up with the "Algorithm", and that's where it's hard. Usually because it's a combination of two sources: The business domain and the technical constraint. That's where people are failing.
But we did manage to create a lot of building blocks, like the standard algorithms and their data structures, libraries that provides an abstraction over a subdomain, frameworks that provides a scaffold to the thinking process,... But the developer still have to solve the system. And that system can get complex real quick if he's careless.
I do believe if you fail at the coding part, that's easy to fix with a few courses (or books) and some practice time. But the system thinking and the solving part is not easily taught. It's not even related to technology other than the latter being the domain it's exercised.
Part of it is learning, but it's just as much coming into the right mental models for it.
Programs are just virtual machines assembled from numerous smaller parts, not so different from a bicycle, car, or mechanized assembly line, but that's not at all how I thought of them when I was first getting into writing code. I'm not sure I even had a mental model at that point, or if I did it was too simplistic to build anything useful with. It was after my mind picked up the machine model when I started to become capable of writing code and eventually designing and build software from scratch.