Monday, November 11, 2013

Nov 11: Better late than never, object-oriented programming

Despite having badly neglected this slog, I intend to post daily about both old and new topics in the run up to the end of term. To start, I will write a little about object-oriented programming.

Though I'm no expert on programming languages, it seems to me that object orientation is a feature which allows a language exponentially more power (in one sense) than the alternative. The ability to define one's own functions and classes creates the potential for infinite abstraction, to the point where any higher-level problem can be solved with enough planning and code. While sometimes I find this abstraction very challenging to wrap my head around, the idea behind it is attractive. Furthermore, the simple modularity of this paradigm is aesthetically and logically pleasing. Though my aspiration as a programmer is to write code which is as modular and straightforward as OOP might seem to be inherently, I will sometimes attempt to solve problems by brute force or trial and error (I'm only human). To me, this is a shortcoming of OOP: it allows for lazy work to sometimes get the job done, where elsewhere more careful planning would be necessary (I imagine, again, I don't know much about other language types).

Thanks to this little meditation on OOP, I resolve going forward to plan out my code more carefully, from the top down.

No comments:

Post a Comment