wfercanas.com

Learning OOP

Author: Fernando Cañas

Published: Sat Nov 09 2024

Throughout this year I’ve been learning backend development for web applications in Codecademy. Recently I could complete ~60% of their Backend Development career path 💪🏻.

The journey has been amazing up to this point. I feel I improved my programming skills.

Nonetheless, I reached the end of what you could call the “Programming for backend” subpath and decided to pause there, since the next two modules are more about DevSecOps, data structures, and algorithms.

I know, I know. Those are key subjects in becoming a better backend programmer as well, but I want to keep working a little more in the foundations of the previous modules.

I particularly want to learn more about object-oriented programming. The last couple of lessons just passed by —as always with this subject in particular— presenting what abstraction, encapsulation, inheritance, and polymorphism means and superficially checking some design patterns.

You know me, I find it hard when people ask me to keep it simple and just go on. Harder even when we’re talking about foundational subjects 🤷🏻‍♂️.

So, I decided to pause Codecademy and try some nice things 😄.

Head First Books

If you want to learn something new, nothing like having fun conversations about what you want to learn. Head First books do exactly that. Those books are just awesome!

I loved learning Git by reading their book about it. So, when I was wondering where to learn about OOP, I first checked the book series to see if they had a book about it. And they have!

The OOA&D book is just amazing. I’m halfway yet, but I can tell you the approach is just beautiful. Since OOP is a paradigm, I have come to realize that the real challenge becomes how to see and think about a problem through the lenses of that paradigm.

I think we all want to just go directly to the code, and see it working right away. But the book does a great job by hitting the brake and providing first some compelling scenarios in which you have to practice your third eye, the OOP eye —haha.

Coding exercises are written in Java, and I don’t know Java. But let me tell you what I did instead 💡.

JavaScript to the rescue

I’ve been using JavaScript for almost 5 years, mainly in a frontend environment. So, my plan is to solve all the exercises with JavaScript instead of using Java.

I think that approach has been a good one. I hardly find myself fighting with the language to make the exercises work, but more than that, it has given me a chance to test my knowledge of the language and see it working in an environment I haven’t been in.

Using the language I know most, has helped me focus on the paradigm itself, rather than its implementation in a specific language.

Escape the comfort zone

My plan then is to complete the book with JavaScript. I’m pretty sure the results will be amazing.

Will that be all for my out-of-the-path adventure? No. I will try a couple of things after completing this book.

First, since I’m also learning Go, I plan to complete all the exercises in this book but with Go! I would love to test my ability to solve the same problems with an OOP mindset in a language that has its very own —and different— way of doing things.

Second, I found an interesting book about learning OOP by creating games using Python. It seems like fun and I will try to complete it with the same approach: by using JavaScript instead.

I promise to keep you up to date! 🍻🍻