Want to read Slashdot from your mobile device? Point it at m.slashdot.org and keep reading!


Forgot your password?
Trust the World's Fastest VPN with Your Internet Security & Freedom - A Lifetime Subscription of PureVPN at 88% off. Also, Slashdot's Facebook page has a chat bot now. Message it for stories and more. ×

Journal npsimons's Journal: Re-usable vs Re-editable 1

Given the recent controversy over Prof. Knuth's comments, I'm left pondering one (of many) questions: why can't code be both re-usable and re-editable? (no, I haven't read the article)

Are re-usable and re-editable code fundamentally opposed? Would it just take too much time (or genius) to make code both re-usable and re-editable? Or is Knuth just calling designing for re-usability a waste of time like unit tests?

To me, the re-usableness and re-editableness of code seem orthogonal. You can write code that is re-usable but completely un-editable (it's usually unreadable at that point). If you're writing code properly, it seems to me that re-editable is a given. Re-usable is more difficult to do, but it seems like a good idea, and a best practice that most programmers should try to get into the habit of (just like writing re-editable code).

Maybe I'm just missing something here, but I always aim to make my code re-editable and re-usable, and one doesn't seem to get in the way of the other, other than competing for my time. Thoughts?

This discussion has been archived. No new comments can be posted.

Re-usable vs Re-editable

Comments Filter:

UNIX is hot. It's more than hot. It's steaming. It's quicksilver lightning with a laserbeam kicker. -- Michael Jay Tucker