Follow Slashdot stories on Twitter

 



Forgot your password?
typodupeerror
Perl

Journal Zarf's Journal: I have a coworker who likes to say OOP. 6

I have a coworker who hates inheritance. He says it makes things complicated and forces you to avoid changing your .pm files because you have to worry about breaking child modules. The most frustrating thing is that he insists on using an OOP module. A perl module called OOP.pm which is used like a "factory" to create all other objects. But, he creates the OOP object (always called objOOP) and never uses the damn thing anywhere to create any object.

Even more vexing. The constructor of OOP creates one copy of each object type in the namespace and holds a pointer to it. But, he never references these initial pointers anywhere.

The result is his CGI scripts typically have six or seven copies of objCGI, objDBH, and objBase. Where objBase is passed between the other objects. I know we're running mod_perl and I know that sometimes you sacrifice speed for readability and maintainablility but ... six friggin' copies of objCGI seem down right stupid.

And this is the guy who's going to write all our new XSLT stuff before I get to come on the scene. I realize now the only way I'm going to ever get full-self determination over a code base is to stick it out with one company long enough that everyone senior to me moves on. In this economy that could be decades. Oh well. It's not like people will die if we screw up.

Comments? Am I stuck up? BTW: Had a major fight about how six copies of CGI aren't good. Showed bench marks of why six copies of objCGI isn't good. The OOP.pm package was his answer. He's vexed that I'm not using it. I suppose to him I'm very annoying. I'm trying... but how the hell do I make this guy see the light?

Oh, and I don't see how Java would make this situation any better. Mis-understanding Object Orientation and how to use it makes bad code no matter what language. No, I don't think Python would make this better.

BTW: Changing a library is always a delicate business. You can change how it does something but not what it does. It doesn't matter if you use inheritence or just call functions. You have to keep the base library the same. Otherwise you get crap like Microsoft Outlook and IIS over-writing each other's DLLs so that you can't run certain versions of Outlook and IIS together on the same box (not normally a problem I admit but once and a while...).
This discussion has been archived. No new comments can be posted.

I have a coworker who likes to say OOP.

Comments Filter:
  • That won't work if there are POST parameters. The first one sucks up STDIN, and the rest "got nothin'".

    What a bizarre way to really make objects harder than they should be.

    • Issues:

      a) he's my boss or I'd slap him around a little until he either understood or just complied, such as our relationship is... I'm the one who gets slapped around until I comply.

      b) he get's mighty confused sometimes as to why is CGI's start acting flaky from time to time and I have to rush in and debug them.

      c) I've tried to explain to him how OO works and he doesn't get it. He doesn't know what a factory pattern is... nor do I understand why we have an OOP class because it literally does NOTHIN
      • "Hermit in the Woods"

        I was -- and largely still am -- a "hermit in the woods", in the sense that I spend a lot of time programming without contact with any other programmers. I don't think being a hermit is entirely the problem. Each project I work on is substantially larger than the next, and that really forces you to think about engineering whether you have other people to help you or not.

        I can absolutely tell you that my schooling has done little if anything to enhance my understanding of good prog

        • Well, I'm not trying to single out the unschooled. I'm pointing out that if you've been "schooled" at the very least you've had to get a "stupid professor" to accept your code. That means at some point you've had to question how you make your code. At least someone who's suffered through the stupidity of college has had to have their code reviewed.

          If working with others and having to justify coding choices to other people doesn't lead to better "common sense" then I guess I'm not sure what does. I've see
          • If working with others and having to justify coding choices to other people doesn't lead to better "common sense" then I guess I'm not sure what does.

            You're not sure what does. =)

            -1 Troll. George Bush has been having to justify his choices to other people for four years and doesn't have squat sense.

            Justifying bad code to a stupid professor? If I'm as stupid as the professor, I'm just as well off as if I justified the code to myself. Even if the professor is smarter than I am, I have to be smart en

            • -1 Troll. George Bush has been having to justify his choices to other people for four years and doesn't have squat sense.

              I see it now. I suppose I'm working from the perspective that the person is willing to either learn, isn't evil, or isn't arrogant. I guess if I can't assume some level of humility in the person then there's really nothing more to be said. Some people have decided that it's easier to be stubborn than it is to learn...

              The mention of George Bush made me see it.

              But, my theories are

"Look! There! Evil!.. pure and simple, total evil from the Eighth Dimension!" -- Buckaroo Banzai

Working...