Can a low-level programmer learn OOP?

Tony23 nospam at example.com
Sat Jul 14 02:09:47 CEST 2007


Chris Carlen wrote:
> John Nagle wrote:
>> Chris Carlen wrote:[edit]
>>> Hence, being a hardware designer rather than a computer scientist, I 
>>> am conditioned to think like a machine.  I think this is the main 
>>> reason why OOP has always repelled me.
>>
>>     Why?
> 
> When pointers were first explined to me, I went "Ok."  And rather 
> quickly ideas lit up in my head about what I could do with them.
> 
> When I read what OOP is, that doesn't happen.  All I think is "what's 
> the point of this?"  "What can this do for me that I can do already with 
> the procedural way of thinking?"  And if it can't do anything new, then 
> why rearrange my thinking to a new terminology?  It's results that 
> matter, not the paradigm.

I have been programming since 1978. I started off with BASIC, learned 
Assembly and Pascal, and much later eventually moved on to Javascript, 
Perl, and PHP. All of my work was done procedurally.

Recently, I have been working on a very large project involving a lot of 
OO-Javascript. For what we are doing on the project, OO makes sense. I 
really didn't get OOP until working on this project - probably because I 
never did anything that really needed it.

I have found myself leaning more toward the OO paradigm since doing 
this, after 25+ years of procedural programming, and now I find myself 
doing more work with OO concepts, and getting things done even faster, 
and with less work, than I used to.

But I still have a problem with STRICT OOP - which is why I like Python. 
Use OO where it's useful, use procedural when that works best.

I suspect that the reason it isn't clicking for you is twofold: 1) You 
don't do anything currently that has an obvious need for OOP, and 2) You 
haven't done anything with OOP.

A couple ideas:

1) Maybe you can try building a relatively trivial program that would 
more naturally use an OO methodology - perhaps a simple videogame like 
Pac-man? The 'monsters' would be objects, with properties such as color, 
X-position, Y-position, etc. - make yourself work in OO terms

2) This may seem silly, but download & play with "Scratch" 
(http://scratch.mit.edu) - it's basically an introduction to programming 
for kids, but it's completely OO, and super easy to use. It might be 
useful to help you to see the 'grand view' better.

3) Give in to the dark side :)

Good luck - after so much time invested in one way of thinking, it's not 
easy to change.



More information about the Python-list mailing list