Justin du Coeur (jducoeur) wrote,
Justin du Coeur
jducoeur

Paring is difficult

Another of those disciplines of programming. It's hard for a good programmer to not write unnecessary code -- the temptation to gold-plate, and add extra functionality for completeness' sake, is very strong.

What's even harder is *removing* unnecessary code. Sometimes, you've built up a system that is complete, but you've found that you're no longer using all that functionality. It's painful, but the right thing to do is often to delete the no-longer-exercised code. Not only does it present danger (if it's not being tested enough, it may introduce bugs), but it can make refactoring harder in the long run. So it is often easier and better to re-create it later when and if it ever becomes relevant again, rather than keep it on the books without a clear use case.

(Yes, I'm doing exactly this right now. Some of the mechanisms from the old Facebook UI just aren't being used in the new UI, and should probably be restructured if they ever do come back. So the low-level support for them should be snipped...)
Tags: commyou, programming
Subscribe
  • Post a new comment

    Error

    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 1 comment