What Is Good Code?

Programmers are artisans—not scientists. Our code must work, yet good code is not only tested and functional; it is a pleasure to read. Good code is that which others can learn from and enjoy the most. It is beautiful. It oozes the care that went into each line, leaving only those with unassailable purpose. Good code is whole; lines cannot be removed without compromising one of any good program's essential qualities: functionality, readability, elegance.

Good code is as often ingenious as it appears to be obvious. Its elegance masks the programmer's labor, like a ballerina twirling on stage. Good code frequently makes comments unnecessary, yet they conveniently appear in complex passages to assist the reader. Good code reflects a programmer's agility in cycling between the macro and micro views of his code; better programmers are both astronomers and particle physicists. They are also artists.

Good code is equally usable by other coders and by users of the program. It is always the work of an optimist because it represents an investment for the future, a proud bet the coder's effort is worth it because his code will last. If it does, it will shine as good code does when it must be revisited by its author or someone else.

Like wine, good code sits in silence during its making. Aging code allows us to shape missing elements and recognize superfluous bits. Code reveals the intimate nature of its maker. It brings to light an author's thought processes and how he expresses them. Only good humans can write good code, people who care for their work, and for those who will use its result.

This is the code we used to create this chart:
codeGOODTechnical Indicatorspinecoders

Tools and ideas for all Pine coders: pinecoders.com
Our Pine FAQ & Code: pinecoders.com/faq_and_code/
Pine news broadcasts: t.me/PineCodersSquawkBox or twitter.com/PineCoders
Also on:

Disclaimer