This story is unavailable.

What does “writing less code” mean?

After having read “Write less code” https://t.co/Afkr1TmHGF by Mike Grouchy, I immediately became aware of the dangers of such piece of advice, especially for those who are new to programming.

You don’t have to be overly cynical to interpret “Write less code” as “Make the amount of code you write smaller”; and this is exactly the problem many inexperienced new programmers think is a blessing: Those who think fewer variables is doubtlessly better; those who think all can be done in one loop; those who are presented code patterns and think “Why not just use a switch statement?”

Truth is, if you tell car designers “use fewer bolts”, you are gonna end up with a lot of parts welded together, and It will be very hard to replace and fix them when they break.

Actually, many coding patterns are based on writing “more” code to solve the problem, in order to ensure flexibility and some degree of extensibility foreseeably needed.

I can foresee a potential “that was not what I(or he) meant”. Do I get the true intent and meaning of “Write less code” ? Yes, I do. It goes along the lines of KISS, don’t fix it if It ain’t broken, and other true herustic strategies that have informally become principles. I just thought I had to point out that software development has benefited from “writing more code” and will continue to benefit from it when it is appropriate. I also had to point out the potential for disaster that exists in the minds of new programmers that actually use the ‘Write less code” phylosohy to end up with big balls of mudd that they are very proud of at the end (I was one of those once). Such potential for disaster is removed with experience and understanding the how’s and why’s of code. The last thing we want to do with that potential is to reinforce it.

One clap, two clap, three clap, forty?

By clapping more or less, you can signal to us which stories really stand out.