|
|
|
|
|
by textmode
3562 days ago
|
|
With the exception of shell scripting which I'm writing every day, I remove "code" more than I write it. C is the language I deal with. The easier it is to remove code from someone else's program, the "cleaner" the code. That's my definition of "clean code". For example, I just had to edit the code for a text-only browser to remove a few "features". For example, the author recently decided it would be a good idea to non-interactively access no-content refs in a page such as "prefetch" and other garbage. |
|
But then, contrary to intuition, a program becomes less clean by actually removing code (since now there is less code to remove, hence it is more difficult to remove code). A minimal (in the sense that no more code can be removed) program would be maximally unclean, whereas, intuitively, should it not be considered clean?
Also, adding code always makes a program cleaner, since the newly added code can always be removed easily.