For example, it's nice to measure McCabe cyclomatic complexity, and it generally rings true, but if you can't be bothered - just look at LOC and you'll get pretty close
Although I think "dependency" is an overloaded term. There are dependencies as in libraries or shared code, and then there are "dependencies" which are like assumptions about other parts of the system. Hickey also mentions this when he talks about interfaces. If you break a class into two classes, but they both make assumptions about the other, in effect they are still the same class.
Perhaps another way to think about complexity is the number of assumptions baked into a system?
On the flip side, a counter-example comes to mind: automatic imports ("autoloading") in some languages, which makes things apparently simple but gets gnarly when things break unexpectedly. It makes a lot of assumptions about your intention, which is simpler when it works the way you expect. I'd prefer explicit imports every time, even if it's verbose (some might call "complex") because it makes no assumptions - every import is visible so it's actually simpler to understand.
This whole post is a discussion of philosophy. There are three different ways you can think about software:
- philosophy
- science
- function
The philosophy of software involves people trying to understand what software is. Humans have a desire for knowledge and understanding, and like to explain things they come into contact with and think about. A lot of the time there's no "objective" philosophical explanation, try as we might to find one. Despite that, many explanations in this realm end up being useful.The science of software is computer science, which is more about math than anything else. This is the only place you're gonna find objectivity or consensus, because you can't really argue with a number. Discussions around CS are less poetic and more boring, and require a lot more knowledge, so you won't typically find these on HN.
The function of software is the day-to-day practice of writing and using software. This is the grunt work, the meat and potatoes. No need for philosophy or science. Just put the legos together and kick the tires. This is 99% of what 99% of software developers deal with. Most people don't think about the science or philosophy of the coffee they're ordering or the bike they're riding; they're just ordering it, riding it.
For a different scenario, imagine you operate a large distributed system and have been paged at 3 am because there is a problem. Besides taking steps to contain the fallout, you want to quickly locate the error and take steps to prevent this stuff from ever happening again.
Unlike a hiring decision, you want to propose measures such that a large number of people get to agree that the state of affairs will improve. It is a truism that we don't want software to fail, so considering expectations may not necessarily help here, and rationality would suggest to strive to achieve an "objective" improvement - and one that does not make the system harder to understand or invite new, different failures.
So all in all, I enjoyed this advocacy of Tellman's perspective, but it does not always seem appropriate to apply it and more meta than the others.
Ironic!
perrygeo•21h ago
Contrast that with Hickey's notion of simplicity as an objective count of interleaved concerns or "folds". The quibble with this is, how do you delineate the concerns? Depending on your style and knowledge of the system, you'll get a different number. So it's hard to call it objective.
Tellman's definition is nice because it acknowledges the subjectivity, and puts it front and center. IOW the "style and knowledge of the system" form a mental model of the software system. What's important is not the cardinality, OR the interleaving. It's the ability for that model to make good predictions about the software's behavior. Accurate model held in the minds of humans that operate it == simple software.
motorest•7h ago
chii•7h ago
The tellman's version is for the end user - simplicity of use, by the user, with their existing expectation, culture and pre-knowledge. It's basically describing skeuomorphism in software (but not limited to just UI). It might be enormously complicated to create for the engineer, while it remains simple for the end-user.
prospero•1h ago
wtetzner•53m ago
Hickey's approach is relevant in how the software is constructed, and Tellman's is relevant to the user experience. Both approaches are useful for a single application.