Justin du Coeur (jducoeur) wrote,
Justin du Coeur

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

  • the dogs

    We of course ate out throughout our stay in Edinburgh, mostly at local restaurants in the residential part of town. (Part of the motivation for…

  • Vacation: Motel 1

    [And now for the promised assorted notes from me] Our hotel in Edinburgh was something I haven't encountered in the US: inexpensive without feeling…

  • Oh, right -- we took this vacation

    Kate and I spent the beginning of the month in the UK, visiting first her northern relatives and then our friends pir and Miko. Here are Kate's…

  • Post a new comment


    Anonymous comments are disabled in this journal

    default userpic

    Your reply will be screened

    Your IP address will be recorded 

  • 1 comment