Beefy Boxes and Bandwidth Generously Provided by pair Networks
Welcome to the Monastery

Re: What quality is your company's code?

by HaB (Sexton)
on Dec 07, 2000 at 01:12 UTC ( #45324=note: print w/replies, xml ) Need Help??

in reply to What quality is your company's code?

In my short (just over 2 years) time as a developer, I have seen an overwhelming trend towards security being a complete afterthought. Out of the 3 jobs I have had, none of them used strict, or modules (aside from DBI), or any kind of data integrity checks (-T or otherwise).

I will say however that except for one, none of them had specific perl developers, but rather guys who were C or java guys, who would hack perl with the camel book firmly in hand.

More startling than the lack of security to me, tho was just plain bad style issues. 500 line programs that used NO modules and NO subroutines. Just one big long while(1) loop. I know perl isn't the strictest language when it comes to style, but c'mon. It was like they wrote some of this stuff thinking they would never have to look at it again.

Then we have the company I'm currently at, who had 2 of their major internal tools written in perl by someone who (I think) learned on Perl4, and never bothered to pick up anything new since then. His subroutine count record is 2 in a 650 line program, and that's including the main loop. They were so soured on perl at this point, that I was actually only called in to document existing code, so they could support it until they came up with another solution. Luckily for me (and them), I have managed to show them a lot more about what the language can do, to the point where the new solution was to let me rewrite the tools for them, since perl is already implemented on all the machines that run them.

Sadly, instead of job-related checks and balances my code review usually is limited to a PM posting, or a post to a mailing list. I think some of the lack of QA I've seen at work stems from ego. I had a posting just today on the Perl-TK mailing list that was asking if there was a better way to do something I had already done, and I got an answer that was so simple and so obvious that I just had to grin at the sheer elegance of it. I mentioned it to a friend and he said that he finds that kind of thing bittersweet. I asked about the bitter part, and he said he always feels lame about not seeing it himself. Bah on that. I don't claim to have all the answers, and I'm more than glad to let other eyes review something I've done for the sake of it being better code, not to mention my own education.

Just my $0.02 worth.


  • Comment on Re: What quality is your company's code?

Log In?

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://45324]
[choroba]: oh ok
[marto]: I crashed the ScotLUG Christmas night, having never actually been to ScotLUG
[choroba]: Corion yeah, I probably already told you about how Bjarne Stroustrup was asked whether he still watched the new tech trends and what really impressed him
[choroba]: His reply was "I watch them, but I haven't been impressed in the last 10 years. There's been nothing new". That was 2 years ago :)
[ambrus]: Ok, the docs is somewhat unclear. It does say that when an object is garbage collected, it will get cleaned up, and eventually can no longer get messages. It's not clear how long this takes, eg. I think it's kept alive until its queued events are handled
[ambrus]: in the loop, and I'm not sure if that's ok for AnyEvent. Also, it's not clear if a Timer or File object you free really is garbage collected, i.e. that Prima doesn't keep some references to it, but I hope so.
[Corion]: choroba: No, I don't remember that story, but yes, it matches my experience ;))
[ambrus]: Hopefull the object isn't kept alive, the events are processed immediately, but you'd have to read a lot of source code to be sure about that.
[Corion]: ambrus: I think both of AnyEvent and Prima are pretty tight in their memory management because they both are cooperative multitasking and (I think) both use the Perl memory management for managing things
[Corion]: ambrus: And for Windows, I don't think that Prima knows if there still are messages queued for an object (in the Windows message loop). Finding that out would take lots of effort for little gain

How do I use this? | Other CB clients
Other Users?
Others romping around the Monastery: (9)
As of 2016-12-09 10:23 GMT
Find Nodes?
    Voting Booth?
    On a regular basis, I'm most likely to spy upon:

    Results (150 votes). Check out past polls.