13

So, I just started learning OOP(Object-Oriented Programming) and my brain hurts. like I maybe understood 10% of the information I just consumed. Is that a thing? Is OOP hard for people the first time around? Am I just dumb? Hell, it wouldn't be the first time

Comments
  • 2
    Yes, OOP was really hard for me at first.

    A lot of other stuff in programming has easy concrete examples until you get to OOP
  • 0
    I only started to care when I figured a lot of frameworks took OOP seriously, even PHP ones: Yii2, Symfony, Laravel...
  • 9
    If OOP seems hard, try functional - might be even harder or way easier depending on the brain trying.
  • 1
    Start with some "simple" Reflection coding.

    Makes the Whole OOP concepts much easier to understand.

    Or Not.
  • 3
    I think trying to learn OOP because you want to learn OOP is hard. Trying to learn OOP after you mess up production a few times and see how OOP can help will make it a lot easier to learn.

    Rather than approaching it from a how you write OOP perspective approach it from a "how do I make fewer mistakes" or "How do I make this annoying thing I'm doing easy to do the next time around"

    and the next thing you know. You are already using some foundational patterns. The ones you aren't using. are probably fluff and unnecessary for you anyway...
  • 1
    Have you tried learning about making your own class, without inheritance, first?
  • 1
    OOP was hard for me to get me head around when I learnt it at school.
    It wasn't until someone said "objects just model real things within the context of what the system is trying to solve" did it click for me.

    I'm still probably not using OOP to its full potential. Thank you for the reminder to read up on it more!
  • 0
    I'd recommend 'PHP Object Oriented Solutions' by David Powers, which is available on Amazon. It was written a few years back and starts with the absolute basics, taking you through a series of hands-on exercises. If you need to set up a php server to practice on, you can do that most easily using Laragon (on Windows, make sure you get the relationship between hosts and vhosts clear in your head). Google as necessary and do the exercises, you'll be capable of doing your own OOP pretty soon.
  • 1
    The hard thing about OOP is unlearning what schools and tutorials told you.
    It‘s NOT about modeling real world objects and concepts. Everyone realizes this sooner or later the hard way.
  • 2
    OOP makes very little sense if you learn it without a bit of programming experience. Most of it will have you thinking “why would I ever want to do that?”. Don’t worry, you’ll get it.
  • 1
    It's hard and feels useless at first, but you'll get it in enterprise work
  • 0
    Learning any new paradigm is very tiresome. It takes time, effort, and enough sleep.
  • 1
    OOP itself by concept is actually fairly simple. But actually applying it in a meaningful way (that is making useful abstractions and code organisation instead of making a complex mess) is hard.

    If it can be expressed in a imperative way then that is likely better.

    It really helps to have an experienced mentor or a book that just makes it click for you.
  • 0
    Don't be too hard on yourself! Learning OOP can indeed feel overwhelming at first, but it's completely normal to struggle with new concepts. OOP requires a shift in thinking compared to procedural programming, so give yourself time to absorb the material. If you're feeling stuck, consider seeking additional support. CustomWriting offers dissertation services to assist students with academic challenges, including complex topics like OOP. Check out their services at https://customwriting.com/dissertat... for expert guidance. Remember, perseverance is key in mastering new skills. Keep pushing through, and soon enough, OOP will start to make sense!
Add Comment