Quote:
Originally Posted by EFFx
What makes you say that? Why would I write a large code to do something easy, if I can use a smaller one which is faster and easy to understand, but with the same end goal?
|
The length of code has no direct correlation to being "easy to edit, fix or read". You can easily make "short" code that is hard to read, fix, and edit.
Similarly, the length of code, generally, has no direct correlation to any performance metric (execution speed or memory). Also similarly, you can make "short" code that is inefficient.
I made the reply to your post because many new coders get it in their head that "shorter code is better" when they need to, instead, be thinking about how to write coded that is efficient and easy to read/edit.
__________________