Beefy Boxes and Bandwidth Generously Provided by pair Networks
Do you know where your variables are?
 
PerlMonks  

Re: On moving forward and breaking compatibility

by crashtest (Curate)
on Feb 10, 2010 at 21:43 UTC ( #822525=note: print w/ replies, xml ) Need Help??


in reply to On moving forward and breaking compatibility

I think you make some valid points, but I disagree with you on your interpretation of module version numbers. For me, even a "point" release could indicate a change in functionality that might break my script. Those are my expectations. Clearly, yours are quite different.

Considering that my point of view wasn't based on anything but a "feel" for how CPAN modules are released, I decided to consult the Perl documentation.

From perlmodlib:

Take care when changing a released module. Always strive to remain compatible with previous released versions. Otherwise try to add a mechanism to revert to the old behavior if people rely on it. Document incompatible changes.

OK so far. Reading further, from perlmodstyle:

Modules which are "stable" should not break backwards compatibility without at least a long transition phase and a major change in version number.
(emphasis mine)... but also:
Version numbers should indicate at least major and minor releases, and possibly sub-minor releases. A major release is one in which most of the functionality has changed, or in which major new functionality is added. A minor release is one in which a small amount of functionality has been added or changed. Sub-minor version numbers are usually used for changes which do not affect functionality, such as documentation patches.
(Emphasis mine, again).

The way I read the documentation, I don't see any indication that WWW::Mechanize broke any rules of conduct here.

Most of your consternation seems to stem from the strong expectation that going from version 1.34 to 1.49_01 would preserve all functionality. I think that expectation is misguided. Perhaps other Monks disagree. Depending on the needs of a production environment, I would not upgrade modules to new "point" releases without moderate testing. God knows I've seen enough bug-fix releases (in non-CPAN software) that broke perfectly working functionality in other areas.

I like your ideas on preparing and communicating functionality changes. Perhaps your node could be a general-purpose tutorial for module maintenance.

Anyway, those are my $0.02.


Comment on Re: On moving forward and breaking compatibility
Select or Download Code
Re^2: On moving forward and breaking compatibility
by pemungkah (Priest) on Feb 11, 2010 at 01:11 UTC
    I'd argue that "all of my scripts that use Mechanize are now broken" is from the user's POV a very major change.

    Automatically checking the status of calls for errors is a great thing for new programs, but every old program following established good practice for using the module is now broken, and there is no alternative except to either downgrade the module (assuming you have the permissions and resources available to do so) or rewrite code that was already working just fine and they broke it without warning me first ARRGH!

    The WWW::Mechanize change is a "perfect storm" situation: a module that's so good you want to use it any time you need to access something via HTTP, so you do. It ends up in many, many programs. You really depend on it. A change that will make new programs much safer and better goes in, but it breaks old ones. Chaos ensues.

    A change that unconditionally breaks an existing codebase with no workaround is never minor. You should make a choice to do this only when there is no other possible alternative - a security problem, a major bug. This change was introduced because it was a "good idea" and "better coding practice". Yes, it absolutely is a good idea, and this is good coding practice. It should definitely have gone in.

    But it is bad maintenance practice.

      But it is bad maintenance practice.

      Upgrading to a new dependency without testing code with the new dependency is a worse maintenance practice.

        Upgrading to a new dependency without testing code with the new dependency is a worse maintenance practice.
        Agreed, but.

        Running into trees is bad driving practice, so we put seatbelts and crumple zones and roll cages in cars (or do safety recalls) instead of putting a small sticker inside the glovebox that says "PLEASE DO NOT RUN INTO TREES AS YOU WILL GET HURT", or "CAR WILL ACCELERATE UNCONTROLLABLY IF FLOORMATS ARE LOOSE".

        I think it's reasonable and responsible to consider the possibility of, and avoid, potentially dangerous situations, not blame the person in trouble: anti-lock brakes instead of blame-the-driver systems. Designing anti-lock brakes took time and effort, and most of the time they're unnecessary. But if they are, they make a big difference.

        So I personally feel like I'm responsible for making this kind of difference when I can. Yes, programmers are supposed to be smart. But they are also sometimes tired, in a hurry, or a little careless - and sometimes, for whatever reason, they're not smart either. I think it's good practice to do a little extra myself so that if something dumb does happen, the damage is minimized, or even prevented.

        Upgrading to a new dependency without testing code with the new dependency is a worse maintenance practice.
        Agreed, but. To talk about "safety belts" from a different perspective:

        Running into trees is bad driving practice, so manufacturers (after being forced to do so, interestingly enough) put seatbelts and crumple zones and roll cages in cars (or do safety recalls) instead of putting a small sticker inside the glovebox that says "PLEASE DO NOT RUN INTO TREES AS YOU WILL GET HURT", or "CAR WILL ACCELERATE UNCONTROLLABLY IF FLOORMATS ARE LOOSE" and saying "okay, job done". We buy the car and have to get used to how all the safety stuff works.

        We do not, however, expect the car to end up with antilock brakes because we took it in for an oil change! If there was a service bulletin or a recall that required something like this, sure, we'd want it. But we'd be pretty upset if someone hadn't very carefully explained that the car was going to drive differently - because not making sure of this could cause an accident, and the driver would probably feel that the service folks had not done their job if there was one.

        Back to software: I think it's reasonable and responsible to consider the possibility of, and avoid, potentially dangerous situations, not blame the person in trouble. Designing anti-lock brakes took time and effort, and most of the time they're unnecessary. But if they are, they make a big difference.

        Yes, programmers are supposed to be smart. But they are also sometimes tired, in a hurry, or a little careless - and sometimes, for whatever reason, they're not smart either. I think it's good practice to do a little extra myself so that if something dumb does happen, the damage is minimized, or even prevented.

        I feel like I'm responsible for making this kind of difference when I can.

Log In?
Username:
Password:

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

How do I use this? | Other CB clients
Other Users?
Others surveying the Monastery: (5)
As of 2014-07-13 21:26 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    When choosing user names for websites, I prefer to use:








    Results (252 votes), past polls