Results 1 to 4 of 4

Thread: OOPS (VB/VBA)

  1. #1
    2 Star Lounger
    Join Date
    Jun 2002
    Location
    Loudon, New Hampshire, USA
    Posts
    125
    Thanks
    0
    Thanked 0 Times in 0 Posts

    OOPS (VB/VBA)

    I have tried to wrap my mind around OOPS. All I get in everything I see is a run around using big words that tell you little. I was a mainframe programmer and wrote COBOL. The COBOL programs I wrote were poor, until I wrote some BAL. Since this is next to machine language, I learned a lot. When I went back to COBOL, I started to look at the PMAP generated by the COBOL generator. It showed the BAL instructions my COBOL code was generating. I found that reading it gave my great insight and I started to produce much better COBOL programs. So what I would like to know, is there any books out there that show what assembler code is generated when one tries to write OOPS?????
    Sarge

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: OOPS (VB/VBA)

    I very much doubt you'll find such a book, and I don't think it would be that helpful. Object-oriented programminginserts so many layers between the code that you write and the machine code that is eventually generated by the compiler that a few lines of code may generate thousands upon thousands of machine instructions.

    The whole idea of object-oriented programming is to hide large chunks of functionality in "objects" so that you don't have to worry about what goes on under the hood. I suspect that compared with the lean-and-mean assembler code we wrote in the past, the machine code produced by an object-oriented compiler is hopelessly complicated. But that doesn't matter because the hardware we have now is incredibly more powerful than what we had to work with then.

    If you want to get into object-oriented programming it might be a good idea to attend a training course; a good trainer/teacher can make the subject "live" much more than a book or online tutorial.

  3. #3
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: OOPS (VB/VBA)

    There are profilers for various languages that help you identify slow spots in your programs. There also are articles suggesting slow functions to avoid. These are very platform specific and may change between generations of runtimes (e.g., different versions of the .Net framework), so it can be difficult to state any general principles.

  4. #4
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Melbourne, Victoria, Australia
    Posts
    5,016
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: OOPS (VB/VBA)

    It's important to realize that OOP is really a design tool. Before your code is translated into (something resembling) machine code, it's ripped apart, reorganized and generally desecrated to an extent that leaves the "ready for compile" source code with virtually no resemblance to the lovely neat OO code you put so much effort into producing. All your carefully chosen variable and function names are gone and the whole pre-compile mess is unrecognizable.

    Even if the tool you want exists, I'd imagine its output would be quite unhelpful for the purposes you seek. I couldn't locate an explanatory example, but this might give some insight: Write Great Code: Understanding the Machine - Google Books Result

    Alan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •