Problem solving
Problem vs exercise
If you have a problem and take away the information that is used to formulate the problem, it becomes an exercise. In the real world success depends on the ability to use the information required to formulate the problem. In schools, children are taught how to solve exercises that are given to them--or worse, they are taught to solve exercises in the way the teacher expects them to, killing all the creativity they have. But in the real world you have to take the problem and formulate it in a way so taht you can do something about it. Problem vs Puzzle example: statistician friend Problem vs Puzzle example: daughter
The word "problem" should not have adjectives in front of it
One way to take away information that could be useful to solve a problem is by putting an adjective in front of it and calling it a marketing problem, engineering problem, architectural problem, economic problem, moral problem, frontend problem, backend problem. Those adjective tell you nothing about the problem, just the persons point of view who is looking at it. A problem is just a problem, and in order to solve it, you have to look at it from a wide variety of perspectives, and find the most effective one. We don't want handicaps when solving problems. In order to solve problems we have to look at it from different points of view.
- barometer and building height example
- frozen fish example
- urban ghetto example
- filing cabinet illustration Here is a great quote from Prof. Ackoff:
- Absolution: ignore the problem, and hope that it will go away, solve itself.
- Resolution: appears in different ways
- usually a modification of a solution to a different similar problem you had, that gets a result which is better than doing nothing (satisficing).
- find a source of blame, and remove it.
- continually fighting fires, but not tracking them to their source.
- this is how most problem solving is done in the world.
- Solution: do something that yields the best possible outcome, or approximates it as closely as possible, use scientific research, experimentation, quantitative analysis, and optimizing techniques
- Dissolution: redesign the system that has the problem or its environment so as to eliminate the problem.
- Dissolution may incorporate all the other ways of solving a problem.
Nature does not come to us in disciplinary form. Phenomena are not physical, chemical, biological, and so on. The disciplines are the ways we study phenomena; they emerge from points of view, not from what is viewed. Hence the disciplinary nature of science is a filing system of knowledge. Its organization is not to be confused with the organization of nature itself...In brief, the need to assemble knowledge of our world into one cohesive view derives from the necessity to take it apart in order to penetrate it in depth -- Russell Ackoff: On Purposeful Systems
Four ways to solve problems
Champion paper example
Russel Ackoff example of helping champion paper company The video above is an example of how Prof. Ackoff solved a problem for a paper company, from here on I will reference the story from the video, to illustrate Solution, and Dissolution. Prof. Ackoff was hired by the plant director to solve the problem with the symptom of decreased productivity in the plant. Since he was a known pioneer of operations research at the time, the director asked him to solve it with optimized scheduling. This is the analytical approach to problem solving: Solution. However what Prof. Ackoff eventually did, is solve it with Dissolution, by going up into the containing system (the whole company) understanding that the increased product variety was the actual cause, and find a way to reduce it, by restructuring the compensation of salespeople. He changed the embedding system in a way that the problem dissolved Some important notes:
- the effective solution was not found in the same place as the symptom
- the systemic solution made the whole system better, not just the plant
- he made a part of the system worse, (more complicated compensation for salespeople), but made the whole system a lot better (increased profits for the company, increased productivity, for the plant)
- the systemic solution increased productivity by a larger margin, then the analytic solution would have increased it, even with perfect forecast
Databases example
Most RDBMS espouse ACID guarantees. (I say espouse, because they don't usually deliver on that primise)
- Atomicity
- Consistency
- Isolation
- Durability For what I want to talk about I will mainly focus on transaction Isolation. Isolation is usually split into four (or more depending on the database) levels where the highest level basically means that multiple concurrent transactions will not step on each others toes, the lower the level, the more they can mess with your data consistency when under high load, also the higher the level, the higher the chance it can deadlock, and the less performant. These are the levels:
- read uncommitted
- read committed
- repeatable reads
- serializable The important one, serializable is what users of a database actually want, the other 3 exist because database vendors can't make serializable work with good performance, so they usually default to something less strict.
- Postgres defaults to Read Committed
- Mysql defaults to Repeatable Read Oh by the way, they also fail jepsen tests:
- Mysql
- "Using our transaction consistency checker Elle, we show that MySQL Repeatable Read also violates internal consistency."
- "we show that AWS RDS MySQL clusters routinely violate Serializability."
- Postgres
- "We evaluated PostgreSQL using Jepsen’s new transactional isolation checker Elle, and found that transactions executed with serializable isolation on a single PostgreSQL instance were not, in fact, serializable."
So it seems that we are torn between Scylla and Charybdis
- keep the database consistent (or not really, as jepsen showed), suffer low performance and chance of deadlock
- or take a chance on inconsistent database, for higher performance. It turns out that this performance vs consistency dichotomy is a false one and you can have your cake and eat it too. That is what the Datomic team did, how did they do it? The important part for this example is that they modified the interface to the database in such a way that it makes ACI from ACID really simple. With SQL, traditional RMDBS have to juggle all the concurrent transactions, and concurrent programming is just hard. Datomic only has one isolation level, a fifth one above serializable: serialized. Transactions in Datomic don't have to be serializable because the are already serialized. They are just one data packet and only require one request, independent of the dependencies in the data. This way:
- Atomicity is designed into the system, there is no need for rollbacks because there is nothing to roll back.
- Isolation is serialized, because a transaction is one service packet.
- It is performant, because the database does not have to juggle in memory multiple concurrent transactions, it just validates them one at a time.
Most of the problems and complexity that exist in traditional DBMSs was designed out of Datomic.