Mar 17 2011

OOP is Distracting

Don’t Distract New Programmers with OOP.

The shift from procedural to OO brings with it a shift from thinking about problems and solutions to thinking about architecture. That’s easy to see just by comparing a procedural Python program with an object-oriented one. The latter is almost always longer, full of extra interface and indentation and annotations. The temptation is to start moving trivial bits of code into classes and adding all these little methods and anticipating methods that aren’t needed yet but might be someday.

Haven’t I seen that all too often on that project that I have worked on over the past 10 years?! Premature optimisation is the root of all evil. Unnecessary architecting the solution won’t be too far from that.

1 Comment

  1. Han on 27 Nov 2011 at 12:27 pm #

    When I had to learn OOP on campus, it was very fun, learn about the concepts, understanding of OOP concepts. But when I was plunged directly into Java programing to implement OOP, so my head was spinning. Confused how the concepts I’ve learned will be applied.

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>