There’s an old adage that states the best programmers are lazy. This idea was likely first introduced in the classic article “Why Good Programmers Are Lazy and Dumb” by Philipp Lenssen. In the article, Philipp outlines why a ‘lazy’ (and ‘dumb’) programmer is desirable, specifically:
Lazy [is desirable], because only a lazy programmer will avoid writing monotonous, repetitive code — thus avoiding redundancy, the enemy of software maintenance and flexible refactoring.
Taking this quote to heart, one might think that including a new library in your project is a no-brainer. …
On a recent project I was playing with I had a need for maintaining a list of settings that had an on/off or true/false nature to each list item. Although I ultimately found what I needed buried in a few code snippets on the React Native documentation, it took me considerable effort to find what I was looking for by googling. I figured writing a quick article may be helpful to other programmers with this need as well as a quick reference for my future self.
Need to efficiently and easily track boolean states for a list of properties.