3 ms·
You left out the explanation of Knuth: "To me, "re-editable code" is much, much better than an untouchable black box or toolkit." This is how I understand it
by mironathetin 19y ago
You left out the explanation of Knuth:
"To me, "re-editable code" is
much, much better than an untouchable black box or toolkit."
This is how I understand it (and how I use it): I always try to improve and write my code more elegant and more adapted to the problem I want to solve. Old code is always the basics that I copy and edit to make it fit into a new and improved environment.
Generic pieces of a library that have been used in many places cannot be modified without very expensive investigation of the consequences on existing code. These investigations are not only boring and time consuming. If they exist (always!) you just limit yourself. Thats because you have to solve your problem AND keep in mind not to harm existing code. This is not what writing software should be about.
Patterns like the decorator may be a way out sometimes. But if used too extensive the resulting code will be too ugly for my taste.