After much reflection on this question, I was finally able to trace back through my history and find a more concrete answer than my usual "You must become the code" Yoda type answer that I tend to give out on occasion. And that's mainly because this is a difficult question to answer. It is very subjective and actually can have many different answers depending on who you are. Such as:
- Do more difficult things
- Ask better questions
- Repetition makes mastery possible
- Rest more often
Those are all good things that you should be doing anyway during your days. Being one with anything for sure will help you out in life, but sometimes we want more concrete answers. Something actionable that you can take with you. Here is that answer for you folks looking to get 'good' at coding. This one thing that I did pretty much kept me in the know for at least a couple of years after I did it. Enough time to where I could pick up more complex topics. What is this magical thing that I did?
It will sound dull an tedious and you won't want to do it, but it works.
I read Problem Solving with C++ by Walter Savitch during my college years. And when I say I 'read' it, I mean I became one with the book. This book is no joke. It's heavy. As in over 1000 pages heavy. And it's expensive as we expect all textbooks to be. It is one of the required reading materials during my very first programming class Programming in C++ I. And if that sounds like a dull answer and you were expecting some other magical means, read on a bit further, because it's both.
I read the #$^@ out of it
I picked up this textbook early in the year, before my class was scheduled to begin because I wanted to prepare as I had never really been exposed to a college level programming class before. And so as soon as I bought it, I began to read through the many cryptic pages highlighting and writing in this book as much as I could. Questions, comments, answers, were littering every page. I normally don't write in my books, but no one told my brain that during this time, because not a single page was spared.
By the time the class had officially started, I was already very versed in many of the concepts and topics.
"I want everyone to read the first 20 pages by next week". Done. How about the first 200? Done that too.
This made my first programming class a breeze. And in preparation for Programming in C++ II, which was scheduled during the following semester, I read the entire book again. More notes and more comments began to litter the pages once again, except this time with more context and a bit more complexity to them. This second time around I actually managed to completely read the entire thing before class began, which I had missed the mark on the first time around as some of the concepts were just too foreign. Everything in its time.
Again, this made the course a relative breeze this second time around. You can guess what I did in preparation for Programming in C++ III, the final course in this C++ journey. In total, I read this book about 5-6 times during my college years. Once just for fun, because I just thoroughly enjoyed reading it after a while. All 1000 pages were read each time, most with some form of note or doodle on it. The resale value on it was in the cents after I was done with it probably, but I wasn't planning on reselling it.
The only reason that I stopped reading it and put it to rest, was because after literal years, it completely fell apart. Chunks of pages hung by threads, while coffee and energy drink stains marred many others. This book had done its job and it did it well.
Should you go buy a C++ book?
I'm not saying go out and buy a book on C++ that's over 1000 pages and covers relatively advanced programmatic topics. You can if you want to, but that's not what I want you to take away here.
Dedication, motivation and genuinely wanting to accomplish something in your life are key components in learning anything and learning it well. I have spent over 15 years writing code and there have been many other factors at play in helping me to improve these skills, such as tough work, helpful co-workers, the ease of finding anything on the internet these days and knowing when to ask questions.
Putting in the countless hours sitting in front of that book, however, and making sure that every word was either understood or at least questioned and highlighted is the earliest moment that I can recall where things just began to click for me and when coding became an enjoyable challenge. Where my brain began to improve its pattern recognition mechanism and when each page was another node in a massive graph that is the C++ programming language.
I don't program in C++ and never did professionally after those classes, but that wasn't the point really. The concepts were understood and the difficulty was taken on and my overall ability to problem solve (hence the book name) improved vastly during this time.
So whatever medium you choose to use in your learning experience, go all in. Don't jump around from book to book or podcast to video to blog post to Instagram post. Consistency really is key in learning and growth and like any muscle it must be trained daily until it becomes second nature.
But if you are going to pick up a book in your learning journey, you could do worse than Problem Solving with C++.
Happy coding folks.