Beefy Boxes and Bandwidth Generously Provided by pair Networks
Pathologically Eclectic Rubbish Lister
 
PerlMonks  

Re: Production Environments and "Foreign" Code

by PodMaster (Abbot)
on Mar 12, 2003 at 14:58 UTC ( [id://242372]=note: print w/replies, xml ) Need Help??


in reply to Production Environments and "Foreign" Code

IMHO, such policies result out of bad-experience and ignorance. Did you hand-roll your CGI parsing code?

I very much doubt you'll experience data loss, and if you do, you should have your backups (duh).

Every xml parsing modules has about 0% chance of losing data on its own (it's only reading after all, and that can't be damaging :D).

Now, look at the reports of cpantesters, and check your target platform(s) for success/failure (lack of test reports don't mean much, inspect reports closely as not all cpan-testers know what they're doing -- true even more today due to CPANPLUS)
http://testers.cpan.org/search?request=dist&dist=XML-Parser
http://testers.cpan.org/search?request=dist&dist=XML-LibXML
http://testers.cpan.org/search?request=dist&dist=XML-Twig

Do a codereview like monks have already suggested, but also be sure to review the tests (and the more tests there are, the better).

Look for bug reports (http://rt.cpan.org).

Now, also look at who wrote the module. I frankly wouldn't do too much of a codereview on a module like Text::xSV which is written by tilly. Some of SCHWERNs stuff I might inspect a little closer though ;D


MJD says you can't just make shit up and expect the computer to know what you mean, retardo!
I run a Win32 PPM repository for perl 5.6x+5.8x. I take requests.
** The Third rule of perl club is a statement of fact: pod is sexy.

Replies are listed 'Best First'.
Re: Re: Production Environments and "Foreign" Code
by Tanalis (Curate) on Mar 12, 2003 at 15:22 UTC
    We don't parse CGI .. *grin* .. at the minute it's all CSV and TDT in flat files, and yes, the modules to read them are all hand-rolled (long before my time). As I said in the original post, we have core Perl modules and DBI installed, as well as the in-house modules people have written over the years, and nothing further than that.

    By losing data I meant badly-formatted or wrongly tagged lines being silently kicked out, not the module itself failing to read or "damage" data. Error reporting and handling is, I believe, one of the reasons management here decided to move away from external code - we're *very* liable if something isn't reported on correctly - and forcing people to write their own code to complete tasks makes you at least stop and think about how the code will cope if the data isn't the *exact* format it should be (spaces in tags, blank lines in the middle of XML, things like that).

    Similarly, the scripts can't fall over if they encounter data they don't know what to do with - errors should be reported and the reports run with the data that *does* exist - we can always re-run that section of the batch run if needs be the following day.

    This is a policy that's existed since long before I got here, and while I'm arguing against it, I can see why it exists. Saying it's all down to ignorance is all well and good, and I agree, it doesn't make a lot of sense, but when you're fighting against years of "this is just the way we do it here", I don't know if progress can ever easily be made. People can, and do, get very set in their ways - even minor changes to policy can come across as a very big thing.

    -- Foxcub
    A friend is someone who can see straight through you, yet still enjoy the view. (Anon)

      Well arm yourself with knowledge (the perlmonks can help, especially if you choose XML::Twig and ask mirod ;D).

      It's easy to fight the PTHBs(pointy haired bosses) if you got the right ammo.

      It is your duty as the developer/programmer, to get that ammo and shoot it up their wazoo, until they give in (see article referenced in Article on how to be a programmer, same sentiment).


      MJD says you can't just make shit up and expect the computer to know what you mean, retardo!
      I run a Win32 PPM repository for perl 5.6x+5.8x. I take requests.
      ** The Third rule of perl club is a statement of fact: pod is sexy.

        It is your duty as the developer/programmer, to get that ammo and shoot it up their wazoo, until they give in

        That's my aim with this post - to gain some ammo and ideas - as well as to gauge public opinion of their policy *smiles*.

        XML::Twig looks interesting - I'll certainly take a look at that.

        Thanks for the comments - they've given me a lot to think about.
        -- Foxcub
        A friend is someone who can see straight through you, yet still enjoy the view. (Anon)

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others studying the Monastery: (7)
As of 2024-03-19 10:15 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found