Sitting here looking at the shit spaghetti I wrote yesterday (that works) and wondering if it'd be easier to add more spaghetti for the feature I need to add or "do the right thing" and fix 1800 lines before I move on...

  • 8
    Did first. Did regret it. Do the right thing, it will help in the long run and most of the time even saves performance!
  • 3
    I habdle spaghetti code like I handle my real spaghetti: cut it up in nice, small pieces that are effortlessly processed hehe
  • 0
    It really depends if you give a fuck or not.

    I give a fuck and try to refactor bolognese when i see it, others from the team are just patching up with more bolognese.

    I am being their janitor and cleaning up their shit on a regular basis. Do your team mates just patch it up with more spaghetti or do they care? Do you want to be the janitor?

    Its up to you!
  • 1
    Get an IDE that supports extract method. Create classes which hold methods that belong together. Ideally only have one public method. And so writing crap like that.
  • 3
    Update, 24 hours later...

    Code is clean, extensible, well commented and beautiful.

    I can now start the 45 minutes of billable time for the next feature.
Add Comment