in reply to Re^4: Speeding up RecDesent parser for Perl Code
in thread Speeding up RecDesent parser for Perl Code

How many tests do you have for those 130 subroutines? What's your code coverage look like?

-- Randal L. Schwartz, Perl hacker
Be sure to read my standard disclaimer if this is a reply.

  • Comment on Re^5: Speeding up RecDesent parser for Perl Code

Replies are listed 'Best First'.
Re^6: Speeding up RecDesent parser for Perl Code
by Outaspace (Scribe) on Sep 07, 2006 at 22:31 UTC
    None and dont know the code coverage either. I think the perl modul tests cant be quite transfered to GUI programs, because most of those functions are callbacks from button and other controls and their behaviour depends on the current situation in the application and in some cases I can't test because I simply cant generate the neccesary case without actually pressing a mouse button (for example). Theire are even cases where the user can enter a Perl Regular Expression (or a sort function) that have to be evaled carefully. I know myself that the testing is a necesary process, but I think that automated testing mechanism create a false confidence, cause you never know what the user is going to to.

    Andre
      Ahh, so this is why you refactor. Move your model and controller code out and away from your view code, and you'll be able to test each independently.

      The more you describe your system, the more I wonder how much time I would waste in maintenance coming in after you if you had left. It sounds like a nightmare.

      I got this quote off a mailing list a short time ago. I think it fits:

      it was the sort of code that made grown men cry.

      He saw it and knew then that his life would never be the same. Gone forever were the nights spent with friends in the pursuit of manly activities, replaced with curling under a blanket with a bottle of cheap vodka mourning a more innocent age, an age before his bad code deflowering. As he looked at the code, he resigned himself to the therapy, the drugs, the late-night waking-up-from-nightmares-drenched-in-sweat-and-screaming that lay ahead, and started contemplating the only other avenue open to him now -- an easier, so much easier avenue. If only suicide was not an unforgivable sin in the Catholic church ...

      -- Randal L. Schwartz, Perl hacker
      Be sure to read my standard disclaimer if this is a reply.

        Until now I allready have about 150 additional Perl Modules, not including the XML setup files, GUI Resource files, images, external scripts and templates. Surely I can and will refactor some functions but under 3000 lines is not possible for the main modul (about one third of the file are comments too). Funny thing is, that this "main modul" is only a plugin in a larger application (which is mostly empty by now).

        Andre