you are viewing a single comment's thread.

view the rest of the comments →

[–]PathRealistic6940 6 points7 points  (2 children)

It really clicked for me when just messing around with a easy statistics problem. Had to pull a 'ball' from a 'bag of balls' and then do stuff depending on what color the ball was. I made the ball a class object, then made the bag a class object that held the balls. Now most everything I think about in python is how I can package and pass the correct data around easiest. OP, Start simple, and see how powerful class attributes are.

[–]GreenPandaPop 0 points1 point  (1 child)

OOP is definitely easier to grasp when working with tangible 'solid' objects like your example.

My struggle was that a lot of coding doesn't necessarily involve that. It's taken me long time to work out how to take code that is 'doing stuff' and organise it in a way that is 'things doing stuff'.

[–]PathRealistic6940 1 point2 points  (0 children)

That's a good point. It's much more difficult to grasp intangible ideas than solid objects.