Archive

Posts Tagged ‘antelope’

Object-Oriented Thinking, Part One

December 28th, 2009 2 comments

For me, starting to learn Object-Oriented Programming (OOP) was quite the pain. It wasn’t what I’d grown accustomed to over the past 15 years, and I was learning C++ at the same time from a prof who was also learning these things at the same time.  (Not that there’s anything wrong with that—profs do it all the time—but sometimes it’s not the best learning environment.)

One of the consequences of this was that we were all caught up in the minutiae of C++, and kinda skimped on the big OOP picture.

So here it is: “OOP is good if you have a bunch of things that have attributes and do stuff.” OOP wraps up the things, their attributes, and the stuff they do in a nice way that can make the code clean and clear. Things like GUIs (which have a bunch of things like windows and buttons, and the windows and buttons have attributes like their locations on the screen, and they can do stuff like get clicked or move) are natural fits to OOP.

Read more…

Share