Get the latest tech news
Meta-analysis of three different notions of software complexity
Discussion on notions of software complexity as defined by Rich Hickey, John Ousterhout and Zach Tellman.
ComplexityComplectsSimpler alternativeState, objectsEverything that touches itValuesObjectsState, identity, valueValuesMethodsFunction and state, namespacesFunctions, namespacesVariablesValue, timeManaged refsInheritanceTypesPolymorphism a la carteSwitch/matchingMultiple who/what pairsPolymorphism a la carteSyntaxMeaning, orderDataImperative loops, foldwhat/howSet functionsActorswhat/whoQueuesVariablesValue, timeValuesORMOMGDeclarative data manipulationConditionalsWhy, rest of programRulesAs one example, Hickey points out that “having state in your program is never simple” and “The only time you can really get rid of it, is it you present a functional interface on the outside, a true functional interface, same input, same output.” In that situation, factoring out the background color into a central location (e.g. by referencing a CSS variable) amounts to replacing a “nonobvious and difficult-to-manage dependency with a simpler and more obvious one.” In contrast, Tellman’s definition of coupling offers a clear answer in the form of a question: how often are you finding yourself trying to explain disparate parts of the system – potentially running on different machines – at the same time?
Or read this on Hacker News