About building-block mindset


#1

My style of programming goes something like this:

  1. Identify and analyze a problem
  2. Make some reusable code out of it, a building block
  3. Refine and iterate over time
  4. Integrate and test with other building blocks

This is how I build large pieces of software over time.
The reason this method works is for the same reason mathematics work.
It takes a long time to reach a state where you have something really useful.
However, when you reaches that state, you can make something that looks magical.

I want to build software that appeals to people in the same way that mathematics appeals to mathematicians.

I want to build software that appeals to people in the same way a music instrument appeals to musicians.

It is the kind of software where you start out somewhere and do not know where you will end up.
The creative flow is both something you make and something that guides you, an interaction between human and machine, the soft and rigid, which plays out over time like a rhythm.

When you start out developing a skill, you strive to get the basic, often following an instruction, which can be frustrating and boring. This is why it is important to not aim for too much at a time. Aiming too high and you loose the motivation.

However, there is a trick you can do. Aim at the horizon, toward a goal that is so distant that your mind can not feel it, but instead notices the steps you make toward the goal. When you look at the horizon, you find new strength.

All building blocks have the property that they create new combinations. The number of combinations grows rapidly. Unless building blocks follow a specific pattern, they tend to break out of forms and shapes. They can form many shapes, but also disconnect from it or contrast with another familiar shape. Given a shape, there exists a reducible set of building blocks making up that shape.

There is a deep connection between having fun and being productive. The sense of fun follows from achieving a goal by executing a series of steps. The closer you are to your limits of skill, and the more daring you are, the less do you know about the outcome and where you are heading.

In the building block world, there is rarely global perfection, but often there is something good and useful in it. To go further it is not enough to navigate by some simple rules, but observe and learn from what is out there.

Mathematics is not about knowing some simple rules, but making new ones. There is no single perfect simple rule. If you look for it, you will be disappointed. There are only new rules that you can discover, and your ability to find the useful ones depends on your ability to recognize, process and set new goals.

There are many sets of simple rules that can be used to describe almost everything. This is how they often trick us to believe that they will allow us to do everything. It is easy to forget that you are constrained by physics, by space and time and your own body. There are universal laws that govern how a given technique has advantages and limitations. This is not a choice, not something you can overcome by being smart. You can only discover new things faster by being smart, but not choose how the end result affects your future. Reality is the way it is, it does not ask you for permission to be this way.

A game engine that is made by many people over many years is nearly impossible for a single person to build. You can not set out to build the final thing, finding the optimal trajectory toward the goal. From a starting point, you explore the nearby areas and then choose a direction to go. One the way you pick up something and learn new things. The end result is smarter after many years than a single person can come up within a few hours. Work smarter and you get closer to the goal. There is no ultimate experience, a moment where you finally reaches nirvana, but a lot of smaller rewards on the way.

The building-block mindset is about understanding reality, according to the rules of how reality works. It is not about communicating something fixed and rigid. There is no single rule that makes you smart. You learn slowly, growing into new forms, transforming yourself.

So, when people ask me what the goal of Piston is, I can not given them a satisfying answer with a few words.

I started Piston because I was inspired by Edwin Brady who created the programming language Idris. I realized that the chance of me inventing something like that was next to zero, so if I wanted to do that I would have to go into the unknown. Edwin made a feature to help the programmer through the type system. This made me think of how difficult computers are to people, specially for programmers, and it is not meant to be this way. You need a completely different mindset, one of learning to be a master of computers, or else you will be a controlled puppet of the system that is familiar to you. If you are a slave, you live in frustration without doing anything about it, but if you are a master, you spend years of effort on something because you are slightly annoyed. Masters have much less lower threshold for doing something that to others looks hard or impossible.

I did not know how to make dependently typed language, but I could work on 2D which was missing from Rust, so that is what I did.

It does not matter to me exactly where Piston ends up, but what I know is that there are some directions that looks more promising than others. I have the freedom to pick the direction I would like to go. It is unacceptable for me to be slightly annoyed over something that could be better. I use the best tools I have to make decisions, using mathematics and analysis because that gives more accurate results. I have a deeper understanding of mathematics now, and this is something I use to build further, as process of working over long time.

I am not saying that this is a mindset you should have. There are trade-offs. However, I hope you can understand me a little better after reading this.