Slashdot Mirror


Learning and Maintaining a Large Inherited Codebase?

An anonymous reader writes "A couple of times in my career, I've inherited a fairly large (30-40 thousand lines) collection of code. The original authors knew it because they wrote it; I didn't, and I don't. I spend a huge amount of time finding the right place to make a change, far more than I do changing anything. How would you learn such a big hunk of code? And how discouraged should I be that I can't seem to 'get' this code as well as the original developers?"

12 of 532 comments (clear)

  1. It depends on the language by $RANDOMLUSER · · Score: 5, Funny

    If it's Perl or VB, you might want to consider self-immolation as a first step.

    --
    No folly is more costly than the folly of intolerant idealism. - Winston Churchill
    1. Re:It depends on the language by chill · · Score: 5, Funny

      No, he meant that as an actual offering to the Perl God, Quetzal$@[&shift]L. It's a bloodthirsty god, who never sends the Divine Debugger without at least two pints of the red stuff. I would have immolated a coworker, but the parent poster seems to have been alone in the room :-/

      The fact the above comment is +5 Informative and not +5 Funny makes me very glad I stopped programming in Perl when I did.

      --
      Learning HOW to think is more important than learning WHAT to think.
  2. Hunt down the original developer by Anonymous Coward · · Score: 5, Funny

    (And then shoot him.)

    1. Re:Hunt down the original developer by ottothecow · · Score: 5, Funny

      shouldn't that be more like shoot(huntdown(first(developers)))?

      --
      Bottles.
  3. Re:30 to 40 thousand lines isn't large by any meas by istartedi · · Score: 5, Funny

    Very well, sir. Here's your 40,000 lines of Perl from the late 90s. It's mostly regex to parse revisions 30 through 451 of our in-house provisioning system. Oh, and BTW don't screw up like the last guy who had this job. He provisioned 32767 customers with tier-1 service, and it was the director's job to explain why we either had to let them have it for the remainder of the year, or else deal with the CR issues.

    --
    For all intensive purposes, "whom" is no longer a word. That begs the question, "who cares"?
  4. You don't. You find out what the software did by Colin+Smith · · Score: 4, Funny

    And then you re-implement it in the latest language.

     

    --
    Deleted
  5. Re:You are an idiot by binarylarry · · Score: 2, Funny

    yeah, the clown always creeped me out as well.

    --
    Mod me down, my New Earth Global Warmingist friends!
  6. Done that.. by spasm · · Score: 2, Funny

    As someone who recently passed off a pile of code of about that size in poorly written and poorly documented php to someone.. All I can say is I'm very very sorry, and I had *no idea* my personal side project would work better than the original commercial offering and be declared 'mission critical' three months before I left for greener pastures..

  7. Re:30 to 40 thousand lines isn't large by any meas by benjamindees · · Score: 5, Funny

    Perl is like the matrix. At a certain point, after you've stared at it long enough, it all just makes sense.

    --
    "I assumed blithely that there were no elves out there in the darkness"
  8. Re:30 to 40 thousand lines isn't large by any meas by Enleth · · Score: 2, Funny

    Seeing software problems in terms of Flying Spaghetti Monsters? Ah, so that's where the "spaghetti code" term comes from!

    --
    This is Slashdot. Common sense is futile. You will be modded down.
  9. Re:Not lots of code by snowgirl · · Score: 2, Funny

    so like... perl?

    More percisely 30-40,000 lines of code is 29,999-39,999 times more lines than one needs to write shitty code...

    --
    WARNING! This girl exceeds the MAXIMUM SAFE standards established by the FDA for BRATTINESS
  10. Re:Hope your management understands by greg1104 · · Score: 2, Funny

    I inherited some code where the developer used names of girlfriends in variable names, it was just dumb and completely unprofessional.

    I once inherited a coding project where the naming conventions involved anti-depressant, anti-anxiety, and sleeping drugs. Let me tell you, that's a fun preview of how one's future working on the project might turn out.