I missed an opportunity to learn coding in 1961 as the computer was 30 miles from campus, I had no car, and was taking semester hours of math and physics. Then I was accepted for graduate school in 1975 and decided that since my goal was to become involved with science and research I should acquire skills to handle data and signed up for FORTRAN.
FORTRAN was offered by the Business department and 'goto' was heavily used. It appeared that only two or three of us in the class of about 30 'got it' but I might have been biased since I was 10 years older than most. Debugging was a bitch. Once the code was key punched the packet of cards was placed in a container embedded in a wall; at some point the computer operator would run the packet through the CDC 6000 series main frame (60 bit words) and then the output wrapped around the card deck and put in a pick-up pile a few hours later. All this to find syntax errors! I wound up doing my coding from 9pm or so until 2am as wait times were substantially shorter. I made friends with the operator and learned how to run the main frame.
About this time a time sharing system using Teletype Model 33 ASR terminals distributed around the science building was installed so I started to use it for my FORTRAN class (slightly different than the CDC) and learned BASIC.
I was given a 6502 computer on a board designed for engineers could learn how to use the 6502 chip and I/O chips. Input was a keyboard, output a paper tape similar to a cash register tape. I learned some assembly on it but had to purchase a couple of tape decks and build an interface to save and load code in the 'Kansas City Format'. I wrote a version of Wumpas using the included BASIC in ROM and used this computer in a data structures class I took.
I did take introductory courses in Pascal and C, for instance, but was self taught in C++ and in the last 4 years Java and Dart.
I read all I could to understand what to do to conceptualize and then start to code projects. Since most the coding I've done is in support of data acquisition and converting raw data into data usable for analysis and display I find that I kind of cherry-pick topics to learn, skip others, and have spotty knowledge of some aspects of the languages I use.
Programming has mostly been a secondary task in my job descriptions. I think requiring primary school students to learn coding is about as sensible as requiring them to take calculus in order to be accepted in University for Humanities majors.