Beefy Boxes and Bandwidth Generously Provided by pair Networks
XP is just a number
 
PerlMonks  

Re: Coding styles: OOP vs. Subs

by dragonchild (Archbishop)
on Nov 16, 2005 at 04:30 UTC ( [id://508901]=note: print w/replies, xml ) Need Help??


in reply to Coding styles: OOP vs. Subs

Modules are not OO. If he's uncomfortable with OO (for whatever reason), then have him put stuff in libraries with Exporter. That, at least, is code reuse.

As for performance ... if it's performance you want, why are you writing in Perl? Perl's OO isn't the performance hit - it's those damn scalars, arrays, and hashes you love using. If those weren't around (particularly the scalars), Perl would be at least 2-3x faster and use like 1/10th of the memory. But, what would be the point?

As for work - there's a manager, and it doesn't sound like it's you. You need to talk to this person and have him/her make a decision as to coding styles and if there will be one for the group. If there isn't, DROP IT. No-one is so valuable that they can't be fired. I was once let go the very next day after I implemented a 99% speedup (~5 minutes to ~2 seconds) in the core subroutine for the application that controlled all of $VERY_LARGE_COMPANY's factory forecasting and purchasing. If you are perceived as being hard to work with, you will be the one in the sights, not your coworker.

And, maybe you coworker has a point. Maybe this stuff doesn't need to be written very well, so long as it works. Maybe getting it out the door is more in line with the company's vision than having stuff that takes longer to write, but is easier to maintain. Maybe the extra time spent polishing the code costs more than a bug. I don't know, but maybe your coworker might.


My criteria for good software:
  1. Does it work?
  2. Can someone else come in, make a change, and be reasonably certain no bugs were introduced?

Replies are listed 'Best First'.
Re^2: Coding styles: OOP vs. Subs
by nikos (Scribe) on Nov 30, 2005 at 22:58 UTC
    I really liked your example. I thought about it for a while and decided to let him write it his way as long as it works. I will make him work on this entire project. We should have started this project a long time ago and it's time to show something. hehe so, we have no choice.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://508901]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others rifling through the Monastery: (5)
As of 2024-04-23 18:59 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found