Best way to learn programming

Best way to learn programming
Photo by Fotis Fotopoulos / Unsplash

I was not too fond of programming in college. The reason was not the code but the way in which I was learning it via books, inheritance, polymorphism. I was more interested in building inverted pyramids on screen. It was a dry, dull, and syntax overload process.

On the first day of my job, I was given a challenge with the objective to solve it. There was no boundation of language, library, editor or anything. Just a problem that needs to be solved. This inverted the learning process.

I was not reading the documentation from top to bottom, just opening the pages that were helping me with current microtask like how to connect to the database, how to plug web server.

This is how I still learn to program today. Makes me wonder if we have bad subjects or just bad entry points for these subjects!