3 ms·
This is a very good indicator of smart coders indeed, people that don't love to code and are not interested in the beautiful of the code itself will reply "but
by antirez 19y ago
This is a very good indicator of smart coders indeed, people that don't love to code and are not interested in the beautiful of the code itself will reply "but it already works well, why do you like to modify existing working code?".
Of course the reason is that you can make it 1/2 the lines of code (or even better, sometimes it happened to me to reduce a 30 lines existing code function to 4 lines of code), more modular, trivial to understand even after 6 months and more beautiful.
- huherto 19y agoYou are right. There is an aesthetic beauty in code. Even in complex problems it should be clear and simple. I wish more people could appreciate this. Many times they don't see it, (because it doesn't give any problems) or they they see the finished product and think it was an easy problem. They do not know how hard was to find the simple and clear solution.
- wallflower 19y ago"Chapter 1 introduces some of the basic tenets of the book, namely that code is literature and should be read as such. All too often people only read code when they have a specific problem to solve or want to get an example of an API. Instead, if you read code frequently you'll always be learning things and improving your skills. Also, Spinellis discusses the lifecycle of code (including its genesis, maintenance, and reuse), which simply must be taken into account if code is to be good. Poorly skilled developers forget these things and just slap it together, never thinking ahead." From a review of "Code Reading: The Open Source Perspective" http://books.slashdot.org/article.pl?sid=05/03/02/1951204 http://books.slashdot.org/article.pl?sid=05/03/02/1951204 I was reading this book in the bookstore the other day (too expensive to buy). See also: "Beautiful Code: Leading Programmers Explain How They Think"
- timr 19y agoAnother reason to reduce lines of code: every line you write is another chance for a bug (this is the argument that I tend to use to convince people who don't believe in beauty).