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

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.

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

Replies are listed 'Best First'.
Re^8: Speeding up RecDesent parser for Perl Code
by Outaspace (Scribe) on Sep 07, 2006 at 23:30 UTC
    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
      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).

      3000 lines with no duplication? 3000 lines with no multiple responsibilities? I have to admit that I find this hard to believe. Main modules tend to be the smallest, rather than the largest bits of functionality in my experience - small wrappers around a bunch of objects/libraries that do the real work. Not being able to get something under 3000 lines smells of a design problem to me.

        Yepp and it is small in comparison to the total size of the application (something between 100.000 and 150.000 lines, I guess).

        But I dont think that the quality of an design depend on the number of lines in a modul.

        Maybe this would be a nice poll: "What is a good design?" :-). It is one of those questions, that you can argue month about.
        For me 3000 lines are easy to maintain, but then this is only my opinion and everybody has its own.

        Humble blessings,

        Andre