Please do not attempt to simplify this code
Having spent 25+ years writing, viewing, commenting on and reviewing code in a multitude of languages, this is good stuff to see - regardless of the &#x27;style&#x27; of programming (or the language broadly-speaking).<p>Stepping back and whilst we can all overlook it, good code comments can make an enormous difference in productivity - both for an individual, a team and indeed a business. It aids repository knowledge (something that is easily lost between current and prior teams&#x2F;individuals), which shouldn&#x27;t be mistaken for the intelligence of someone looking at code...<p>I&#x27;ve spent far too much time personally and otherwise attempting to reverse-engineer code written by someone with no comments or explanation. At times, super experienced programmers&#x2F;developers will take performance-enhancing shortcuts that the less-experienced don&#x27;t understand; They&#x27;ll compress routines and functions that are a result of their explicit knowledge of a language and&#x2F;or domain but without explanation...<p>On a basic level, comments should: inform, educate, outline and help others understand the sometimes complex routines and functions that we all create and often under an enormous amount of pressure.<p>There are those that believe good code shouldn&#x27;t need explanation and to <i>some</i> degree that&#x27;s true, but you can&#x27;t apply that brush to every codebase. Code can become complex, awkward, spaghetti-like and almost unfathomable at times.<p>I&#x27;ve always strived to teach less experienced developers to comment well, efficiently and with a little humor&#x2F;humour (where possible); Something that allows us to understand code quickly, appreciate the efforts of those before us and smile&#x2F;grin at the complexity of a challenge.<p>Personally, I don&#x27;t really care about the code&#x2F;comment ratio - It&#x27;s a complete red herring. At times, code comments can be worth more than the code itself. At other times, they just help you get your job done; quickly, efficiently, no fuss, just great code.