Ivan Reese
Ivan Reese
Kartik Agaram
Ivan Reese
shalabh
02/03/2020, 5:57 PMJustin Blank
02/03/2020, 5:58 PMKartik Agaram
Justin Blank
02/03/2020, 6:01 PMJustin Blank
02/03/2020, 6:02 PMmk
02/03/2020, 6:14 PMJared Windover
02/03/2020, 6:24 PMmove-back
commands). So we introduce a home button. It fully and minimally captures the action I was trying to take. We have made the keyboard more complex, and every layer of software in between that needs to care about this keycode, but is that complexity really incidental? It is perfectly and minimally in service of a real™️ problem.Justin Blank
02/03/2020, 6:28 PMshalabh
02/03/2020, 6:36 PMwe can then start to analyze things like that fact that I want to "simplify my life". On its own, the statement is meaningless because we do not know in regards to which aspect in my life I would like to make easier. If I buy more appliances, to reduce my working time -- say a food processor, for example -- I save time in chopping. But it comes at the expense of having to buy the machine, washing it afterward, and occasionally performing some type of maintenance to keep it in working order.
ibdknox
02/03/2020, 6:46 PMibdknox
02/03/2020, 6:49 PMibdknox
02/03/2020, 6:50 PMibdknox
02/03/2020, 6:54 PMIvan Reese
ibdknox
02/03/2020, 7:00 PMshalabh
02/03/2020, 7:04 PMobjectively better, but feels badSometimes I prefer to drive on town streets that are always moving instead of the freeway which has a single strech of very slow congestion. The freeway might actually be faster overall, but its more painful.
Stefan
02/03/2020, 7:18 PMKartik Agaram
Kartik Agaram
Justin Blank
02/03/2020, 8:13 PMKartik Agaram
Justin Blank
02/03/2020, 8:22 PMJared Windover
02/03/2020, 8:24 PMIvan Reese
Hammers can hit nails. That's their very purpose. But they can also hit screws, which is a great way to make a screw stay put while you reach for the screwdriver. They can also dent and deform sheet metal, which is useful for crafting a steel drum. They can knock loose a stuck fitting or lid, especially when hitting the free end of a long wrench on a stuck nut. They can punch a hole in drywall, making it easier to tear down. They can also smash your hand.
Hammers are tools for working with nails. This is a conceptual constraint placed on hammers by their designers. Hammers are designed with this specific intent in mind. But sometimes, hammers are just tools for amplifying the force of your arm. Sometimes, hammers are but tools for surviving a forceful impact.The [unfinished] draft, if you're interested: https://ivanish.ca/mental-models/
Ivan Reese
Justin Blank
02/03/2020, 8:33 PMIvan Reese
Kartik Agaram
Justin Blank
02/03/2020, 8:43 PMBenoît Fleury
02/03/2020, 9:09 PMBenoît Fleury
02/03/2020, 9:17 PMIvan Reese
abstractions of the geocentric model are easier than the heliocentric onesI don't follow. Would you mind explaining that point a bit more? Do you mean that we developed the geocentric model first, and thus it was "easier" to discover than the later, more elusive heliocentric one?
Benoît Fleury
02/03/2020, 9:59 PMBenoît Fleury
02/03/2020, 10:00 PMDoug Moen
02/04/2020, 1:14 AMIvan Reese
Kartik Agaram
Kartik Agaram
Kartik Agaram
Every time you introduce a new idea that needs to be understood — whether it's functions, function composition, currying, partial application, ...These seem like accidental complexity for a music-creation app, but essential complexity for a programming language.
...the existence of one particular function in your codebase, the history of that function and previous issues it had that are now avoided by doing things in a slightly surprising way, the syntax for the documentation explaining that change, the fact that the change was made to bring the resulting program closer in line with the end user expectations for what this program does — you add an additional complexity that you, the programmer, need to deal with to work on this program...These seem like accidental complexity for the users of a program, but potentially essential complexity for someone working with it given our current context (the world already exists, the codebase already exists in the world, etc.) So the context seems crucial here. What is the system under consideration, who is the target audience, all this affects where the line is. The further to one extreme you draw the line, the less useful the distinction becomes.
Kartik Agaram
shalabh
02/04/2020, 6:40 PMf=ma
is a message that requires us to become the medium first and then absorb its meaning).
What is the end goal in this endeavor? We're trying to predict something perhaps, or design something for a purpose - these are our goals, our vision of the purpose.
Now a twist: how do we represent our purpose? The purpose is just another medium. When I put pen to paper, I'm using the physical medium to affect the written medium. Is pen and paper incidental? Yes, ideally I'd just think the words and they'd appear on paper. But follow that chain - why am I creating the written words anyway - maybe I'm distributing an idea across. So writing is just incidental - the greater purpose is distributing the idea. Indeed I could make a video instead. (So why spread an idea.. the chain keeps growing) So what's incidental depends entirely on where we 'cut off' our context.
I think what Ivan is saying is that there are multiple alternative paths of medium/message stacks to get to our goals. All of these are 'incidental complexity'. The simplest solution is having the button with 'my goal' on it, that I push. (Well technically that still has incidental complexity because you'd have to grasp the medium of buttons - push, cause, effect etc.) But anything else on this path from the vision of purpose to purpose fulfillment is incidental.
I've taken the position that 'programs' are a red herring. I think it's based on the fundamental position that all these abstractions, ideas, mediums and messages of thought are incidental and we can choose different ones.Benoît Fleury
02/04/2020, 7:39 PMJared Windover
02/04/2020, 8:18 PM“How many different ideas do you need to know in order to understand what a program does?” If that was a good description of complexity then we would all be programming with turing machines.I don’t think that’s true. I don’t think a human could be presented with a complex program expressed as a turing machine and understand what it does without developing, either internally or externally, abstractions over those operations. I think it may still be a useful description of complexity if we take into account that limited humans are the ones doing the understanding.
Benoît Fleury
02/04/2020, 8:26 PMshalabh
02/04/2020, 8:58 PM"How many different ideas do you need to know in order to understand what a program does?" If that was a good description of complexity then we would all be programming with turing machines.But programming with Turing machines is complicated and programming with programming languages is easier? So maybe there is a cost/benefit aspect to each new idea? Each abstraction/concept has a cost and a benefit. The deeper question is this: is there any concept that is fundamentally essential to the problem being solved? E.g. are pure functions fundamentally essential and stateful objects fundamentally unessential to programming the game of Pong? My interpretation of Ivan's position is that it's all incidental complexity - and computing is a game of choose your poison.
Benoît Fleury
02/04/2020, 9:27 PMBenoît Fleury
02/04/2020, 9:41 PMIvan Reese
"How many different ideas do you need to know in order to understand what a program does?" If that was a good description of complexity then we would all be programming with turing machines. You have very few ideas in a turing machine and they're very easy to understand.I'm not advocating that we should be minimizing the number of different ideas. I'm just trying to establish that the number of ideas is how you measure complexity. Take that together with my overall assertion that complexity isn't evil, and you'll see that I don't think we should be programming with Turing machines. I think we should have richer, more complex programming machinery than we have today. --- You win — surpassing Out of the Tar Pit — when you recognize that inessential complexity is not binary. It's not even scalar. There are different flavors of incidental complexity. What kind of incidental complexity you want, or don't want, depends on a lot of factors. It depends on the essential complexity of the problem you're solving. It depends on what ideas you and the people around you know and can work with. @shalabh’s comment that starts "Trying to wrap my head around the different perspectives" absolutely nails it. This is not just about software engineering. This is about epistemology.
Jared Windover
02/04/2020, 10:12 PMIvan Reese
Now a twist: how do we represent our purpose? The purpose is just another medium. When I put pen to paper, I'm using the physical medium to affect the written medium. Is pen and paper incidental? Yes, ideally I'd just think the words and they'd appear on paper. But follow that chain - why am I creating the written words anyway - maybe I'm distributing an idea across. So writing is just incidental - the greater purpose is distributing the idea. Indeed I could make a video instead. (So why spread an idea.. the chain keeps growing) So what's incidental depends entirely on where we 'cut off' our context.and
computing is a game of choose your poison.So, I have 2 beefs with the Tar Pit. 1) "Incidental / accidental complexity is bad and should be reduced to the absolute minimum" — this breaks down as soon as you ask questions like, "Is my type system essential or incidental?" 2) "Essential complexity is that which remains when you strip a problem to its most minimal essence" — this breaks down when the above breaks down, because as you approach the most minimal essence of a problem, stripping away complexity after complexity, it's going to look wildly different depending on who does the stripping — and you won't reach truly the most minimal essence until you've reduced the problem to total black nonexistent nothingness.
Benoît Fleury
02/04/2020, 10:53 PMIvan Reese
Benoît Fleury
02/04/2020, 11:25 PMIvan Reese
shalabh
02/05/2020, 1:32 AMIt doesn't make sense to me to talk about complexity for things that help you solve your problemI think it's that any solution also brings its own complexity.
shalabh
02/05/2020, 1:33 AMThere are two widely-used approaches to understanding systems (or components of systems):
Testing: This is attempting to understand a system from the outside — as a “black box”. ...
Informal Reasoning: This is attempting to understand the system by examining it from the inside....
Of the two informal reasoning is the most important by far.So reading the code and testing is it? For a while I've thought 'reading code' isn't really going to scale. How about "querying the system"? Can I say "given these kinds of conditions show me how _these kinds of outcomes arise_"? Of course we can't ask this of a program, but if you consider a whole programming system, it may have an abstract evaluator that can try and figure this from the model (whether it's code or something else). It would then give you 'abstract execution traces' showing the internals of the system. But doing this means you have to first design the system and model with this use case in mind and not presume a workflow of programming exists.
Ivan Reese
Stefan
02/05/2020, 10:32 AMshalabh
02/05/2020, 5:41 PMIs it not the case that property-based testing gives you that same information?There's an overlap but not quite. I mean specifically abstract interpretation (property testing does actual execution with a large number of inputs). For example, if you have a chunk of untyped Python code you can informally reason about the types of values flowing around by reading and simulating in your head. An abstract interpreter (pytype) will actually evaluate the code in terms of types (not values) and can show you the predicted types of various parameters and locals. It can get much further than mental simulation, because it can evaluate much larger chunks of the code. Technically this might belong in formal reasoning, which the paper mentions in the following paragraph:
The bottom line is that allways of attempting to understand a system have their limitations (and this includes both informal reasoning— which is limited in scope, imprecise and hence prone to error — as well as formal reasoning— which is dependent upon the accuracy of a specification)I think the abstract interpretation approach could be extended so you "feed in scenarios", e.g. the user says "what if the local
a
here is an integer between 0 and 1000 and b
is an empty list" and the system does abstract interpretation (specifically one execution and not 1000 different executions) to find other properties of an execution under that scenario - dead code, exceptions, and notes "`c` will be a+20
" etc.
A more apt name for this kind of approach might be computer aided reasoning - we're not reading static code on paper and we're not writing complex types and have the system prove something, but we're simply asking targeted questions. I'd love to ask the system "show me why this dependency is invoked when this kind of request arrives" and then follow up by zooming into a part of the abstract execution trace. A related idea is "program slicing" - point to a value and have the computer tell you the subpart (slice) of the program that affects that variable. I think these are all good ideas to make state trackable, a different angle than going state-free and aiding informal reasoning.
Even with the most 'readable' code, I'll note that reading doesn't scale very far - how much can you read in a day anyway? We might climb out of a small tar pit only to fall into a larger one. But targeted questions in a query language might be able to handle very large programs and even large systems with multiple programs! They'd have to be built using a model that is designed for something like this and scales up.shalabh
02/05/2020, 5:49 PM